New Mac backdoor program steals keychain contents

The Keydnap malware uses creative ways to infect computers and gain root access

Researchers have identified a new Mac backdoor program that's designed to steal credentials stored in the OS-encrypted keychain and give attackers control over the system.

Dubbed OSX/Keydnap by researchers from antivirus vendor ESET, this is the second backdoor program targeting Macs found by antivirus firms in the past few days.

It's not clear how Keydnap is distributed, but it arrives on computers in the form of a zip archive. Inside there's an executable file with an apparently benign extension such as .txt or .jpg that actually has a space character at the end. The file also has an icon indicating an image or text file.

Opening this malicious file in Finder actually executes its code in the Terminal application. The execution happens really fast, with the Terminal window just flashing for a bit. The good news is that if the file is downloaded from the internet and the Gatekeeper security feature is turned on on the latest versions of OS X, the file won't be executed automatically and the user will see a security warning.

However, if the code is executed, it will download and install the backdoor component, called icloudsyncd, which connects to a command-and-control channel over the Tor anonymity network. If it has root access, this component also configures itself to start every time the Mac is rebooted.

The way it tries to obtain root access is also interesting. It will wait until the user runs a different application and it will immediately spawn a window asking for the user’s credentials, exactly like the window OS X users usually see when an application requires admin privileges.

The backdoor can receive commands from the control server to update itself, to download and execute files and scripts, to execute shell commands and to send back the output. It also includes a component that steals the contents of the OS X keychain.

This component seems to be based on open-source, proof-of-concept code published on GitHub. It reads the memory of the securityd OS X service, which handles the keychain access, and searches for the keychain decryption key. Once it has this key, it can exfiltrate user credentials stored inside.

While infecting Macs with malware is arguably more difficult than PCs, especially in the latest version of OS X with all the security features turned on, Keydnap shows that attackers can still come up with creative ways to trick users and exploit their habits.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Cool Tech

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Breitling Superocean Heritage Chronographe 44

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?