Skip to content

Shellshock Detection Script Inconsistencies #1983

Closed
res0nat0r/nmap
#1

Description

NSE: http-shellshock.nse

Edits Requested:
Line 89: cmd = '() { :;}; echo; /bin/bash -c '..cmd
Line 99: Comment out line 99

Different results with/without line 99
Suggest either take it out or do 2 request with/without.

For line 89, adding the echo before the command would ensure the response has a blank line after the header.

Activity

  1. nnposter commented on Jul 29, 2020

    @nnposter

    Could you please elaborate on the rationale for the additional bash wrapper?

    @cldrn Is there a case for using the payload as a header name? It seems to me that doing so might result in HTTP 400 while the chance of executing is limited, especially since the payload contains a colon so whatever primitive parsing might try to accept the header is bound to trim or split the payload.

  2. cldrn commented on Jul 30, 2020

    @cldrn
    Member

    The example vulnerable application we used to write that script was vulnerable via header injection. I think at that time there were a couple of products affected by the injection via headers but i can't recall which ones.

    The VM is still available here:
    https://drive.google.com/file/d/0BzPR8exG0kt6eUtBZ1NjekRNblE/view?usp=sharing

  3. nnposter commented on Jul 31, 2020

    @nnposter

    Thank you for the quick response. I have run the VM and it appears not vulnerable when the payload is used as a header name. (It is vulnerable when the same payload is used as a value for a regular header.)

    Considering this observed test, combined with my earlier rationale, do you see a reason why we should keep populating a header name with the payload?

  4. nnposter commented on Aug 22, 2020

    @nnposter

    @cldrn Have you had a chance to consider the proposal? I am going to remove the payload in the header name in a few weeks unless you wish to take over and handle this GitHub issue in whatever way you feel appropriate.

  5. cldrn commented on Aug 26, 2020

    @cldrn
    Member

    Hi,

    It makes sense to remove it if it does not work as expected. I thought we included there for a reason (that VM) but it could be that it never worked as intended so feel free to remove the payload from the header.

  6. self-assigned this
    on Aug 30, 2020
  7. nnposter commented on Aug 30, 2020

    @nnposter

    The header name payload has been removed in r37990.

  8. added a commit that references this issue on Oct 7, 2020
    c461990
  9. added a commit that references this issue on Mar 20, 2024
    c3431b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions