ChromeOS Enrolment Payload

pull/379/head
TheDragonkeeper 2019-04-06 03:14:38 +01:00
parent 6760498c27
commit cda2430080
2 changed files with 186 additions and 0 deletions

View File

@ -0,0 +1,38 @@
ChromeOS Deployment For Bash Bunny
Author: TheDragonkeeper
Version: Version 1
## Description
This is the enterprise enrolment process for ChromeOS.
I use this code at work when we get a bulk order in.
WIP im still merging my different payloads into one.
Set the DUCKY_LANG to the correct keyboard to avoid credential mistypes
## Variables
| Vars | Notes |
| ---------------- | ----------------------------------------------------------------------------- |
| ChromePre70 | if the OS is pre 70 then there is a slight variation in key presses so set correctly {y/n}|
| WIFI_USER | Wifi username : This is used if enterprise wifi type is selected {string}|
| WIFI_PASS | Wifi password : used on all wireless connection types {string}|
| ENROL_USER | This is the user account used for device enrolment {string}|
| ENROL_PASS | The password for ENROL_USER {string}|
| EwWPA | WIFI type: WPA {y/n}|
| EwPEAP | WIFI type: PEAP {y/n}|
| EwLEAP | WIFI type: LEAP {y/n}|
| checkCERT | Check or ignore WIFI certificate {y/n}|
| sendGoogleData | Send analytic data to google... unsure why you would want to but the option is here {y/n} |
| EwDEFAULT | Do not change this; it is used to check that only one wifi type is set to 'y' else use EwWPA |
## STATUS
| LED | Status |
| ---------------- | ----------------------------------------------------------------------------- |
| Blue slow | Booting |
| Red | Executing |
| Green flashing | Waiting for switch change to continue, used in case any updates are avalible |
| Green | Task complete, ready to unplug |

View File

@ -0,0 +1,148 @@
LED B SLOW
ATTACKMODE HID
LED R 0
# set your keyboard !!
DUCKY_LANG gb
## add keys for pre 70
ChromePre70='n'
WIFI_NAME="xxx"
##wifi creds
WIFI_USER="xxx" #only used on enterprise
WIFI_PASS="xxx"
#creds to enrol device
ENROL_USER="xxx"
ENROL_PASS="xxx"
# change
EwWPA='n'
EwPEAP='n'
EwLEAP='n'
## ent wifi options
checkCERT='n'
sendGoogleData='n'
##defaults to WPA if more than one wifi type set as 'y'
EwDEFAULT='n'
options=($EwWPA $EwPEAP $EwLEAP);
options=(${options[@]/n/})
[[ ${#options[@]} -gt 1 ]] && $EwDEFAULT='y'
keys () {
if [ -z $2 ]; then
QUACK $1
sleep 1
else
count=0
while [ $count -lt $2 ]; do
count=$((count+1))
QUACK $1
sleep 1
done
fi
}
## main screen needs to have the language bar hightlighted
# just added this sleep to be sure the OS has had time to accept HID
# as some devices can be slower
sleep 5
## open sys tray
QUACK ALT-SHIFT s
sleep 2
#select wifi
keys "TAB" 4
keys "ENTER"
## add wifi
keys "TAB" 3
keys "ENTER"
##ssid
sleep 3
QUACK STRING $WIFI_NAME
sleep 1
keys "TAB"
## wpa
if [ $EwDEFAULT == 'y' ] || [ $EwWPA == 'y' ]; then
keys "DOWNARROW" 2
keys "TAB"
QUACK STRING $WIFI_PASS
sleep 1
keys "TAB" 3
keys "ENTER"
fi
## enterprise with PEAP
if [ $EwDEFAULT == 'n' ] && [[ $EwPEAP == 'y' || $EwLEAP == 'y' ]]; then
keys "DOWNARROW" 3
keys "TAB"
keys "DOWNARROW"
keys "TAB"
### add in the extra keys for leap
## add vars for types
keys "DOWNARROW" 2
keys "TAB"
[[ $checkCERT == 'n' ]] && keys "DOWNARROW"
keys "TAB"
# wifi creds
QUACK STRING $WIFI_USER
keys "TAB"
QUACK STRING $WIFI_PASS
sleep 1
#save ?
keys "TAB" 3
keys "ENTER"
##connect ?
keys "TAB" 2
QUACK ENTER
fi
## waiting for wifi connection
sleep 25
## main screen starting on Lang button
keys "TAB" 2
keys "ENTER"
# check if need two more tabs?
keys "TAB" 3
keys "ENTER"
sleep 2
##enter TOS
keys "TAB" 2
[[ $sendGoogleData == 'n' ]] && keys "ENTER"
sleep 2
keys "TAB" 3
QUACK ENTER
### waiting on device
## could be performing updates so will wait for this to finish
## and continue by moving the switch
LED G FAST
WAIT
LED R 0
########################## enrollment
QUACK STRING $ENROL_USER
sleep 1
keys "ENTER"
## enroll pass
QUACK STRING $ENROL_PASS
sleep 1
QUACK ENTER
## green light, finished, waiting for user to input asset info
LED G