Detect Ingress Tool Transfer in Google Chronicle
Adversaries may transfer tools or other files from an external system into a compromised environment. Tools may be pulled via the C2 channel or through alternate protocols using built-in OS utilities (certutil, bitsadmin, PowerShell Invoke-WebRequest, curl, wget, scp). Threat actors including HAFNIUM, Fox Kitten, and Cobalt Group have leveraged this technique to stage second-stage payloads, implants, and post-exploitation toolkits onto victim systems.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1105 Ingress Tool Transfer
- Canonical reference
- https://attack.mitre.org/techniques/T1105/
YARA-L Detection Query
rule t1105_ingress_tool_transfer {
meta:
author = "df00tech"
description = "Detects ingress tool transfer via LOLBin download utilities, PowerShell download cradles, and executables dropped in suspicious temporary paths by known download utilities. Covers certutil, bitsadmin, BITS, PowerShell WebClient methods, curl, wget, mshta, wscript, and related LOLBins."
mitre_attack_tactic = "Command and Control"
mitre_attack_technique = "T1105"
mitre_attack_url = "https://attack.mitre.org/techniques/T1105/"
severity = "HIGH"
confidence = "HIGH"
rule_version = "1.0"
yara_version = "YL2.0"
events:
(
$e.metadata.event_type = "PROCESS_LAUNCH"
and
(
(
re.regex($e.target.process.file.full_path, `(?i)(certutil|bitsadmin|mshta|desktopimgdownldr|esentutl|expand|extrac32|finger|ftp|ieexec|wscript|xcopy)\.exe$`)
and re.regex($e.target.process.command_line, `(?i)(https?://|ftp://)`)
)
or
(
re.regex($e.target.process.file.full_path, `(?i)certutil\.exe$`)
and re.regex($e.target.process.command_line, `(?i)(-urlcache|-decode|-decodehex|-verifyctl)`)
)
or
(
re.regex($e.target.process.file.full_path, `(?i)bitsadmin\.exe$`)
and re.regex($e.target.process.command_line, `(?i)(/transfer|/addfile|/setnotifycmdline)`)
)
or
(
re.regex($e.target.process.file.full_path, `(?i)(powershell|pwsh|wscript|cscript)\.exe$`)
and re.regex($e.target.process.command_line, `(?i)(invoke-webrequest|net\.webclient|downloadfile|downloaddata|downloadstring|start-bitstransfer|webclient|httpclient|webrequest\.create|openread)`)
and re.regex($e.target.process.command_line, `(?i)https?://`)
)
or
(
re.regex($e.target.process.file.full_path, `(?i)(curl|wget)\.exe$`)
and re.regex($e.target.process.command_line, `(?i)https?://`)
)
)
)
or
(
$e.metadata.event_type = "FILE_CREATION"
and re.regex($e.target.file.full_path, `(?i)(\\temp\\|\\appdata\\local\\temp\\|\\appdata\\roaming\\|\\users\\public\\|\\programdata\\|\\windows\\temp\\)`)
and re.regex($e.target.file.full_path, `(?i)\.(exe|dll|ps1|vbs|bat|cmd|hta|scr|bin|msi)$`)
and re.regex($e.principal.process.file.full_path, `(?i)(certutil|bitsadmin|powershell|pwsh|curl|wget|mshta|wscript|cscript)\.exe$`)
)
condition:
$e
} Chronicle YARA-L 2.0 rule detecting T1105 Ingress Tool Transfer across two event branches: (1) PROCESS_LAUNCH events where known LOLBin download utilities or PowerShell/script interpreters execute with external URL arguments or tool-specific download flags; (2) FILE_CREATION events where executable or script files are written to user-writable temporary directories by known download utilities. Uses UDM target.process and target.file field references with re.regex for case-insensitive matching.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate enterprise software deployment — SCCM, Intune, or Ansible calling certutil for certificate operations or bitsadmin for background transfer of approved software packages from internal HTTPS endpoints
- Security tooling self-updates where agents such as Splunk UF, Elastic Agent, or CrowdStrike Falcon use PowerShell or curl to pull updated configurations or signatures from vendor cloud infrastructure
- Software development workflows on engineer workstations where build tools, language package managers, or IDE plugins use PowerShell WebClient or curl to fetch dependencies from npm, PyPI, or NuGet registries over HTTPS
Other platforms for T1105
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Certutil URL Cache Download
Expected signal: Sysmon Event ID 1: Process Create with Image=certutil.exe, CommandLine containing '-urlcache -split -f http://'. Sysmon Event ID 3: Network Connection from certutil.exe to 127.0.0.1:8080. Sysmon Event ID 11: File Create at %TEMP%\df00tech-test.exe with InitiatingProcessImage=certutil.exe. Security Event ID 4688 if command line auditing is enabled.
- Test 2BitsAdmin File Transfer
Expected signal: Sysmon Event ID 1: Process Create with Image=bitsadmin.exe, CommandLine containing '/transfer' and '/download'. Sysmon Event ID 3: Network Connection from bitsadmin.exe to 127.0.0.1:8080. Microsoft-Windows-Bits-Client/Operational Event ID 3 (job created) and Event ID 59 (transfer complete) if the server responds. Sysmon Event ID 11 for file creation if download succeeds.
- Test 3PowerShell Invoke-WebRequest File Download
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Invoke-WebRequest' and '-OutFile'. Sysmon Event ID 3: Network Connection from powershell.exe to 127.0.0.1:8080. Sysmon Event ID 11: File Create at %TEMP%\df00tech-iwr.exe. PowerShell ScriptBlock Log Event ID 4104 with full cmdlet and parameters.
- Test 4Certutil Encode-then-Decode Two-Stage Transfer
Expected signal: Two Sysmon Event ID 1 entries: first for certutil.exe -encode, second for certutil.exe -decode. Both events will have CommandLine containing 'certutil.exe' and temp path arguments. The -decode invocation is the targeted indicator. Security Event IDs 4688 for both invocations if command line auditing is enabled.
- Test 5Linux curl Download to /tmp
Expected signal: Auditd syscall records for execve of curl with arguments including '-o /tmp/'. Syslog or auditd file creation record for /tmp/df00tech-test-payload. If auditd rules monitor /tmp writes (WATCH -w /tmp -p w), an auditd WATCH event fires. If endpoint agent (Falcon, Defender for Linux) is present, a process creation event with curl and -o /tmp argument is generated.
References (11)
- https://attack.mitre.org/techniques/T1105/
- https://lolbas-project.github.io/#t1105
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer
- https://cloud.google.com/blog/topics/threat-intelligence/cosmicenergy-ot-malware-russian-response/
- https://www.trellix.com/blogs/research/beyond-file-search-a-novel-method/
- https://www.technologyreview.com/2013/08/21/83143/dropbox-and-similar-services-can-sync-malware/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1105/T1105.md
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_certutil_download.yml
- https://www.mandiant.com/resources/blog/hafnium-china-cyberespionage-exchange-server
- https://www.ptsecurity.com/upload/corporate/ww-en/analytics/Cobalt-Snatch-eng.pdf
Unlock Pro Content
Get the full detection package for T1105 including response playbook, investigation guide, and atomic red team tests.