Unusual Interactive Process Launched in a Container
This rule detects when an unusual interactive process is launched inside a container. Interactive processes are typically run in the foreground and require user input, which is unusual behavior for a containerized environment. This activity could indicate an attacker attempting to gain access to the container environment or perform malicious actions.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/03/12"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2025/03/12"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule detects when an unusual interactive process is launched inside a container. Interactive processes are typically
11run in the foreground and require user input, which is unusual behavior for a containerized environment. This activity
12could indicate an attacker attempting to gain access to the container environment or perform malicious actions.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.process*"]
16language = "kuery"
17license = "Elastic License v2"
18name = "Unusual Interactive Process Launched in a Container"
19risk_score = 47
20rule_id = "7020ff25-76d7-4a7d-b95b-266cf27d70e8"
21setup = """## Setup
22
23This rule requires data coming in from Elastic Defend.
24
25### Elastic Defend Integration Setup
26Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
27
28#### Prerequisite Requirements:
29- Fleet is required for Elastic Defend.
30- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
31
32#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
33- Go to the Kibana home page and click "Add integrations".
34- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
35- Click "Add Elastic Defend".
36- Configure the integration name and optionally add a description.
37- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
38- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
39- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
40- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
41
42For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
43- Click "Save and Continue".
44- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
45For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
46"""
47severity = "medium"
48tags = [
49 "Domain: Container",
50 "OS: Linux",
51 "Use Case: Threat Detection",
52 "Tactic: Execution",
53 "Data Source: Elastic Defend",
54 "Resources: Investigation Guide",
55]
56timestamp_override = "event.ingested"
57type = "new_terms"
58query = '''
59event.category:process and host.os.type:linux and event.type:start and event.action:exec and
60process.entry_leader.entry_meta.type:container and process.interactive:true
61'''
62
63[[rule.threat]]
64framework = "MITRE ATT&CK"
65
66[[rule.threat.technique]]
67id = "T1059"
68name = "Command and Scripting Interpreter"
69reference = "https://attack.mitre.org/techniques/T1059/"
70
71[[rule.threat.technique.subtechnique]]
72id = "T1059.004"
73name = "Unix Shell"
74reference = "https://attack.mitre.org/techniques/T1059/004/"
75
76[rule.threat.tactic]
77id = "TA0002"
78name = "Execution"
79reference = "https://attack.mitre.org/tactics/TA0002/"
80
81[rule.new_terms]
82field = "new_terms_fields"
83value = ["process.name"]
84
85[[rule.new_terms.history_window_start]]
86field = "history_window_start"
87value = "now-14d"
toml
Related rules
- Container Management Utility Run Inside A Container
- File Made Executable via Chmod Inside A Container
- Egress Connection from Entrypoint in Container
- Privileged Docker Container Creation
- AWS Credentials Searched For Inside A Container