Jump to content

[Extension] RUNPOWER


elkentaro

Recommended Posts

So a new extension I wrote to avoid to have to escape special characters for complex powershells.

This extension takes a text file containing the powershell command.

Example:

RUNPOWER switch1/pstxt.txt

inside the pstxt.txt file :
Set-WinUserLanguageList -LanguageList en-US -force;

 

Basically it takes the contents of the text file and encodes it to a base64 string and passes it to powershell as an encoded command. (also works as obfuscation of the attack code)

https://github.com/elkentaro/bashbunny-payloads/blob/master/library/extensions/runpower.sh

 

@elkentaro 

Edited by elkentaro
  • Upvote 2
Link to comment
Share on other sites

So that is is how you do Unicode base64 encoding in bash.  :-)

 

I can see myself using this instead of encoding commands myself when I want to use them via a quack.

Only things I would change would be to make it have an extra parameter that I can use to add a string of parameters to be prepended before the encoded command like if I wanted to hide the powershell window or make it non interactive, etc.

Second is I would make it just out put the powershell command.  no gui r or anything.  Reason being is most have been doing prep work before running their script like from the run command getting a UAC bypassed cmd shell to run their powershell in.

 

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