Skip to content

Conversation

@Ludicro
Copy link

@Ludicro Ludicro commented Feb 28, 2025

I didn't test if the issues happened on UNIX boxes, but any attempt to use this before would cause unreadable USB errors on windows. It works the same from the payload side, but works now

I didn't test if the issues happened on UNIX boxes, but any attempt to use this before would cause unreadable USB errors on windows. It works the same from the payload side, but works now
@Ludicro
Copy link
Author

Ludicro commented Feb 28, 2025

For context, I ran into the need to make these changes with:

LED SETUP
scriptFolder=" /root/udisk/payloads/library/RemoteAccess/ReverseSSH/ "
script="run.txt"

RUN_PAYLOAD $scriptFolder $script

as the contents of my switch1/payload.txt

My laptop with Linux is in the shop so I can't test if this messes up usage on UNIX systems but it works on windows now

@hak5peaks
Copy link
Member

Because this is changes to anther authors payload, it is required that the original author @thedragonkeeper reviews and approved the changes.

@thedragonkeeper
Copy link
Contributor

looking through the changes apart from the excessive commented lines the only actual change seems to be the addition of:
sed -i 's/\r$//'

All this change does is remove the extra return carriages some windows editors add to files and i dont think would cause "unreadable USB errors on windows"

i think its best to remove these returns for all files when using them on a Linux system, for various reasons.
for this reason i don't think this needs to be a change solely on this extension.

@Ludicro
Copy link
Author

Ludicro commented Apr 21, 2025

Fully forgot to remove all those extra comments. I included em just for my own debugging to figure out why it wasn't working on Windows. I gave it a test on Linux and Windows and it would only work on Windows if I included the sed

@thedragonkeeper
Copy link
Contributor

the bash bunny has a linux OS that runs the payloads , plugging it into windows or linux should make no difference in its execution.
the difference is if you edit files on windows in something like notepad, windows will add the extra \r to the end of a line which can cause issues. such as something like #!/bin/bash\r maybe be invalid.

so in theory stripping the return carriages when you transfer the files over should also fix the problem youre having

@Ludicro
Copy link
Author

Ludicro commented Apr 21, 2025

Didn't even think about that. I'll give it another test when I get the chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants