Deriving Ransomware Formulation Complexity and Compromisation Topology

Ujas Dhami, Nisarg ShahInternational Journal of Science and Research (IJSR) 2022 · DOI

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.

Figure 1: Trends in Ransomware Infections and Associated Costs (2016-2021)

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:

  1. Obfuscation: It encrypts the initial bytes of a payload using Morse Code as a unique obfuscation layer.
  2. File Encryption: It employs AES-256 in CBC mode for the file body.
  3. 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

Abstract

The Ransomware family, notably, is outspreading itself amongst major organizations and institutions. The family has gained several of its members in the recent two years, increasing the infection rate by 68.5%, as per Statista's Annual Ransomware report. Investigation: This paper demonstrates ransomware created by the authors in a testing lab with the use of Python, acquainting the ease of developing the malware and deploying it into remote machines. Method: The Ransomware is constructed from utilizing already available python libraries, inside a python environment. The Ransomware is deployed into a remote machine, along with a Reverse Channelized Socket connection, and cryptographic keys are exchanged to maintain access and to supply the attacker with the decryption key, upon a successful compromise. Principle Result: Heuristics performed by the ransomware to compromise the system derive a similar methodology used by sophisticated ransomware to carry out organizational attacks. Domestic ransomware made with python libraries is as effective as other members of the family.
BibTeX
@article{dhami2022deriving,
  author = {Ujas Dhami and Nisarg Shah},
  title = {{Deriving Ransomware Formulation Complexity and Compromisation Topology}},
  journal = {International Journal of Science and Research (IJSR)},
  year = {2022},
  doi = {10.21275/sr22114182357},
}
Figure