CSHARP-STREAMER
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The malware known as CSHARP-STREAMER is a Remote Access Trojan (RAT) developed in .NET.
History and attribution csharp-streamer has been around since at least April 2021... In this post we studied a quite advanced RAT that provides pretty much everything a threat actor requires in preparation of a ransomware attack.
The malware known as CSHARP-STREAMER is a Remote Access Trojan (RAT) developed in .NET.
Techniques & procedures
49 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
4 techniques
Execution
In our case, the PowerShell script shown initially in this post was downloaded from a server using a small Net.WebClient.DownloadString() snippet in a scheduled task as well as a service in some instances.
This gives us a first hint that this RAT may be command-line-based, i.e., the operators have a terminal that they can type commands into, which will then be executed on the victim’s machine and the output is sent back.
PowerShell stager As is often as a PowerShell script was used to deploy the malware.
T1569.002 System Services (Service Execution) The TA uses „ PSExec “ to execute commands on remote systems via a Powershell-Script.
Persistence
2 techniques
Persistence
In our case, the PowerShell script shown initially in this post was downloaded from a server using a small Net.WebClient.DownloadString() snippet in a scheduled task as well as a service in some instances.
The malware can either be invoked directly... or it can be registered as service, in which case a --service argument needs to be passed to the executable.
Privilege Escalation
5 techniques
Privilege Escalation
In our case, the PowerShell script shown initially in this post was downloaded from a server using a small Net.WebClient.DownloadString() snippet in a scheduled task as well as a service in some instances.
Spawn : Loads a DLL or shellcode into a process; either an existing process, or msiexec.exe is launched as injection target
T1134.001 Access Token Manipulation: Token Impersonation/Theft The malware supports token impersonation.
T1134.002 Access Token Manipulation: Create Process with Token The malware offers the ability to launch processes in different contexts.
The malware can either be invoked directly... or it can be registered as service, in which case a --service argument needs to be passed to the executable.
Stealth
8 techniques
Stealth
The scripts we encountered in this case were heavily obfuscated with arithmetic expressions and dead code.
Spawn : Loads a DLL or shellcode into a process; either an existing process, or msiexec.exe is launched as injection target
T1134.001 Access Token Manipulation: Token Impersonation/Theft The malware supports token impersonation.
T1134.002 Access Token Manipulation: Create Process with Token The malware offers the ability to launch processes in different contexts.
The above code base64 decodes a string stored as a byte array and then applies XOR to each character while cycling the key.
[Reflection.Assembly] $assembly = [System.AppDomain]::CurrentDomain.Load($bytes) # Load Assembly
T1497.001 Virtualization/Sandbox Evasion (Systemchecks) The TA checks the host environment via the bios serialnumber and manufacturer of the computer via a Powershell-Script.
T1620 Reflective Code Loading The malware allows to execute Code from URLs, remote and local files directly in memory.
Defense Impairment
1 technique
Defense Impairment
T1562.001 Impair Defenses: Disable or Modify Tools The malware patches the in-memory amsi.dll before executiong PowerShell-Commands
Credential Access
7 techniques
Credential Access
Mimi : Use powerkatz variant of Mimkatz to execute commands logonpasswords/samdump/lsasecrets/lsacache/wdigest/dcsync/passthehash.
Process : List processes, dump process of interest (via pid or name). Probably used to dump the lsass process
Mimi : Use powerkatz variant of Mimkatz to execute commands logonpasswords/samdump/lsasecrets/lsacache/wdigest/dcsync/passthehash.
Keylogger : Turn keylogging on/off. Logs are written to the temp dir with a name of KBDLog-<MM-dd-yyyy>.txt
T1110.001 Brute Force: Password Guessing The malware has an integrated function that supports bruteforcing credentials for smb-access.
SmbLogin : Test SMB login credentials against an IP address range or all systems queried via LDAP
T1558.003 Steal or Forge Kerberos-Tickets (Kerberoasting) The TA uses „PowerView“ [4] from the „PowerSploit“-Framework to aquire Tickets and converts them for later usage via a Powershell-Script.
Discovery
15 techniques
Discovery
T1016 System Network Configuration Discovery The malware enumerates the network configuration of infected hosts.
T1018 Remote System Discovery The malware queries LDAP to discover additional systems.
T1033 System Owner / User Discovery The TA queries the AD-Environment and uses LDAP for User-Discovery via a Powershell-Script using „ adsisearcher “.
PortScan : Check an IP address range for a range of open ports to discover interesting applications that may be hosted in the network.
This packet contains some basic information about the machine csharp-streamer is executing on, such as local IP address, domain name, computer name, user name and whether the user is an admin.
T1083 File and Directory Discovery The malware can create filetrees on infected systems.
T1087.001 Account Discovery (Local) The TA uses „ net user “ to enumerate local users on each computer via a Powershell-Script.
T1087.002 Account Discovery (Domain) The TA uses „ net user “ and „ adsisearcher “ to enumerate domain users on each computer via a Powershell-Script.
T1087.003 Account Discovery (Mail) The TA uses „adsisearcher“ to enumerate mail users on each computer via a Powershell-Script.
T1217 Browser Information Discovery The TA uses NirSoft’s „Browser History View“ [3] to view the History of Internet Explorer, Firefox, Chrome and Safari via a Powershell-Script.
T1482 Domain Trust Discovery The TA queries the AD-Environment for all trust-relationships via a Powershell-Script.
T1497.001 Virtualization/Sandbox Evasion (Systemchecks) The TA checks the host environment via the bios serialnumber and manufacturer of the computer via a Powershell-Script.
T1518 Software Discovery The TA lists all .lnk files in the Windows\Start Menu Folder and analyzes the Windows\Prefetch Folder for executed and installed Applications via a Powershell-Script.
T1614 System Location Discovery The TA queries the AD-Environment for department and physical delivery location of computers via a Powershell-Script.
T1619 Cloud Storage Object Discovery The TA lists all Files in the main folderpath of „OneDrive“ and „Dropbox“ and their first subdirectory-level via a Powershell-Script.
Lateral Movement
3 techniques
Lateral Movement
PsExec : Custom psexec-like implementation to copy binaries to a remote system and launch them there as service.
Mimi : Use powerkatz variant of Mimkatz to execute commands logonpasswords/samdump/lsasecrets/lsacache/wdigest/dcsync/passthehash.
PsExec : Custom psexec-like implementation to copy binaries to a remote system and launch them there as service.
Collection
2 techniques
Collection
Keylogger : Turn keylogging on/off. Logs are written to the temp dir with a name of KBDLog-<MM-dd-yyyy>.txt
T1113 Screen Capture The malware can capture screenshots.
Command and Control
6 techniques
Command and Control
The networking code will attempt to establish a connection to the C2 server via websockets on each of the specified ports, until it succeeds.
Relay : Launch a TCP relay that forwards packets received on a specified port to another system, e.g., an internal host that cannot directly talk to the internet.
T1090.001 Proxy: Internal Proxy The malware has dedicated port-relaying capabilities
-1 has a special meaning and is used if everything else failed - it establishes an ICMP “connection” and camouflages protocol data in ping packets.
It attempts to download a file disguised as png from a server... The file is not actually an image, it’s a .NET PE.
Payloads are encrypted using RC4 with a hardcoded key.
Exfiltration
2 techniques
Exfiltration
T1567 Exfiltration Over Web Service The malware allows data exfiltration via https.
MEGA : Download files and folders our upload files and folders with various constraints
Impact
2 techniques
Impact
T1485 Data Destruction The TA uses „format“ to format secondary partitions via „ PSExec “.
T1486 Data Encrypt for Impact The TA encrypts virtual machines on the hypervisor-level. Local files are encrypted through the use of ransomware deployed via „ PSExec “.
Observables
4 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.