Skip to content

Questions about "Gzip request body" #66

@rcbarnett

Description

@rcbarnett

@albinowax - per my question on X - I am testing the http request smuggler menu option to "Gzip request body" and I have a few questions.

Example usage: I have a normal urlencoded request body with a POST method.
image

Once this has executed, the body is Gzip compressed and a Transfer-Encoding: gzip header is added.
image

My first question is why Transfer-Encoding is used instead of Content-Encoding? TE is a hop-by-hop header whereas CE would be kept along the pipeline path as it is specifically related to the compressed body content.

My second question is that there might be a possible bug in relation to the compression itself. If I "turn on non printable characters" option, I see the compressed body header begins with the expected "1F8B" characters that indicate Gzip compression.
image

If, however, I switch to "Hex" view, you will see that there is a "c2" character in between:
image

Is this a bug in the implementation? I am asking as the gunzip mechanisms are not working on these bodies. You can test using that exact payload and gzip commandline:
$ gzip -t -v /tmp/3 gzip: /tmp/3: not in gzip format /tmp/3: NOT OK

$ od -c /tmp/3 0000000 037 302 213 \b 001 001 001 001 001 001 ÿ ** K Î ** M 0000020 ± ** M H N , Q Ð ** O - I Ö ** / H 0000040 , . . O I 001 001 * \ A 036 025 001 001 001 \n 0000060
Is this a bug in the gzipBody() function code or is this expected? Are there perhaps lax parsers that can still gunzip these bodies?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions