â•£ Active Ports
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
â•£ Users with console
janis:x:1004:1004::/home/janis:/bin/bash
paige:x:1001:1001::/home/paige:/bin/zsh
root:x:0:0:root:/root:/bin/bash
terry:x:1002:1002::/home/terry:/bin/bash
walter:x:1003:1003::/home/walter:/bin/bash
â•£ Checking 'sudo -l', /etc/sudoers, and /etc/sudoers.d
╚ https://book.hacktricks.xyz/linux-unix/privilege-escalation#sudo-and-suid
Matching Defaults entries for www-data on walla:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User www-data may run the following commands on walla:
(ALL) NOPASSWD: /sbin/ifup
(ALL) NOPASSWD: /usr/bin/python /home/walter/wifi_reset.py
(ALL) NOPASSWD: /bin/systemctl start hostapd.service
(ALL) NOPASSWD: /bin/systemctl stop hostapd.service
(ALL) NOPASSWD: /bin/systemctl start dnsmasq.service
(ALL) NOPASSWD: /bin/systemctl stop dnsmasq.service
(ALL) NOPASSWD: /bin/systemctl restart dnsmasq.service
â•£ Permissions in init, init.d, systemd, and rc.d
╚ https://book.hacktricks.xyz/linux-unix/privilege-escalation#init-init-d-systemd-and-rc-d
You have write privileges over /lib/systemd/system/raspapd.service
â•£ Readable files belonging to root and readable by me but not world readable
-rwxr-x--- 1 root www-data 124 Sep 17 2020 /etc/raspap/hostapd/enablelog.sh
-rwxr-x--- 1 root www-data 3113 Sep 17 2020 /etc/raspap/hostapd/servicestart.sh
-rwxr-x--- 1 root www-data 102 Sep 17 2020 /etc/raspap/hostapd/disablelog.sh
â•£ Searching specific hashes inside files - less false positives (limit 70)
/etc/raspap/raspap.php:$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i
/var/www/html/raspap.php:$2y$10$YKIyWAmnQLtiJAy6QgHQ.eCpY4m.HCEbiHaTgN6.acNC6bDElzt.i