nuclei-templates/javascript/enumeration/ldap/ldap-metadata.yaml

45 lines
1.4 KiB
YAML
Raw Normal View History

2024-07-03 18:30:46 +00:00
id: ldap-metadata
info:
name: LDAP Metadata - Enumeration
author: pussycat0x
severity: info
description: |
LDAP metadata refers to the data that describes the structure, schema, and attributes of the LDAP directory
reference:
- https://docs.projectdiscovery.io/templates/protocols/javascript/modules/ldap.Metadata
metadata:
max-request: 1
shodan-query: ldap
tags: js,network,ldap
javascript:
2024-07-10 12:08:01 +00:00
- pre-condition: |
isPortOpen(Host,Port);
code: |
2024-07-03 18:30:46 +00:00
const ldap = require('nuclei/ldap');
const cfg = new ldap.Config();
cfg.Upgrade = true;
const client = new ldap.Client(Host, Port, cfg);
const metadata = client.CollectMetadata();
Export(metadata)
args:
Host: "ldap://{{Host}}"
Port: 389
2024-07-03 18:39:29 +00:00
matchers:
- type: dsl
dsl:
- "success == true"
2024-07-03 18:30:46 +00:00
extractors:
- type: json
json:
- '"BaseDN: " + .BaseDN'
- '"DnsHostName: " + .DnsHostName '
- '"DefaultNamingContext: "+ .DefaultNamingContext'
- '"DomainFunctionality: "+ .DomainFunctionality'
- '"ForestFunctionality: " + .ForestFunctionality'
- '"DomainControllerFunctionality: "+ .DomainControllerFunctionality'
# digest: 4a0a0047304502201a7f8d1aac1b3310c350f97cfc2da7ee0c35031a8c190f60cf53d13205487b94022100922fe954b1f34d7c2cebe82aacc313bf609ed3259c819b989e32c20fc4cf80e4:922c64590222798bb761d5b6d8e72950