Jump to content

Somethings wrong


hoppler

Recommended Posts

Hello,

 

first of all, I am a proud owner of the Bash Bunny.

So far so good, but there are a problem I can not resolve.

I have a payload in switch 1:

 

ATTACKMODE HID STORAGE

Q GUI r
Q DELAY 500

Q DELAY 500
Q STRING cmd
Q ENTER

 

Q DELAY 500

for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch/test.exe (start %d:/payload/switch/test.exe  & exit)

Q  ENTER

 

If  I put this manuallz in the cmd window everzthing works fine. But if I start the BB it does not write the line for.....

What do I want to achive?

 

I placed an exe file in the payload folder.

And I just want to start this exe file by inserting the BB. Because I do not know the drive I want to loop throug the availlable drives and start the exe if it was found an exit the cmd.

And even this does not work.

I am on Windows XP and there is no powershell availlable. So I want to use plain old DOS stuff.

And besides: Yes, I upgraded the BB to the latest firmware.

 

So now my questions:

1. Why the BB stops on the string with the loop?

2. Is there a way to find the file in drive and execute this file?

3.  Are there "forbidden" commands?

 

Any help to achive my goal would be really appreciated.

 

Sorry for my bad english, but I am a bit rosty.

Thanks in advance for help.

best regards

 

 

Link to comment
Share on other sites

Sorry, code got messed up:

Here the right one:

 

ATTACKMODE HID STORAGE

Q GUI r
Q DELAY 500
Q STRING cmd
Q ENTER

LED Y

Q DELAY 500
Q STRING for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch/test.exe (start %d:/payload/switch/test.exe  & exit)
Q ENTER

LED W

Link to comment
Share on other sites

Well I guess I have to answer my own question.

 

Q DELAY 500
Q STRING for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch1/test.exe (start %d:/payload/switch1/test.exe  & exit)
Q ENTER

 

Problem was: Double quotes are missing:

 

Q DELAY 500
Q STRING "for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch/test.exe (start %d:/payload/switch/test.exe  & exit)"
Q ENTER

 

And now it runs smoothly.

Thanks to myself.

Link to comment
Share on other sites

  • 4 years later...

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