Skip to content

Commit

Permalink
Fix false positives on ID command
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime ALAY-EDDINE authored and tarraschk committed Feb 19, 2025
1 parent 90ed601 commit fc46829
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion wapitiCore/attack/mod_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def attack(self, request: Request, response: Optional[Response] = None):
vuln_info = None

# No timeout raised, check for patterns in response
if any(rule in response.content for rule in payload_info.rules):
if any(rule.replace("[SPACE]", " ") in response.content for rule in payload_info.rules):
vuln_info = payload_info.description
# We reached maximum exploitation for this parameter, don't send more payloads
vulnerable_parameter = True
Expand Down
14 changes: 7 additions & 7 deletions wapitiCore/data/attacks/execPayloads.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[DEFAULT]
payload = None
; rules will be used as a boolean AND if there are multiple
; rules will be used as a boolean OR if there are multiple
rules = None
description = None
status = vulnerability
type = pattern

[no_escape]
payload = id
rules = uid=
gid=
groupes=
rules = [SPACE]gid=
[SPACE]groupes=
[SPACE]groups=
description = Command execution
status = vulnerability

[no_escape_owasp_benchmark]
payload = id
rules = uid=
gid=
groupes=
rules = [SPACE]gid=
[SPACE]groupes=
[SPACE]groups=
description = Command execution
status = vulnerability

Expand Down

0 comments on commit fc46829

Please sign in to comment.