用 NC 测试 http 访问 (假设 有 http://192.168.29.10/i.html 网页 )
注明: // Windows: nc -c 进行 CRLF 转换 // linux: nc -C 进行 CRLF 转换
在 Kali Linux 下:
方法1: nc -C 192.168.29.10 80 |
GET /i.html HTTP/1.1 Host: 192.168.29.10
|
方法2: echo -e "GET /i.html HTTP/1.1\r\nHost: 192.168.29.120\r\n\r\n" | nc 192.168.29.10 80 |
在 Windows 下
nc -c 192.168.29.10 80 |
GET /i.html HTTP/1.1 Host: 192.168.29.10
|
wireshark 捕获接口配置
过滤表达式的规则
1. 协议过滤
比如TCP,只显示TCP协议。
2. IP 过滤
ip.src==192.168.1.102 显示源地址为 192.168.1.102
ip.dst==192.168.1.102 显示目标地址为 192.168.1.102
ip.addr ==192.168.29.10
3. 端口过滤
tcp.port==80 显示端口为80的
tcp.srcport== 80 显示TCP协议的源端口为80的
4. HTTP 模式过滤
http.request.method=="GET", 只显示HTTP GET方法的
http contains sqli
5. 逻辑运算符为 AND/ OR ( 等价于 && ||)
ip.src==192.168.29.10 or ip.dst==192.168.29.10 (等价于 ip.addr==192.168.29.10)
tcp.port == 80 || tcp.port == 21
DDOS 洪水攻击
hping3 模拟 半连接洪水攻击
hping3 192.168.29.120 -p 81 -S -i u1000
hping3 -c 10000 -d 120 -S -w 64 -p 81 --flood --rand-source 192.168.29.120
-c:发送数据包的个数 -d:每个数据包的大小 -w:TCP window大小
nping 模拟 TCP 全连接洪水攻击
nping --tcp-connect -p 80 --rate=90000 -c 900000 -q testsite.com
nping --tcp-connect --rate=10000 -c 1000 192.168.29.120 -p81