Detect One-Way Communication in Sumo Logic CSE
Adversaries may use an existing, legitimate external Web service as a means for sending commands to a compromised system without receiving return output over the Web service channel. Compromised systems may leverage popular websites and social media (GitHub, Twitter/X, Telegram, GitLab, TechNet) to host command and control (C2) instructions. Those infected systems may send output back over a different C2 channel or return no output at all. Using common services makes it easier for adversaries to hide in expected noise, and SSL/TLS encryption from Web service providers adds an additional layer of protection.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1102 Web Service
- Sub-technique
- T1102.003 One-Way Communication
- Canonical reference
- https://attack.mitre.org/techniques/T1102/003/
Sumo Detection Query
(_sourceCategory=*windows* OR _sourceCategory=*sysmon*)
| where EventID = "3"
| eval dest_host = toLowerCase(DestinationHostname)
| eval proc_image = toLowerCase(Image)
| where dest_host matches "*twitter.com*"
OR dest_host matches "*x.com*"
OR dest_host matches "*github.com*"
OR dest_host matches "*githubusercontent.com*"
OR dest_host matches "*gitlab.com*"
OR dest_host matches "*telegram.org*"
OR dest_host matches "*t.me*"
OR dest_host matches "*pastebin.com*"
OR dest_host matches "*paste.ee*"
OR dest_host matches "*hastebin.com*"
OR dest_host matches "*discord.com*"
OR dest_host matches "*discordapp.com*"
OR dest_host matches "*googleapis.com*"
OR dest_host matches "*sharepoint.com*"
OR dest_host matches "*reddit.com*"
OR dest_host matches "*notion.so*"
OR dest_host matches "*trello.com*"
| where proc_image matches "*powershell.exe"
OR proc_image matches "*pwsh.exe"
OR proc_image matches "*cmd.exe"
OR proc_image matches "*wscript.exe"
OR proc_image matches "*cscript.exe"
OR proc_image matches "*mshta.exe"
OR proc_image matches "*rundll32.exe"
OR proc_image matches "*regsvr32.exe"
OR proc_image matches "*certutil.exe"
OR proc_image matches "*curl.exe"
OR proc_image matches "*wget.exe"
OR proc_image matches "*bitsadmin.exe"
OR proc_image matches "*python.exe"
OR proc_image matches "*python3.exe"
OR proc_image matches "*node.exe"
OR proc_image matches "*wmic.exe"
OR proc_image matches "*msbuild.exe"
| eval is_encoded = if(CommandLine matches "(?i).*(-encodedcommand|-enc \\S|frombase64string|base64).*", 1, 0)
| eval is_office_parent = if(ParentImage matches "(?i).*(winword|excel|powerpnt|outlook|onenote|msaccess|acrord32|acrobat)\\.exe.*", 1, 0)
| eval is_service_spawn = if(ParentImage matches "(?i).*(svchost|taskeng|taskhostw|services|wmiprvse)\\.exe.*", 1, 0)
| eval suspicion_score = is_encoded + is_office_parent + is_service_spawn
| fields _messageTime, Computer, User, Image, CommandLine, ParentImage, ParentCommandLine, DestinationHostname, DestinationIp, DestinationPort, is_encoded, is_office_parent, is_service_spawn, suspicion_score
| sort by _messageTime desc Sumo Logic query against Sysmon EventCode 3 (Network Connection) data detecting one-way C2 traffic over legitimate web services (T1102.003). Identifies suspicious LOLBins and scripting engine processes making outbound connections to GitHub, Telegram, Pastebin, Discord, and similar platforms. Enriches events with encoded command, office parent, and service spawn context flags to support triage prioritization.
Data Sources
Required Tables
False Positives & Tuning
- Continuous integration runners executing under system accounts where Node.js or Python scripts resolve packages or call build APIs hosted on GitHub raw content or googleapis.com
- Endpoint management or RMM agents that spawn cmd.exe or PowerShell to periodically poll SaaS status endpoints or pull configurations from SharePoint or Notion
- Developer workstations where interactive use of curl.exe or wget.exe is common for testing webhook endpoints against Discord, Reddit, or Trello APIs
Other platforms for T1102.003
Testing Methodology
Validate this detection against 4 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 1PowerShell C2 Polling via Pastebin Raw URL
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Invoke-WebRequest', 'pastebin.com/raw', 'Invoke-Expression', '-WindowStyle Hidden'. Sysmon Event ID 3: Network Connection to pastebin.com on port 443. Sysmon Event ID 22: DNS query for pastebin.com. PowerShell ScriptBlock Log Event ID 4104 with the full script content.
- Test 2Python Script Polling GitHub Raw Content for Commands
Expected signal: Sysmon Event ID 1: Process Create with Image=python.exe, CommandLine containing 'raw.githubusercontent.com' and urllib. Sysmon Event ID 3: Three successive network connections to raw.githubusercontent.com on port 443, approximately 30 seconds apart. Sysmon Event ID 22: DNS queries for raw.githubusercontent.com.
- Test 3Curl Silent Polling of Telegram Bot API
Expected signal: Sysmon Event ID 1: Process Create with Image=curl.exe, CommandLine containing '-s', '-o', 'api.telegram.org', 'getUpdates'. Sysmon Event ID 3: Network Connection to api.telegram.org on port 443. Sysmon Event ID 11: File creation at %TEMP%\tg_response.txt. Sysmon Event ID 22: DNS query for api.telegram.org.
- Test 4Scheduled Task Simulating Periodic Web Service C2 Poll
Expected signal: Security Event ID 4698 (Scheduled Task Created) with task name 'MicrosoftEdgeUpdateTaskMachineUA_ARGUSTEST' and command containing 'raw.githubusercontent.com'. Sysmon Event ID 1: schtasks.exe process creation. Registry event for new task in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache. On execution: Sysmon Event ID 1 for powershell.exe spawned by taskeng.exe/taskhostw.exe, Sysmon Event ID 3 for network connection to raw.githubusercontent.com.
References (10)
- https://attack.mitre.org/techniques/T1102/003/
- https://www.prevailion.com/darkwatchman-a-new-javascript-rat/
- https://www.fireeye.com/blog/threat-research/2018/03/suspected-chinese-espionage-group-targeting-maritime-and-engineering-industries.html
- https://unit42.paloaltonetworks.com/gamaredon-group-russia-linked-threat-actor/
- https://blog.talosintelligence.com/lotus-blossom-sagerunex/
- https://www.f-secure.com/documents/996508/1030745/dukes_whitepaper.pdf
- https://www.volexity.com/blog/2024/04/12/zero-day-exploitation-of-unauthenticated-remote-code-execution-vulnerability-in-globalprotect/
- https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1102.003/T1102.003.md
- https://www.mandiant.com/resources/blog/apt29-using-wellmess-malware-to-target-covid19-vaccine-development
Unlock Pro Content
Get the full detection package for T1102.003 including response playbook, investigation guide, and atomic red team tests.