Coder Social home page Coder Social logo

cve-2021-30853's Introduction

CVE-2021-30853

A simple POC script to test for CVE-2021-30657 affecting MacOS.
This CVE allows bypass of gatekeeper, notraization and xprotect checks.

Vulnerability detail

This Vunlerability occurs when you don't define a interpreter( or specify a interpreter that itself is a shell script) in first line(shebang) of the main script of your executable bundle. This will cause xpcproxy to invokes posix_spawnp to launch the interpreter-less script-based application. This initially errors out (no interpreter โ†’ ENOEXEC), but then posix_spawnp "recovers" and (re)executes the script ...this time directly via /bin/sh.
Later, the AppleSystemPolicy kext intercepts the process launch to ensure its conformant (signed, notarized, etc). But it checks /bin/sh without any variable set, so execute the script without any default checks.
Based on thread: https://twitter.com/objective_see/status/1473741597368098819

Steps to reproduce

  • Put your desireable shell script code in payload.sh. Keep in mind to not modify the first line of script (#!/usr/bin/command).
  • Execute setup.sh.
  • This will generate a bait.dmg that will contain our malicious app bundle.
  • Share it to the victim through internet.
  • When victim will double click on app icon after mounting dmg, it will execute the payload script without any gatekeeper's checks.

Affected version

macOS Big Sur < 11.6

Technical details

https://objective-see.com/blog/blog_0x6A.html

cve-2021-30853's People

Contributors

shubham0d avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

0rx1 re13orn

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.