PH_Rule_TH_Linux_12
Enabled
Detects hidden files or folders in common writable directories. Users can mark specific files as hidden simply by putting a "." as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion. This requires process monitoring via FortiSIEM Linux agent.
7
Security
Defense Evasion
Defense Evasion consists of techniques that adversaries use to avoid detection throughout their compromise. Techniques used for defense evasion include uninstalling/disabling security software or obfuscating/encrypting data and scripts. Adversaries also leverage and abuse trusted processes to hide and masquerade their malware. Other tactics’ techniques are cross-listed here when those techniques include the added benefit of subverting defenses.
https://attack.mitre.org/tactics/TA0005T1564.001
Hide Artifacts: Hidden Files and Directories
Adversaries may set files and directories to be hidden to evade detection mechanisms. These files don't show up when a user browses the file system with a GUI or when using normal commands on the command line. Adversaries can use this to their advantage to hide files and folders anywhere on the system and evading a typical user or system analysis that does not incorporate investigation of hidden files.
https://attack.mitre.org/techniques/T1564/001Server
Linux Process Monitoring via FortiSIEM Agent
Correlation
No remediation guidance specified
If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.
300 seconds
If the following defined pattern/s occur within a 300 second time window.
SYSCALL AND PATH
This defines how two or more distinct events are related in a time-series based action. e.g. An event occurs followed by another event if the source IP, user, and messageId are the same
SYSCALL.hostName = PATH.hostName AND SYSCALL.msgId = PATH.msgId
This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.
This is the query logic that matches incoming events
eventType IN ("LINUX_PROCESS_EXEC","LINUX_Auditd_SYSCALL") AND procName NOT IN ("ls","find")
This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID
hostName,userId,user,procName,msgId
This is most typically a numerical constraint that defines when the rule should trigger an incident
COUNT(*) >= 1
Operator Rank: 0 Operator Type: AND
This operator defines the logic condition relating to the prior event subpattern clause and the following event subpattern clause
This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.
This is the query logic that matches incoming events
eventType = "LINUX_Auditd_PATH" AND objType = "CREATE" AND osObjName REGEXP "^\.[^\/]+|\/\.[^\/]+"
This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID
hostName,objType,osObjName,msgId
This is most typically a numerical constraint that defines when the rule should trigger an incident
COUNT(*) >= 1
This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.
The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern
hostName=SYSCALL.hostName,
userId=SYSCALL.userId,
user=SYSCALL.user,
procName=SYSCALL.procName,
msgId=SYSCALL.msgId,
osObjName=PATH.osObjName,
objType=PATH.objType