diff --git "a/1.1 python\347\256\200\344\273\213\345\222\214\347\216\257\345\242\203\346\220\255\345\273\272/1.1.pdf" "b/1.1 python\347\256\200\344\273\213\345\222\214\347\216\257\345\242\203\346\220\255\345\273\272/1.1.pdf" new file mode 100644 index 0000000..08e0c77 Binary files /dev/null and "b/1.1 python\347\256\200\344\273\213\345\222\214\347\216\257\345\242\203\346\220\255\345\273\272/1.1.pdf" differ diff --git a/1.1.pdf b/1.1.pdf new file mode 100644 index 0000000..08e0c77 Binary files /dev/null and b/1.1.pdf differ diff --git "a/1.2 \346\225\260\345\200\274\347\261\273\345\236\213/1.2.pdf" "b/1.2 \346\225\260\345\200\274\347\261\273\345\236\213/1.2.pdf" new file mode 100644 index 0000000..1fc092b Binary files /dev/null and "b/1.2 \346\225\260\345\200\274\347\261\273\345\236\213/1.2.pdf" differ diff --git a/1.2.pdf b/1.2.pdf new file mode 100644 index 0000000..1fc092b Binary files /dev/null and b/1.2.pdf differ diff --git "a/1.3 \345\255\227\347\254\246\344\270\262\343\200\201\345\210\227\350\241\250\343\200\201\345\205\203\347\273\204\343\200\201\345\255\227\345\205\270\345\222\214\351\233\206\345\220\210/1.3.pdf" "b/1.3 \345\255\227\347\254\246\344\270\262\343\200\201\345\210\227\350\241\250\343\200\201\345\205\203\347\273\204\343\200\201\345\255\227\345\205\270\345\222\214\351\233\206\345\220\210/1.3.pdf" new file mode 100644 index 0000000..18f11a4 Binary files /dev/null and "b/1.3 \345\255\227\347\254\246\344\270\262\343\200\201\345\210\227\350\241\250\343\200\201\345\205\203\347\273\204\343\200\201\345\255\227\345\205\270\345\222\214\351\233\206\345\220\210/1.3.pdf" differ diff --git a/1.3.pdf b/1.3.pdf new file mode 100644 index 0000000..18f11a4 Binary files /dev/null and b/1.3.pdf differ diff --git "a/1.4 \346\265\201\347\250\213\346\216\247\345\210\266/1.4.pdf" "b/1.4 \346\265\201\347\250\213\346\216\247\345\210\266/1.4.pdf" new file mode 100644 index 0000000..83d5fcf Binary files /dev/null and "b/1.4 \346\265\201\347\250\213\346\216\247\345\210\266/1.4.pdf" differ diff --git a/1.4.pdf b/1.4.pdf new file mode 100644 index 0000000..83d5fcf Binary files /dev/null and b/1.4.pdf differ diff --git "a/1.5 \345\207\275\346\225\260/1.5.pdf" "b/1.5 \345\207\275\346\225\260/1.5.pdf" new file mode 100644 index 0000000..99847d7 Binary files /dev/null and "b/1.5 \345\207\275\346\225\260/1.5.pdf" differ diff --git a/1.5.pdf b/1.5.pdf new file mode 100644 index 0000000..99847d7 Binary files /dev/null and b/1.5.pdf differ diff --git "a/1.6 \346\250\241\345\235\227/1.6.pdf" "b/1.6 \346\250\241\345\235\227/1.6.pdf" new file mode 100644 index 0000000..616745a Binary files /dev/null and "b/1.6 \346\250\241\345\235\227/1.6.pdf" differ diff --git a/1.6.pdf b/1.6.pdf new file mode 100644 index 0000000..616745a Binary files /dev/null and b/1.6.pdf differ diff --git "a/1.7 \345\274\202\345\270\270\345\244\204\347\220\206/1.7.pdf" "b/1.7 \345\274\202\345\270\270\345\244\204\347\220\206/1.7.pdf" new file mode 100644 index 0000000..9152c2a Binary files /dev/null and "b/1.7 \345\274\202\345\270\270\345\244\204\347\220\206/1.7.pdf" differ diff --git a/1.7.pdf b/1.7.pdf new file mode 100644 index 0000000..9152c2a Binary files /dev/null and b/1.7.pdf differ diff --git "a/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/1.8.pdf" "b/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/1.8.pdf" new file mode 100644 index 0000000..a49221c Binary files /dev/null and "b/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/1.8.pdf" differ diff --git "a/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/img/2.0.pdf" "b/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/img/2.0.pdf" new file mode 100644 index 0000000..2c7a594 Binary files /dev/null and "b/1.8 \351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213/img/2.0.pdf" differ diff --git a/1.8.pdf b/1.8.pdf new file mode 100644 index 0000000..a49221c Binary files /dev/null and b/1.8.pdf differ diff --git a/2.0.pdf b/2.0.pdf new file mode 100644 index 0000000..2c7a594 Binary files /dev/null and b/2.0.pdf differ diff --git "a/2.1 \346\226\207\344\273\266\345\222\214\347\233\256\345\275\225\345\237\272\346\234\254\346\223\215\344\275\234/2.1.pdf" "b/2.1 \346\226\207\344\273\266\345\222\214\347\233\256\345\275\225\345\237\272\346\234\254\346\223\215\344\275\234/2.1.pdf" new file mode 100644 index 0000000..d83442b Binary files /dev/null and "b/2.1 \346\226\207\344\273\266\345\222\214\347\233\256\345\275\225\345\237\272\346\234\254\346\223\215\344\275\234/2.1.pdf" differ diff --git a/2.1.pdf b/2.1.pdf new file mode 100644 index 0000000..d83442b Binary files /dev/null and b/2.1.pdf differ diff --git a/2.2.pdf b/2.2.pdf new file mode 100644 index 0000000..2f0b12e Binary files /dev/null and b/2.2.pdf differ diff --git "a/2.3 \345\244\232\350\277\233\347\250\213\347\274\226\347\250\213/2.3.pdf" "b/2.3 \345\244\232\350\277\233\347\250\213\347\274\226\347\250\213/2.3.pdf" new file mode 100644 index 0000000..ac8bc2a Binary files /dev/null and "b/2.3 \345\244\232\350\277\233\347\250\213\347\274\226\347\250\213/2.3.pdf" differ diff --git a/2.3.pdf b/2.3.pdf new file mode 100644 index 0000000..ac8bc2a Binary files /dev/null and b/2.3.pdf differ diff --git "a/3.1 Socket \347\274\226\347\250\213\345\237\272\347\241\200/3.1.pdf" "b/3.1 Socket \347\274\226\347\250\213\345\237\272\347\241\200/3.1.pdf" new file mode 100644 index 0000000..1183406 Binary files /dev/null and "b/3.1 Socket \347\274\226\347\250\213\345\237\272\347\241\200/3.1.pdf" differ diff --git a/3.1.pdf b/3.1.pdf new file mode 100644 index 0000000..1183406 Binary files /dev/null and b/3.1.pdf differ diff --git "a/3.2 \344\270\200\344\270\252\347\256\200\345\215\225\346\234\250\351\251\254/3.2.pdf" "b/3.2 \344\270\200\344\270\252\347\256\200\345\215\225\346\234\250\351\251\254/3.2.pdf" new file mode 100644 index 0000000..31c97f3 Binary files /dev/null and "b/3.2 \344\270\200\344\270\252\347\256\200\345\215\225\346\234\250\351\251\254/3.2.pdf" differ diff --git a/3.2.pdf b/3.2.pdf new file mode 100644 index 0000000..31c97f3 Binary files /dev/null and b/3.2.pdf differ diff --git "a/3.3 \345\244\232\350\277\236\346\216\245\343\200\201\351\235\236\351\230\273\345\241\236\347\232\204\346\234\215\345\212\241\347\253\257\343\200\201\345\256\242\346\210\267\347\253\257\347\274\226\347\250\213/3.3.pdf" "b/3.3 \345\244\232\350\277\236\346\216\245\343\200\201\351\235\236\351\230\273\345\241\236\347\232\204\346\234\215\345\212\241\347\253\257\343\200\201\345\256\242\346\210\267\347\253\257\347\274\226\347\250\213/3.3.pdf" new file mode 100644 index 0000000..6c84c0e Binary files /dev/null and "b/3.3 \345\244\232\350\277\236\346\216\245\343\200\201\351\235\236\351\230\273\345\241\236\347\232\204\346\234\215\345\212\241\347\253\257\343\200\201\345\256\242\346\210\267\347\253\257\347\274\226\347\250\213/3.3.pdf" differ diff --git a/3.3.pdf b/3.3.pdf new file mode 100644 index 0000000..6c84c0e Binary files /dev/null and b/3.3.pdf differ diff --git "a/3.4 Scapy\345\237\272\347\241\200/3.4.pdf" "b/3.4 Scapy\345\237\272\347\241\200/3.4.pdf" new file mode 100644 index 0000000..a2f6a3d Binary files /dev/null and "b/3.4 Scapy\345\237\272\347\241\200/3.4.pdf" differ diff --git a/3.4.pdf b/3.4.pdf new file mode 100644 index 0000000..a2f6a3d Binary files /dev/null and b/3.4.pdf differ diff --git "a/3.5 ARP\346\254\272\351\252\227/3.5.pdf" "b/3.5 ARP\346\254\272\351\252\227/3.5.pdf" new file mode 100644 index 0000000..da493ec Binary files /dev/null and "b/3.5 ARP\346\254\272\351\252\227/3.5.pdf" differ diff --git a/3.5.pdf b/3.5.pdf new file mode 100644 index 0000000..da493ec Binary files /dev/null and b/3.5.pdf differ diff --git "a/3.6 \347\275\221\347\273\234\345\227\205\346\216\242/3.6.pdf" "b/3.6 \347\275\221\347\273\234\345\227\205\346\216\242/3.6.pdf" new file mode 100644 index 0000000..7afc55d Binary files /dev/null and "b/3.6 \347\275\221\347\273\234\345\227\205\346\216\242/3.6.pdf" differ diff --git a/3.6.pdf b/3.6.pdf new file mode 100644 index 0000000..7afc55d Binary files /dev/null and b/3.6.pdf differ diff --git "a/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/3.7.pdf" "b/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/3.7.pdf" new file mode 100644 index 0000000..0e4e6e9 Binary files /dev/null and "b/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/3.7.pdf" differ diff --git "a/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/readme.md" "b/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/readme.md" index bf3b626..c069c1a 100644 --- "a/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/readme.md" +++ "b/3.7 \347\253\257\345\217\243\346\211\253\346\217\217/readme.md" @@ -231,11 +231,11 @@ def ackScan(target,ports): print_ports(port,"filtered") ``` -### 3.17.5 TCP Window扫描 +### 3.7.5 TCP Window扫描 TCP 窗口扫描的流程同 ACK 扫描类似,同样是客户端向服务器发送一个带有 ACK 标识和端口号的 TCP 数据包,但是这种扫描能够用于发现目标服务器端口的状态。在 ACK 扫描中返回 RST 表明没有被过滤,但在窗口扫描中,当收到返回的 RST 数据包后,它会检查窗口大小的值。如果窗口大小的值是个非零值,则说明目标端口是开放的。 - + 如果返回的 RST 数据包中的窗口大小为0,则说明目标端口是关闭的。 diff --git a/3.7.pdf b/3.7.pdf new file mode 100644 index 0000000..0e4e6e9 Binary files /dev/null and b/3.7.pdf differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/2.2.pdf" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/2.2.pdf" new file mode 100644 index 0000000..2f0b12e Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/2.2.pdf" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0 copy.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0 copy.jpg" new file mode 100755 index 0000000..85f3ccd Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0 copy.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0.jpg" new file mode 100755 index 0000000..85f3ccd Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/0.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00 copy.jpeg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00 copy.jpeg" new file mode 100644 index 0000000..7af7d51 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00 copy.jpeg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00.jpeg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00.jpeg" new file mode 100644 index 0000000..7af7d51 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/00.jpeg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/1.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/1.jpg" new file mode 100644 index 0000000..fdf5aad Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/1.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/10.png" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/10.png" new file mode 100644 index 0000000..a47d842 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/10.png" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/11.png" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/11.png" new file mode 100644 index 0000000..25d3102 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/11.png" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/12.png" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/12.png" new file mode 100644 index 0000000..61f621a Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/12.png" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/13.png" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/13.png" new file mode 100644 index 0000000..3b8ef29 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/13.png" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/2.png" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/2.png" new file mode 100644 index 0000000..2c75b01 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/2.png" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/3.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/3.jpg" new file mode 100644 index 0000000..c0d894b Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/3.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/4.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/4.jpg" new file mode 100644 index 0000000..f3dbc79 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/4.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/5.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/5.jpg" new file mode 100644 index 0000000..7aacd01 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/5.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/6.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/6.jpg" new file mode 100644 index 0000000..985f486 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/6.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/7.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/7.jpg" new file mode 100644 index 0000000..f85a400 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/7.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/8.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/8.jpg" new file mode 100644 index 0000000..37b6779 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/8.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/9.jpg" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/9.jpg" new file mode 100644 index 0000000..e30b328 Binary files /dev/null and "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/img/9.jpg" differ diff --git "a/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/readme.md" "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/readme.md" new file mode 100644 index 0000000..eeda0f5 --- /dev/null +++ "b/4.1 \345\215\217\350\256\256\346\246\202\350\247\210/readme.md" @@ -0,0 +1,396 @@ +## 协议概览 + +Web应用已经是当前互联网上数量最多、应用最广的应用形式了,Web 安全问题也是计算机网络安全中关注度最高的领域。Web应用起源于HTTP协议。由于HTTP是纯文本传输协议,无法加密传输数据,在此基础上出现了HTTPS、SSL。随着Web应用的发展,又推出了全双工通信的WebSocket协议。如今HTTP协议更新换代,HTTP/2标准正在越来越多的被支持。 + +理解Web安全,首先要从理解协议开始。本节对笔者认为应该重点了解的Web协议做一个概览性描述。更细节的内容,还需要大家去阅读规范文档或者书籍。 + +### 4.1.1 HTTP 协议 + +HTTP协议(或超文本传输协议)是用于在因特网上传输文件的网络协议。它是一种无状态协议,不仅可用于发送文件,还可用于发送资源(如动态生成的查询结果,CGI脚本的输出和其他数据)。HTTP资源由统一资源标识符(URI)或统一资源定位符(或URL)标识并位于Internet上。 + +HTTP/1.1 是当前版本主要应用的HTTP版本,是对 HTTP/1.0 的修订。HTTP/1.1 允许传输流数据。在 [W3C网站](https://www.w3.org/Protocols/rfc2616/rfc2616.html)可以阅读 HTTP/1.1 的详细内容。 + +HTTP协议具有设备无关性,可以从各种类型的主机和客户端之间进行通信。主机和客户端之间的通信通过 请求(Request)/响应(Response) 进行。 + + + +Web浏览器是HTTP客户端,因为它将请求发送到HTTP服务器(或Web服务器),然后HTTP服务器使用所需资源响应浏览器。 + +在发送HTTP请求之前,浏览器会先和服务端建立TCP连接(通常是80端口)。HTTP Server 在预定义端口上的等待客户端消息。请求由状态行和消息体组成。消息正文作为请求的资源返回,也可能返回错误消息或其他信息。 + +客户端使用“请求方法”向HTTP服务器发送请求消息。 + + +如上图,使用Chrome浏览的开发者工具可以很方便的查看HTTP请求和响应的信息。 + +HTTP协议指定的“请求方法”如下: + +
GETHEADPOSTPUTDELETECONNECTOPTIONSTRACEPATCH100 Continue101 Switching ProtocolUpgrade 标头发送的,并且指示服务器也正在切换的协议。102 Processing (WebDAV)103 Early Hints Link 链接头一起使用,以允许用户代理在服务器仍在准备响应时开始预加载资源。200 OK请求成功。成功的含义取决于HTTP方法:
+ +201 Created202 Accepted203 Non-Authoritative Information204 No Content205 Reset Content206 Partial Content207 Multi-Status (WebDAV)208 Multi-Status (WebDAV)226 IM Used (HTTP Delta encoding)300 Multiple Choice301 Moved Permanently302 Found303 See Other304 Not Modified305 Use Proxy 306 unused307 Temporary Redirect308 Permanent RedirectLocation: HTTP Response 标头指定的另一个 URI。 这与 301 Moved Permanently HTTP 响应代码具有相同的语义,但用户代理不能更改所使用的 HTTP 方法:如果在第一个请求中使用 POST,则必须在第二个请求中使用 POST。400 Bad Request401 Unauthorized402 Payment Required403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable407 Proxy Authentication Required408 Request Timeout409 Conflict410 Gone411 Length RequiredContent-Length 头的情况下接受请求。在添加了表明请求消息体长度的有效 Content-Length 头之后,客户端可以再次提交该请求。412 Precondition Failed413 Payload Too LargeRetry-After 的响应头,以告知客户端可以在多少时间以后重新尝试。414 URI Too Long415 Unsupported Media Type416 Requested Range Not Satisfiable417 Expectation FailedExpect 请求标头字段指示的期望值。418 I'm a teapot“茶壶冲泡咖啡”。421 Misdirected Request422 Unprocessable Entity (WebDAV)423 Locked (WebDAV)424 Failed Dependency (WebDAV)425 Too Early426 Upgrade RequiredUpgrade 头以指示所需的协议。428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons500 Internal Server Error501 Not ImplementedGET和HEAD是要求服务器支持的,它们必定不会返回此错误代码。502 Bad Gateway503 Service UnavailableRetry-After:如果可能的话,HTTP头应该包含恢复服务之前的估计时间。 网站管理员还必须注意与此响应一起发送的与缓存相关的标头,因为这些临时条件响应通常不应被缓存。504 Gateway Timeout505 HTTP Version Not Supported506 Variant Also Negotiates507 Insufficient Storage508 Loop Detected (WebDAV)510 Not Extended511 Network Authentication Required| + http + | ++ https + | +
|---|---|
| + 以超文本(结构化文本)格式传输数据 + | ++ 以加密格式传输数据 + | +
| + 默认使用端口80 + | ++ 默认使用端口443 + | +
| + 不安全 + | ++ 使用SSL技术保护安全 + | +
+ 以 http://开始
+ |
+
+ 以 https://开始
+ |
+