Jump to content

execute Powershell


Loki159

Recommended Posts

I'm trying to get more familiar with the Bash bunny and I'm trying to setup the Bash bunny to run a Powershell script that plays a mp4 file,

But I'm not sure what command's to use or even how to point the Bash bunny in that direction, any Help would be appreciated,

Thank you in advance.

Link to comment
Share on other sites

It would be on the Bash Bunny, the Terget is Windows 10, I was unable to find much of anything about playing a mp4 file unfortunately I don't have any code to show you,

Also I can't find anything about the bash bunny directory structure, It could be in the readme and maybe I just missed it, Thank you

Link to comment
Share on other sites

The directory structure (the part that is mounted to the target if ATTACKMODE STORAGE is used, or arming mode) is explained in the documentation.

https://docs.hak5.org/bash-bunny/getting-started/mass-storage-structure

If using the Bash Bunny Mark 2 along with a Micro SD card, that will be different, as explained in the documentation here:

https://docs.hak5.org/bash-bunny/getting-started/considerations-for-mark-ii#storage

You could start with trying to "address" the mp4 file directly and see if any default media player will take care of it and autoplay it.

You could try something like this (just taken totally off the top of my head, not a validated payload at all, but something to start tinkering with at least)

LED SETUP
ATTACKMODE HID STORAGE
LED ATTACK
QUACK GUI r
QUACK DELAY 1000
QUACK STRING ".((gwmi win32_volume -f 'label=''BashBunny''').Name+'my-media-file-to-play.mp4')"
QUACK DELAY 1000
QUACK ENTER
LED FINISH

 

Link to comment
Share on other sites

Don't sure if I'm doing it right I have both on the bash bunny, I'm using the Bash bunny eBook for now for testing

 

LED SETUP
ATTACKMODE HID STORAGE

LED ATTACK

QUACK GUI r

QUACK DELAY 1000

QUACK STRING ".((gwmi win32_volume -f 'label=''BashBunny''')./payloads/switch1/Bash-Bunny.pdf')"

QUACK DELAY 1000

QUACK ENTER

LED FINISH

Link to comment
Share on other sites

As I said, I just extracted that from my head without testing it. You might need to add some PowerShell execution to get that working. Go through some payloads on GitHub and verify what could possibly be working for your scenario. You are also changing the script in a way that will make it not work. Look at how you wrote the gwmi line compared to my example. Why did you remove the .Name+ part?

https://github.com/hak5/bashbunny-payloads/tree/master/payloads/library

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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