Detection rules › Elastic
Remcos RAT INETCookies File Deletion
Identifies INETCookies file deletion by unsigned process, consistent with the Remcos Remote Access Trojan (RAT) behavior. Remcos RAT is used by attackers to perform actions on infected machines remotely.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
Rule body
[rule]
description = """
Identifies INETCookies file deletion by unsigned process, consistent with the Remcos Remote Access Trojan (RAT)
behavior. Remcos RAT is used by attackers to perform actions on infected machines remotely.
"""
id = "cf7592cc-6954-4973-92ee-213c5eea0fa5"
license = "Elastic License v2"
name = "Remcos RAT INETCookies File Deletion"
os_list = ["windows"]
reference = [
"https://any.run/malware-trends/remcos",
"https://attack.mitre.org/software/S0332/",
"https://www.elastic.co/security-labs/dissecting-remcos-rat-part-four",
]
version = "1.0.4"
query = '''
file where event.action == "deletion" and file.name : "container.dat" and user.id != "S-1-5-18" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
file.path : "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCookies\\container.dat" and
not process.executable : "C:\\Program Files (x86)\\WinDirStat\\windirstat.exe"
'''
min_endpoint_version = "8.1.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[threat]]
framework = "MITRE ATT&CK"
[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[internal]
min_endpoint_version = "8.1.0"
Stages and Predicates
Stage 1: file
file where event.action == "deletion" and file.name : "container.dat" and user.id != "S-1-5-18" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
file.path : "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCookies\\container.dat" and
not process.executable : "C:\\Program Files (x86)\\WinDirStat\\windirstat.exe"
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | eq | C:\Program Files (x86)\WinDirStat\windirstat.exe | excludes:process.executable field:"process.executable" value:"C:\Program Files (x86)\WinDirStat\windirstat.exe" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"deletion" |
file.name | wildcard |
| field:"file.name" kind:wildcard value:"container.dat" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard value:"?:\Users\*\AppData\Local\Microsoft\Windows\INetCookies\container.dat" |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"false" |
user.id | ne |
| field:"user.id" kind:ne value:"S-1-5-18" |