Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload that makes screenshot with powershell #326

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

NickRaw
Copy link

@NickRaw NickRaw commented Feb 7, 2018

This payload makes a screenshot of your windows desktop with powershell. Just wait for it to load and when the light turns blue/greenish, you flick the switch and the bash bunny executes a powershell script that makes a screenshot and saves it to the bash bunny. The Get-Screenshot.ps1 is a function made by guittarrpc so those credits go to him. Future change I am working on is: 1 payload for different OS's (linux, mac and windows). The second stage is from Darren Kitchen's wait command.

NickRaw and others added 4 commits February 7, 2018 08:04
This payload makes a screenshot of your windows desktop with powershell. Just wait for it to load and when the light turns blue/greenish, you flick the switch and the bash bunny executes a powershell script that makes a screenshot and saves it to the bash bunny.
Instead of the while loop that Darren made I now implemented the WAIT command.

# EXECUTION - STAGE 3
LED STAGE2
RUN WIN powershell -WindowStyle Hidden -ExecutionPolicy bypass ".((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$PRIMARYSTH\winload.ps1')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using a variable assignment for the drive label as not everyone's configuration will have the default BashBunny drive label. This makes user configuration much easier.

You can do this by adding it to the top of your payload. For example with line:

DRIVE_LABEL="BashBunny"
RUN WIN powershell -WindowStyle Hidden -ExecutionPolicy bypass ".((gwmi win32_volume -f 'label=''$DRIVE_LABEL''').Name+'payloads\\$PRIMARYSTH\winload.ps1')"

@@ -0,0 +1,7 @@
$Variable=((gwmi win32_volume -f 'label=''BashBunny''').Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would include instructions in your readme mentioning that if users arent using the default drive label, to change it inside of winload.ps1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants