[Studying] Analyzing njRAT Danger Edition 2020
Last Update:
Word Count:
Read Time:
Introduction
This article is part of my series: Inside Different Generations of RATs and part of the njRAT Family.
If you are interested in the full series, please refer to the linked pages above.
This article presents an analysis of njRAT Danger Edition 2020, with a particular focus on its newly introduced features.
Key Takeaways
- This version contains several defective features
- The Ransomware functionality is likely inspired by WannaCry
- The graphical user interface resembles that of Cobalt Strike (or Armitage, although it lacks pivoting capabilities)
njRAT Danger Edition 2020
njRAT Danger Edition 2020 (For convenience, I use “the 2020 version” in this article) is the third version of the Danger Edition.
Compared to the previous version (2018), it introduces more features (although some of them are defective).
Experimental Environment
To safely conduct malware analysis, the environment should be isolated using virtual machines. Under no circumstances should malware be executed on a personal or production system.
| Tool | Description |
|---|---|
| ExeInfo PE | Detect packers, compilers, and basic file metadata |
| Detect It Easy (DIE) | Identify packers, protectors, and signatures |
| Wireshark | Network traffic analysis |
| de4dot | .NET de-obfuscation |
| dnSpy | .NET reverse engineering and debugging |
| pestudio | Static PE analysis tool |
| Device | IP Address | Description |
|---|---|---|
| Windows 7 x64 (VM) | 192.168.85.5 | Victim machine |
| Windows 10 x64 (VM) | 192.168.85.3 | Analysis machine |
The two virtual machines were configured within an isolated internal network to prevent unintended external communication. If you want to know how to set up your experimental environment, please view:
- How to Setup Your Experimental Environment for Malware Analysis
- Installing VMware Tools on Windows XP and Windows 95 with VMware WorkStation 17
Usage
Note: To distinguish the terms “server”, “client”, “controller” and “payload”, please refer to this section.
Some features are not easily observable, so they will be explained in the reverse engineering section instead of being shown in this section.
The graphical user interface of the controller application is shown below:
Generate the payload using the provided builder:
After deploying the payload on the target machine, the compromised machine appears in the controller application once the connection is established:
File Manager
Connected UDP
Info
Hide (Hidden) RDP
The 2020 version provides hidden RDP. I will analyze this feature in the reverse engineering section.
Funny
Ransomware
The 2020 version provides Ransomware capabilities. However, it is not user-friendly since attackers are required to specify target files (not directories!) one by one manually:
In addition, the implementation appears to be defective.
Protocol Analysis
As in the previous analysis articles, the 2020 version transfers data in plain text without any protection.
Reverse Engineering
Since the implementations of this variant are almost identical to njRAT v0.7. Therefore, I only focused on new features in this section.
Payload
Open the payload using ExeInfo PE and DIE (Detect It Easy):
Open the payload using dnSpy:
Hidden RDP
The mechanism of the Hidden RDP is described as follows:
- Create local user
- Add user to the Administrators group
- Set hidden description
- Enable RDP
This raises a question: If the RDP, Remote Desktop Protocol is applied, how can attackers connect to the compromised machine if they only have the public IP behind a NAT?
The answer is: attackers can use the provided reverse proxy feature.
VB.NET Compiler
The 2020 version provides a VB.NET compiler for remote code execution:
Ransomware
After further investigation, I clearly understand the mechanism and the vulnerabilities of this feature.
The Ransomware feature uses 3DES to encrypt the specified files. It uses an MD5-derived key for the 3DES algorithm.
In addition, it sets itself as a critical process to avoid termination (If you are interested in the underlying mechanism, please refer to this article).
However, the secret key is constant. It means all victims can use the same secret to decrypt their files (However, I think the decryption algorithm is incomplete and defective. Fortunately, the provided encryption user interface is not user-friendly for attackers).
Conclusion
This article presents an analysis of njRAT Danger Edition 2020. Compared to the previous article, it introduces more functionalities, although several of them are poorly implemented or incomplete.
Initially, I was suprised by its multiple features, even though I was not fully familiar with their underlying principles and implementations.
However, after further investigation, some features are not as robust (or advanced) as initially expected.
At the time of writing, I only found three versions of the Danger Edition branch. Therefore, this article is probably the last analysis article of the Danger Edition. Of course, I will try to find any other versions of this branch.
If you have any comments or suggestions, please feel free to leave them below!
THANKS FOR READING