Giter VIP home page Giter VIP logo

lockscream's Introduction

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

  • Credentials are XOR encrypted and stored as a base64 encoded string using User Defaults
    • Operators are free to push LockScream to remote implants and retrieve credentials at a later time
    • Details on retrieving credentials below
  • Fullscreen Kiosk mode
    • Menu bar hidden
    • Dock hidden
    • Cmd+Tab disabled
    • Force Quit (Option + Cmd + Esc) disabled
    • All Apple System menus disabled
    • Expose/Mission Control disabled
    • Cannot switch Spaces
    • Power button disabled
      • Note that hardbooting the machine by holding the power button until the machine shuts down still works
  • Credential Validation
    • LockScream will not close until correct credentials are provided
  • Lock Screen impersonation
    • Password input box "shakes" side to side if given incorrect credentials
    • Clicking the "Cancel" button invokes false screensaver
    • Pressing escape key invokes false screensaver
    • Keyboard input automatically focuses password box
    • Keyboard input automatically adds "arrow-in-circle" icon next to password box
    • User's wallpaper determined programatically and blurred when LockScream is invoked
  • False Screensaver
    • Leverages the same functionality as System Preferences to call users's set Screensaver in "test" mode
    • Does not cause the real lock screen to trigger when exiting screensaver
    • Moving the cursor during false screensaver will cause it to close and bring back LockScream

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

lockscream's People

Contributors

n0ncetonic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.