mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Wallpaper Changer (#245)
This commit is contained in:
43
payloads/library/prank/WallpaperChanger/payload.txt
Normal file
43
payloads/library/prank/WallpaperChanger/payload.txt
Normal 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
|
||||||
10
payloads/library/prank/WallpaperChanger/s.ps1
Normal file
10
payloads/library/prank/WallpaperChanger/s.ps1
Normal 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
|
||||||
BIN
payloads/library/prank/WallpaperChanger/w.png
Normal file
BIN
payloads/library/prank/WallpaperChanger/w.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user