uploading LINUX_MOUNT extension (#570)

* uploading LINUX_MOUNT extension

* uploading LINUX_MOUNT_DEMO

* decreasing delay time

* removed delays
pull/574/head
drapl0n 2022-12-17 00:22:57 +05:30 committed by GitHub
parent 8dba72cedd
commit 858bb2df2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#!/bin/bash
#
# LINUX_MOUNT v1 by @drapl0n
# Auto mounts BashBunny on GNU/Linux systems.
# NOTE: Mount path is stored in variable "lmnt".
# Usage: LINUX_MOUNT - to automatically mount BashBunny.
# LINUX_UMOUNT - to unmount mounted BashBunny.
function LINUX_MOUNT() {
Q CTRL-ALT t
Q DELAY 1000
Q STRING unset HISTFILE
Q ENTER
Q DELAY 200
Q STRING disk='$(lsblk -fs | grep BashBunny | awk '\'{print\ '$1'}\'\)''
Q ENTER
Q DELAY 200
Q STRING udisksctl mount -b /dev/'$disk'
Q ENTER
Q DELAY 2000
Q STRING lmnt='$(lsblk | grep $disk | awk '\'{print\ '$7'}\'\)''
Q ENTER
Q DELAY 500
}
function LINUX_UMOUNT() {
Q STRING udisksctl unmount -b /dev/'$disk'
Q ENTER
Q DELAY 1000
}
export -f LINUX_MOUNT LINUX_UMOUNT

View File

@ -0,0 +1,27 @@
# Title: LINUX_MOUNT_DEMO
# Description: LINUX_MOUNT is an extension to automatically mount/unmount BashBunny on GNU/Linux systems.
# AUTHOR: drapl0n
# Version: 1.0
# Category: Genral
# Target: Unix-like operating systems.
# Attackmodes: HID, Storage
ATTACKMODE STORAGE HID
LED SETUP
# LINUX_MOUNT automatically mounts BashBunny.
LINUX_MOUNT
# NOTE: Mount path is stored in varialble "lmnt".
Q STRING echo Successfully mounted BashBunny at '\"$lmnt\"'.
Q ENTER
# LINUX_UMOUNT unmounts mounted BashBunny from system.
LINUX_UMOUNT
Q STRING echo Successfully unmounted BashBunny.
Q ENTER
LED FINISH
Q DELAY 2000
Q STRING exit
Q ENTER