当前位置:网站首页>Hackmyvm target series (4) -vulny
Hackmyvm target series (4) -vulny
2022-07-06 13:57:00 【The moon should know my meaning】
One 、 information gathering
The old , Let's start with a wave of network segment scanning , Discover the host
nmap -sP 192.168.200.0/24 | grep -i -B 2 virtualbox
Use nmap Scan port , Two ports were found , One 80 port , One 33060( I don't know what it is , No matter it first )
nmap -sC -sV 192.168.200.153 -p-
Visit the home page , However, no useful information was found .
The old , Let's start with a wave of directory scanning , See if you can find any useful information .
Use gobuster Scan the directory .
gobuster dir -u http://192.168.200.153 -w directory-list-2.3-medium.txt -t 30 -x php,html,txt,7z,zip,bak,gz
Found several directories and files , After visiting , Only secret The directory is useful .
Find keywords wordpress, Is this website cms yes wordpress?
Reuse dirsearch Scan this record and try
dirsearch -u "http://192.168.200.153/secret/" -e php,html,txt,zip,bak,gz,7z -x 404,500-599 -t 50
Sure enough wordpress, There are many catalogues .
Visit the following directories one by one to see if there are any gains
Found a compressed file , Download it and see . However, after opening it, I found that I was still too young , I don't understand .
So Baidu took a look , This is a wordpress A plug-in for , There is also an arbitrary file upload vulnerability .
On exploitdb Search the Internet , Found a utilization script . But I always report syntax errors in this script , We won't change , Then we can only find another way .
Two 、 Exploit
Use msf, stay msf The exploitation method of this vulnerability is found above .
Configuration module parameters , Use success , To obtain a web jurisdiction . Use python Get an interactive shell
python3 -c 'import pty; pty.spawn("/bin/bash")'
Check the user , Find out besides root One more adrian user
cat /etc/passwd
Pay attention to this sentence , Mentioned the configuration file and the ability to read accounts and passwords .
Then try reading wordpress Try the configuration file of !
<!-- A picture is missing here , Reading the configuration file, you can see a line of comments -->
Why ! A line of comments is found here , Is this the password of the user above ?
adrian:idrinksomewater
perfect , Successfully switched users !
Get the first flag
3、 ... and 、 Elevated privileges
See if there is any order to raise power !
flock The command can be executed as any user without permission password .
Enter the following command to raise the right
sudo flock -u / /bin/bash
perfect , Successfully promoted the permission to root
Get the second flag
边栏推荐
- .Xmind文件如何上传金山文档共享在线编辑?
- [the Nine Yang Manual] 2022 Fudan University Applied Statistics real problem + analysis
- Experiment five categories and objects
- 7-6 矩阵的局部极小值(PTA程序设计)
- Callback function ----------- callback
- 强化学习基础记录
- A piece of music composed by buzzer (Chengdu)
- . Net6: develop modern 3D industrial software based on WPF (2)
- [the Nine Yang Manual] 2018 Fudan University Applied Statistics real problem + analysis
- 强化学习基础记录
猜你喜欢
强化学习基础记录
A piece of music composed by buzzer (Chengdu)
强化學習基礎記錄
Experiment 6 inheritance and polymorphism
Renforcer les dossiers de base de l'apprentissage
7-5 走楼梯升级版(PTA程序设计)
FAQs and answers to the imitation Niuke technology blog project (II)
HackMyvm靶机系列(6)-videoclub
(original) make an electronic clock with LCD1602 display to display the current time on the LCD. The display format is "hour: minute: Second: second". There are four function keys K1 ~ K4, and the fun
Attach the simplified sample database to the SQLSERVER database instance
随机推荐
JS several ways to judge whether an object is an array
FAQs and answers to the imitation Niuke technology blog project (I)
Write a program to simulate the traffic lights in real life.
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
Relationship between hashcode() and equals()
Leetcode. 3. Longest substring without repeated characters - more than 100% solution
优先队列PriorityQueue (大根堆/小根堆/TopK问题)
[面试时]——我如何讲清楚TCP实现可靠传输的机制
【手撕代码】单例模式及生产者/消费者模式
The difference between cookies and sessions
编写程序,模拟现实生活中的交通信号灯。
A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
TypeScript快速入门
中间件漏洞复现—apache
7-1 output all primes between 2 and n (PTA programming)
Implementation principle of automatic capacity expansion mechanism of ArrayList
撲克牌遊戲程序——人機對抗
Experiment 4 array
Matlab opens M file garbled solution
Meituan dynamic thread pool practice ideas, open source