Merge pull request #10559 from daffainfo/patch-8

fix: false positive on pop3-capabilities-enum.yaml
patch-9
Sandeep Singh 2024-08-16 16:23:48 +05:30 committed by GitHub
commit 0d53722ed4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 6 deletions

View File

@ -2,7 +2,7 @@ id: pop3-capabilities-enum
info: info:
name: POP3 Capabilities - Enumeration name: POP3 Capabilities - Enumeration
author: pussycat0x author: pussycat0x,daffainfo
severity: info severity: info
description: | description: |
POP3 capabilities are defined in RFC 2449. The CAPA command allows a client to ask a server what commands it supports and possibly any site-specific policy. Besides the list of supported commands, the IMPLEMENTATION string giving the server version may be available. POP3 capabilities are defined in RFC 2449. The CAPA command allows a client to ask a server what commands it supports and possibly any site-specific policy. Besides the list of supported commands, the IMPLEMENTATION string giving the server version may be available.
@ -23,8 +23,7 @@ javascript:
let conn = c.Open('tcp', `${Host}:${Port}`); let conn = c.Open('tcp', `${Host}:${Port}`);
conn.Send(data); conn.Send(data);
let result = conn.RecvString(); let result = conn.RecvString();
let cleanedData = result.replace(/\+OK Dovecot ready\.\r\n\+OK|\r\n|\s/g, " "); Export(result);
console.log(Export(cleanedData))
args: args:
Host: "{{Host}}" Host: "{{Host}}"
@ -36,6 +35,10 @@ javascript:
dsl: dsl:
- "success == true" - "success == true"
- type: regex
regex:
- '\+OK.*'
- type: word - type: word
words: words:
- "HTTP/1.1" - "HTTP/1.1"
@ -43,7 +46,6 @@ javascript:
extractors: extractors:
- type: dsl - type: dsl
name:
dsl: dsl:
- response - replace_regex(replace_regex(response, "\\+OK.*\\r\\n\\+OK.*\\r\\n", ""), "\\r\\n", " ")
# digest: 4a0a0047304502205ee9fb4328d4c7601dcd2216a6d20addbf5330be29a7dacc18ebadd9d98ec60c022100e0bbcf935dd62250ed205d1fdaf7c6ce1bc8188cac860752df55c8b5320b61ff:922c64590222798bb761d5b6d8e72950 # digest: 4a0a0047304502205ee9fb4328d4c7601dcd2216a6d20addbf5330be29a7dacc18ebadd9d98ec60c022100e0bbcf935dd62250ed205d1fdaf7c6ce1bc8188cac860752df55c8b5320b61ff:922c64590222798bb761d5b6d8e72950