Fortinet Analyzes TrickBot Variant Using DNS Tunneling for C2

· Original article ↗

Summary

Fortinet details a TrickBot variant that uses DNS tunneling for command-and-control, persists through scheduled tasks, and can download and execute modules. The analyzed C2 server was offline, so researchers simulated its responses.

Key points

  • The Windows malware sends encoded command-and-control data through malformed DNS queries and responses; the analyzed C2 server was offline.
  • It encrypts strings and resolves Windows APIs at runtime to hinder static analysis.
  • It creates a recurring Windows Scheduled Task, disguises it as a Wireshark update, and stores task details in NTFS Alternate Data Streams.
  • DNS requests use packet types 0x30, 0x31, and 0x32 for commands, response sizing, and response data; response data is encoded in IPv4 addresses.
  • Supported commands include executing Windows commands and PowerShell, downloading modules, and using process hollowing or process doppelgänging.
  • Fortinet lists westurn.in as the C2 domain and provides sample hashes; it says its security services detect or block the campaign.

Article Details

Attack Vectors
  • TrickBot used DNS tunneling to exchange command-and-control requests and responses through malformed DNS queries and DNS response IP addresses.
  • The malware established persistence by creating a Windows Task Scheduler task configured to run at startup and every five minutes.
  • The variant stored task and executable-path information in NTFS Alternate Data Streams.
  • TrickBot supported downloading and executing modules, including execution through rundll32.exe, process hollowing, process doppelgänging, PowerShell, and direct execution of machine code.
Defensive Notes
  • Fortinet reported protection through FortiGuard AntiSPAM, Web Filtering, IPS, and Antivirus services; the TrickBot DNS tunneling IPS signature is named Trick.Botnet.
  • FortiNDR Cloud detects TrickBot DNS tunneling using behavioral analysis of DNS traffic.
  • The reported FortiGuard Antivirus signature for the samples is W64/TrickBot.WC!tr.

Indicators of compromise

TypeIndicatorContext
DOMAINwesturn[.]inDomain identified by the article as the TrickBot campaign's C2 server domain.
SHA256105f652e6b8f31c371f2385877e43b6772aff5d3168d5d4635f8a1fcbb321421SHA-256 hash listed for a TrickBot sample.
SHA25633c331ededbf8ee9829895424423ce3fd17e359d2e784fcbce396aacff458cf5SHA-256 hash listed for a TrickBot sample.
SHA2563b19a82e1354ac14a3da7c840cbdd0ce50db38432d78e767b36f08e45024c23dSHA-256 hash listed for a TrickBot sample.
SHA2566c677eb2b3ffd288083c59a13d7bb712d4754af61a5563873f76c440962346f4SHA-256 hash listed for a TrickBot sample.
SHA256bf80245ba792992fbfe24abac33f8fd66f24cdeb5f0f21cfdf45a29d107c8d3bSHA-256 hash listed for a TrickBot sample.
SHA256df527a5c2fbde43816cd02f4cd49eee4bb82fb4a3c7045021360888c7d504c98SHA-256 hash listed for a TrickBot sample.

MITRE ATT&CK

People

Malware

Vendors

Products

Related Articles