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

85 lines
2.3 KiB
YAML
Raw Normal View History

2024-07-04 00:00:46 +05:30
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
2024-07-04 00:00:46 +05:30
javascript:
2025-04-10 17:03:00 +05:30
- code: |
2024-07-04 00:00:46 +05:30
const ldap = require('nuclei/ldap');
const cfg = new ldap.Config();
cfg.Upgrade = true;
2025-04-10 17:03:00 +05:30
const client = new ldap.Client(Host, Port);
2024-07-04 00:00:46 +05:30
const metadata = client.CollectMetadata();
2025-04-10 17:03:00 +05:30
Export((metadata))
2024-07-04 00:00:46 +05:30
args:
2025-04-10 17:03:00 +05:30
Host: "ldap://{{Host}}"
2024-07-04 00:00:46 +05:30
Port: 389
2024-07-04 00:09:29 +05:30
matchers:
- type: dsl
dsl:
2025-04-10 17:03:00 +05:30
- "len(BaseDn) != 0"
- "len(DnsHostName) != 0"
- "len(DefaultNamingContext) != 0"
- "len(DomainFunctionality) != 0"
- "len(ForestFunctionality) != 0"
- "len(DomainControllerFunctionality) != 0"
2024-07-04 00:09:29 +05:30
- "success == true"
2024-07-04 00:00:46 +05:30
extractors:
2025-04-10 17:03:00 +05:30
- type: json
internal: true
name: BaseDn
json:
- '.BaseDN'
- type: json
internal: true
name: DnsHostName
json:
- '.DnsHostName'
- type: json
internal: true
name: DefaultNamingContext
json:
- '.DefaultNamingContext'
- type: json
internal: true
name: DomainFunctionality
json:
- '.DomainFunctionality'
- type: json
internal: true
name: ForestFunctionality
json:
- '.ForestFunctionality'
- type: json
internal: true
name: DomainControllerFunctionality
json:
- '.DomainControllerFunctionality'
2024-07-04 00:00:46 +05:30
- type: json
json:
- '"BaseDN: " + .BaseDN'
2025-04-10 17:03:00 +05:30
- '"DnsHostName: " + .DnsHostName'
2024-07-04 00:00:46 +05:30
- '"DefaultNamingContext: "+ .DefaultNamingContext'
- '"DomainFunctionality: "+ .DomainFunctionality'
- '"ForestFunctionality: " + .ForestFunctionality'
2025-01-09 12:55:26 +00:00
- '"DomainControllerFunctionality: "+ .DomainControllerFunctionality'
2025-04-10 12:55:30 +00:00
# digest: 4b0a00483046022100cbfe0c1d3dfae0a65e393d39f5e3f59d0b9f66f477cb66b57872f6a77d50e4f8022100ffb9acd602b1a8397a7151648316ef51216d7e94f3941a708d4b05b97bad575e:922c64590222798bb761d5b6d8e72950