Bybit / Safe{Wallet} - Developer's Mac Compromised → MFA-Backed AWS Session Hijacked → JavaScript Swapped in Safe's S3 Bucket → Signers Approve a Disguised Delegatecall → ~$1.5B Swept From Bybit's Cold Wallet
At 14:13:35 UTC on February 21, 2025, Bybit's Ethereum multisig cold wallet executed a transaction that its three signers had approved, in the Safe{Wallet} web app, as a routine transfer. It was a delegatecall that handed control of the wallet to an attacker contract, and about two and a half minutes later the wallet was swept. The FBI puts the theft at about $1.5 billion in virtual assets. The route ran through Safe{Wallet}'s cloud, not Bybit's. On February 4 a Safe{Wallet} developer's Mac was compromised through a Docker project. From February 5 the attackers used that developer's MFA-backed AWS session tokens inside Safe's AWS account, and on February 19 they tampered with the JavaScript that app.safe.global served from Safe's S3 bucket through CloudFront: the main app bundle and, per Sygnia, at least one other file. The new code fired only when the connected Safe was Bybit's cold wallet or one other address. It changed the transaction the signers' hardware wallets were asked to sign while the web page showed the transfer they expected. The tampered code was live for about two days before the theft and was removed about two minutes after it, per Sygnia, before the main sweep. Bybit says both forensic firms it hired found no compromise of its own infrastructure. The FBI says North Korea was responsible and calls the activity TraderTraitor, the same FBI label it gives the 2026 Binance hot wallet theft; Mandiant tracks the group as UNC4899 (CryptoSlate, reporting Safe's March 6 update).
The cloud lesson sits in step 06, where nothing is reported to have checked the files in the bucket. Safe has described a security program that limited privileged infrastructure access to a few developers, separated source code from infrastructure management, and required multiple peer reviews before production changes (CryptoSlate). This attack went around all of it. It did not touch the source code; it overwrote built files in the bucket, with access that Safe says came from one of the very few staff who held it. No published account describes any control at Safe noticing the changed files in the roughly 47 hours the malicious code was served. The investigators reconstructed it afterwards from the Chrome caches on all three signers' machines and from public web archives (Sygnia), and no published source shows the uploads in an AWS log or names the identity that made them. The page that loaded the files carried no Subresource Integrity hashes, and its Content Security Policy allowed scripts from its own origin, which is where the tampered files came from (this page's reading of the Internet Archive's copy from February 20).
Safe's statements and the investigators' findings differ, and in one place they contradict. On February 21 Safe posted that it had "not found evidence that the official Safe frontend was compromised" (crypto.news). Sygnia and Verichains, in preliminary reports Bybit published on February 26, both placed malicious JavaScript in files that app.safe.global served from Safe's S3 bucket, and Safe's own March 6 timeline later listed a snapshot of the site "with malicious JS code inserted." That first statement was what Safe said it had found at the time; its own timeline superseded it. Safe's February 26 statement said the attack came through "a compromised Safe{Wallet} developer machine" resulting in "the proposal of a disguised malicious transaction," and that external researchers found no vulnerabilities in its smart contracts or the "source code of the frontend and services." On those terms it matches the investigators: none of them alleges a flaw in Safe's source code or contracts, Sygnia says the JavaScript was modified "directly on the S3 bucket," and Elastic describes the app being subverted without a breach of backend APIs or contract logic. The difference is framing, between source code and a file deployed to S3, and what the statement leaves out. It does not mention AWS, S3 or the served JavaScript, and the disguised transaction was built in Bybit's signers' browsers by code served from Safe's infrastructure (Sygnia, NCC Group); the developer's machine was the way into AWS. Safe also said it had rebuilt its infrastructure and rotated all credentials, "ensuring the attack vector is fully eliminated." Sygnia wrote on March 16 that critical gaps remained, the largest being a comprehensive investigation of activity in Safe's AWS account. Safe's March 6 update, prepared with Mandiant, does describe the hijacked AWS session tokens and the JavaScript change, though Sygnia notes that the Mandiant material Safe shared mentions the change to the JavaScript but "did not independently confirm" it through a forensic investigation of Safe's infrastructure. Safe said on February 26 that it would publish a full post-mortem; this page found none later than the March 6 update.
Slides: download the PDF or make your own editable copy (copying needs a Google account). The slides are licensed CC BY-NC 4.0.
Safe's timeline, built with Mandiant, records the developer it calls Developer1 as compromised at 08:55:45 UTC on February 4, 2025. Safe says this developer "was one of the very few personnel that had higher access" (The Hacker News). The earliest malicious activity Mandiant found was a Docker project named MC-Based-Stock-Invest-Simulator-main sending traffic to getstockprice[.]com, a domain registered through Namecheap at 01:50:18 UTC on February 2. The project's files sat in the developer's ~/Downloads folder, which Sygnia, relaying Mandiant, reads as suggesting a potential social engineering vector.
How the developer came to run it is not published. The Hacker News notes earlier cases in which TraderTraitor approached cryptocurrency exchange developers on Telegram to help troubleshoot a Docker project, and says it is not clear the same method was used here. SecurityWeek reports, citing Mandiant, that the attackers posed as a trusted open-source contributor; other accounts say only likely social engineering. Safe says the attacker later removed the malware and cleared Bash history, so the payload on the Mac was not recovered. Mandiant saw the open-source Mythic framework (S0699) in use (Sygnia), and Palo Alto Networks Unit 42, which does not name Safe, lists getstockprice[.]com among the C2 infrastructure of the group it calls Slow Pisces, seen from February 3 to 20. Mandiant also found three more UNC4899-linked domains in Safe's AWS network logs and the workstation's logs (CryptoSlate).
Lure: Docker project MC-Based-Stock-Invest-Simulator-main, files in ~/Downloads; how it arrived is not published
Domain: getstockprice[.]com, registered February 2 via Namecheap (T1583.001)
Tooling: Mythic, per Mandiant as relayed by Sygnia
Why it worked: code of unknown origin ran on a machine that held a live session into production AWS
Detect: developer machines with production access contacting newly registered domains; containers started from a Downloads folder on those machines (this page's suggestion)
Safe described the attack as the compromise of the developer's laptop and "the hijacking of AWS session tokens to bypass multi-factor authentication" (The Hacker News). Sygnia explains the constraint. Safe's configuration required MFA re-authentication for Security Token Service (STS) sessions every 12 hours, and the attackers had failed to register an MFA device of their own, so they relied on a hijacked, active session token, "likely extracted by the malware" on the workstation.
A temporary AWS session is a bearer credential: whoever holds the access key, secret key and session token can make the same API calls until it expires, and the MFA check happened when it was issued. How the developer obtained it, and where it was stored, are not published. Elastic Security Labs, which rebuilt the attack in an emulation, lists both as unknown and suspects either the GetSessionToken API or an AWS SSO login through the CLI, both of which cache short-lived credentials locally. If the token was read from a file such as ~/.aws/credentials, the matching technique is Unsecured Credentials: Credentials In Files. Elastic's endpoint rule "Cloud Credential Files Accessed by Process in Suspicious Directory" looks for that read.
Taken: an active AWS session token from Developer1's workstation, "likely" by the malware (Sygnia)
How issued: not published; GetSessionToken or AWS SSO, in Elastic's assessment
Why it worked: MFA is checked when a session is issued, and a session that lives for hours on a compromised machine carries that check with it
Defence gap: a 12-hour session; and, on the investigators' reading, a developer's access that reached the production web bucket (no published log names who wrote the files)
Safe's timeline puts the first access to its AWS environment at 08:36:51 UTC on February 5, just under 24 hours after the workstation was compromised. Safe said the use of Developer1's AWS account "originated from ExpressVPN IP addresses" with user-agent strings containing distrib#kali.2024, which indicates Kali Linux (The Hacker News). Sygnia and Safe both say the attackers aligned their working hours with Developer1's schedule, so the activity ran when the real developer's would have.
At 14:06:25 UTC the same day the attackers tried to register their own MFA device on the developer's identity, and failed (Safe's timeline). Safe has not said why. Elastic's overview suggests the session lacked MFA context, but its own emulation, using a session that had MFA context, also failed, and Elastic calls the reason unclear. Had it worked, the attackers would have had their own way to start fresh MFA-backed sessions once the stolen one expired. The attempt was also the clearest early signal in this chain: an MFA device enrollment from a temporary session, from a commercial VPN address, with an offensive-distribution user agent.
Source: ExpressVPN IP addresses
User agent: contains distrib#kali.2024
Timing: aligned with Developer1's working hours
Persistence attempt: own MFA device registration, February 5, 14:06:25 UTC, failed
Detect: Elastic's rules "STS Temporary IAM Session Token Used from Multiple Addresses", "IAM Attempt to Register Virtual MFA Device with Temporary Credentials" and "AWS CLI with Kali Linux Fingerprint Identified"
Safe's timeline covers February 5 to 17 with one line, attacker reconnaissance in the AWS environment, and Sygnia notes that apart from the failed MFA registration not much has been disclosed. At 03:22:44 UTC on February 17 the timeline records command and control activity in the AWS environment without saying what it was. Elastic reads it as the shift from reconnaissance to staging the attack, and separately notes a possible indication of persistence in AWS; this page leaves it unmapped. Mandiant's three additional UNC4899 domains turned up in Safe's AWS network logs (CryptoSlate), so some network telemetry existed and was searched afterwards.
Elastic's timeline says the attackers likely enumerated IAM roles and S3 buckets, and its emulation lists buckets with the AWS CLI. Its own hardening section then says the adversary did no IAM enumeration and went straight to S3. Elastic also assumes the attackers knew of the bucket because it served app.safe.global, whose files anyone could download. This page maps cloud infrastructure and storage discovery as likely, not shown.
Published detail: "reconnaissance"; on February 17, 03:22:44 UTC, command and control activity in AWS, otherwise undescribed
Likely, per Elastic: IAM role and S3 bucket enumeration (its hardening section says no IAM enumeration)
Found afterwards: three more UNC4899 domains in AWS network logs and workstation logs (CryptoSlate)
Detect: list and describe calls from a human session at volumes unlike its history; any access to the production web bucket by an identity that does not deploy (this page's suggestion)
CertiK records two attacker contracts deployed on February 18, 2025 (UTC), three days before the theft. NCC Group describes the first, 0x96221423...7242: it imitates an ERC-20 transfer() but writes its first argument to storage slot 0, which in a Safe proxy holds the address of the implementation contract, the masterCopy. The second, 0xbDd077f6...9516, contains backdoor functions to transfer funds (CertiK). Run through a delegatecall from Bybit's wallet, the first would execute in the wallet's own storage and point the wallet at the second.
The tampered JavaScript in step 06 lists a second Safe beside Bybit's, 0x19c6876e...d141, which Sygnia calls "likely associated with the attackers." Safe's public Transaction Service, read for this page, shows a 3-of-6 Safe running the same v1.1.1 implementation as Bybit's wallet. It executed nine delegatecalls into 0x96221423...7242 between 19:16 UTC on February 18 and 12:32 UTC on February 20, four of them submitted by the address that later submitted the theft. This page infers it was the attackers' rehearsal wallet; no published source says so.
Slot-0 writer: 0x96221423681a6d52e184d440a8efcebb105c7242
Fund mover: 0xbdd077f651ebe7f7b3ce16fe5f2b025be2969516
Rehearsal (this page's reading): 9 delegatecalls from Safe 0x19c6876e978d9f128147439ac4cd9ea2582cd141 into the slot-0 writer, February 18 to 20
Detect: threat intelligence only; the contracts were public on chain for three days before the theft
The main file was _next/static/chunks/pages/_app-52c9031bfa03da47.js. Sygnia and Verichains, in the preliminary reports Bybit published on February 26, both found JavaScript resources modified "directly on the S3 bucket" serving app.safe.global (Sygnia). Verichains concluded that an AWS S3 or CloudFront account or API key of Safe's "was likely leaked or compromised" (BleepingComputer). Sygnia found the tampered bundle in the Chrome caches of all three signers' machines, served from app.safe.global out of an S3 bucket and last modified on February 19, two days before the theft. Sygnia also shows a second modified resource, 6514.b556851795a4cbaa.js, whose Last-Modified time is 14:15:13 UTC on February 21, when the clean code went back (step 09).
The Internet Archive holds the main bundle from both sides of the change. Its capture at 11:19 UTC on February 19 is the clean build, last modified on February 13. Its capture at 17:29 UTC the same day is the malicious version, returned by a server identifying itself as AmazonS3 behind CloudFront, with a Last-Modified time of 15:29:43 UTC and a new ETag (this page's reading of the archived response headers). Safe's March 6 timeline gives 15:29:25 UTC, and labels both this change and the later restore as Wayback Machine snapshots rather than citing an AWS log. The archive holds no capture of the site at either of Safe's times, Safe's restore time is the Last-Modified time Sygnia shows for the second file, and both of Safe's times fall 18 to 19 seconds before the bundle's own, so they read as file modification times, probably the second file's, rather than snapshots (this page's reading of the archive's capture index). The injected code added about 2 KB to a file of about 3.7 MB (this page's measurement of the archived files). The name, which carries a hash of the build, did not change.
This is the step the rest of the chain depended on, and nothing is reported to have caught it. Safe's controls, as it described them, guarded the path from source code to production: few people with infrastructure access, source code kept apart from infrastructure management, and peer review before production changes (CryptoSlate). The attack skipped that path and wrote built files straight into the bucket. No published account says whether Safe logged S3 object-level writes, or names the AWS identity that wrote the files. The page that loaded the bundle, itself served by S3 through CloudFront, had no integrity attributes on its scripts, and its Content Security Policy allowed scripts from its own origin (this page's reading of the archived app.safe.global/welcome from February 20). The browser had no reason to refuse a changed file from the same place. Safe added SRI hashes in March 2025, in pull requests #5190 and #5199, and they appear in the archive's copies of the page by March 20.
Safe's account of this step changed over time. On February 21 it said it had found no evidence that the official frontend was compromised; its March 6 timeline lists the malicious JavaScript. Its February 26 finding of no vulnerability in the source code of the frontend is consistent with the investigators on that narrow point: the source was not changed, the deployed file was. Sygnia adds that the Mandiant material Safe shared mentions the change without independently confirming it through a forensic investigation of Safe's infrastructure.
Origin: S3 behind CloudFront ("AmazonS3" in the archived Server header)
Written: February 19, about 15:29 UTC; _app archived Last-Modified 15:29:43; Safe's 15:29:25 is probably the second file's time (this page's reading)
Name: unchanged, so the build hash in it no longer matched the content
In the browser: no SRI on the page; CSP script-src allowed 'self'
Logged: no published source shows the write in CloudTrail or names who made it
Why it worked: on the investigators' reading, credentials from a developer's session could overwrite production frontend files, and nothing compared the served files with the build
Detect: CloudTrail S3 data events on the web bucket, with an alert on any write the deploy role did not make; Elastic's rule "S3 Static Site JavaScript File Uploaded via PutObject", whose published query matches only static/js/ paths, so a Next.js site has to widen it to _next/static/; a scheduled comparison of served files with the build's hashes
NCC Group published the injected code. It checks the connected Safe against two addresses, Bybit's cold wallet 0x1db92e2e...dfcf4 and 0x19c6876e...d141. If one matches and the transaction is a plain call (operation 0), it points the transaction at the attacker contract, sets the operation to 1 (delegatecall), the value to 0 and safeTxGas to 45746, and replaces the data with a transfer() naming the fund-moving contract. After the wallet signs, the code restores the original fields "immediately after the signature and before the data was proposed to the server," as NCC puts it, so the Safe interface and the other signers see the transfer they expected. By this page's reading of the archived file, the same swap also wraps the code path that executes a transaction. A second list of two addresses makes the page reload itself when one of them is the connected signer; by this page's reading, one is an owner of the rehearsal Safe in step 05 and the other is one of Bybit's own signers, who did not sign the theft. No source explains the list. Sygnia also describes tampering with a transaction validation function.
On February 21 Bybit's signers used app.safe.global for what NCC describes as an apparently routine internal transfer. Bybit's CEO, Ben Zhou, said they saw a masked transaction: the Safe interface showed the correct address and data, but the data sent to the Ledger for signing was altered, and he did not verify the transaction data on the Ledger screen before signing (CertiK). NCC writes that the signers blind-signed, trusting what the web app displayed, and that blind signing should be expected in any threat model. The underlying data is not human-readable, NCC notes, which makes one transaction easy to mistake for another.
NCC describes the January 14 mETH transfer as an earlier intended delegatecall that could make the malicious one look familiar. Safe's Transaction Service records it as a plain call (operation 0), and the theft as the only delegatecall among the wallet's 72 executed transactions (this page's reading). What set the malicious one apart was the operation type and an unfamiliar destination contract.
Condition: connected Safe in the list, and operation == 0
Swapped in: to = 0x9622...7242, operation = 1 (delegatecall), value = 0, safeTxGas = 45746, data = transfer(0xbdd0...9516, 0)
After signing: original fields restored for display and for the proposal to Safe's servers
Signers: three, who blind-signed (NCC); Zhou says he used a Ledger and did not check the data on it (CertiK)
Why it worked: the signers checked the web interface, and the web interface was running the attacker's code
Detect: recompute the Safe transaction hash on a separate machine from the intended fields and compare it with the hardware wallet's; refuse any delegatecall to a contract outside an allowlist
The transaction carrying the three signatures, 0x46deef0f...7882 in block 21,895,238, was sent by an attacker address, not by a Bybit signer; NCC notes it was "sent directly by the attacker." NCC also notes that signatures sent to Safe's Client Gateway can be read through Safe's APIs, though none of the sources sets out exactly how the attackers gathered these three. Run as a delegatecall, the attacker contract's transfer() wrote the fund-moving contract's address into storage slot 0, so Bybit's wallet now ran the attacker's code and its three-signature threshold no longer stood in the way (NCC, CertiK). ATT&CK has no technique for replacing a smart contract wallet's implementation; this page maps the effect, the wallet's signature check removed, to Modify Authentication Process as the nearest fit.
At 14:15:11 UTC a test sweep moved 90 USDT, and at 14:16:11 four sweeps moved 401,346.77 ETH, 90,375.55 stETH, 15,000 cmETH and 8,000 mETH to one address, by this page's reading of the chain; NCC rounds the ETH to 401,347. One part came back: the attackers' withdrawal of the 15,000 cmETH through mETH Protocol had to wait out a delay, eight hours in this case, in which mETH Protocol blocked it, and Bybit says mETH Protocol retrieved the tokens (ChainCatcher, Bybit). The FBI puts the theft at about $1.5 billion; Elliptic counts about $1.46 billion. The laundering that followed is outside this page's scope. Bybit said in a press release the following week that both forensic firms had found no indications of any compromise within its own infrastructure, and that it had moved the majority of funds out of its Safe Wallet administered addresses on the day of the incident.
Nothing on chain stopped the swap. NCC identifies the wallet's implementation as a Gnosis Safe masterCopy that Safe's API labels version 1.1.1. Safe's Guardrail guard, published by the Safe Foundation in August 2025, allows delegatecalls only to allowlisted contracts, with a delay before a new one can be added, and is designed for Safe v1.5.0 and above. Safe presents it as an introductory example, not something to put on a large treasury without a professional audit. NCC's conclusion goes further: a wallet built only for the transfers Bybit needed, with human-readable signatures, would have had no built-in delegatecall to arbitrary contracts for an attacker to use.
Sent by: 0x0fa09c3a328792253f8dee7116848723b72a6d2e (attacker), not a Bybit signer
Effect: storage slot 0 (masterCopy) set to the fund-moving contract
Swept: 14:16:11 UTC; 401,346.77 ETH, 90,375.55 stETH, 15,000 cmETH, 8,000 mETH
Loss: about $1.5 billion (FBI); about $1.46 billion (Elliptic)
Why it worked: the wallet would delegatecall any contract once enough owners had signed
Detect: after execution there were 156 seconds before the sweep, so the controls that count are mostly the ones that act before signing; mETH Protocol's withdrawal delay is why the 15,000 cmETH came back
Sygnia determined that the tampered resources were modified again at 14:15 UTC on February 21, "approximately two minutes after the malicious transaction was executed," and that the attackers likely did it, "presumably to cover their track." Safe's timeline gives 14:15:13 UTC, again labelled as a Wayback Machine snapshot, though the archive holds no capture at that time and 14:15:13 is the Last-Modified time Sygnia shows for the second file (this page's reading). The archive's next copy of the main bundle gives the restored object a Last-Modified time of 14:15:32 UTC, 117 seconds after the theft transaction, and the same ETag as the February 13 build (this page's reading). The restore came before the 14:16:11 sweep. Sygnia's own check of app.safe.global on February 24 found the malicious code gone.
So the malicious code was served for about two days before the theft, from 15:29 UTC on February 19, and for about two minutes after it. The two days came before the theft, not after it. The Hacker News's phrase, that the code was injected "for a two-day period between February 19 and 21," describes the same window. On the developer's Mac, Safe said, the attacker "removed their malware and cleared Bash history in an effort to thwart investigative efforts" (The Hacker News).
The cleanup did not erase the evidence. The tampered bundle survived in the Chrome caches on the signers' machines and in the Internet Archive, and those copies, not a log at Safe, are what Sygnia and NCC worked from. No published source names the identity that wrote the files back; Sygnia says likely the attackers.
After the theft: about 2 minutes (98 to 117 seconds by those timestamps)
Before the theft: about 2 days live, from 15:29 UTC on February 19
On the Mac: malware removed, Bash history cleared (Safe)
Evidence that survived: the signers' Chrome caches; Internet Archive captures
Detect: a second unplanned write to the same object minutes after a large outbound transfer; with versioning on, the bucket keeps both versions
🛡 How to Defend Against This Chain
s3:PutObject and s3:DeleteObject to every principal except one deploy role, and a trust policy on that role that accepts only the CI provider's OIDC token for the production branch or environment, so no human session can assume it. Restrict who can change that bucket policy, the role's trust policy and the CloudFront distribution's origin too, for example with a service control policy, or an identity that can edit them can undo the deny or route around it. Keep a break-glass path, alarmed and rarely used.PutObject only as data events, and AWS's documentation says that by default "trails and event data stores do not log data events." Turn on write data events for the production web bucket (they are billed separately) and alert when the caller is not the deploy role or the write falls outside a deploy run. Elastic publishes a rule for this, "S3 Static Site JavaScript File Uploaded via PutObject" (now "AWS S3 Static Site JavaScript File Uploaded"), but as published it matches only keys under static/js/, so it would not have matched Safe's _next/static/chunks/ path; a Next.js site has to change the path. An alert on any write the deploy role did not make has no such gap. No published source says whether Safe logged these events; its timeline labels both changes as web archive snapshots, though the archive holds no capture at either time, and no account names the identity that wrote the files.integrity attributes, and its CSP allowed scripts from its own origin, which the tampered files shared. Safe added SRI hashes in March 2025, and Elastic recommends SRI. NCC states the condition: pinning the JavaScript would have prevented the attack if the attackers could change the JavaScript files but not the HTML. The archived HTML page was itself served by S3 through CloudFront. When the HTML that carries the hashes comes from the same bucket, an identity that can write one can usually write both, so SRI protects mainly in combination with the write restriction above, or when the HTML is published from somewhere that identity cannot reach. That last point is this page's reasoning.sts:GetSessionToken from IAM users. It also recommends IAM conditions that deny sensitive calls such as iam:CreateVirtualMFADevice when made with temporary credentials, a control Elastic says would have prevented the MFA persistence attempt in step 03. Engineers who can write production are high-value targets: the machine that held this session also ran a Docker project from its Downloads folder. After the attack Safe provisioned new developer machines (SecurityWeek).