High Number of Process Terminations
This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2022/07/27"
3integration = ["endpoint"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2023/02/22"
8
9[rule]
10author = ["Elastic"]
11description = "This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period."
12from = "now-9m"
13index = ["logs-endpoint.events.*", "endgame-*"]
14language = "kuery"
15license = "Elastic License v2"
16name = "High Number of Process Terminations"
17note = """## Triage and analysis
18
19### Investigating High Number of Process Terminations
20
21Attackers can kill processes for a variety of purposes. For example, they can kill process associated with business applications and databases to release the lock on files used by these applications so they may be encrypted,or stop security and backup solutions, etc.
22
23This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.
24
25#### Possible investigation steps
26
27- Examine the entry point to the host and user in action via the Analyse View.
28 - Identify the session entry leader and session user.
29- Examine the contents of session leading to the process termination(s) via the Session View.
30 - Examine the command execution pattern in the session, which may lead to suspricous activities.
31- Examine the process killed during the malicious execution
32 - Identify imment threat to the system from the process killed.
33 - Take necessary incident response actions to respawn necessary process.
34
35### False positive analysis
36
37- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
38
39### Response and remediation
40
41- Initiate the incident response process based on the outcome of the triage.
42- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.
43- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
44- Reimage the host operating system or restore it to the operational state.
45- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.
46- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
47- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
48- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
49"""
50risk_score = 47
51rule_id = "67f8443a-4ff3-4a70-916d-3cfa3ae9f02b"
52severity = "medium"
53tags = ["Elastic", "Host", "Linux", "Threat Detection", "Impact", "Investigation Guide", "Elastic Endgame"]
54type = "threshold"
55
56query = '''
57event.category:process and host.os.type:linux and event.type:start and process.name:"pkill" and process.args:"-f"
58'''
59
60
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63[[rule.threat.technique]]
64id = "T1489"
65name = "Service Stop"
66reference = "https://attack.mitre.org/techniques/T1489/"
67
68
69[rule.threat.tactic]
70id = "TA0040"
71name = "Impact"
72reference = "https://attack.mitre.org/tactics/TA0040/"
73
74[rule.threshold]
75field = ["host.id"]
76value = 10
Triage and analysis
Investigating High Number of Process Terminations
Attackers can kill processes for a variety of purposes. For example, they can kill process associated with business applications and databases to release the lock on files used by these applications so they may be encrypted,or stop security and backup solutions, etc.
This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.
Possible investigation steps
- Examine the entry point to the host and user in action via the Analyse View.
- Identify the session entry leader and session user.
- Examine the contents of session leading to the process termination(s) via the Session View.
- Examine the command execution pattern in the session, which may lead to suspricous activities.
- Examine the process killed during the malicious execution
- Identify imment threat to the system from the process killed.
- Take necessary incident response actions to respawn necessary process.
False positive analysis
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Reimage the host operating system or restore it to the operational state.
- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).