You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature] Headers missing or modified from raw request #256
Describe the bug
I was trying to build a template for request-smuggling but I found out some headers are stripped from the raw request blocking the exploitation attempt.
Here is an extract of the template with the raw request
and my server is receiving the following request which lack of the Transfer-Encoding: chunked header, furthermore the Content-Length: was modified. Did I miss something ? :)
POST / HTTP/1.1
Host: 127.0.0.1:4444
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86
Content-Length: 95
Connection: close
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
5c
GPOST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 15
x=10
The payload is from PortSwigger Request Smuggling Lab.
Thank you for creating this issue, good news is that, we already worked on this, it's not possible to send crafted or invalid request with standard net/http, so we need something else to support this, as a result, we FOSS https://github.com/projectdiscovery/rawhttp, and we already added support of it in httpx with unsafe flag and soon it will be added into nuclei as well, after that, you can literally do anything with the request.
Reacted by Antoine Roly and Ricardo Iramar dos Santos
changed the title [-][issue] Headers missing or modified from raw request[/-][+][feature] Headers missing or modified from raw request[/+]on Aug 24, 2020
@swisskyrepo Raw HTTP support is added in the master code, now adding unsafe: true withing the request block should allow using raw HTTP with all the capabilities we need, we will add more details and example about these changes on the documentation website before creating a new release, here is a quick example for solving one of the lab at web academy.
This template doesn't work in my lab, I rebuilt the binary with GO111MODULE=on go get -u -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei.
The header Transfer-Encoding: chunked is still not sent to the server.
@swisskyrepo these changes are live in the master code and you are pulling the last stable release, if you want to use these changes before we can create a new release, you can install the master version using GO111MODULE=on go get -u -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@master or follow the Github install method in the readme page.
Activity
ehsandeep commentedon Aug 24, 2020
Hey @swisskyrepo,
Thank you for creating this issue, good news is that, we already worked on this, it's not possible to send crafted or invalid request with standard
net/http, so we need something else to support this, as a result, we FOSS https://github.com/projectdiscovery/rawhttp, and we already added support of it inhttpxwithunsafeflag and soon it will be added into nuclei as well, after that, you can literally do anything with the request.[-][issue] Headers missing or modified from raw request[/-][+][feature] Headers missing or modified from raw request[/+]ehsandeep commentedon Oct 6, 2020
@swisskyrepo Raw HTTP support is added in the master code, now adding
unsafe: truewithing the request block should allow using raw HTTP with all the capabilities we need, we will add more details and example about these changes on the documentation website before creating a new release, here is a quick example for solving one of the lab at web academy.swisskyrepo commentedon Oct 7, 2020
This template doesn't work in my lab, I rebuilt the binary with
GO111MODULE=on go get -u -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei.The header
Transfer-Encoding: chunkedis still not sent to the server.Am I doing something wrong ?
ehsandeep commentedon Oct 7, 2020
@swisskyrepo these changes are live in the master code and you are pulling the last stable release, if you want to use these changes before we can create a new release, you can install the master version using
GO111MODULE=on go get -u -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@masteror follow the Github install method in the readme page.swisskyrepo commentedon Oct 7, 2020
You are right, thank you :)