Unusual File Transfer Utility Launched
This rule leverages ES|QL to detect the execution of unusual file transfer utilities on Linux systems. Attackers may use these utilities to exfiltrate data from a compromised system. ES|QL rules have limited fields available in its alert documents. Make sure to review the original documents to aid in the investigation of this alert.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/02/21"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2025/04/07"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule leverages ES|QL to detect the execution of unusual file transfer utilities on Linux systems. Attackers may use
11these utilities to exfiltrate data from a compromised system. ES|QL rules have limited fields available in its alert
12documents. Make sure to review the original documents to aid in the investigation of this alert.
13"""
14from = "now-61m"
15interval = "1h"
16language = "esql"
17license = "Elastic License v2"
18name = "Unusual File Transfer Utility Launched"
19note = """ ## Triage and analysis
20
21> **Disclaimer**:
22> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
23
24### Investigating Unusual File Transfer Utility Launched
25
26File transfer utilities like scp, ftp, and rsync are essential for data movement in Linux environments. However, adversaries can exploit these tools to exfiltrate sensitive data. The detection rule identifies suspicious executions of these utilities by monitoring process activities, focusing on rare occurrences and unique agent IDs, which may indicate unauthorized data transfers. This helps in early detection of potential data breaches.
27
28### Possible investigation steps
29
30- Review the process.command_line field to understand the exact command executed and assess if it aligns with typical usage patterns or if it appears suspicious.
31- Examine the process.parent.executable field to determine the parent process that initiated the file transfer utility, which may provide insights into whether the execution was part of a legitimate workflow or potentially malicious activity.
32- Check the agent.id field to identify the specific host involved in the alert and correlate it with other security events or logs from the same host to gather additional context.
33- Investigate the @timestamp field to verify the timing of the event and cross-reference with any known scheduled tasks or user activities that could explain the execution.
34- Analyze the host.os.type field to confirm the operating system and ensure that the alert pertains to a Linux environment, as expected by the rule.
35
36### False positive analysis
37
38- Routine administrative tasks using file transfer utilities may trigger alerts. Regularly scheduled backups or updates using scp, rsync, or ftp should be documented and excluded from alerts by creating exceptions for known scripts or cron jobs.
39- Automated system updates or patches that utilize these utilities can be mistaken for suspicious activity. Identify and whitelist the processes and command lines associated with these updates to prevent false positives.
40- Internal data transfers between trusted servers for legitimate business purposes might be flagged. Establish a list of trusted agent IDs and exclude them from the rule to avoid unnecessary alerts.
41- Development and testing environments often use these utilities for transferring test data. Ensure that these environments are recognized and excluded by specifying their hostnames or IP addresses in the rule configuration.
42- User-initiated file transfers for legitimate reasons, such as data analysis or reporting, can be misinterpreted. Educate users to notify the security team of such activities in advance, allowing for temporary exceptions to be made.
43
44### Response and remediation
45
46- Immediately isolate the affected Linux system from the network to prevent further data exfiltration and unauthorized access.
47- Terminate any suspicious file transfer processes identified by the alert, such as scp, ftp, or rsync, to halt ongoing data transfers.
48- Conduct a thorough review of the process command lines and parent executables to identify any malicious scripts or unauthorized software that initiated the file transfer.
49- Change credentials and access keys associated with the compromised system to prevent further unauthorized access.
50- Escalate the incident to the security operations team for a deeper forensic analysis to determine the extent of the breach and identify any additional compromised systems.
51- Implement network monitoring to detect any further attempts of unauthorized file transfers or suspicious activities from the affected system.
52- Update and enhance endpoint detection and response (EDR) solutions to improve detection capabilities for similar threats in the future.
53"""
54risk_score = 21
55rule_id = "8eeeda11-dca6-4c3e-910f-7089db412d1c"
56setup = """## Setup
57
58This rule requires data coming in from one of the following integrations:
59- Elastic Defend
60
61### Elastic Defend Integration Setup
62Elastic 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.
63
64#### Prerequisite Requirements:
65- Fleet is required for Elastic Defend.
66- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
67
68#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
69- Go to the Kibana home page and click "Add integrations".
70- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
71- Click "Add Elastic Defend".
72- Configure the integration name and optionally add a description.
73- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
74- 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).
75- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
76- 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.
77For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
78- Click "Save and Continue".
79- 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.
80For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
81"""
82severity = "low"
83tags = [
84 "Domain: Endpoint",
85 "OS: Linux",
86 "Use Case: Threat Detection",
87 "Tactic: Exfiltration",
88 "Tactic: Execution",
89 "Data Source: Elastic Defend",
90 "Resources: Investigation Guide",
91]
92timestamp_override = "event.ingested"
93type = "esql"
94
95query = '''
96from logs-endpoint.events.process-*
97| keep @timestamp, host.os.type, event.type, event.action, process.name, process.executable, process.parent.executable, process.command_line, agent.id, host.name
98| where @timestamp > now() - 1 hours
99| where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
100 process.name in ("scp", "ftp", "sftp", "vsftpd", "sftp-server", "rsync")
101| stats cc = count(), agent_count = count_distinct(agent.id), host.name = VALUES(host.name), agent.id = VALUES(agent.id) by process.executable, process.parent.executable, process.command_line
102| where agent_count == 1 and cc < 5
103| sort cc asc
104| limit 100
105'''
106
107
108[[rule.threat]]
109framework = "MITRE ATT&CK"
110
111[rule.threat.tactic]
112id = "TA0010"
113name = "Exfiltration"
114reference = "https://attack.mitre.org/tactics/TA0010/"
115[[rule.threat]]
116framework = "MITRE ATT&CK"
117
118[rule.threat.tactic]
119id = "TA0002"
120name = "Execution"
121reference = "https://attack.mitre.org/tactics/TA0002/"
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Unusual File Transfer Utility Launched
File transfer utilities like scp, ftp, and rsync are essential for data movement in Linux environments. However, adversaries can exploit these tools to exfiltrate sensitive data. The detection rule identifies suspicious executions of these utilities by monitoring process activities, focusing on rare occurrences and unique agent IDs, which may indicate unauthorized data transfers. This helps in early detection of potential data breaches.
Possible investigation steps
- Review the process.command_line field to understand the exact command executed and assess if it aligns with typical usage patterns or if it appears suspicious.
- Examine the process.parent.executable field to determine the parent process that initiated the file transfer utility, which may provide insights into whether the execution was part of a legitimate workflow or potentially malicious activity.
- Check the agent.id field to identify the specific host involved in the alert and correlate it with other security events or logs from the same host to gather additional context.
- Investigate the @timestamp field to verify the timing of the event and cross-reference with any known scheduled tasks or user activities that could explain the execution.
- Analyze the host.os.type field to confirm the operating system and ensure that the alert pertains to a Linux environment, as expected by the rule.
False positive analysis
- Routine administrative tasks using file transfer utilities may trigger alerts. Regularly scheduled backups or updates using scp, rsync, or ftp should be documented and excluded from alerts by creating exceptions for known scripts or cron jobs.
- Automated system updates or patches that utilize these utilities can be mistaken for suspicious activity. Identify and whitelist the processes and command lines associated with these updates to prevent false positives.
- Internal data transfers between trusted servers for legitimate business purposes might be flagged. Establish a list of trusted agent IDs and exclude them from the rule to avoid unnecessary alerts.
- Development and testing environments often use these utilities for transferring test data. Ensure that these environments are recognized and excluded by specifying their hostnames or IP addresses in the rule configuration.
- User-initiated file transfers for legitimate reasons, such as data analysis or reporting, can be misinterpreted. Educate users to notify the security team of such activities in advance, allowing for temporary exceptions to be made.
Response and remediation
- Immediately isolate the affected Linux system from the network to prevent further data exfiltration and unauthorized access.
- Terminate any suspicious file transfer processes identified by the alert, such as scp, ftp, or rsync, to halt ongoing data transfers.
- Conduct a thorough review of the process command lines and parent executables to identify any malicious scripts or unauthorized software that initiated the file transfer.
- Change credentials and access keys associated with the compromised system to prevent further unauthorized access.
- Escalate the incident to the security operations team for a deeper forensic analysis to determine the extent of the breach and identify any additional compromised systems.
- Implement network monitoring to detect any further attempts of unauthorized file transfers or suspicious activities from the affected system.
- Update and enhance endpoint detection and response (EDR) solutions to improve detection capabilities for similar threats in the future.
Related rules
- Base64 Decoded Payload Piped to Interpreter
- File Creation in /var/log via Suspicious Process
- Potential Malware-Driven SSH Brute Force Attempt
- Python Path File (pth) Creation
- Python Site or User Customize File Creation