Detection: Living Off The Land Detection

Description

The following correlation identifies multiple risk events associated with the "Living Off The Land" analytic story, indicating potentially suspicious behavior. It leverages the Risk data model to aggregate and correlate events tagged under this story, focusing on systems with a high count of distinct sources. This activity is significant as it often involves the use of legitimate tools for malicious purposes, making detection challenging. If confirmed malicious, this behavior could allow attackers to execute code, escalate privileges, or persist within the environment using trusted system utilities.

1
2| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime sum(All_Risk.calculated_risk_score) as risk_score, count(All_Risk.calculated_risk_score) as risk_event_count, values(All_Risk.annotations.mitre_attack.mitre_tactic_id) as annotations.mitre_attack.mitre_tactic_id, dc(All_Risk.annotations.mitre_attack.mitre_tactic_id) as mitre_tactic_id_count, values(All_Risk.annotations.mitre_attack.mitre_technique_id) as annotations.mitre_attack.mitre_technique_id, dc(All_Risk.annotations.mitre_attack.mitre_technique_id) as mitre_technique_id_count, values(All_Risk.tag) as tag, values(source) as source, dc(source) as source_count from datamodel=Risk.All_Risk where All_Risk.analyticstories="Living Off The Land" All_Risk.risk_object_type="system" by All_Risk.risk_object All_Risk.risk_object_type All_Risk.annotations.mitre_attack.mitre_tactic 
3| `drop_dm_object_name(All_Risk)` 
4| `security_content_ctime(firstTime)` 
5| `security_content_ctime(lastTime)` 
6| where source_count >= 5 
7| `living_off_the_land_detection_filter`

Data Source

No data sources specified for this detection.

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
living_off_the_land_detection_filter search *
living_off_the_land_detection_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1105 Ingress Tool Transfer Command And Control
T1190 Exploit Public-Facing Application Initial Access
T1059 Command and Scripting Interpreter Execution
T1133 External Remote Services Initial Access
KillChainPhase.COMMAND_AND_CONTROL
KillChainPhase.DELIVERY
KillChainPhase.INSTALLATION
NistCategory.DE_AE
Cis18Value.CIS_10
APT-C-36
APT18
APT28
APT29
APT3
APT32
APT33
APT37
APT38
APT39
APT41
Ajax Security Team
Andariel
Aquatic Panda
BITTER
BRONZE BUTLER
BackdoorDiplomacy
Chimera
Cinnamon Tempest
Cobalt Group
Confucius
Daggerfly
Darkhotel
Dragonfly
Elderwood
Evilnum
FIN13
FIN7
FIN8
Fox Kitten
GALLIUM
Gamaredon Group
Gorgon Group
HAFNIUM
HEXANE
INC Ransom
IndigoZebra
Indrik Spider
Ke3chang
Kimsuky
Lazarus Group
LazyScripter
Leviathan
LuminousMoth
Magic Hound
Metador
Molerats
Moonstone Sleet
Moses Staff
MuddyWater
Mustang Panda
Mustard Tempest
Nomadic Octopus
OilRig
PLATINUM
Patchwork
Play
Rancor
Rocke
Sandworm Team
SideCopy
Sidewinder
Silence
TA2541
TA505
TA551
TeamTNT
Threat Group-3390
Tonto Team
Tropic Trooper
Turla
Volatile Cedar
Volt Typhoon
WIRTE
Whitefly
Windshift
Winnti Group
Winter Vivern
Wizard Spider
ZIRCONIUM
menuPass
APT28
APT29
APT39
APT41
APT5
Agrius
Axiom
BackdoorDiplomacy
BlackTech
Blue Mockingbird
Cinnamon Tempest
Dragonfly
Earth Lusca
Ember Bear
FIN13
FIN7
Fox Kitten
GALLIUM
GOLD SOUTHFIELD
HAFNIUM
INC Ransom
Ke3chang
Kimsuky
Magic Hound
Moses Staff
MuddyWater
Play
Rocke
Sandworm Team
Threat Group-3390
ToddyCat
Volatile Cedar
Volt Typhoon
Winter Vivern
menuPass
APT19
APT32
APT37
APT39
Dragonfly
FIN5
FIN6
FIN7
Fox Kitten
Ke3chang
OilRig
Saint Bear
Stealth Falcon
Whitefly
Windigo
Winter Vivern
APT18
APT28
APT29
APT41
Akira
Chimera
Dragonfly
Ember Bear
FIN13
FIN5
GALLIUM
GOLD SOUTHFIELD
Ke3chang
Kimsuky
LAPSUS$
Leviathan
OilRig
Play
Sandworm Team
Scattered Spider
TeamTNT
Threat Group-3390
Volt Typhoon
Wizard Spider

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event False
This configuration file applies to all detections of type Correlation. These correlations will generate Notable Events.

Implementation

To implement this correlation search a user needs to enable all detections in the Living Off The Land Analytic Story and confirm it is generating risk events. A simple search index=risk analyticstories="Living Off The Land" should contain events.

Known False Positives

There are no known false positive for this search, but it could contain false positives as multiple detections can trigger and not have successful exploitation. Modify the static value distinct_detection_name to a higher value. It is also required to tune analytics that are also tagged to ensure volume is never too much.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
An increase of Living Off The Land behavior has been detected on $risk_object$ 63 90 70
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset lotl stash
Integration ✅ Passing Dataset lotl stash

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 4