T1590.005

IP Addresses

Adversaries may gather the victim's IP addresses that can be used during targeting. Public IP addresses may be allocated to organizations by block, or a range of sequential addresses. Information about assigned IP addresses may include a variety of details, such as which IP addresses are in use. IP addresses may also enable an adversary to derive other details about a victim, such as organizational size, physical location(s), Internet service provider, and or where/how their publicly-facing infrastructure is hosted. Adversaries gather this information via direct collection actions (active scanning, phishing for information) or through online data sets such as WHOIS, ARIN, RIPE, passive DNS repositories, and IP intelligence platforms like Shodan or Censys.

Microsoft Sentinel / Defender
kusto
let IPIntelServices = dynamic([
  "shodan.io", "censys.io", "ipinfo.io", "ipapi.co", "ip-api.com",
  "ipwhois.io", "bgp.he.net", "arin.net", "ripe.net", "apnic.net",
  "lacnic.net", "afrinic.net", "spyse.com", "fofa.info", "zoomeye.org",
  "dnsdumpster.com", "hackertarget.com", "viewdns.info", "ipvoid.com",
  "whatismyipaddress.com", "ip2location.com", "maxmind.com", "greynoise.io",
  "binaryedge.io", "onyphe.io"
]);
let OSINTTools = dynamic([
  "nmap", "masscan", "zmap", "theharvester", "recon-ng", "maltego",
  "shodan", "censys", "spiderfoot", "amass", "subfinder"
]);
// Branch 1: Outbound connections from managed endpoints to IP intelligence platforms
let EndpointIPIntel = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where ActionType in ("ConnectionSuccess", "ConnectionAttempt")
| where RemoteUrl has_any (IPIntelServices)
    or RemoteIPType == "Public" and (RemoteUrl has "whois" or RemoteUrl has "ipinfo" or RemoteUrl has "bgp")
| extend DetectionBranch = "EndpointIPIntelLookup"
| project Timestamp, DeviceName, AccountName, RemoteUrl, RemoteIP, RemotePort,
         InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionBranch;
// Branch 2: OSINT tool execution on managed endpoints (insider threat / compromised endpoint)
let OSINTToolExec = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (OSINTTools)
    or ProcessCommandLine has_any (OSINTTools)
    or ProcessCommandLine has_any ("nmap -sn", "nmap -p", "masscan --rate", "zmap -p",
                                    "theharvester -d", "amass enum", "subfinder -d",
                                    "shodan search", "censys search", "spiderfoot -s")
| extend DetectionBranch = "OSINTToolOnEndpoint"
| project Timestamp = Timestamp, DeviceName, AccountName,
         RemoteUrl = "", RemoteIP = "", RemotePort = int(0),
         InitiatingProcessFileName, InitiatingProcessCommandLine = ProcessCommandLine,
         DetectionBranch;
union EndpointIPIntel, OSINTToolExec
| sort by Timestamp desc
low severity low confidence

Data Sources

Network Traffic: Network Connection Creation Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents DeviceProcessEvents

False Positives

  • Security analysts and threat intelligence teams routinely query Shodan, Censys, ARIN, and RIPE to assess the organization's external attack surface — this is expected and should be allowlisted by user/device
  • Network engineers using nmap or masscan for authorized internal network discovery and asset inventory
  • Penetration testers performing authorized external assessments will use all of these tools and services legitimately
  • IT and DevOps staff querying ipinfo.io or similar APIs in automation scripts to geolocate user traffic or validate IP addresses

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections