New research How Rover caught a PAN-OS authentication bypass attempt (CVE-2025-0108) Baku · Dubai

Codefinger Ransomware: Encrypting S3 Buckets With AWS's Own Keys

May 20, 2025  /  Cypho Research Team  /  4 min read

Codefinger surfaced in January 2025, when researchers at Halcyon documented a ransomware campaign that never touches a laptop or a server. It targets Amazon S3 buckets, and it does the encryption with a feature AWS itself provides: server-side encryption with customer-provided keys (SSE-C). There is no malware binary to detect and no file-encrypting process to kill. The attacker needs only a valid AWS key and two ordinary S3 permissions.

Halcyon identified two victims at the time of reporting. The numbers are small, but the technique is cheap, quiet and hard to undo, which is why it deserves attention from anyone who stores data in S3.

How the Attack Works

  1. Stolen or exposed AWS keys. The attacker uses AWS access keys that were publicly exposed or previously compromised, and that carry s3:GetObject and s3:PutObject permissions.
  2. Re-encryption with the attacker's key. Objects are rewritten using SSE-C with AES-256. The attacker supplies the encryption key in the request (the x-amz-server-side-encryption-customer-algorithm and matching key headers). AWS uses the key to encrypt the data and does not store it.
  3. A deadline. The attacker marks the files for deletion within seven days through S3 lifecycle rules, which turns the encryption into a countdown.
  4. A ransom note. A note left in the affected prefixes gives a Bitcoin address and a client ID, and warns that changing account permissions or files will end negotiations.

Why the Data Can't Be Recovered

With SSE-C, S3 never stores the key; whoever supplied it is the only one who can decrypt the data. There is no copy for AWS support to hand back and nothing in your logs to recover it from. Unless a clean copy exists somewhere the attacker couldn't reach, paying for the key is the only way back to the data, and even that depends on the attacker keeping their word.

Halcyon's report documents encryption and extortion. It does not document data exfiltration, so there is no evidence of a double-extortion stage in this campaign.

How This Differs From Classic Ransomware

Most ransomware still works the old way: a binary lands on Windows hosts, spreads through the network and encrypts files on disk. The code below, from a file-encrypting sample, is typical. It encrypts smaller files and overwrites larger ones with random data before renaming them.

Decompiled code from a file-encrypting ransomware sample: files under 2,117,152 bytes are encrypted; larger files are overwritten with random data and renamed with a random four-character extension.

Codefinger skips every one of those stages. There is no dropper, no lateral movement across hosts and no process to catch in the act. The attack happens entirely through legitimate, authenticated cloud API calls, so endpoint tools see nothing. The defences that matter are identity and cloud logging.

The Broader Ransomware Picture

For context, the rest of this section covers how classic ransomware grew and how it operates today. None of it describes Codefinger specifically.

Ransomware timeline

  1. 1989
    The AIDS Trojan (a.k.a. PC Cyborg), the first instance of ransomware. Created by Dr. Joseph Popp and distributed to 20,000 attendees at the World Health Organization (WHO) AIDS conference on 5ΒΌ" floppies. Demanded $189.
  2. 2004/2005
    GpCoder. A message on the user's home screen directed them to a .txt file on their desktop explaining how to pay the ransom and unlock the affected files. Demanded $200.
  3. 2006
    Archiveus Trojan. Primarily a Windows-based attack. Encrypted the MyDocuments directory. First ransomware to use RSA encryption.
  4. 2012
    Locker ransomware. Reveton locked the victim's screen with a fake law-enforcement notice (the "FBI MoneyPak" scam) and demanded a fine. WinLock was an earlier example of the same approach.
  5. 2013
    CryptoLocker. First ransomware to demand payment in bitcoin.
  6. 2014
    CryptoWall. Leveraged a Java vulnerability. Nearly 1,000 victims; estimated losses of at least $18 million.
  7. 2015
    TeslaCrypt. Targeted files belonging to computer games, alongside documents and photos.
  8. 2016
    Often called "the year of ransomware". Locky spread through huge phishing campaigns, with as many as 500,000 emails per day. Cerber, Jigsaw, SamSam and Petya were also active that year.
  9. 2017
    WannaCry attacked an estimated 200,000 computers in about 150 countries; U.S. and U.K. officials claimed North Korea was behind it. NotPetya, a variant of Petya, targeted victims in Ukraine including the National Bank of Ukraine; U.S. officials estimated damages at more than $10 billion.
  10. 2021
    DarkSide. The Colonial Pipeline attack. The pipeline was shut down for six days, and Colonial paid a $4.4 million bitcoin ransom.
Major highlights, not a complete list. Redrawn from the original timeline, with dates corrected.

Modern ransomware is an ecosystem. Initial access brokers, stealer and loader operators, affiliates and ransomware-as-a-service developers each handle one stage, supported by bulletproof hosting, money laundering and anonymisation services.

The ransomware-as-a-service ecosystem

Initial compromise

  • Direct exploitation or brute force
  • Distribution, through a TDS (traffic distribution system) to stealers and loaders

Access sold on

  • Initial access brokers
  • Access marketplaces

Operators

  • Affiliates, using post-exploitation tools

Service

  • Ransomware as a service (RaaS)
  • Financial services
  • Bulletproof hosting (BPH) services
  • Anonymisation tools and communications
Each stage hands off to the next. The bottom row is the shared infrastructure underneath all of it. Redrawn from the original diagram.

Groups advertise, recruit and publish victims through dark web forums, encrypted messengers and leak sites.

Inside a network, classic ransomware typically moves from one foothold, such as an exposed remote desktop, to file servers, user machines and connected devices.

Movement through the network

FromTo
AttackerRemote desktop
Remote desktopWeb server
Remote desktopFile server
File serverEnd users
Remote desktopConnected devices (printers, routers), marked as infected
Every connection in the original is two-way. From one remote desktop foothold the attacker reaches servers, users and connected devices. Redrawn from the original diagram.

Two delivery chains

A malware TTP

  1. 'fallguy'
  2. Malicious codeindex.js
  3. Obfuscated code_0x13e5
  4. Steal information via a URLTelegram, cloud download

#TA577

  1. Email
  2. *.zip
  3. *.js
  4. *.exe
  5. C2
Redrawn from the original diagram.

Every stage of that on-host kill chain leaves traces, and catching any one of them can stop the attack:

Ransomware kill chain: 7 detection opportunities

You only need to catch one to stop the attack.

  1. 01Initial access
    Indicators
    Phishing emails, RDP brute force, vulnerable public-facing apps.
    Tools and logs
    Email gateway, firewall logs, failed auth attempts, IDS/IPS.
    Action
    Block suspicious IPs, quarantine emails, disable compromised accounts immediately.
  2. 02Execution
    Indicators
    Suspicious process creation, PowerShell/cmd abuse, macro execution.
    Tools and logs
    EDR, Sysmon (Event ID 1), script block logging.
    Action
    Kill malicious processes, isolate endpoint, capture memory dump for forensics.
  3. 03Persistence
    Indicators
    Registry modifications, scheduled tasks, startup folder changes.
    Tools and logs
    Sysmon (Event ID 12, 13), Task Scheduler logs, Autoruns, EDR.
    Action
    Remove persistence mechanisms, check all systems for similar IOCs, rebuild if needed.
  4. 04Discovery and recon
    Indicators
    net.exe, nltest, whoami, ipconfig, mass network scanning.
    Tools and logs
    SIEM correlation rules, process command lines, network traffic logs.
    Action
    Isolate now. This is your best catch point. Network segmentation can limit spread.
  5. 05Credential access
    Indicators
    Mimikatz, LSASS dumps, ntds.dit access, SAM registry reads.
    Tools and logs
    EDR alerts, Sysmon (Event ID 10), Windows Security logs 4663/4656.
    Action
    Critical window. Isolate, force password resets on admin accounts, revoke Kerberos tickets.
  6. 06Lateral movement
    Indicators
    RDP sessions, PsExec, WMI, SMB file copies, unusual auth patterns.
    Tools and logs
    Windows Event ID 4624/4625, network flow data, EDR lateral movement alerts.
    Action
    Mass isolation mode. Segment networks, disable admin shares, hunt for additional compromises.
  7. 07Impact (encryption)
    Indicators
    vssadmin delete, bcdedit, wevtutil, mass file modifications, ransom notes.
    Tools and logs
    Process monitoring, file integrity monitoring, Event ID 1102, EDR ransomware detection.
    Action
    Too late for prevention. Activate the IR plan: isolate all systems, preserve evidence, engage leadership.
Redrawn from the original diagram.

Detecting Codefinger-Style Attacks

  • Turn on S3 data-event logging. CloudTrail doesn't record object-level requests by default. Without data events you won't see the encryption happen.
  • Alert on SSE-C where you don't use it. In CloudTrail, S3 writes that used a customer-provided key carry "SSEApplied":"SSE_C" in the event's additional data. They are rare in most environments, so a burst of them on PutObject, CopyObject or multipart uploads is a strong signal.
  • Watch lifecycle changes. New or modified lifecycle rules that expire objects within days, especially right after bulk writes.
  • Watch the keys. Long-lived access keys used from new IP addresses, regions or user agents, or used at unusual volume.
  • Look for ransom notes as objects. New small text objects appearing across many prefixes at once.

Mitigation

  • Make sure SSE-C is blocked. Since April 2026, S3 blocks SSE-C by default on new buckets, and on existing buckets in accounts that had no SSE-C encrypted objects. Older buckets may still allow it: check each bucket's default encryption configuration (BlockedEncryptionTypes) and block SSE-C unless a workload genuinely needs it. An IAM or bucket policy Condition on s3:x-amz-server-side-encryption-customer-algorithm adds a second layer.
  • Get rid of long-lived keys. Audit and rotate access keys, disable the ones nobody uses, and prefer short-lived role credentials.
  • Least privilege. Few principals need both read and write on every object in a bucket.
  • Keep a copy out of reach. Versioned buckets protected by Object Lock, or replicas in a separate account, give you something to restore from.
  • Find exposed keys before attackers do. Keys leak through public repositories, paste sites and stealer logs, which is exactly the kind of exposure external threat intelligence is built to catch.

Related reading from Cypho:

References

Unknown threats are unstoppable. Until we expose them.

Send us your company domain. We'll walk you through what's already out there about you and how Cypho would handle it, with one of our analysts on the call.

Or write to [email protected]

We'll use your details to respond to your request. See our privacy policy.