To hack any firewall we use allowed ports in Trojan, virus or exploit for communication.
(port 21,22,25,80,8080 etc.)
Bypassing Firewall or Proxy using SOCK Proxies*
Proxies
It is a program which stays in-between the user's system and internet. The request sends
by the user's system are processed by the proxy and then forward to the destination
server. Proxies are used to distribute the internet access among the nodes. Most of the
firewalls comes with inbuilt proxy feature. Firewall proxies increases security for the
organisation.
SOCKS
SOCKS stands for "SOCKetS", these are proxies used for tunneling the connection over
the internet for better security. Tunneling provides a protective shield for the data passing
over the internet. Since, the data is encrypted it is neither understood by the firewall or
the content filters.
Now I shall discuss how one can make use of SOCKS to bypass the firewall / proxies.
Let's assume you want to download music / video files using KaZaa Lite (File Sharing
Software) or chat using MSN or Yahoo without getting caught by the system
administrator.
136 Copyright ©2009 Leo Impact Security Services Pvt Ltd
Install a SOCKS client on your system
The list of SOCKS Client are as follows:
Http-Tunnel - Commercial - http://www.http-tunnel.com/html/
Hopster - Freeware - http://www.hopster.com/deutsch/
Use one among the free SOCKS proxy (FreeProxy or Hopster). our personal choice is
Hopster.
Configure SOCKS client to accept connections from the application (KaZaa or MSN
etc)
Configure Hopster to listen on port 1080/TCP (default port) on your local system. Set
your internet proxy address on the SOCK client so that it can connect to it. Click on the
link below to view the screenshot:
Screenshot1:
In Hopster you also have to set options to accept connection from application like
KaZaaLite. View screenshot for details.
Configure the application (KaZaa / MSN ) to connect to SOCKS proxy
The application must be configured to connect to the local loopback IP address
(127.0.0.1) on port 1080/TCP. View the screenshot of KaZaa being configured to connect
to the local SOCKS proxy.
137 Copyright ©2009 Leo Impact Security Services Pvt Ltd
Once KaZaa has the connection established with the SOCK proxy, you can see the data
transfer status both on KaZaa and as well as Hopster. View the screenshot for details.
How a SOCKS proxy work?
A SOCKS Client sitting on your system acts as a proxy server between your application
and your corporate firewall/proxy. This SOCKS client when receive a particular request
for the user system, it tunnel the request through http port to the main SOCK proxy
server. Since, http port is usually allowed through the firewall / proxy, the tunnel is not
detected by the security devices. The main SOCKS proxy then process the request and
sends back the data through the http port back to the client machine.
The whole sequence of data flow is given below:
Step1: Application/User Sends Request -------------- >> SOCKS Client
Step2: SOCKS Client Sends Request ---------------- >> Corporate Proxy / Firewall (as
HTTP request)
Step3: Corporate Proxy / Firewall Sends Request ---- >> SOCKS Proxy (Main SOCKS
Server)
Step4: SOCKS Server Processes the Request
Step5: SOCKS Server sends back data -------------- >> Corporate Proxy / Firewall
138 Copyright ©2009 Leo Impact Security Services Pvt Ltd
Step6: Corporate Proxy / Firewall sends back data --- >> SOCKS Client
Step7: SOCKS Client sends back data --------------- >> Application /User
Note: Similarly one can bypass the corporate firewall / proxy and run any application
(MSN/Yahoo/IRC) or visit any sites using this method.
Video URL: www.thesecretofhacking.com/vd/ch13/cs1