Moved extension folder out of the payload library folder

This commit is contained in:
Sebastian Kinne
2017-05-01 12:14:54 +10:00
parent 744165b31e
commit d819b33afb
5 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/bash
function DUCKY_LANG() {
[[ -z "$1" ]] && exit 1 # parameter must be set
export DUCKY_LANG="$1"
}
export -f DUCKY_LANG

23
payloads/extensions/get.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
function GET() {
case $1 in
"TARGET_IP")
export TARGET_IP=$(cat /var/lib/dhcp/dhcpd.leases | grep ^lease | awk '{ print $2 }' | sort | uniq)
;;
"TARGET_HOSTNAME")
export TARGET_HOSTNAME=$(cat /var/lib/dhcp/dhcpd.leases | grep hostname | awk '{print $2 }' | sort | uniq | tail -n1 | sed "s/^[ \t]*//" | sed 's/\"//g' | sed 's/;//')
;;
"HOST_IP")
export HOST_IP=$(cat /etc/network/interfaces.d/usb0 | grep address | awk {'print $2'})
;;
"SWITCH_POSITION")
[[ "$(cat /sys/class/gpio_sw/PA8/data)" == "0" ]] && export SWITCH_POSITION="switch1" && return
[[ "$(cat /sys/class/gpio_sw/PL4/data)" == "0" ]] && export SWITCH_POSITION="switch2" && return
[[ "$(cat /sys/class/gpio_sw/PL3/data)" == "0" ]] && export SWITCH_POSITION="switch3" && return
export SWITCH_POSITION="invalid"
;;
esac
}
export -f GET

View File

@@ -0,0 +1,18 @@
#!/bin/bash
#
# REQUIRETOOL v1 by @Hak5Darren
# Checks for specified directory in /tools, exits with LED FAIL if not found
# Usage: REQUIRETOOL directory
#
# Examples:
# REQUIRETOOL impacket
function REQUIRETOOL() {
[[ -z "$1" ]] && exit 1 # parameter must be set
if [ ! -d /tools/$1/ ]; then
LED FAIL
exit 1
fi
}
export -f REQUIRETOOL

47
payloads/extensions/run.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
#
# RUN v1 by @Hak5Darren
# Simplifies executing commands from HID attacks for various targets
# Usage: RUN [OS] [Command to execute]
#
# Examples:
# RUN WIN notepad.exe
# RUN WIN "powershell -Exec Bypass \"tree c:\\ > tree.txt; type tree.txt\"
# RUN OSX http://www.example.com
# RUN UNITY xterm
function RUN() {
local os=$1
shift
[[ -z "$os" || -z "$*" ]] && exit 1 # Both OS and Command parameter must be set
case "$os" in
WIN)
QUACK GUI r
QUACK DELAY 500
QUACK STRING "$@"
QUACK ENTER
;;
OSX)
QUACK GUI SPACE
QUACK DELAY 500
QUACK STRING "$@"
QUACK DELAY 500
QUACK ENTER
;;
UNITY)
QUACK ALT F2
QUACK DELAY 500
QUACK STRING "$@"
QUACK DELAY 500
QUACK ENTER
;;
*)
# OS parameter must be one of the above
exit 1
;;
esac
}
export -f RUN

View File

@@ -0,0 +1,51 @@
#!/bin/bash
#
# SETKB v2.0 by @elkentaro
# Simplifies executing commands from HID attacks for different language keyboards. on Windows by using Powershell.
# Usage: SETKB en-US [give the command the 2 letter combination of keyboard settings]
#
# Examples:
# SETKB START (set the keyboard layout to a US keyboard layout)
# SETKB DONE (set the keyboard layout to the default keyboard determined by the OS language settings)
# SETKB xx-XX (overwrite the keyboard layout to whatever keyboard layout you need, you will need the [lanugage].json file to run Ducky scripts)
function SETKB() {
local state=$1
shift
[[ -z "$state" ]] && exit 1 # state keyboard parameter must be given.
case "$state" in
'START')
QUACK GUI r
QUACK DELAY 500
QUACK STRING "powershell.exe Set-WinUserLanguageList -LanguageList en-US -force;"
QUACK ENTER
QUACK DELAY 1500
;;
'DONE')
QUACK GUI r
QUACK DELAY 500
QUACK "STRING powershell.exe \$back2kb=(get-Culture | Select -ExpandProperty Name) ; Set-WinUserLanguageList -LanguageList \$back2kb -force; "
QUACK ENTER
QUACK DELAY 1500
;;
*)
QUACK GUI r
QUACK DELAY 500
QUACK "STRING powershell.exe Set-WinUserLanguageList -LanguageList $state -force"
QUACK ENTER
QUACK DELAY 1500
;;
esac
}
export -f SETKB