Abstract
The Ransomware family is rapidly outspreading amongst major organizations and institutions. Recent data indicates that the family has gained several new members in the last two years, increasing the infection rate by 68.5% according to Statista's Annual Ransomware report. This paper investigates the "formulation complexity" of modern ransomware by demonstrating a custom variant created in a testing lab using Python. We acquaint the ease of developing and deploying malware into remote machines using standard libraries. Our results show that domestic ransomware is as effective as sophisticated professional variants, deriving similar methodologies to carry out organizational attacks.
Introduction: The Rising Threat of Ransomware
Ransomware is no longer the exclusive domain of elite nation-state actors; it has become a "domesticated" threat. The barrier to entry for creating potent malware is alarmingly low, as standard programming tools can now mimic the behavior of sophisticated families like CryptoLocker and WannaCry.
As shown in Figure 1, while raw infection numbers have fluctuated, the economic impact and cost associated with these compromises have seen a staggering and consistent rise, reaching over $25 billion by 2021. This financial incentive drives the continuous evolution of ransomware topology. This paper bridges the gap between theoretical threats and practical implementation, asking: How easy is it for a developer with standard skills to build a devastating piece of malware?
Methods and Implementation
The authors developed a customized ransomware, named ".NIJAS," using Python 3.9. The architecture was designed to test the effectiveness of "off-the-shelf" tools in a modern security environment.
Development & Packaging
The malware utilizes standard libraries such as pyaes for encryption, pycryptodome for low-level primitives, and PyInstaller to convert scripts into standalone executables. By using ubiquitous libraries like numpy and requests, the malware can potentially blend in with legitimate administrative scripts, making heuristic detection more difficult.
Propagation & Privilege Escalation
To gain a foothold, the malware employs a DLL reflection attack. This technique "drills" a DLL into system memory to bypass Windows User Access Control (UAC) and spawn a command prompt with NT\SYSTEM privileges. Once elevated, the script executes sc stop WinDefend to kill Windows Defender processes, clearing the path for encryption.
Encryption Scheme
The malware uses a hybrid approach for maximum impact:
- Obfuscation: It encrypts the initial bytes of a payload using Morse Code as a unique obfuscation layer.
- File Encryption: It employs AES-256 in CBC mode for the file body.
- Key Exchange: RSA-2048 is used for the secure exchange of decryption keys via a reverse channelized socket connection (port 9999) to the attacker’s server.
Experimental Results
The paper utilized a controlled experimental testing environment consisting of a Virtual Machine running Windows 10 Enterprise with Windows Defender active.
- Successful Compromise: The ".NIJAS" ransomware successfully infected the test environment, disabled active security monitoring, and encrypted files without administrative privileges being manually granted.
- Performance: Despite the "Python Paradox"—where Python is often viewed as slower than C++—the system was fully compromised within seconds of execution.
- Lossless Recovery: A working decryption tool successfully restored files from the ".NIJAS" extension using the exfiltrated RSA/AES keys, proving the technical viability of the end-to-end attack chain.
Discussion and Conclusion
The study concludes that "domestic" ransomware made with open-source libraries is just as effective as professional variants for carrying out organizational attacks. The successful bypass of Windows Defender using a known DLL reflection technique underscores that standard OS protections are insufficient against even "simple" custom-built threats.
While Python-based decryptors may be slower than those written in Go or Bash for massive datasets, the extreme ease of development makes it a highly attractive language for rapid malware iteration. As the "crowdsourcing" of malware development increases alongside global digitalization, there is an urgent need for more robust IT laws and advanced Endpoint Detection and Response (EDR) systems capable of catching the specific socket behaviors and injection techniques demonstrated in this research.
Summary updated