Detection rules › Panther
OSSEC Rootkit Detected via Osquery
Checks if any results are returned for the Osquery OSSEC Rootkit pack.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1014 Rootkit |
Rule body yaml
AnalysisType: rule
Filename: osquery_ossec.py
RuleID: "Osquery.OSSECRootkitDetected"
DisplayName: "OSSEC Rootkit Detected via Osquery"
Enabled: true
LogTypes:
- Osquery.Differential
Tags:
- Osquery
- Malware
- Defense Evasion:Rootkit
Reports:
MITRE ATT&CK:
- TA0005:T1014
Severity: Medium
Description: >
Checks if any results are returned for the Osquery OSSEC Rootkit pack.
Runbook: >
Verify the presence of the rootkit and re-image the machine.
Reference: https://panther.com/blog/osquery-log-analysis/
SummaryAttributes:
- name
- hostIdentifier
- action
Tests:
- Name: Rootkit Detected
ExpectedResult: true
Log:
{
"action": "added",
"calendarTime": "Tue Sep 11 16:14:21 2018 UTC",
"columns":
{
"build_distro": "10.12",
"build_platform": "darwin",
"config_hash": "1111",
"config_valid": "1",
"counter": "14",
"global_state": "0",
"extensions": "active",
"instance_id": "1111",
"pid": "223",
"resident_size": "54894592",
"start_time": "1536634519",
"system_time": "12472",
"user_time": "31800",
"uuid": "37821E12-CC8A-5AA3-A90C-FAB28A5BF8F9",
"version": "3.2.6",
"watcher": "92",
},
"counter": "255",
"decorations": { "host_uuid": "1111", "environment": "corp" },
"epoch": "0",
"hostIdentifier": "test.lan",
"log_type": "result",
"name": "pack_ossec-rootkit_pwned",
"unixTime": "1536682461",
}
- Name: Rootkit Not Detected
ExpectedResult: false
Log:
{
"action": "added",
"calendarTime": "Tue Sep 11 16:14:21 2018 UTC",
"columns":
{
"build_distro": "10.12",
"build_platform": "darwin",
"config_hash": "1111",
"config_valid": "1",
"counter": "14",
"global_state": "2",
"extensions": "active",
"instance_id": "1111",
"pid": "223",
"resident_size": "54894592",
"start_time": "1536634519",
"system_time": "12472",
"user_time": "31800",
"uuid": "37821E12-CC8A-5AA3-A90C-FAB28A5BF8F9",
"version": "3.2.6",
"watcher": "92",
},
"counter": "255",
"decorations": { "host_uuid": "1111", "environment": "corp" },
"epoch": "0",
"hostIdentifier": "test.lan",
"log_type": "result",
"name": "pack_osquery-response_alf",
"unixTime": "1536682461",
}
Detection logic
Condition
name contains "ossec-rootkit"
action eq "added"
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field |
|---|
hostIdentifier |