
PANW NGFW CVE-2024-0012
이 Python 스크립트는 Palo Alto Networks PAN-OS 관리 웹 인터페이스에서 발견된 CVE-2024-0012로 식별된 중요한 인증 우회 취약점의 존재 여부를 검사합니다. 이 취약점은 인증되지 않은 공격자가 관리 권한을 획득하고, 구성을 변조하거나, 다른 권한 상승 취약점을 악용할 수 있게 합니다.
Zero Touch Provisioning 및 window.Pan와 같은 컨텍스트 기반 Palo Alto 특정 표시자를 사용하여 정확한 탐지 수행.-t로 단일 대상 지정 또는 -f로 대상 목록 파일 지정.-d 인수 또는 대화형 모드에서 사용자 프롬프트를 통해 취약한 대상에 대한 상세 결과를 선택적으로 표시.-e 또는 --explanation을 사용하여 CVE-2024-0012 및 CVE-2024-9474에 대한 상세하고 이해하기 쉬운 설명 출력.rich 라이브러리를 사용하여 결과를 깔끔하고 사람이 읽기 쉬운 형식으로 표시.requests 라이브러리rich 라이브러리pip install -r requirements.txt
단일 대상을 대화형으로 확인하려면:
python main.py
단일 FQDN 또는 IP 지정:
python main.py -t 127.0.0.1
대상 목록(한 줄에 하나)이 포함된 파일 제공:
python main.py -f targets.txt
-d 또는 --details 플래그를 사용하여 모든 취약한 대상에 대한 상세 결과를 자동으로 출력:
python main.py -t 127.0.0.1 -d
-e 또는 --explanation 플래그를 사용하여 CVE-2024-0012 및 CVE-2024-9474 취약점에 대한 상세 설명 출력:
python main.py -t 127.0.0.1 -d -e (또는 -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.
스캔이 끝나면 모든 대상과 상태를 나열한 요약 테이블이 표시됩니다:
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Target ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
┃ 127.0.0.1 ┃ Vulnerable ┃
┃ example.com ┃ Not Vulnerable ┃
└───────────────────────┴─────────────────┘
-e 또는 --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 또는 --file 인수가 제공되지 않으면 스크립트가 대화형 입력을 요청합니다.-e 플래그는 추가 컨텍스트가 필요한 사용자를 위해 취약점에 대한 교육적 개요를 제공합니다.이 스크립트는 MIT 라이선스 하에 배포됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.
이 스크립트는 어떠한 종류의 보증 없이 "있는 그대로" 제공됩니다. 사용에 따른 모든 위험은 사용자에게 있습니다. 저자는 이 도구의 사용으로 인해 발생하는 어떠한 손해에 대해서도 책임을 지지 않습니다.
이 스크립트는 watchTowr 팀의 뛰어난 작업에서 영감을 받았습니다. 이들의 CVE-2024-0012용 원본 Nuclei YAML 템플릿이 이 Python 구현의 기초가 되었습니다. 중요한 보안 취약점을 식별하고 해결하려는 그들의 헌신은 계속해서 사이버 보안 커뮤니티에서 높은 기준을 제시하고 있습니다.