Jump to content

Recommended Posts

Posted

So I was taking a look at the RUN extension and noticed that he used ducky script inside his function. I tried to recreate that but with my own set of ducky commands but  it doesn't seem to execute?

....extension (eject.sh)

#!/bin/bash
#
# Eject storage v1 by vo1d
# opens powershell to eject flash device
# Requires Windows
# Usage: EJECT name of device
#
# Examples:
# EJECT BashBunny

function EJECT(){
    local dvn = $1
    shift

    [[ -z "$dvn" ]] && exit 1 # parameter must be set
    
    LED R B FAST
    sleep 5
    
    QUACK GUI
    QUACK DELAY 100
    QUACK STRING "powershell"
    QUACK DELEAY 100
    QUACK CTRL-SHIFT ENTER
    QUACK DELAY 500
    QUACK ALT y
    QUACK DELAY 200
    
        LED R SLOW
        sleep 5
        
        QUACK STRING "\$dvn = (gwmi win32_volume -f 'label=''$dvn''' | Select-Object -ExpandProperty DriveLetter)"
        QUACK DELAY 100
        QUACK ENTER
        QUACK DELAY 100
        QUACK STRING "\$Eject = New-Object -comObject Shell.Application"
        QUACK DELAY 100
        QUACK ENTER
        QUACK DELAY 100
        QUACK STRING "\$Eject.NameSpace(17).ParseName(\$dvn).InvokeVerb(\"Eject\")"
        QUACK DELAY 100
        QUACK ENTER QUACK DELAY 100
}

export -f EJECT

 

...payload (payload.txt)

ATTACKMODE HID

EJECT BashBunny

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.

  • Recently Browsing   0 members

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