一、目标与思路
在目标主机上,用nc启动一个侦听端口。当有连接时,返回一个web的响应文件,模拟webserver的功能。
在探测机上,用curl访问目标机的端口,按返回值检测连通性。
二、准备web应用的响应文件
1、初始文件
从www.baidu.com获取初始文件:
curl -i www.baidu.com >index.html
2、精简文件
vi index.html
cat index.html
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: keep-alive
Content-Length: 40
Content-Type: text/html
Date: Thu, 25 Jun 2020 09:45:28 GMT
Etag: "588604c4-94d"
Last-Modified: Mon, 23 Jan 2017 13:27:32 GMT
Pragma: no-cache
Server: bfe/1.0.8.18
Set