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

decompression bomb increase memory usages #5133

Open
ehsandeep opened this issue May 2, 2024 · 1 comment
Open

decompression bomb increase memory usages #5133

ehsandeep opened this issue May 2, 2024 · 1 comment
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@ehsandeep
Copy link
Member

Nuclei version:

dev / main

Current Behavior:

out of memory issue

Expected Behavior:

  1. Set max memory limit to read for decompression like nuclei has for response read.
  2. Confirm if each matchers are not doing decompression separately and being resued.

Steps To Reproduce:

id: decompression-bomb

info:
  name: test
  author: parthmalhotra
  severity: critical
  description: |
    test
  reference:
    - http://example.com
  tags: bomb

http:
  - raw:
      - |
        GET /compr.txt HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(zlib_decode(body), "223ff")'
          - 'contains(zlib_decode(body), "2232ff")'
          - 'contains(zlib_decode(body), "22322ff")'
          - 'contains(zlib_decode(body), "223f333f")'
          - 'contains(zlib_decode(body), "224443ff")'
          - 'contains(zlib_decode(body), "223fdf")'
          - 'contains(zlib_decode(body), "2232cff")'
          - 'contains(zlib_decode(body), "2232b2ff")'
          - 'contains(zlib_decode(body), "223fx333f")'
          - 'contains(zlib_decode(body), "2s24443ff")'
          - 'contains(zlib_decode(body), "223fccxf")'
          - 'contains(zlib_decode(body), "223zz2ff")'
          - 'contains(zlib_decode(body), "2332322ff")'
          - 'contains(zlib_decode(body), "22w3f333f")'
          - 'contains(zlib_decode(body), "2244463ff")'
          - 'contains(zlib_decode(body), "22344ffdf")'
          - 'contains(zlib_decode(body), "2232333cff")'
          - 'contains(zlib_decode(body), "2232224b2ff")'
          - 'contains(zlib_decode(body), "223fdfe3x333f")'
          - 'contains(zlib_decode(body), "2s244ffrfrf343ff")'
        condition: and
  1. Save above template as test.yaml
  2. Run nuclei -t test.yaml -u 64.227.170.3 (test host with compressed file compr.txt)
  3. Notice spike in memory usages.
@ehsandeep ehsandeep added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label May 2, 2024
@Ice3man543
Copy link
Member

Ice3man543 commented May 2, 2024

@Ice3man543 Ice3man543 self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants