51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
id: pop3-capabilities-enum
|
|
|
|
info:
|
|
name: POP3 Capabilities - Enumeration
|
|
author: pussycat0x,daffainfo
|
|
severity: info
|
|
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.
|
|
reference:
|
|
- https://nmap.org/nsedoc/scripts/pop3-capabilities.html
|
|
metadata:
|
|
verified: true
|
|
max-request: 1
|
|
shodan-query: "port:110"
|
|
tags: js,network,pop3,enum
|
|
|
|
javascript:
|
|
- pre-condition: |
|
|
isPortOpen(Host,Port);
|
|
code: |
|
|
let data = "CAPA\r\n"
|
|
let c = require("nuclei/net");
|
|
let conn = c.Open('tcp', `${Host}:${Port}`);
|
|
conn.Send(data);
|
|
let result = conn.RecvString();
|
|
Export(result);
|
|
|
|
args:
|
|
Host: "{{Host}}"
|
|
Port: 110
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: dsl
|
|
dsl:
|
|
- "success == true"
|
|
|
|
- type: regex
|
|
regex:
|
|
- '\+OK.*'
|
|
|
|
- type: word
|
|
words:
|
|
- "HTTP/1.1"
|
|
negative: true
|
|
|
|
extractors:
|
|
- type: dsl
|
|
dsl:
|
|
- replace_regex(replace_regex(response, "\\+OK.*\\r\\n\\+OK.*\\r\\n", ""), "\\r\\n", " ")
|
|
# digest: 4b0a00483046022100a6a76a8646e2c13b3725c08b6147a79dba19f54b89918b42d1b1cf67137ee3f3022100ba72e4587dabaf290bfbf0c1abf3bfbd0f09a17b583dfaa4006fd700201edffd:922c64590222798bb761d5b6d8e72950 |