Wallpaper Changer (#245)

pull/473/head
xhico 2021-10-02 19:25:34 +01:00 committed by GitHub
parent ee97a0820d
commit 78eb6e3828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,43 @@
#!/bin/bash
#
# Title: Change windows wallpaper
# Author: xhico
# Version: 1.0
# Target: Windows
#
# Changes the users wallpaper from the ${SWITCH_POSITION} folder
# in the payloads library of the Bash Bunny USB Disk partition.
#
# Colors:
# | Status | Color | Description |
# | ---------- | ------------------------------| ------------------------------------------------ |
# | SETUP | Magenta solid | Setting attack mode, getting the switch position |
# | FAIL | Red slow blink | Could not find the wallpaper file |
# | ATTACK | Yellow single blink | Running the Powershell Script |
# | FINISH | Green blink followed by SOLID | Script is finished |
# Magenta solid
LED SETUP
# Get the switch position
GET SWITCH_POSITION
PAYLOAD_DIR=/root/udisk/payloads/$SWITCH_POSITION
# Check for w.png s.ps1 files
if [[ ! -f ${PAYLOAD_DIR}/w.png || ! -f ${PAYLOAD_DIR}/s.ps1 ]]; then
LED FAIL
exit 1
fi
# Set the attack mode to HID and STORAGE
ATTACKMODE HID STORAGE
# Yellow single blink
LED ATTACK
# Run the command to change the wallpaper
RUN WIN powershell ".((gwmi win32_volume -f 'label=''BASHBUNNY''').Name+'payloads\\$SWITCH_POSITION\s.ps1') \"((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\w.png')\""
# Green LED for finished
LED FINISH

View File

@ -0,0 +1,10 @@
# Receives the path for the wallpaper file from the Bunnys Playload Dir
Param([string]$Path)
# Sets the new wallpaper path to the desktop
# Copies the file from the Playload Dir to the Users Desktop
$new_path = "$env:USERPROFILE\Desktop\w.png"
cp $Path $new_path
#Sets the wallpaper
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value $new_path

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB