
HTTP/HTTPS इंटरसेप्शन प्रॉक्सी विंडोज़ प्रमाणीकरण तंत्रों के परीक्षण के लिए, जो NTLM, Kerberos, pass-the-hash, pass-the-ticket और रिले हमलों का समर्थन करती है, साथ ही MITM के लिए अंतर्निहित प्रमाणपत्र निर्माण के साथ।
यह HTTP प्रॉक्सी आपकी ओर से सभी HTTP प्रमाणीकरणों को संभालता है।
यह NTLM EPA (channel binding और service binding), kerberos, pass-the-hash, overpass-the-hash (pass-the-key) और pass-the-ticket (TGT और TGS) का समर्थन करता है।
संबंधित लेख:
$ # In a venv
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install -r requirements.txt
या आप प्रोजेक्ट को सीधे स्थापित करने के लिए pip/pipx का उपयोग कर सकते हैं
$ # With pip
$ pip3 install git+https://github.com/synacktiv/Prox-Ez
$ # With pipx
$ pipx install git+https://github.com/synacktiv/Prox-Ez
इसे ऐसे चलाएँ, यह किसी भी ऐसी वेबसाइट पर mydomain/myusername:mypassword क्रेडेंशियल्स के साथ प्रमाणित करने का प्रयास करेगा जिसे प्रमाणीकरण की आवश्यकता होती है:
python3 proxy.py -dc mydomain/myusername:mypassword
वही लेकिन पासवर्ड के बजाय NT हैश का उपयोग करते हुए:
python3 proxy.py -dc mydomain/myusername --hashes :31d6cfe0d16ae931b73c59d7e0c089c0
burpsuite के साथ काम करने के लिए:
Project options -> HTTP -> HTTP/2 -> Enable HTTP/2 को अनचेक करेंSet response header "Connection: close" को अनचेक करें क्योंकि NTLM एक TCP कनेक्शन को प्रमाणित करता है: Proxy -> Options -> Miscellaneous -> Set response header "Connection: close" को अनचेक करें।Set "Connection" header on incoming requests when using HTTP/1 को अनचेक करें: Proxy -> Options -> Miscellaneous -> HTTP/1 का उपयोग करते समय आने वाले अनुरोधों पर को अनचेक करेंबाद में, आपको बस burp में एक अपस्ट्रीम प्रॉक्सी निर्दिष्ट करना होगा, ताकि यह उस होस्ट के लिए इस प्रॉक्सी का उपयोग करे जिसके साथ आप प्रमाणित नहीं कर सकते:
Project options -> Connections -> Upstream Proxy Servers में -> Add पर क्लिक करें -> उस रिमोट होस्टनाम को निर्दिष्ट करें जो NTLM प्रमाणीकरण के साथ समस्याएँ पैदा कर रहा है, टूल में कॉन्फ़िगर किया गया प्रॉक्सी होस्ट और पोर्ट, और Authentication type को None पर छोड़ दें।$ python3 proxy.py -h
usage: proxy.py [-h] [--listen-address LISTEN_ADDRESS] [--listen-port LISTEN_PORT] [--cacert CACERT] [--cakey CAKEY] [--cakey-pass CAKEY_PASS] [--certsdir CERTSDIR] [--singleprocess] [--debug] [--dump-keys DUMP_KEYS] [--creds CREDS]
[--default-creds DEFAULT_CREDS] [--hashes HASHES] [--kerberos] [--dcip DCIP] [--spn SPN] [--spn-force-fqdn] [--no-epa]
Prox-Ez: The Swiss Army Knife of HTTP auth.
optional arguments:
-h, --help show this help message and exit
--listen-address LISTEN_ADDRESS, -l LISTEN_ADDRESS
Address the proxy will be listening on, defaults to 127.0.0.1.
--listen-port LISTEN_PORT, -p LISTEN_PORT
Port the proxy will be listening on, defaults to 3128.
--cacert CACERT Filepath to the CA certificate, defaults to ./cacert.pem. Will be created if it does not exists.
--cakey CAKEY Filepath to the CA private key, defaults to ./cakey.pem. Will be created if it does not exists.
--cakey-pass CAKEY_PASS
CA private key passphrase.
--certsdir CERTSDIR Path to the directory the generated certificates will be stored in, defaults to /tmp/Prox-Ez. Will be created if it does not exists.
--singleprocess, -sp Do you want to be slowwwww ?! Actually useful during debug.
--debug, -d Increase debug output.
--dump-keys DUMP_KEYS, -dk DUMP_KEYS
File to dump the SSL/TLS keys to. Useful when trying to debug. When this option is specified, --singleprocess is implied.
--creds CREDS Path to the credentials file, for instance: { "my.hostname.com": { "creds": "domain/user:password", "spn": "HTTP/anothername" }, "my.second.hostname.com": { "creds": "domain1/user1", "hashes": ":nthash1" } }
--default-creds DEFAULT_CREDS, -dc DEFAULT_CREDS
Default credentials that will be used to authenticate.
--hashes HASHES Could be used instead of password. It is associated with the domain and username given via --default_creds. format: lmhash:nthash or :nthash.
--kerberos, -k Enable kerberos authentication instead of NTLM.
--dcip DCIP IP Address of the domain controller (only for kerberos).
--spn SPN Use the provided SPN when an SPN is needed. More details in the article.
--spn-force-fqdn Force the usage of the FQDN as the SPN instead of what was specified in the URL.
--no-epa Deactivate the NTLM EPA feature.
DEBUG:Proxy.ProxyToServerHelper:Our state: MIGHT_SWITCH_PROTOCOL; their state: SEND_RESPONSE
[...]
assert self.conn.our_state in [h11.DONE, h11.MUST_CLOSE, h11.CLOSED] and self.conn.their_state is h11.SEND_RESPONSE
AssertionError
Set "Connection" header on incoming requests when using HTTP/1