Bypassare Microsoft ISA Proxy Server
|
ISA (Internet Security & Acceleration
Server) e' la soluzione firewall e web cache di mamma Microsoft. Step 1: Poiche' l'autenticazione degli utenti in ISA avviene per mezzo del "celebre" protocollo proprietario NTLM, nessun browser che non sia IE6 su Windows puo' accedere al web attraverso il proxy (complimenti a Microsoft anche per questo... ;)) Fortunatamente, un'anima pia che risponde al nome di Dmitry Rozmanov ha creato questo: http://ntlmaps.sourceforge.net/ "NTLM Authorization Proxy Server (APS) is a proxy software that allows you to authenticate via an MS Proxy Server using the proprietary NTLM protocol. Since version 0.9.5 APS has an ability to behave as a standalone proxy server and authenticate http clients at web servers using NTLM method. It can change arbitrary values in your client's request header so that those requests will look like they were created by MS IE. It is written in Python v1.5.2 language." Scompattiamo il targz, entriamo nella directory appena creata e modifichiamo alcuni campi del file di conf "server.cfg": PARENT_PROXY: ipaddress del proxy isa server PARENT_PROXY_PORT: porta del proxy isa server NT_DOMAIN: dominio *NT* al quale apparteniamo USER: nostro username per l'autenticazione sul proxy PASSWORD: password per l'autenticazione sul proxy
Lanciamo aps con il comando: [root@pocketcoffee][~/aps098]#
python main.py Per testare il corretto funzionamento di aps, modifichiamo alcuni parametri nel wgetrc: http_proxy = http://127.0.0.1:5865/ E cerchiamo di "uscire su internet"... [caff@pocketcoffee][~]$ wget
http://www.google.it/ 100%[==============================================================>] 4,262 84.94K/s ETA 00:00 16:19:22 (84.94 KB/s) - `index.html' saved [4262/4262]
[root@pocketcoffee][~]# telnet
127.0.0.1 5865 HTTP/1.1 502 Proxy Error ( The
specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is
not configured to allow SSL requests from this port. Most Web browsers
use port 443 for SSL requests. ) Ok, il metodo CONNECT e' limitato alla sola porta 443 (serve ad isa per proxare https). [root@pocketcoffee][~]# telnet
127.0.0.1 5865 HTTP/1.1 502 Proxy Error ( Connection
refused ) A questo punto, siamo a cavallo! Scarichiamo il secondo e ultimo tool del nostro "arsenale del perfetto proxy piercier" :) http://www.agroman.net/corkscrew/ "Corkscrew is a tool for tunneling SSH through HTTP proxies." Dopo averlo compilato e installato, aggiungiamo la seguente riga nello ssh_config: ProxyCommand /usr/local/bin/corkscrew 127.0.0.1 5865 %h %p Telefoniamo ad un amico fidato e facciamoci tirare su un sshd in ascolto sulla porta 443 nella nostra macchina a casa... E voila'! Les jeux son fait: [caff@pocketcoffee][~]$ ssh -v
-p 443 caff@caff.homeip.net debug1: Authentications that
can continue: publickey,password,keyboard-interactive Ora possiamo fare ssh fino a casa
e da li' andarcene in giro dove ci pare. Basta creare quello che si chiama "reverse ssh tunnel": [caff@pocketcoffee][~]$ ssh -p 443 -R 12345:ipaddress_macchina_lan_interna:22 caff@caff.homeip.net Ora, chi si collega a 127.0.0.1:12345 su caff.homeip.net, sara' rediretto sulla porta 22 della macchina nella lan aziendale.
http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-watchdog.html
|