Query Details

Remcos Rat Checking For Geolocation

Query

# Remcos RAT checking for geolocation through web

### Description

SANS ISC published a diary on 30/05/2023 where ModiLoader installs a Remcos RAT payload which checks for geolocation through web by geoplugin[.]net. The following query checks whether an attempt to connect to geoplugin[.]net has been made by a non-browser application. Query can be modified based on your environment and the browsers used, also other geolocation services could be checked.

### References
- https://isc.sans.edu/diary/29896

### Microsoft 365 Defender
```
// Define browser executable filenames
let Browser = dynamic(["firefox.exe", "msedge.exe", "chrome.exe", "opera.exe", "brave.exe"]);
DeviceNetworkEvents
// Define timeframe 
| where Timestamp > ago(30d)
| where not(InitiatingProcessFileName in (['Browser']))
// Define service used to locate geographical information
| where RemoteUrl contains 'geoplugin.net'
| project Timestamp, DeviceName, LocalIP, RemoteUrl, RemoteIP, RemotePort, InitiatingProcessFileName, InitiatingProcessAccountUpn
| sort by Timestamp desc
```

### Microsoft Sentinel
```
// Define browser executable filenames
let Browser = dynamic(["firefox.exe", "msedge.exe", "chrome.exe", "opera.exe", "brave.exe"]);
DeviceNetworkEvents
// Define timeframe 
| where TimeGenerated > ago(30d)
| where not(InitiatingProcessFileName in (['Browser']))
// Define service used to locate geographical information
| where RemoteUrl contains 'geoplugin.net'
| project Timestamp, DeviceName, LocalIP, RemoteUrl, RemoteIP, RemotePort, InitiatingProcessFileName, InitiatingProcessAccountUpn
| sort by Timestamp desc
```

### MITRE ATT&CK Mapping
- Tactic: Discovery
- Technique ID: T1614
- [System Location Discovery](https://attack.mitre.org/techniques/T1614/)

### Source

### Versioning
| Version       | Date          | Comments                          |
| ------------- |---------------| ----------------------------------|
| 1.0           | 08/06/2023    | Initial publish                   |

Explanation

This query checks for attempts to connect to the website geoplugin[.]net by non-browser applications. It looks for instances where a Remcos RAT payload installed by ModiLoader checks for geolocation through the web. The query can be modified to fit different environments and browsers used. It provides information such as the timestamp, device name, local IP, remote URL, remote IP, remote port, initiating process file name, and initiating process account UPN. The query is useful for detecting potential malicious activity related to geolocation checks.

Details

Michalis Michalos profile picture

Michalis Michalos

Released: August 14, 2023

Tables

DeviceNetworkEvents

Keywords

Devices,Intune,User

Operators

|,let,DeviceNetworkEvents,where,Timestamp,ago,not,in,project,sort,by,desc,contains

Actions