当前位置:网站首页>Vulnhub-dc6 learning notes

Vulnhub-dc6 learning notes

2022-07-18 14:56:00 Zhaohg720

1. Scan host

nmap Scanning ports found 22 and 80
 Please add a picture description

2. Yes http 80 Port to test

 Please add a picture description
web Service turn ip Address translation into domain name access , We need to modify here host file , hold ip Address and wordy This domain name can be accessed by corresponding .
 Please add a picture description
 Please add a picture description
Here is a wordpress Website , Let's scan the specific version information
 Please add a picture description
Use wpscan obtain wordpress Username
 Please add a picture description
 Please add a picture description
Then all kinds of blasting were carried out ... Finally, I saw the author's tips on the website where I downloaded the target .
 Please add a picture description
We need to go from rockyou.txt Extract contains k01 As a dictionary
 Please add a picture description
 Please add a picture description
According to the prompt , We got the dictionary , And then use wpscan The blasting function of 4 Brute force password cracking of users , Finally get a user mark Password
 Please add a picture description
Here we can log in to the management page , But I didn't find anything valuable , Next, we'll continue to use wpscan Scan the plug-in
 Please add a picture description
 Please add a picture description
Here we find this plainview-activity-monitor Of 20161228 There is a command execution vulnerability in version
 Please add a picture description

3. Exploit

Let's look at one poc
 Please add a picture description
It can be seen here that activity_monitor The plug-in activity_tools in ,post The content of can be divided by | To execute system commands ,poc Use... Directly nc Listening for port bounce shell
The operation is not complicated. We can operate it manually
 Please add a picture description
First, find the location where the command is executed , And then use burpsuit To modify us post Data content of
 Please add a picture description
 Please add a picture description
 Please add a picture description
Here we successfully login to the server

4. Raise the right

Here we will first look for suid The order of , But no command can be found
 Please add a picture description
And found that jens There is one in your home directory backups.sh It has executive authority
mark There is a text file in the home directory

 Please add a picture description
backups.sh Is a simple backup command
however things-to-do.txt Users are shown in graham Password , Remember before we nmap The scanned ports are also 22 port , So we use graham user ssh Sign in
 Please add a picture description
And then we look at graham What high authority commands do users have
 Please add a picture description
It can only be modified jens The backup file in , We modify the file to get jens Of shell
 Please add a picture description
 Please add a picture description
 Please add a picture description
So we get jens Authority
Then we continue to set dolls
 Please add a picture description
Find out jens have access to root Permission to run nmap
here nmap It can run .nse The script file at the end , The script file follows Lua grammar , So we can use it os.execute() Give Way nmap To execute system commands
 Please add a picture description
Use sudo To run the nmap, Use shell.nse Script , I can get it root The powers of the shell, here shell Don't echo what we entered , It doesn't have a big impact , stay root There are flag.

原网站

版权声明
本文为[Zhaohg720]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/199/202207160619093931.html