0x The Malware Lab
RAT
RAT.MsCoreBind.Nim

Nim / Win32 · MsCoreBind

A Nim-compiled bind-shell RAT. It listens on TCP 5555, reads commands from whoever connects, and returns the output — giving remote command execution. It persists via the Startup folder and masquerades as Microsoft core binaries.

Identification

Original name
RAT.CmdSocket.exe.malz
Aliases
RAT.CmdSocket.exe.malz
File type
PE executable (Nim, Win32)

Capabilities

Indicators of Compromise

Network indicators

TypeValueNote
portTCP 5555Bind-shell listening port
domainserv1.ec2-102-95-13-2-ubuntu.localHost referenced in strings (C2 / staging)
user-agentNim httpclient/1.0.6Default Nim HTTP client user agent

Host indicators

TypeValueNote
file\mscordll.exeMasqueraded binary name
file/msdcorelib.exePotential downloaded payload
pathAppData\Roaming\Microsoft\Windows\Start Menu\Programs\StartupPersistence location
fileintrt explrMasquerade string ("internet explorer")

MITRE ATT&CK

TechniqueIDNote
Command and Scripting InterpreterT1059Executes commands received over the socket.
Non-Standard PortT1571Bind shell on TCP 5555.
Boot or Logon Autostart Execution: Startup FolderT1547.001Persists via the Startup folder.
Masquerading: Match Legitimate Name or LocationT1036.005Masquerades as mscordll.exe / msdcorelib.exe / "intrt explr".
Ingress Tool TransferT1105May download msdcorelib.exe.

Execution flow

1. Establish persistence by installing itself into the Startup folder. 2. Bind and listen on TCP 5555. 3. On connection, print a banner ("[+] online", "[+] what command can I run for you") and read attacker input. 4. Execute each received command and return the (base64-encoded) output.

Static analysis

Strings / FLOSS output show a Nim HTTP client plus the bind-shell banners and masquerade/persistence artifacts:


@[+] what command can I run for you
@[+] online
@NO SOUP FOR YOU
@\mscordll.exe
@Nim httpclient/1.0.6
@/msdcorelib.exe
@AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
@intrt explr
@ http://serv1.ec2-102-95-13-2-ubuntu.local
InternetOpenW  InternetOpenUrlW  MessageBoxW

Dynamic analysis

activity.

msdcorelib.exe.

the LISTENING state** on port 5555; base64-encoded data observed on the socket; command-injection capability.

The name reflects the behaviour: this RAT is a bind shell — it binds port 5555, reads the input of whoever connects, and returns the result.

Screenshots

Nim / bind-shell strings
Nim / bind-shell strings
Persistence and masquerade strings
Persistence and masquerade strings
Networking imports
Networking imports
Listening socket on TCP 5555
Listening socket on TCP 5555
Base64 data over the socket
Base64 data over the socket
Command injection in action
Command injection in action
Wireshark capture / potential download
Wireshark capture / potential download
← All samples