
PANW NGFW CVE-2024-0012
هذا النص البرمجي بلغة Python يتحقق من وجود ثغرة خطيرة في تجاوز المصادقة في واجهة الإدارة المستندة إلى الويب لأنظمة Palo Alto Networks PAN-OS، والمعروفة باسم CVE-2024-0012. تسمح هذه الثغرة لمهاجم غير مصادق بالحصول على صلاحيات إدارية، أو العبث بالتكوين، أو استغلال ثغرات تصعيد صلاحيات أخرى.
Zero Touch Provisioning و window.Pan للكشف الدقيق.-t أو ملفًا يحتوي على أهداف باستخدام -f.-d أو عبر طلب المستخدم في الوضع التفاعلي.-e أو لطباعة وصف تفصيلي وسهل الفهم لـ CVE-2024-0012 و CVE-2024-9474--explanationrich لعرض النتائج بتنسيق نظيف وقابل للقراءة.requests لطلبات HTTPrich للمخرجات المنسّقة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، الذي كان قالب Nuclei YAML الأصلي الخاص بهم لـ CVE-2024-0012 بمثابة الأساس لهذا التنفيذ بلغة Python. لا يزال تفانيهم في تحديد ومعالجة الثغرات الأمنية الحرجة يضع معيارًا عاليًا في مجتمع الأمن السيبراني.