Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeater returns encoded body even if content-encoding is gzip #116

Closed
derevnjuk opened this issue Jul 26, 2022 · 0 comments · Fixed by #117
Closed

Repeater returns encoded body even if content-encoding is gzip #116

derevnjuk opened this issue Jul 26, 2022 · 0 comments · Fixed by #117
Assignees
Labels
Type: bug Something isn't working

Comments

@derevnjuk
Copy link
Member

Repeater returns encoded body even if content-encoding: gzip body. Originally this was found on DVWA AO using repeater started from code (at least at Windows machine).

Steps to reproduce:

  1. Start a repeater using https://github.com/NeuraLegion/sectester-js/tree/master/packages/repeater
  2. Test DVWA cms AO using repeater started at step 1 (mind that there’s no additional header at stage 1).
DVWA AO
{
  "type": "multistep",
  "name": "DVWA-CMS",
  "test": {
    "request": {
      "protocol": "http",
      "method": "GET",
      "url": "http://dvwa2.neuralegion.com",
      "changeMethodOnRedirect": false,
      "followRedirects": false,
      "maxRedirects": 0
    }
  },
  "invalidSessionDetection": [
    {
      "type": "header",
      "name": "location",
      "patterns": [
        "login"
      ]
    }
  ],
  "config": {
    "multistep": {
      "steps": [
        {
          "name": "stage1",
          "request": {
            "method": "GET",
            "url": "http://dvwa2.neuralegion.com/login.php",
            "changeMethodOnRedirect": false,
            "protocol": "http",
            "followRedirects": true,
            "maxRedirects": 3
          },
          "successResponseDetection": [
            {
              "type": "status",
              "statuses": [
                200
              ]
            }
          ]
        },
        {
          "name": "stage2",
          "request": {
            "method": "POST",
            "url": "http://dvwa2.neuralegion.com/login.php",
            "changeMethodOnRedirect": false,
            "protocol": "http",
            "followRedirects": false,
            "maxRedirects": 0,
            "headers": [
              {
                "name": "content-type",
                "value": "application/x-www-form-urlencoded",
                "mergeStrategy": "replace"
              }
            ],
            "body": "username=admin&password=password&Login=Login&user_token={{ stage1.response.body | match: /value=.(.{32})./ }}"
          },
          "successResponseDetection": [
            {
              "type": "header",
              "name": "location",
              "patterns": [
                "index"
              ]
            }
          ]
        }
      ]
    }
  }
}

Actual result: encoded data in response body at stage 1, failing step 2.
image
image

Expected result: success at all stages.

image

Note: adding to stage the accept-encoding: identity field fixes the issue.

@derevnjuk derevnjuk added the Type: bug Something isn't working label Jul 26, 2022
@derevnjuk derevnjuk self-assigned this Jul 26, 2022
@derevnjuk derevnjuk changed the title Repeater returns encoded body even if content-encoding: gzip Repeater returns encoded body even if content-encoding is gzip Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant