HTTP/WWW/port 80/Netcat question

styxxxola

Solid State Member
Messages
8
So I have a question about how the internet uses this port.
So I know our OS's come with many many different kinds of built in servers and one of them is the default server for web access. It listens on port 80 and we use it to connect to the web to use our web browsers? Or something like that?

When I scan my computer on Windows 7 and Debian 6 port 80 shows up as closed. I am always able to still surf though? What exactly is happening here?

I know if I change my current web servers port to listen to another (port 8080), I can bind netcat to port 80 and have it sniff everything I send out right?

So my web browser still attempts to send out information through port 80, the packets get captured, and somehow afterward it magically gets routed to port 8080 and my internet continues to work?

I guess it's a 2 part question about what my server does/how it works, where it's located, etc. and why my packets are captured on that port once the listening port is changed.

I am reading Netcat Power Tools and my questions come from this simple script that's suppose to sniff my packets once I change my web servers listening port to 8080.

http_sniffer:
#! /bin/bash
nc -o /blah/sniff.out 192.168.1.100 8080

pwned server: # nc -l -p 80 -e /blah/http_sniffer


----------------------------------------------------------------------------------------------------------------

So I had it wrong. Port 80 is the default port for your personal web server. So that command would sniff any connections we would be receiving, right?
 
yes, port 80 is the port that the server listens on, not the port that the server will reply on.

you connect from a random high port to port 80, the server replies from a different random high port
 
Back
Top Bottom