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

42 lines
1.2 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:
- code: |
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'