开发者

Can We Determine From TCP Layer That The Given Request Is HTTP Or Non-HTTP?

开发者 https://www.devze.com 2023-02-14 08:25 出处:网络
If the HTTP requests are sent from ports different than port number 8开发者_如何学JAVA0, so in this situations can we identify http requests from TCP layer?First, I\'m confused about one part of the q

If the HTTP requests are sent from ports different than port number 8开发者_如何学JAVA0, so in this situations can we identify http requests from TCP layer?


First, I'm confused about one part of the question: "...from ... port number 80...". The FROM port is always >1024 and more or less random, coming from the browser, the TO (destination) port is 80. I just guess you mean the destination port (i.e. on the server).

The easiest way is to filter for destination ports 80 and 443 (SSL). Sure, HTTP could take place to any port, but 99.9999% of HTTP communication out there is to those (standard) ports. The next step, if that is not enough, would involve packet inspection. You could not inspect SSL traffic though, so you would never catch that traffic.


if you know socket port (usually 80) on wich http-server is binded, there is no problem. scanning tcp-header for port field must solve it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号