It is widespread knowledge, and therefore a common practice, to close open ports on any machines connected to the internet.
If for example, a typical program uses port xyz as it's communication channel, and there is a vulnerability in that program, which could be exploited through that port, why won't the same attack be successful through, let's say, port 80?
Given our pseudo program uses port 888 TCP, and it has a vulnerability which could be exploited, why can't that vulnerability be exploited through port 80 TCP (which is HTTP, and is open on almost any machine)?
Is port 80 on the web server listening only to a UNIQUE type of TCP packets? Does it accept only a certain kind of packet?
Why can't a hacker try to craft a TCP packet with a malicious string, encapsulate it inside the HTTP packet and therefore attack the web server?