Skip to content

Commit 8a22132

Browse files
[New Rule] Unusual Remote File Creation (#4476)
* [New Rule] Unusual Remote File Creation * Description update * ++ * ++ * Update rules/linux/lateral_movement_unusual_remote_file_creation.toml --------- Co-authored-by: shashank-elastic <[email protected]>
1 parent 73aaad9 commit 8a22132

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[metadata]
2+
creation_date = "2025/02/20"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2025/02/20"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule leverages the new_terms rule type to detect file creation via a commonly used file
11+
transfer service while excluding typical remote file creation activity. This behavior is
12+
often linked to lateral movement, potentially indicating an attacker attempting to move
13+
within a network.
14+
"""
15+
from = "now-9m"
16+
index = ["logs-endpoint.events.file*", "auditbeat-*"]
17+
language = "kuery"
18+
license = "Elastic License v2"
19+
name = "Unusual Remote File Creation"
20+
risk_score = 47
21+
rule_id = "ed3fedc3-dd10-45a5-a485-34a8b48cea46"
22+
setup = """## Setup
23+
24+
This rule requires data coming in from one of the following integrations:
25+
- Elastic Defend
26+
- Auditbeat
27+
28+
### Elastic Defend Integration Setup
29+
Elastic 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.
30+
31+
#### Prerequisite Requirements:
32+
- Fleet is required for Elastic Defend.
33+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
34+
35+
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
36+
- Go to the Kibana home page and click "Add integrations".
37+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
38+
- Click "Add Elastic Defend".
39+
- Configure the integration name and optionally add a description.
40+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
41+
- 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).
42+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
43+
- 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.
44+
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
45+
- Click "Save and Continue".
46+
- 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.
47+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
48+
49+
### Auditbeat Setup
50+
Auditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.
51+
52+
#### The following steps should be executed in order to add the Auditbeat on a Linux System:
53+
- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
54+
- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).
55+
- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).
56+
- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).
57+
- For complete “Setup and Run Auditbeat” information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).
58+
"""
59+
severity = "medium"
60+
tags = [
61+
"Domain: Endpoint",
62+
"OS: Linux",
63+
"Use Case: Threat Detection",
64+
"Tactic: Lateral Movement",
65+
"Data Source: Elastic Defend",
66+
]
67+
timestamp_override = "event.ingested"
68+
type = "new_terms"
69+
query = '''
70+
event.category:file and host.os.type:linux and event.action:creation and
71+
process.name:(scp or ftp or sftp or vsftpd or sftp-server or sync) and
72+
not file.path:(/dev/ptmx or /run/* or /var/run/*)
73+
'''
74+
75+
[[rule.threat]]
76+
framework = "MITRE ATT&CK"
77+
78+
[[rule.threat.technique]]
79+
id = "T1021"
80+
name = "Remote Services"
81+
reference = "https://attack.mitre.org/techniques/T1021/"
82+
83+
[[rule.threat.technique.subtechnique]]
84+
id = "T1021.004"
85+
name = "SSH"
86+
reference = "https://attack.mitre.org/techniques/T1021/004/"
87+
88+
[[rule.threat.technique]]
89+
id = "T1570"
90+
name = "Lateral Tool Transfer"
91+
reference = "https://attack.mitre.org/techniques/T1570/"
92+
93+
[rule.threat.tactic]
94+
id = "TA0008"
95+
name = "Lateral Movement"
96+
reference = "https://attack.mitre.org/tactics/TA0008/"
97+
98+
[rule.new_terms]
99+
field = "new_terms_fields"
100+
value = ["process.executable", "host.id"]
101+
102+
[[rule.new_terms.history_window_start]]
103+
field = "history_window_start"
104+
value = "now-10d"

0 commit comments

Comments
 (0)