Giter Site home page Giter Site logo

noshutdown's Introduction

NoShutdown is a PoC showing how simple could be to evade the recent "iShutdown" detection mechanisms from Kaspersky Labs.

Read here Kaspersky's blogpost

Basically it consists in letting the main thread of a binary listen to com.apple.springboard.deviceWillShutDown Darwin notification and kindly close itself with 'exit(0)' inside the callback function.

I only tested with an old checkra1n-able iPhone 7 with iOS 14.8.

To have a try with different iPhones/iOS version:

  1. Build the binaries with build.sh
  2. scp them inside, for example, '/private/var/db/com.apple.xpc.roleaccountd.staging'
  3. Execute the launcher from an ssh shell
  4. Reboot the phone

'shutdown.log' file should not contain any evidence of 'no_shutdown' process.

On the other hand, compiling 'no_shutdown.m' commenting out the CFNotificationCenterAddObserver function and reproducing the steps should result in 'shutdown.log' file contaning the log for 'no_shutdown' process.

Note that running a binary directly from ssh shell won't be useful, because presumably the os kindly shuts down the ssh process before rebooting, resulting in our process not logged. So I tried to create two binaries: 'no_shutdown' (representing a malicious implant) and a 'launcher' that simply posix_spawns the first one and exits.

Note: another way to evade iShutdown seems to be to place a plist inside '/Library/LaunchDaemons' and start the binary with 'launchctl' utility.

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.