Jump to content

Starting a stored .exe


DelTex

Recommended Posts

How exactly would I go about detecting what drive number the target computer assigned to the Bash Bunny?

For example, on my computer it assigns it to F:\ so to start a stored .exe file right now I have a script saying "Q STRING start A:\SomeRandom.exe" which types that into an opened CMD. I then copied and pasted this again and again for A-Z drives...

I'm sure there is an easier way of discovering what drive letter the target computer has assigned to the BB, so that's what I'm here to find out.

Heck, I might even not have to be launching this .exe from CMD at all... Is there some kind of command that will run it when it's literally just a .exe file that has been saved to the BB itself? If so, please explain to me how the command works if you can. I'm trying to learn and not just copy and past someone else's work. Thanks tons.

(Let me know if you have any questions about my questions and I will try my best to re-explain them)

Link to comment
Share on other sites

Many, many, many payloads already do this, just have a look at their code.

For example:

RUN WIN powershell ".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\d.cmd')"

This uses the PSH gwmi module to grab the drive that has the label "BashBunny" and use it as a directory to start a .cmd file with PSH.

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...