Wednesday, February 20, 2008

Nmap scanning technique and SSH tunneling and various other methods.

Since my ex roomate , who is currently engage with internship somewhere around KL keeps bugging me how to do tunneling inside his own network. I think i ought to write one, please take not in the real life job world, the benefits of having good networks versus getting kicked out of office is not something we really like ( but hey somehow the rules doesn't apply to most local malaysian company).

1st. we would like to check if your internet connection is using transparent proxy or not by just opening your web browser.

If it points out to a website that you need to enter a password or something, let say it forwards the connection to service.checkout.com .

Entering password is boring so will nmap give us a clue?

nmap service.checkout.con -p 80,3128,8080

if it reveals something like this:

PORT STATE SERVICE
8080/tcp open http-proxy

Just connect it directly and you should be okay.


2nd. Bypassing firewall rules

Note this method may or maynot work depending on the level of your administrator skills. But it might helps a little bit.

Let's assume the firewall block all incoming/outgoing traffic from any other ports except 80 and 443. To make matter worst every non encrypted packet will be monitored review and etcx3.

This is a good practise actually since i ImHO you shouldn't waste time surfing stuff u shouldn't at the work place. But to continue there's a method that we call SSH Tunneling.

What it does? We can say in some case as a cheap ugly poor man lowlevel vpn. SSH have an ability called remote portforwarding and local portforwarding.

To simply matter a local portforwarding will create a connection from your choosen localport encapsulate in the ssh traffic and conect it to an's external ip with it`s chosen port.

While remote portfowarding does the thing reversely.

So how do we get this thing to work on?

1st. Setup a SSH server running at port 443 . Here is a list of good servers

2nd. Get a good client i think Putty is quite nice. Links

3. Now let's make some simple example we are using jaguars shell as a dynamic port forwarding. Here's a quick and ugly guide using screenshots .. I don't like writing too much.




Using Minefield as example:





P/S: Ghust gunalah meebo

2 comments:

kuc1n993m0k said...

hmmphh...aku nak try kat trisystems..biar ade keje sket IT admin trisystems tu..lulz

Anonymous said...

ish2.. x bek to toyek.. orang nk rehat..

btw, this post is specially dedicated for ghus eh.. euwwww