
PANW NGFW CVE-2024-0012
Questo script Python verifica la presenza di una vulnerabilità critica di bypass dell'autenticazione nell'interfaccia web di gestione PAN-OS di Palo Alto Networks, identificata come CVE-2024-0012. La vulnerabilità consente a un attaccante non autenticato di ottenere privilegi amministrativi, manomettere la configurazione o sfruttare altre vulnerabilità di escalation dei privilegi.
Zero Touch Provisioning e window.Pan per un rilevamento accurato.-t o un file di target con -f.-d o tramite richiesta all'utente in modalità interattiva.-e o --explanation per stampare una descrizione dettagliata e di facile lettura di CVE-2024-0012 e CVE-2024-9474rich per visualizzare i risultati in un formato pulito e leggibile.requests per le richieste HTTPrich per l'output stilizzatopip install -r requirements.txt
Per controllare un singolo target in modo interattivo:
python main.py
Specifica un singolo FQDN o IP:
python main.py -t 127.0.0.1
Fornisci un file contenente un elenco di target (uno per riga):
python main.py -f targets.txt
Usa il flag -d o --details per stampare automaticamente i risultati dettagliati per tutti i target vulnerabili:
python main.py -t 127.0.0.1 -d
Usa il flag -e o --explanation per stampare una spiegazione dettagliata delle vulnerabilità CVE-2024-0012 e CVE-2024-9474:
python main.py -t 127.0.0.1 -d -e (or -de)
[!] Target -appears- vulnerable!
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key ┃ Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
┃ URL ┃ https://127.0.0.1/php/ztp_gate.php/.js.map ┃
┃ Status Code ┃ 200 ┃
┃ Headers ┃ {"Date": "Wed, 20 Nov 2024 15:29:31 GMT", ... ┃
┃ Markers Found ┃ ...<title>Zero Touch Provisioning</title>... ┃
┃ ┃ ...window.Pan = window.Pan || {};... ┃
└─────────────────────────────┴──────────────────────────────────────────────────────────┘
[+] Target does not appear to be vulnerable.
Message: No matching conditions met.
Al termine della scansione, una tabella di riepilogo elenca tutti i target e i relativi stati:
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Target ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
┃ 127.0.0.1 ┃ Vulnerable ┃
┃ example.com ┃ Not Vulnerable ┃
└───────────────────────┴─────────────────┘
Se viene utilizzato il flag -e o --explanation:
CVE-2024-0012 Explained
CVE-2024-0012 is an authentication bypass vulnerability. This means attackers can skip the login process and access sensitive parts of a system without needing a username or password. In Palo Alto Networks' PAN-OS, this vulnerability allows attackers to trick the system by sending specially crafted HTTP GET requests. These requests include a header called `X-PAN-AUTHCHECK`, which tells the system whether or not authentication is required. If this header is set to `off`, the system mistakenly grants access to restricted areas without checking if the person is logged in.
This vulnerability can be exploited together with CVE-2024-9474, a privilege escalation vulnerability, to gain full root access to the device. Once attackers achieve root access, they can control the firewall, steal sensitive data, or disable security features.
If this vulnerability is confirmed, patch the affected system as soon as possible to prevent exploitation. Additionally, restrict access to the management interface by IP whitelisting or using a dedicated management network.
[bold red]Error:[/bold red] HTTPSConnectionPool(host='127.0.0.1', port=443): Max retries exceeded with URL: /php/ztp_gate.php/.js.map (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x...>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
--target o --file, lo script chiede un input interattivo.-e fornisce una panoramica educativa delle vulnerabilità per gli utenti che necessitano di più contesto.Questo script è rilasciato sotto la licenza MIT. Consulta il file LICENSE per i dettagli.
Questo script è fornito "così com'è" senza alcuna garanzia. Usalo a tuo rischio. L'autore non è responsabile per eventuali danni causati dall'uso di questo strumento.
Questo script è stato ispirato dall'ottimo lavoro del team watchTowr, il cui template YAML Nuclei originale per CVE-2024-0012 ha costituito la base per questa implementazione Python. La loro dedizione nell'identificare e affrontare vulnerabilità di sicurezza critiche continua a stabilire uno standard elevato nella comunità della cybersecurity.