Name:Windows TinyCC Shellcode Execution id:fdb6774e-e465-4912-86e3-63cf9ab91491 version:4 date:None author:Michael Haag, Splunk status:production type:TTP Description:Detects abuse of Tiny-C-Compiler (TinyCC) for shellcode execution, where tcc.exe is renamed to masquerade as svchost.exe and used to compile and execute C source files containing shellcode.
This technique was observed in the Lotus Blossom Chrysalis backdoor campaign, where attackers renamed "tcc.exe" to "svchost.exe", and executed a file named "conf.c" containing Metasploit block_api shellcode with the flags -nostdlib -run.
TinyCC is a legitimate C compiler, but its ability to compile and execute code on-the-fly makes it attractive to attackers seeking to evade detection.
The combination of a renamed compiler binary executing from non-standard locations with suspicious flags is a strong indicator of malicious activity.
Data_source:
-Sysmon EventID 1
-Windows Event Log Security 4688
search:| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime
from datamodel=Endpoint.Processes where
Processes.process_name IN ("svchost.exe", "tcc.exe") Processes.process="* -nostdlib*" Processes.process="* -run*" Processes.process IN ("*.c", "*conf.c*") NOT Processes.process_path IN ( "*:\\Windows\\System32\\*", "*:\\Windows\\SysWOW64\\*" )
how_to_implement:To successfully implement this search, you need to be ingesting logs with process creation information from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA and have enabled EventCode 1 (Process Create). Ensure that command-line arguments are being captured in your Sysmon configuration.
The detection relies on the OriginalFileName field being populated to distinguish between legitimate svchost.exe and renamed tcc.exe binaries. Ensure Sysmon is configured to capture full command-line arguments.
known_false_positives:Legitimate TinyCC usage by developers may trigger this detection if executed from non-standard locations. However, the combination of:
1. Renamed binary (svchost.exe with tcc.exe OriginalFileName)
2. Execution from user-writable directories (AppData, Temp, ProgramData)
3. Suspicious flags (-nostdlib -run) with .c file execution
is highly suspicious and warrants investigation. Legitimate TinyCC usage typically occurs from Program Files or developer directories with standard compilation workflows.
Allowlist known development environments if needed.
References: -https://attack.mitre.org/techniques/T1059/003/ -https://attack.mitre.org/techniques/T1027/ -https://www.rapid7.com/blog/post/tr-chrysalis-backdoor-dive-into-lotus-blossoms-toolkit/ -https://github.com/phoenixthrush/Tiny-C-Compiler drilldown_searches: name:'View the detection results for - "$dest$" and "$user$"' search:'%original_detection_search% | search dest = "$dest$" user = "$user$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$dest$" and "$user$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$", "$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'7d' latest_offset:'0' analytic_story:['Lotus Blossom Chrysalis Backdoor']