Skip to main content
Mallory
Malware

Keydnap

Tracked since Dec 5, 2025 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns0Associated
Actors0Associated
ATT&CK30Techniques
IOCs34Tracked
Type
Backdoor
Capabilities
Credential theftExfiltrationPersistencePrivilege escalationPost exploitationDefense evasionReconnaissance
Delivery
Lure
Platforms
macOS
Also known asOSX/Keydnap

Keydnap, also known as OSX/Keydnap, is a macOS credential-stealing backdoor observed in 2016. It combines a downloader with a persistent implant designed to extract passwords and cryptographic keys from the macOS keychain and maintain remote access. Its keychain-theft functionality incorporates code from the publicly available Keychaindump proof of concept, which locates keychain decryption material in the memory of the macOS security service.

Keydnap has been distributed in ZIP archives containing Mach-O executables disguised as text documents or images through misleading extensions and icons. A trailing space in the executable's name causes Finder to launch it through Terminal. The downloader retrieves and executes the backdoor, replaces itself with a decoy document, opens that document, and closes the Terminal window. In August 2016, Keydnap was also distributed through a trojanized Transmission 2.92 application hosted on Transmission's official website. The malicious application carried a valid Apple Developer ID signature that allowed it to pass Gatekeeper checks.

The backdoor establishes persistence through LaunchAgents and can display a fake administrator authentication prompt to capture credentials and obtain root privileges. When privileged, it configures executable ownership and setuid/setgid permissions to preserve elevated execution. It supports remote command and Python-script execution, additional payload download and execution, self-update, and uninstallation. It also reports system information and its privilege status to its operators.

Earlier versions communicate with Tor-hosted command-and-control infrastructure through Tor2Web proxies over HTTPS, with RC4-encrypted POST data. Version 1.5 adds a standalone Tor client and allows the command-and-control address to be changed remotely. Modified UPX packing, process-name masquerading, and decoy-file replacement help conceal the implant and its execution.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
MITRE ATT&CK

Techniques & procedures

30 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

3 techniques
T1195Supply Chain CompromiseEvidence1

OSX/Keydnap was distributed on a trusted website... via a recompiled version of the otherwise legitimate open source BitTorrent client application Transmission and distributed on their official website.

T1195.002Compromise Software Supply ChainEvidence1

"the OSX/KeRanger authors hacked the official website for ... 'Transmission' ... infected the legitimate Transmission application"; similarly for Keydnap: "the official Transmission website ... was hacked again ... to distribute Keydnap"

T1566PhishingEvidence1

It is still not clear how victims are initially exposed to OSX/Keydnap. It could be through attachments in spam messages, downloads from untrusted websites or something else.

Execution

4 techniques
T1059Command and Scripting InterpreterEvidence3

Command ID Description ... 4 Decode and execute a base64-encoded Python script ... 6 Download and execute a Python script from a URL ... 7 Execute a command and report the output back to the C&C server

T1059.006PythonEvidence3

[Keydnap](https://attack.mitre.org/software/S0276) uses Python for scripting to execute additional commands.(Citation: synack 2016 review)

T1204User ExecutionEvidence1

The archive file contains a Mach-O executable file with an extension that looks benign, such as .txt or .jpg. However, the file extension actually contains a space character at the end, which means double-clicking the file in Finder will launch it in Terminal and not Preview or TextEdit.

T1204.002Malicious FileEvidence1

SHA-1 Filename First seen on VirusTotal Backdoor download URL Decoy description or URL ... CVdetails.doc ... "Most Common Interview Questions" ... Firefox 20 about screenshot

Persistence

2 techniques
T1543Create or Modify System ProcessEvidence1

maintain a permanent backdoor... $HOME/Library/LaunchAgents/com.apple.iCloud.sync.daemon.plist ... $HOME/Library/LaunchAgents/com.geticloud.icloud.photo.plist

T1543.001Launch AgentEvidence6

[Keydnap](https://attack.mitre.org/software/S0276) uses a Launch Agent to persist.(Citation: synack 2016 review)

Privilege Escalation

4 techniques
T1055Process InjectionEvidence1

It reads securityd’s memory and searches for the decryption key for the user’s keychain.

T1543Create or Modify System ProcessEvidence1

maintain a permanent backdoor... $HOME/Library/LaunchAgents/com.apple.iCloud.sync.daemon.plist ... $HOME/Library/LaunchAgents/com.geticloud.icloud.photo.plist

T1543.001Launch AgentEvidence6

[Keydnap](https://attack.mitre.org/software/S0276) uses a Launch Agent to persist.(Citation: synack 2016 review)

T1548.001Setuid and SetgidEvidence4

[Keydnap](https://attack.mitre.org/software/S0276) adds the setuid flag to a binary so it can easily elevate in the future.(Citation: OSX Keydnap malware)

Stealth

7 techniques
T1027.002Software PackingEvidence1

It is still packed with the modified UPX described in our first article about Keydnap.

T1027.013Encrypted/Encoded FileEvidence1

parameters as POST data, encrypted with RC4

T1036MasqueradingEvidence2

The ZIP also contains the Resource fork that contains the icon of the executable file. It mimics the icon Finder usually applies to JPEG or text files to increase the likelihood the recipient will double-click the file.

T1036.006Space after FilenameEvidence3

[Keydnap](https://attack.mitre.org/software/S0276) puts a space after a false .jpg extension so that execution actually goes through the Terminal.app program.(Citation: synack 2016 review)

T1036.011Overwrite Process ArgumentsEvidence1

To camouflage the location of the malicious file, Keydnap replaces argv[0] with /usr/libexec/icloudsyncd –launchd netlogon.bundle.

T1055Process InjectionEvidence1

It reads securityd’s memory and searches for the decryption key for the user’s keychain.

T1564.009Resource ForkingEvidence3

[Keydnap](https://attack.mitre.org/software/S0276) uses a resource fork to present a macOS JPEG or text file icon rather than the executable's icon assigned by the operating system.(Citation: OSX Keydnap malware)

Defense Impairment

1 technique
T1553.002Code SigningEvidence2

a legitimate code signing key was used to sign the malicious Transmission application bundle... still signed by Apple and bypasses Gatekeeper protection.

Credential Access

5 techniques
T1056.002GUI Input CaptureEvidence4

[Keydnap](https://attack.mitre.org/software/S0276) prompts the users for credentials.(Citation: synack 2016 review)

T1555Credentials from Password StoresEvidence1

The OSX/Keydnap backdoor is equipped with a mechanism to gather and exfiltrate passwords and keys stored in OS X’s keychain.

T1555.001KeychainEvidence1

Keydnap: "ability to dump credentials ... from the keychain ... via code from the open-source keychaindump project"

T1555.002Securityd MemoryEvidence3

[Keydnap](https://attack.mitre.org/software/S0276) uses the keychaindump project to read securityd memory.(Citation: synack 2016 review)

T1649Steal or Forge Authentication CertificatesEvidence2

If the victim falls for this and enters their credentials, the backdoor will henceforth run as root and the content of the victim’s keychain will be exfiltrated.

Collection

1 technique
T1056.002GUI Input CaptureEvidence4

[Keydnap](https://attack.mitre.org/software/S0276) prompts the users for credentials.(Citation: synack 2016 review)

Command and Control

6 techniques
T1071Application Layer ProtocolEvidence3

The RC4 key used to encrypt HTTP POST data and decrypt the response changed... The hardcoded C&C URL is now hxxp://t4f2cocitdpqa7tv.onion/api/osx

T1071.001Web ProtocolsEvidence7

[Keydnap](https://attack.mitre.org/software/S0276) uses HTTPS for command and control.(Citation: synack 2016 review)

T1090.002External ProxyEvidence1

The FRP client can be configured to connect to the server through a proxy. The server component of SystemBC has used SOCKS5 for C2 communication. Keydnap uses a copy of tor2web proxy for HTTPS communications.

T1090.003Multi-hop ProxyEvidence7

[Keydnap](https://attack.mitre.org/software/S0276) uses a copy of tor2web proxy for HTTPS communications.(Citation: synack 2016 review)

T1105Ingress Tool TransferEvidence4

Keydnap’s downloader is simple. It will: Download and execute the backdoor component

T1573Encrypted ChannelEvidence1

The data field is encrypted with the RC4 key "u2RLhh+!LGd9p8!ZtuKcN" without quotes.

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence1

The HTTP resource always starts with /api/osx/ and contains actions such as: /api/osx/keychain to exfiltrate the content of the keychain

Indicators of compromise

Observables

34 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching34Match every observed IP, domain, and hash against your live telemetry.
Associated threat actorsGroups linked to this family, with evidence pinned to each claim.
Associated vulnerabilitiesCVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping30Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.