Update and fix payloads (#277)

* Updated all Payloads for Version 1.2+

Fixed Style Issues on extensions and payloads.
Added GET TARGET_OS to get.sh
Removed and Fixed all uses ducky_helper.sh (Issue #248)
Removed all mention of DUCKY_LANG (Issue #248)
Renamed Payloads with spaces in name
Added an extension to keep Macs Happy
Added a payload for Mac DNS poisoning
Fixed Issue #271 changed wget to curl -o
Implemented PR #268
Implemented PR #273

* Fixed e.cmd

* Fix e.cmd pt2

* Fixed Issues

Fixed issues pointed out by @sebkinne
Fixed styling errors
This commit is contained in:
Aidan Holland
2017-10-24 20:10:17 -04:00
committed by Sebastian Kinne
parent c0ab8d3e88
commit 5a77792c1d
56 changed files with 438 additions and 395 deletions

View File

@@ -1,25 +1,25 @@
#!/bin/bash
function CUCUMBER() {
case $1 in
"ENABLE")
echo ondemand | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
echo 0 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
;;
"DISABLE")
echo 1 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
sleep 2
echo ondemand | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
;;
"PLAID")
echo 1 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
sleep 2
echo performance | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
;;
*)
LED FAIL
exit 1
esac
case $1 in
"ENABLE")
echo ondemand | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
echo 0 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
;;
"DISABLE")
echo 1 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
sleep 2
echo ondemand | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
;;
"PLAID")
echo 1 | tee /sys/devices/system/cpu/cpu{1..3}/online &> /dev/null
sleep 2
echo performance | tee /sys/devices/system/cpu/cpu{0..3}/cpufreq/scaling_governor &> /dev/null
;;
*)
LED FAIL
exit 1
esac
}
export -f CUCUMBER
export -f CUCUMBER

View File

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

View File

@@ -1,23 +1,31 @@
#!/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
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"
;;
"TARGET_OS")
ScanForOS=$(nmap -Pn -O $TARGET_IP -p1)
[[ $ScanForOS == *"Too many fingerprints"* ]] && ScanForOS=$(nmap -Pn -O --osscan-guess $TARGET_IP)
[[ $ScanForOS == *"Windows"* ]] && OSfound='WINDOWS' && return
[[ $ScanForOS == *"Linux"* ]] && OSfound='LINUX' && return
[[ $ScanForOS == *"Apple"* ]] && OSfound='MACOS' && return
export TARGET_OS='UNKNOWN'
;;
esac
}
export -f GET
export -f GET

View File

@@ -0,0 +1,26 @@
#!/bin/bash
#Title: Mac_Happy
# Author: thehappydinoa
# Target: Mac
# Version: 0.1
#
# Makes Mac happy by correctly setting pid and vid
# Use by running mac_happy ATTACKMODE HID <attack modes here>
#
function mac_happy() {
[[ -z "$1" ]] && exit 1 # parameter must be set
[[ ! $1 =~ "ATTACKMODE" ]] && exit 1 # parameter must be for ATTACKMODE
for i in $*;
do
command=$(echo $command $i)
done
command=$(echo $command VID_0X05AC PID_0X021E)
eval $command
}
export -f mac_happy

View File

@@ -8,11 +8,11 @@
# REQUIRETOOL impacket
function REQUIRETOOL() {
[[ -z "$1" ]] && exit 1 # parameter must be set
[[ -z "$1" ]] && exit 1 # parameter must be set
if [ ! -d /tools/$1/ ]; then
LED FAIL
exit 1
fi
if [ ! -d /tools/$1/ ]; then
LED FAIL
exit 1
fi
}
export -f REQUIRETOOL

View File

@@ -13,9 +13,9 @@
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
@@ -37,6 +37,13 @@ function RUN() {
QUACK DELAY 500
QUACK ENTER
;;
LINUX)
QUACK ALT F2
QUACK DELAY 500
QUACK STRING "$@"
QUACK DELAY 500
QUACK ENTER
;;
*)
# OS parameter must be one of the above
exit 1

View File

@@ -7,45 +7,45 @@
# 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)
# 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
local state=$1
shift
;;
'DONE')
QUACK GUI r
QUACK DELAY 500
QUACK "STRING powershell.exe \$sl=(Get-WinSystemLocale | Select -ExpandProperty Name) ; Set-WinUserLanguageList -LanguageList \$sl -force; "
QUACK ENTER
QUACK DELAY 1500
[[ -z "$state" ]] && exit 1 # state keyboard parameter must be given.
;;
*)
QUACK GUI r
QUACK DELAY 500
QUACK "STRING powershell.exe Set-WinUserLanguageList -LanguageList $state -force"
QUACK ENTER
QUACK DELAY 1500
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 \$sl=(Get-WinSystemLocale | Select -ExpandProperty Name) ; Set-WinUserLanguageList -LanguageList \$sl -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
esac
}
export -f SETKB