Follow
Subscribe via Email!

Enter your email address to subscribe to this platform and receive notifications of new posts by email.

Ransomware Attacks: How Malicious File Encryption Works

Ransomware locks vital data behind mathematical ciphers to extort money from individuals and enterprises. An examination of its technical mechanics, infection pathways, historical roots, and defense solutions shows how modern organizations can protect their systems.
A close-up view of an open laptop keyboard illuminated with moody dark blue and pink lighting.

Ransomware is bad software designed to block access to a victim’s files or computer systems until a ransom fee is paid, growing from early scams into a global threat that accounted for an estimated $1 billion in damages by 2016 [2]. Locker variants lock the device screen, but crypto variants quietly scramble user data and demand digital payments in bitcoin [1]. CryptoLocker collected millions in bitcoin [5].

What Is Ransomware?

Crypto ransomware and locker ransomware represent the two main architectures of digital attacks. While locker malware locks the hardware display or operating system shell without altering files, crypto malware uses mathematical ciphers to scramble databases and documents across company workstations [1]. Joseph Popp created the first extortion trojan in 1989 [5]. Victims cannot open encrypted files without an external key [1].

Crews also deploy secondary variants known as scareware, doxware, double extortion, and data wipers. In doxware attacks, crooks steal private records and threaten to release them on public forums if the target refuses to pay [6]. Double extortion combines file encryption with data theft, forcing victims to pay once to recover locked files and again to prevent proprietary leaks. Wipers destroy data permanently. Scareware relies on fake warnings from agencies like the FBI to frighten users into paying fines [1].

Digital ransom attacks cause heavy financial and operational damage to enterprises worldwide. A survey conducted by Sophos in 2024 involving 5,000 cybersecurity leaders showed that 59% of organizations suffered an extortion attack in 2023, with average ransom demands reaching $4.3 million. The Cybersecurity and Infrastructure Security Agency reported that businesses spend an average of $1.85 million just to recover their systems after an attack, while 80% of firms that paid were targeted again by cybercriminals [6]. Companies in the European Union and the United States also face legal penalties under the California Consumer Privacy Act if confidential records leak online [1]. The FBI recorded 3,611 ransomware complaints in 2025 with adjusted losses exceeding $32 million [5].

On-screen payment instructions from an extortion program.
Payment instructions presented to victims following an unauthorized system infection. (Credit: BBC News)

Initial Infection Vectors

Phishing lures and rogue emails serve as frequent entry points for delivering malware to corporate endpoints. The Sophos survey showed that exploited software flaws caused 32% of attacks, compromised credentials accounted for 29%, and bad emails caused 23%. Criminals disguise suspicious file attachments as business invoices or shipping notices, tricking office employees into executing hostile scripts on their workstations [6]. Security teams can strengthen baseline defenses through structured awareness drills and regular phishing network takedown operations that remove hostile domains before users make a mistake.

Exploit kits provide an avenue for silent drive-by downloads on compromised web pages. Cybercriminals compromise legitimate websites or run deceptive online advertisements that silently route visitors toward malicious exploit scripts [1]. Security firm GFI Labs observed attackers abusing GitHub and SourceForge pages with the Stamp EK exploit kit, dropping the Trojan.Win32.Agent.akmt payload on infected systems [7]. The exploit kit executes without user confirmation [1].

Weak remote connections and exposed network ports give attackers a direct bridge into enterprise networks. Criminals search for internet-facing Remote Desktop Protocol connections on port 3389, using automated password tools to break administrative accounts. Once inside, intruders turn off local security tools like Microsoft Defender and spread rogue files to neighboring server clusters [6]. Doctor Web discovered Linux.Encoder.1 in 2015. The Linux.Encoder.1 trojan traversed directory trees to scramble home directories, MySQL databases, and Apache or Nginx web servers using public key cryptography, while also encrypting archives containing the word backup. Weak SSH credentials allowed initial access [10].

How Cryptoviral Extortion Locks Local Files

Researchers Adam L. Young and Moti Yung introduced cryptoviral extortion at Columbia University during the 1996 IEEE Security & Privacy conference. Inspired by the parasitic facehugger creature in the classic science fiction movie Alien, they proved that public key cryptography could kidnap electronic data. Joseph Popp created the AIDS Trojan for PC Cyborg in 1989. Popp used weak symmetric ciphers. Young and Yung introduced asymmetric key pairs that prevent local decryption [5].

The cryptoviral extortion protocol relies on a three-round exchange that prevents victims from recovering their data without attacker assistance. The attacker generates an asymmetric key pair and embeds the public encryption key inside the malware binary before releasing it on the internet. When the program infects a target PC, it creates a random symmetric key, encrypts user files with that key, and then encrypts the symmetric key using the embedded public key. The malware then erases original files and purges the temporary symmetric key from volatile memory, leaving behind scrambled data files and a small asymmetric ciphertext package. Because only the attacker holds the matching private decryption key, victims cannot calculate the key locally and must transmit their encrypted key package to the criminal to receive a working decryptor tool [5].

Digital illustration depicting security defenses against system extortion.
Enterprise security architecture designed to prevent unauthorized administrative takeover. (Credit: CSO Online)

Once executed, the malware searches storage drives for specific file extensions. Strains look for office documents, spreadsheets, design projects, and backup archives. Avast researcher Jakub Kroustek analyzed the Star Trek themed Kirk malware and discovered that it targeted 625 file types before adding a .kirked extension to every file [14]. The code also deletes volume shadow copies, preventing recovery through native Windows tools [11]. Captain James T. Kirk and Spock graphics appeared in the ransom note [14].

Symmetric Keys and Public Key Encryption

Hybrid encryption solves the speed limitations of pure public key ciphers. Scrambling gigabytes of information using asymmetric RSA algorithms requires hours of processor time, raising system alarms and giving defenders time to interrupt the attack [5]. By pairing fast symmetric ciphers like AES with asymmetric public keys, the malware encrypts thousands of files in minutes. AES ciphers execute in seconds [14]. The symmetric cipher rapidly scrambles data, while the public key locks up the symmetric key [5].

Implementation mistakes in encryption routines have sometimes allowed cybersecurity researchers to build free recovery tools for victims. Security researchers at Nixu discovered that TorrentLocker made an elementary cryptographic error by reusing the exact same keystream to scramble all files on a computer with a basic XOR operation. The SANS Institute said that analysts recovered the keystream simply by applying an XOR operation between an encrypted file and its known plaintext counterpart. Richard Hummel of iSight Partners reported that the developers fixed this bug in later versions, showing how quickly malware authors improve their tools while scanning Thunderbird email profiles to expand spam campaigns across Australia and the UK. TorrentLocker demanded $500 in bitcoin [9].

Other malware families have leaked decryption keys by mismanaging Windows cryptographic interfaces. The authors of CryptoDefense accidentally left the private decryption key stored on the victim’s hard drive because they used built-in Windows APIs incorrectly [9]. During the WannaCry outbreak, security researchers observed that flawed memory allocation left components of the private key unencrypted in RAM. A security researcher at Quark Security built an automated recovery program that pulled these keys from memory, helping organizations restore their Windows 7 systems without paying the criminals [11]. Jack Schofield recommended tools like Kaspersky Rescue Disk, Comodo, Malwarebytes, Process Explorer, and Virus Total for system analysis [7].

Ransomware Attacks: How Malicious File Encryption Works — The Guardian image
(Credit: The Guardian)

The Rise of Ransomware as a Service

The growth of darknet marketplaces transformed isolated cyberattacks into an organized franchise model known as ransomware as a service. In this business model, skilled developers write malicious software, maintain payment portals, and develop decryption tools, while renting the platform to criminal affiliates. Affiliates break into company networks and deploy the malware, splitting collected ransom funds with the developers according to agreed percentages. Affiliates share collected ransom funds [1]. This setup lowers technical barriers for novice hackers [6].

Specialized criminal roles have created an underground supply chain that supports digital extortion activities. In a study published in Computers & Security, researchers Meland, Bayoumy, and Sindre analyzed darknet marketplaces to describe the value chain connecting software creators, access brokers, and affiliates [4]. High-profile groups like LockBit operated large affiliate networks across several business sectors until law enforcement dismantled parts of their infrastructure in 2024. Other groups like BlackByte and Hive adopted double extortion strategies to pressure public institutions and hospital networks [1].

Human-operated attacks represent a shift toward targeted corporate infiltration. Instead of relying on random infections, operators spend weeks exploring enterprise networks to map critical infrastructure and sensitive databases. The Akira group exploited VPN services without multifactor authentication, impacting over 250 organizations and claiming approximately USD 42 million in ransom proceeds. In 2022, the FBI infiltrated the Hive network to capture decryption keys, preventing more than USD 130 million in extortion payouts before the group disbanded [1]. Check Point researcher Maya Horowitz said that extortion demands are calibrated directly to a victim’s financial capacity [7].

Ransomware Attacks: How Malicious File Encryption Works — The Guardian image
(Credit: The Guardian)

High-Profile Outbreaks and Network Worms

On 12 May 2017, the WannaCry outbreak demonstrated how combining file-encrypting code with an automated network worm could trigger a global emergency across healthcare and enterprise sectors. The malware infected more than 300,000 computers in 150 countries by exploiting EternalBlue, an exploit developed by the United States National Security Agency that abused flaws in the Microsoft Windows Server Message Block protocol. The Shadow Brokers leaked EternalBlue online a month earlier. WannaCry paired EternalBlue with the DoublePulsar backdoor to scan networks and spread from machine to machine without user interaction [11]. In the UK, Home Secretary Amber Rudd confirmed that 48 National Health Service trusts suffered disruptions, leaving doctors unable to access patient records and forcing clinics to cancel routine appointments. Foreign targets included Telefonica, Gas Natural, and Iberdrola in Spain, alongside FedEx and Renault in France [13].

Marcus Hutchins halted the global outbreak [11]. The British malware analyst discovered a hardcoded web address in the program code and spent £8.50 ($11) to register the domain name, triggering a kill switch that stopped new infections worldwide [13]. Security researcher Kevin Beaumont and expert Jake Williams said that the incident exposed systemic patching delays. Shodan tracked unpatched endpoints in Atlanta and beyond. Microsoft released security updates for unsupported operating systems like Windows XP [12]. Kaspersky Lab reported that roughly 98 percent of infected machines ran Windows 7, while TSMC later faced temporary chip factory shutdowns from a related variant [11].

In April 2022, the Russia-linked Conti group launched an extortion campaign that hit 27 government bodies in Costa Rica. President Rodrigo Chaves declared a national state of emergency after customs and tax platforms stopped working at the Ministerio de Hacienda. Trade disruptions cost local businesses between $38 million and $125 million, while a subsequent attack by Hive forced the health service to reschedule 34,677 medical appointments. Former director Jorge Mora and Mario Robles of White Jaguars coordinated defenses alongside Joey Milgram of Soluciones Seguras. Brett Callow of Emsisoft and Sergey Shykevich of Check Point evaluated the infrastructure impact. Vitali Kremez of AdvIntel tracked the subsequent dismantling of Conti [15].

Why Paying the Extortion Fails to Guarantee Recovery

Although many victims consider paying, law enforcement authorities and cybersecurity professionals advise victims never to pay money to extortionists. Paying a ransom does not guarantee that criminals will provide a functional decryption tool or that the software will restore corrupted databases without errors [1]. Gary Sockrider, principal security technologist at Arbor Networks, estimated that attackers deliver working decryption keys only about 65% to 70% of the time [6]. Few victims ever recover data. Many businesses have paid hundreds of thousands of dollars only to discover that their data remained locked forever [1].

Meeting extortion demands creates legal liabilities and marks an organization as an easy target for future attacks. The Cybersecurity and Infrastructure Security Agency reported that 80% of organizations that paid a ransom suffered a second extortion attack shortly after [6]. In addition, transferring funds to criminal gangs can breach regulatory sanctions, while companies still face fines under the General Data Protection Regulation if consumer data was stolen during the breach. Paying criminals also finances illegal software development, ensuring that other businesses will face similar threats in the future [1].

Ransomware Attacks: How Malicious File Encryption Works — BBC News image
(Credit: BBC News)

Victim resistance and targeted police operations have started to curb total cybercrime revenue. Research published by Chainalysis showed that global extortion payments dropped to $813 million in 2024, down by more than a third from $1.25 billion in 2023. Jacqueline Burns Koven of Chainalysis said that victims increasingly refused to pay demands, even as gangs increased requested sums by 53% in late 2024. Lizzie Cookson of Coveware said that law enforcement crackdowns on groups like LockBit and BlackCat prevented the criminal ecosystem from returning to its previous scale, even after attacks on firms like Krispy Kreme. UK ministers proposed banning ransomware payouts across NHS trusts and schools [8].

Practical Ransomware Defense Strategies

Offline backups provide the most reliable defense against digital ransom attacks. Advanced malware families actively search for local storage drives and cloud connections to delete backup copies before encrypting primary systems [1]. Organizations must keep secondary copies on external drives or isolated networks that cannot be accessed through standard login credentials [10]. Vendor Sophos found that 56% of affected companies recovered their files from backups, compared to just 26% that relied on paying ransom fees [5].

Regular software updates close security vulnerabilities before automated worms can exploit them [1]. Administrators should verify that system protections function properly across Windows 7, Windows 8, Windows 8.1, and Windows 10 PCs, especially in environments where Microsoft Defender updates defend against malicious background scripts. Installing patches for remote services and segmenting internal subnets stops attackers from moving between computers if a single machine is compromised. IT teams should also disable unnecessary network protocols and restrict administrative permissions to limit potential infection pathways [6].

A Zero Trust architecture provides deep defense against both automated and human-operated extortion groups, especially as AI-driven attack tools emerge. A Zero Trust framework verifies every access request, enforces least-privilege principles, and assumes that malicious actors are already present inside the network perimeter. Regular phishing drills help employees identify suspicious email attachments before opening dangerous files on their computers. If an infection occurs, having an incident response plan lets technicians isolate affected machines, alert law enforcement agencies like the FBI, IC3, or Secret Service, and restore operations safely [1].

Sources
  1. WEBSITE Microsoft Security. (2026). What is ransomware? Protection and prevention. [Article Link]
  2. ACADEMIC JOURNAL Brewer, R. (2016). Ransomware attacks: detection, prevention and cure. Network Security, 2016(9), 5-9. [Article Link]
  3. ACADEMIC JOURNAL Oz, H., Arış, A., Levi, A. W., & Uluagac, A. S. (2022). A Survey on Ransomware: Evolution, Taxonomy, and Defense Solutions. ACM Computing Surveys, 54(11s), 1-37. [Article Link]
  4. ACADEMIC JOURNAL O’Kane, P., Sezer, S., & Carlin, D. (2018). Evolution of ransomware. IET Networks, 7(5), 321-327. [Article Link]
  5. WEBSITE Wikipedia. Ransomware. [Article Link]
  6. ONLINE NEWS Fruhlinger, J., & Muse, D. (2024). Ransomware explained: How it works and how to remove it. CSO Online. [Article Link]
  7. ONLINE NEWS Schofield, J. (2016). How can I remove a ransomware infection? The Guardian. [Article Link]
  8. ONLINE NEWS Milmo, D. (2025). Global ransomware payments plunge by a third amid crackdown. The Guardian. [Article Link]
  9. ONLINE NEWS PCWorld. (2014). Encryption goof fixed in TorrentLocker file-locking malware. [Article Link]
  10. ONLINE NEWS PCWorld. (2015). File-encrypting ransomware starts targeting Linux web servers. [Article Link]
  11. WEBSITE Wikipedia. WannaCry ransomware attack. [Article Link]
  12. ONLINE NEWS Whittaker, Z. (2019). Two years after WannaCry, a million computers remain at risk. TechCrunch. [Article Link]
  13. ONLINE NEWS Newman, L. H. (2017). The Ransomware Meltdown Experts Warned About Is Here. WIRED. [Article Link]
  14. ONLINE NEWS Abrams, L. (2017). Star Trek Themed Kirk Ransomware Brings us Monero and a Spock Decryptor! BleepingComputer. [Article Link]
  15. ONLINE NEWS Burgess, M. (2022). Conti’s Attack Against Costa Rica Sparks a New Ransomware Era. WIRED. [Article Link]
  16. ACADEMIC JOURNAL Paquet-Clouston, M., Haslhofer, B., & Dupont, B. (2019). Ransomware payments in the Bitcoin ecosystem. Journal of Cybersecurity, 5(1). [Article Link]
Leave a Comment

Related Posts
Total
0
Share