2
$\begingroup$

If I do a port scan from the internet, do I hit a bundle of wires that are physical ports into the motherboard (like a PCE port)?

Or do I actually go into the operating system and interact with the virtual or 'logical' ports of the OS?

I am trying to understand what the difference is between these ports, and why, if they are logical, I would be able to scan any of them from the internet, because it implies my bytes are passing over hardware to reach these 'logical' ports inside the CPU and cache, rather than on the peripheral hardware (before they are rejected)… This feels wrong...

But if they are actually physical, then where are they? And, if I have a daemon listen on a port that is "opened", does this mean that the program is listening to bytes that pass over a physical component on the motherboard, exterior to the cache-ram-cpu area?

$\endgroup$
1
  • $\begingroup$ They are virtual ones. $\endgroup$
    – joojaa
    Commented May 25, 2018 at 3:09

1 Answer 1

1
$\begingroup$

The ports referred to in a "port scan" are logical.

Consider the fact that all network communication to a computer typically is over a single physical connection, usually Ethernet. There are multiple simultaneous conversations happening routinely. Think about how the network traffic for fetching email in one window, a web browser in another window, various apps accessing servers elsewhere, and all those viruses sending your passwords and bank account details over to my servers all work independently without getting each other's traffic.

At the TCP and UDP level, this is done with virtual ports. Servers are waiting on "well known ports" to accept connections. For example, port 25 is usually reserved for requesting new connections of a SMTP server. Once a connection is established, it is assigned a free port. Subsequent traffic then references that port to identify the connection.

A port scan essentially (this is over-simplified, but that's all that's needed for the basic concept) sends a connection request to every port (they are in a 16 bit namespace) to see which ones the server machine reacts to. Some OS services of particular operating systems and versions are known to have servers on particular ports. Some of there are know to have vulnerabilities. One purpose of a port scan is to find out what ports your machine reacts to, and if there are any you might know how to exploit in doing unintended things with the machine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.