T1596

Search Open Technical Databases

This detection identifies potential adversary reconnaissance activity involving queries to open technical databases such as Shodan, Censys, Certificate Transparency logs, passive DNS repositories, WHOIS services, and CDN enumeration tools. Because T1596 is a PRE-ATT&CK technique executed outside the victim network, direct detection is not possible. Instead, this rule focuses on second-order indicators: internal endpoints or service accounts making scripted bulk queries to known OSINT aggregator domains, automated certificate transparency monitoring tools being abused, and unusual DNS resolution patterns targeting passive DNS APIs. Detection of these behaviors may indicate an insider threat, a compromised endpoint conducting pre-pivot reconnaissance, or red team activity. Confidence is set to low due to high false positive potential from legitimate security research and threat intelligence workflows.

Microsoft Sentinel / Defender
kusto
let OSINTDomains = dynamic([
    "shodan.io", "api.shodan.io",
    "censys.io", "search.censys.io",
    "dnsdumpster.com",
    "securitytrails.com", "api.securitytrails.com",
    "spyse.com",
    "zoomeye.org",
    "fofa.so", "fofa.info",
    "binaryedge.io", "api.binaryedge.io",
    "onyphe.io",
    "hunter.io",
    "intelx.io",
    "passivedns.circl.lu",
    "riddler.io",
    "robtex.com",
    "hackertarget.com",
    "whoisxmlapi.com",
    "domaintools.com",
    "crt.sh",
    "certspotter.com",
    "urlscan.io",
    "viewdns.info",
    "threatcrowd.org"
]);
let SuspiciousProcesses = dynamic([
    "curl.exe", "wget.exe",
    "python.exe", "python3.exe", "py.exe",
    "powershell.exe", "pwsh.exe",
    "cmd.exe", "wscript.exe", "cscript.exe"
]);
DeviceNetworkEvents
| where TimeGenerated > ago(1h)
| where ActionType == "ConnectionSuccess" or ActionType == "HttpConnectionInspected"
| where RemoteUrl has_any (OSINTDomains)
    or RemoteIPType != "Private" and RemotePort in (443, 80)
        and (RemoteUrl contains "shodan" or RemoteUrl contains "censys" or RemoteUrl contains "crt.sh")
| where InitiatingProcessFileName in~ (SuspiciousProcesses)
    or InitiatingProcessCommandLine has_any ("/api/", "apikey", "api_key", "--key", "-H 'API")
| summarize
    RequestCount = count(),
    UniqueOSINTDomains = dcount(RemoteUrl),
    QueriedDomains = make_set(RemoteUrl, 20),
    ProcessesUsed = make_set(InitiatingProcessFileName, 5),
    CommandLines = make_set(InitiatingProcessCommandLine, 5),
    FirstSeen = min(TimeGenerated),
    LastSeen = max(TimeGenerated)
    by DeviceName, InitiatingProcessAccountName, InitiatingProcessAccountDomain
| where RequestCount >= 5 or UniqueOSINTDomains >= 2
| extend
    RiskScore = case(
        UniqueOSINTDomains >= 5, 90,
        UniqueOSINTDomains >= 3, 70,
        RequestCount >= 20, 60,
        40
    ),
    Alert = "Possible open technical database reconnaissance from corporate endpoint"
| project
    FirstSeen, LastSeen, DeviceName,
    InitiatingProcessAccountName, InitiatingProcessAccountDomain,
    RequestCount, UniqueOSINTDomains, QueriedDomains,
    ProcessesUsed, CommandLines, RiskScore, Alert
| order by RiskScore desc
medium severity low confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents

False Positives

  • Security analysts and threat intelligence teams performing legitimate asset discovery or exposure monitoring using these same OSINT tools
  • Red team or penetration testing engagements querying Shodan/Censys to validate external attack surface
  • Automated vulnerability management platforms (e.g., Tenable.io, Rapid7) that query third-party databases as part of external exposure scanning
  • DevSecOps pipelines using crt.sh or SecurityTrails APIs for certificate transparency monitoring in CI/CD
  • IT asset management tools that periodically validate domain and certificate configurations via WHOIS or passive DNS APIs

Unlock Pro Content

Get the full detection package for T1596 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections