Windows PowerShell Invoke-RestMethod IP Information Collection
The following analytic detects the use of PowerShell's Invoke-RestMethod cmdlet to collect geolocation data from ipinfo.io or IP address information from api.ipify.org. This behavior leverages PowerShell Script Block…
Description
The following analytic detects the use of PowerShell's Invoke-RestMethod cmdlet to collect geolocation data from ipinfo.io or IP address information from api.ipify.org. This behavior leverages PowerShell Script Block Logging to identify scripts that gather external IP information and potential geolocation data. This activity is significant as it may indicate reconnaissance efforts, where threat actors are attempting to determine the geographical location or network details of a compromised system. While some legitimate software may use these services, this pattern is commonly observed in malware and post-exploitation toolkits like those used by Water Gamayun threat actors.
Detection logic
Detection requirements
- Platform
- ESXiIaaSLinuxmacOSNetwork DevicesWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source category
- powershell_script_block_logging_4104
Known benign triggers
- Some legitimate applications or administrative scripts may use these services for IP validation or geolocation. Filter as needed for approved administrative tools.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| securityintelligence.com/posts/new-threat-actor-water-gamayun-targets-telecom-finance/ | 2 |
| www.ncsc.gov.uk/report/weekly-threat-report-12th-april-2024 | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- 8db47e12-9c3e-4f5a-b0d6-e42a1895cd4f
- Tagged by the source as
- Water GamayunEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1