Connection
machine downloaded from https://hackmyvm.eu/
difficulty: Easy
OS: Linux
- Scan the network
- Port and service scanning with nmap
Services exposed on ports 22, 80, 139, 445
- With whatweb command we can search info about web server:
- We can enumerate samba server
- We can try to connect to samba and push a file with php-reverse-shell into the shared folder
php-rever-shell code
- In Kali we listen to port 447 and in the browser we run the index.php file.
- We can improve the prompt and look for the first flag that is in /home/connection/local.txt
- Search for binary files to exploit
- We can try this with gdb following instructions from https://gtfobins.github.io/gtfobins/gdb/#suid