Jump to content

[Extensions] Not working


GitGitBunny

Recommended Posts

I also posted this on the github. 

Hi! I'm experiencing some issues with the extensions and i dont really know what i'm doing wrong.. According to the documentation of the bash bunny i can just invoke the commands but that leads to no results.

./payloads/switch1/payload.txt
LED Y
FOLDER

./payloads/library/extensions/folder.sh
function FOLDER() {
LED G
}

The led won't turn green. I also tried to do a RUN instead.. also not working.

Anyone else have an idea?

Link to comment
Share on other sites

22 minutes ago, GitGitBunny said:

I also posted this on the github. 

Hi! I'm experiencing some issues with the extensions and i dont really know what i'm doing wrong.. According to the documentation of the bash bunny i can just invoke the commands but that leads to no results.

./payloads/switch1/payload.txt
LED Y
FOLDER

./payloads/library/extensions/folder.sh
function FOLDER() {
LED G
}

The led won't turn green. I also tried to do a RUN instead.. also not working.

Anyone else have an idea?

./payloads/library/extensions/folder.sh
function FOLDER() {
LED G
}
export -f FOLDER

Link to comment
Share on other sites

I actually think i found out what the problem is.. and seem to be able to reproduce the problem as well. I did some testing and came to the following conclusion: 

When creating a new file in Notepad++ (W7) and storing it on the BB, calling the function won't load it. However.. if i copy the original run.sh file, rename it to whatever and typing the script in this file (explicitly typing, so no copying), it works. 

I'll add this finding to the github, maybe hak5 can do a root cause analysis. 

Link to comment
Share on other sites

6 minutes ago, GitGitBunny said:

I actually think i found out what the problem is.. and seem to be able to reproduce the problem as well. I did some testing and came to the following conclusion: 

When creating a new file in Notepad++ (W7) and storing it on the BB, calling the function won't load it. However.. if i copy the original run.sh file, rename it to whatever and typing the script in this file (explicitly typing, so no copying), it works. 

I'll add this finding to the github, maybe hak5 can do a root cause analysis. 

Remember... The first line of the folder.sh sccipt must be 

#!/bin/bash

tested it -  it works

 

Link to comment
Share on other sites

#!/bin/bash

function BLABLA() {
    LED FINISH
}

export -f BLABLA
Stored above to a new file blabla.sh in extensions folder.

#TESTSCRIPT
LED STAGE1
BLABLA

Tried the payload.. did not work when saving it as a new file. I think it is a file format issue. 

When copying run.sh, renaming it to blabla.sh and typing above code, script works and led goes green. 

Link to comment
Share on other sites

Open the File with  the vi editor. Are there ^M at the end of the line.

Be sure the notepad++  Edit --> EOL Conversion is set to "Convert to Unix Format"

My scripts was also created with notepad++

Edited by qdba
  • Upvote 1
Link to comment
Share on other sites

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