Friday, March 1, 2024

New Nim-Based Malware Delivered via Weaponized Word Document

Hackers use weaponized Word documents to deliver malicious payloads through social engineering. 

By embedding malware or exploiting vulnerabilities in these documents, attackers trick users into opening them and leading to the execution of malicious code. 

While leveraging the familiarity and trust associated with such file format, this tactic is effective for several illicit purposes:-

  • Spreading malware
  • Gaining unauthorized access
  • Initiating other cyber attacks

Recently, cybersecurity researchers at Netskope identified a new Nim-based malware, which was delivered via weaponized Word documents by the threat actors.

Nim is a new language that sees a rising malware trend, and experts at Netskope Threat Labs note growing Nim-based threats, anticipating further popularity. 

Among them, the most notable one is “Dark Power” ransomware, which is also a variant of the Nim-based family that surfaced recently.

Nim-Based Malware via Word Document

The malicious Word doc drops the Nim backdoor, which is sent as an email attachment by a fake Nepali official. 

Despite macro security, APT malware, like Menorah, which used a similar tactic months ago, still leverages macros for payload delivery. 

Malicious Word file prior to enabling macro
Malicious Word file prior to enabling macro (Source – Netskope)

Besides this, opening the file shows a blank doc, prompts macro to enable, and then the clicking triggers the:-

  • Auto-routine
  • Code execution

VBA project uses passwords and obfuscation to dodge AV solutions. At the same time, the macros employ Chr( ) and string concatenation. 

Apart from this, the code is divided into four subroutines, and here below we have mentioned them:-

  • sch_task
  • hide_cons
  • read_shell
  • vb_chain

Word doc deploys Nim-based ‘conhost.exe’ backdoor on September 20, 2023. Nim is a versatile language that compiles the following languages together with Pythonic syntax:-

  • C
  • C++
  • JavaScript

Backdoor operates with user’s privileges, mimicking Nepali authority to deceive users. C&C server imitates government domains ([.]govnp[.]org).

Nim Backdoor
Nim Backdoor (Source – Netskope)

Nim backdoor checks for analysis tools and terminates if found. Then, it fetches the hostname and encrypts it with the ‘bakery’ function.

Processes the backdoor avoids
Processes the backdoor avoids (Source – Netskope)

The encrypted hostname double-base64 encoded, which was:-

  • Spliced with C&C server URL
  • Suffixed with ‘.asp’

The C&C server issues the commands via HTTP GET, the response is decrypted by the ‘confectionary’ function, executed with cmd /c, and then the result is sent back to the server. 

Besides this, for encryption and decryption, “NPA” was used as the key, potentially Nepal Agent.

Contacted C2 hosts

Here below, we have mentioned all the C2 hosts that were contacted:-

  • mail[.]mofa[.]govnp[.]org
  • nitc[.]govnp[.]org
  • mx1[.]nepal[.]govnp[.]org
  • dns[.]govnp[.]org

The VBscript ‘OCu3HBg7gyI9aUaB.vbs‘ in the startup folder ensures access. Confirms internet connection, pings Google. 

On success, it runs ‘8lGghf8kIPIuu3cM.bat,’ and the batch file drops the files and creates tasks for payload. 

Meanwhile, the ‘d.bat’ establishes the persistent execution with the scheduled task ‘ConsoleHostManager.’

Scheduled Task
Scheduled Task (Source – Netskope)

Malware in rare languages challenges security experts, and the cross-compilation in Nim aids hackers in creating obstacles for security analysts.



  • e2a3edc708016316477228de885f0c39
  • 777fcc34fef4a16b2276e420c5fb3a73
  • EF834A7C726294CE8B0416826E659BAA
  • 32C5141B0704609B9404EFF6C18B47BF


  • 3aa803baf5027c57ec65eb9b47daad595ba80bac
  • 5D2E2336BB8F268606C9C8961BED03270150CF65
  • 4CAE7160386782C02A3B68E7A9BA78CC5FFB0236
  • 0599969CA8B35BB258797AEE45FBD9013E57C133


  • b5c001cbcd72b919e9b05e3281cc4e4914fee0748b3d81954772975630233a6e
  • 696f57d0987b2edefcadecd0eca524cca3be9ce64a54994be13eab7bc71b1a83
  • 88FA16EC5420883A9C9E4F952634494D95F06F426E0A600A8114F69A6127347F
  • 1246356D78D47CE73E22CC253C47F739C4F766FF1E7B473D5E658BA1F0FDD662


  • mail[.]mofa[.]govnp[.]org
  • nitc[.]govnp[.]org
  • mx1[.]nepal[.]govnp[.]org
  • dns[.]govnp[.]org

Latest articles

RisePro Stealer Attacks Windows Users Steals Sensitive Data

A new wave of cyber threats has emerged as the RisePro information stealer targets...

Golden Corral restaurant chain Hacked: 180,000+ Users’ Data Stolen

The Golden Corral Corporation, a popular American restaurant chain, has suffered a significant data...

CISA Warns Of Hackers Exploiting Multiple Flaws In Ivanti VPN

Threat actors target and abuse VPN flaws because VPNs are often used to secure...

BEAST AI Jailbreak Language Models Within 1 Minute With High Accuracy

Malicious hackers sometimes jailbreak language models (LMs) to exploit bugs in the systems so...

Hackers Hijack Anycubic 3D Printers to Display Warning Messages

Anycubic 3D printer owners have been caught off guard by a series of unauthorized...

RSM US Deploys Stellar Cyber Open XDR Platform to Secure Clients

Stellar Cyber, the innovator of Open XDR, today announced that RSM US – the leading provider...

Biden Crack Down Sale of Americans’ Personal Data to China & Russia

To safeguard the privacy and security of American citizens, President Joe Biden has issued...
Tushar Subhra Dutta
Tushar Subhra Dutta
Tushar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Live Account Takeover Attack Simulation

Live Account Take Over Attack

Live Webinar on How do hackers bypass 2FA ,Detecting ATO attacks, A demo of credential stuffing, brute force and session jacking-based ATO attacks, Identifying attacks with behaviour-based analysis and Building custom protection for applications and APIs.

Related Articles