Rev 1.8.1a IoT and Hardware Hacking Course Setup - Menu option Y or y
This commit is contained in:
parent
f46c407358
commit
92f0b141ae
23
README.md
23
README.md
|
@ -46,6 +46,17 @@ sudo ./pimpmykali.sh
|
||||||
# Writeups / Honorable Mentions
|
# Writeups / Honorable Mentions
|
||||||
- ip3c4c_n00b https://ip3c4c.com/2202_homelab_vmware/
|
- ip3c4c_n00b https://ip3c4c.com/2202_homelab_vmware/
|
||||||
|
|
||||||
|
# Revision 1.8.1a - Added Andrew B's IoT and Hardware Hacking Course Setup
|
||||||
|
- Menu option Y or y
|
||||||
|
- stand alone function
|
||||||
|
- installs dependencies sigrok xxd zlib1g-dev liblzma-dev liblzo2-dev
|
||||||
|
- clone sasquatch to /opt/sasquatch
|
||||||
|
- patches sasquatch with M1-Kali.patch.txt
|
||||||
|
- builds patched sasquatch
|
||||||
|
- installs to /usr/local/bin/sasquatch
|
||||||
|
- calls fix_ghidra function to install ghidra from github
|
||||||
|
- installs ghidra dark theme to /opt/ghidra-dark-theme
|
||||||
|
|
||||||
# Revision 1.8.1 - Ghidra
|
# Revision 1.8.1 - Ghidra
|
||||||
- Menu option G - Install Ghidra
|
- Menu option G - Install Ghidra
|
||||||
- Included in menu options 0, N and 1
|
- Included in menu options 0, N and 1
|
||||||
|
@ -278,6 +289,18 @@ sudo ./pimpmykali.sh
|
||||||
- Menu Option W
|
- Menu Option W
|
||||||
- Install GoWitness precompiled binary
|
- Install GoWitness precompiled binary
|
||||||
|
|
||||||
|
|
||||||
|
- Menu Option Y
|
||||||
|
- Andrew B's IoT and Hardware Hacking Course Setup
|
||||||
|
- installs dependencies sigrok xxd zlib1g-dev liblzma-dev liblzo2-dev
|
||||||
|
- clone sasquatch to /opt/sasquatch
|
||||||
|
- patches sasquatch with M1-Kali.patch.txt
|
||||||
|
- builds patched sasquatch
|
||||||
|
- installs to /usr/local/bin/sasquatch
|
||||||
|
- calls fix_ghidra function to install ghidra from github
|
||||||
|
- installs ghidra dark theme to /opt/ghidra-dark-theme
|
||||||
|
|
||||||
|
|
||||||
- Menu Option Z
|
- Menu Option Z
|
||||||
- Install course requirements for Alex T's C# 101 for Hackers
|
- Install course requirements for Alex T's C# 101 for Hackers
|
||||||
- installs vscode
|
- installs vscode
|
||||||
|
|
108
pimpmykali.sh
108
pimpmykali.sh
|
@ -9,7 +9,7 @@
|
||||||
# Standard Disclaimer: Author assumes no liability for any damage
|
# Standard Disclaimer: Author assumes no liability for any damage
|
||||||
|
|
||||||
# revision var
|
# revision var
|
||||||
revision="1.8.1"
|
revision="1.8.1a"
|
||||||
|
|
||||||
# unicorn puke:
|
# unicorn puke:
|
||||||
red=$'\e[1;31m'
|
red=$'\e[1;31m'
|
||||||
|
@ -130,6 +130,25 @@ check_for_root() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean_vars() {
|
||||||
|
APP=""
|
||||||
|
EXIT_STATUS=""
|
||||||
|
FUNCTYPE=""
|
||||||
|
}
|
||||||
|
|
||||||
|
check_exit_status() {
|
||||||
|
case ${EXIT_STATUS} in
|
||||||
|
0) echo -e "\n${spaces}${greenplus} $APP $FUNCTYPE successs";;
|
||||||
|
1) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE General Error Exit Status: ${EXIT_STATUS}" ;;
|
||||||
|
2) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE Misuse of Shell commands, Exit Status: ${EXIT_STATUS}" ;;
|
||||||
|
126) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE Command Invoked Cannot Execute, Exit Status ${EXIT_STATUS}";;
|
||||||
|
127) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE Command Not Found, Exit Staus: ${EXIT_STATUS}";;
|
||||||
|
128) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE Invalid Arguement to Exit, Exit Status: ${EXIT_STATUS}" ;;
|
||||||
|
255) echo -e "\n${spaces}${redexclaim} $APP $FUNCTYPE Exit status out of range, Exit Status: ${EXIT_STATUS}" ;;
|
||||||
|
*) echo -e "\n${spaces}${redexclaim} Exit Status $EXIT_STATUS for $APP $FUNCTYPE status: failed";;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
fix_section() {
|
fix_section() {
|
||||||
if [ $check -ne 1 ]
|
if [ $check -ne 1 ]
|
||||||
then
|
then
|
||||||
|
@ -2327,18 +2346,25 @@ fix_ghidra() {
|
||||||
DESKTOP_FILE="/usr/share/applications/ghidra.desktop"
|
DESKTOP_FILE="/usr/share/applications/ghidra.desktop"
|
||||||
EXEC_PATH="${GHIDRA_INSTALL_DIR}/ghidraRun"
|
EXEC_PATH="${GHIDRA_INSTALL_DIR}/ghidraRun"
|
||||||
ICON_PATH="${GHIDRA_INSTALL_DIR}/docs/images/GHIDRA_1.png"
|
ICON_PATH="${GHIDRA_INSTALL_DIR}/docs/images/GHIDRA_1.png"
|
||||||
|
DARK_THEME_URL="https://github.com/zackelia/ghidra-dark-theme"
|
||||||
|
|
||||||
echo -e "\n ${greenplus} Ghidra Setup "
|
echo -e "\n ${greenplus} Ghidra Setup "
|
||||||
|
|
||||||
# check for current ghidra installation, uninstall if found
|
# check for current ghidra installation, uninstall if found
|
||||||
GHIDRA_INSTALLED_APT=$(apt search ghidra | grep -i -c "installed")
|
GHIDRA_INSTALLED_APT=$(apt search ghidra | grep -i -c "installed")
|
||||||
|
|
||||||
if [[ ${GHIDRA_INSTALLED_APT} -ge 1 ]];
|
if [[ ${GHIDRA_INSTALLED_APT} -ge 1 ]];
|
||||||
then
|
then
|
||||||
echo -e "\n ${redexclaim} Uninstalling existing Ghidra installation\n"
|
echo -e "\n ${redexclaim} Uninstalling existing Ghidra installation\n"
|
||||||
apt -y remove ghidra ghidra-data
|
eval apt -y remove ghidra ghidra-data
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CHECK_OPEN_JDK=$(apt search openjdk-23-jdk | grep -i -c "installed")
|
||||||
|
|
||||||
|
if [[ ${CHECK_OPEN_JDK} -eq 0 ]];
|
||||||
|
then
|
||||||
eval apt -y install openjdk-23-jdk
|
eval apt -y install openjdk-23-jdk
|
||||||
|
fi
|
||||||
|
|
||||||
[ -f ${GHIDRA_TMP_ZIP} ] && rm -f ${GHIDRA_TMP_ZIP}
|
[ -f ${GHIDRA_TMP_ZIP} ] && rm -f ${GHIDRA_TMP_ZIP}
|
||||||
|
|
||||||
|
@ -2346,10 +2372,10 @@ fix_ghidra() {
|
||||||
[ ! -d ${GHIDRA_INSTALL_DIR} ] && mkdir ${GHIDRA_INSTALL_DIR}
|
[ ! -d ${GHIDRA_INSTALL_DIR} ] && mkdir ${GHIDRA_INSTALL_DIR}
|
||||||
|
|
||||||
echo -e "\n${spaces}${greenplus} Downloading Ghidra"
|
echo -e "\n${spaces}${greenplus} Downloading Ghidra"
|
||||||
wget "${WGET_STATUS} " "${DOWNLOAD_URL}" -O "${GHIDRA_TMP_ZIP}"
|
wget -q "${WGET_STATUS} " "${DOWNLOAD_URL}" -O "${GHIDRA_TMP_ZIP}"
|
||||||
|
|
||||||
echo -e "\n${spaces}${greenplus} Unzipping Ghidra to ${GHIDRA_TMP_DIR}"
|
echo -e "\n${spaces}${greenplus} Unzipping Ghidra to ${GHIDRA_TMP_DIR}"
|
||||||
unzip -qq -o "${GHIDRA_TMP_ZIP}" -d "${GHIDRA_TMP_DIR}" > /dev/null 2>&1
|
unzip -qq -o "${GHIDRA_TMP_ZIP}" -d "${GHIDRA_TMP_DIR}"
|
||||||
|
|
||||||
echo -e "\n${spaces}${greenplus} Moving Ghidra from ${GHIDRA_TMP_DIR} to ${GHIDRA_INSTALL_DIR}"
|
echo -e "\n${spaces}${greenplus} Moving Ghidra from ${GHIDRA_TMP_DIR} to ${GHIDRA_INSTALL_DIR}"
|
||||||
mv "${GHIDRA_TMP_DIR}"/ghidra_*/* "${GHIDRA_INSTALL_DIR}"
|
mv "${GHIDRA_TMP_DIR}"/ghidra_*/* "${GHIDRA_INSTALL_DIR}"
|
||||||
|
@ -2382,11 +2408,12 @@ fix_ghidra() {
|
||||||
GHIDRA_DARK_THEME_INSTALL_DIR="/opt/ghidra-dark-theme"
|
GHIDRA_DARK_THEME_INSTALL_DIR="/opt/ghidra-dark-theme"
|
||||||
[ -d ${GHIDRA_DARK_THEME_INSTALL_DIR} ] && rm -rf ${GHIDRA_DARK_THEME_INSTALL_DIR}
|
[ -d ${GHIDRA_DARK_THEME_INSTALL_DIR} ] && rm -rf ${GHIDRA_DARK_THEME_INSTALL_DIR}
|
||||||
|
|
||||||
echo -e "\n${spaces}${greenplus} Cloning Ghidra Dark Theme"
|
echo -e "\n${spaces}${greenplus} Cloning Ghidra Dark Theme ${DARK_THEME_URL}"
|
||||||
echo -e "\n To install Open Ghidra and Click Edit/Themes/Import and browse to ${GHIDRA_DARK_THEME_INSTALL_DIR}"
|
echo -e "\n To install the dark theme, Open Ghidra and Click Edit/Themes/Import"
|
||||||
|
echo -e " browse to ${GHIDRA_DARK_THEME_INSTALL_DIR} double click on the .theme file"
|
||||||
|
|
||||||
# clone ghidra dark-theme
|
# clone ghidra dark-theme
|
||||||
git clone https://github.com/zackelia/ghidra-dark-theme ${GHIDRA_DARK_THEME_INSTALL_DIR} > /dev/null 2>&1
|
git clone ${DARK_THEME_URL} ${GHIDRA_DARK_THEME_INSTALL_DIR} > /dev/null 2>&1
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
echo -e "\n${spaces}${greenplus} Cleaning up ${GHIDRA_TMP_ZIP}"
|
echo -e "\n${spaces}${greenplus} Cleaning up ${GHIDRA_TMP_ZIP}"
|
||||||
|
@ -2397,6 +2424,59 @@ fix_ghidra() {
|
||||||
echo -e "\n ${greenplus} Ghidra Setup Complete"
|
echo -e "\n ${greenplus} Ghidra Setup Complete"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iot_course_setup() {
|
||||||
|
SASQUATCH_URL="https://github.com/devttys0/sasquatch"
|
||||||
|
SASQUATCH_PATCH_URL="https://github.com/devttys0/sasquatch/files/7776843/M1-Kali.patch.txt"
|
||||||
|
CLONE_DIR="/opt/sasquatch"
|
||||||
|
PATCH_DIR="/opt/sasquatch/patches"
|
||||||
|
PATCH_FILE="M1-Kali.patch.txt"
|
||||||
|
INSTALLED_BIN="/usr/local/bin/sasquatch"
|
||||||
|
|
||||||
|
# rev 1.8.1a IoT Course setup requirements
|
||||||
|
echo -e "\n ${greenplus} IoT and Hardware Hacking Course Setup"
|
||||||
|
apt_update && apt_update_complete
|
||||||
|
echo -e "\n${spaces}${greenplus} Installing dependencies sigrok xxd zlib1g-dev liblzma-dev liblzo2-dev"
|
||||||
|
|
||||||
|
eval apt-get -y install build-essential sigrok xxd zlib1g-dev liblzma-dev liblzo2-dev linux-headers-$(uname -r)
|
||||||
|
|
||||||
|
echo -e "\n ${greenplus} Sasquatch Setup"
|
||||||
|
|
||||||
|
# remove clone dir if it already exists
|
||||||
|
[ -d ${CLONE_DIR} ] && rm -rf ${CLONE_DIR}
|
||||||
|
|
||||||
|
# remove installed sasquatch binary if it exists
|
||||||
|
[ -f ${INSTALLED_BIN} ] && rm -f ${INSTALLED_BIN}
|
||||||
|
|
||||||
|
echo -e "\n${spaces}${greenplus} Cloning sasquatch to ${CLONE_DIR} \n"
|
||||||
|
cd /opt && git clone ${SASQUATCH_URL}
|
||||||
|
|
||||||
|
echo -e "\n${spaces}${greenplus} Downloading sasquatch patch ${PATCH_FILE}"
|
||||||
|
wget -qq ${SASQUATCH_PATCH_URL} -O ${PATCH_DIR}/${PATCH_FILE}
|
||||||
|
|
||||||
|
echo -e "\n${spaces}${greenplus} Patching sasquatch with ${PATCH_FILE}"
|
||||||
|
cd ${PATCH_DIR}
|
||||||
|
patch patch0.txt M1-Kali.patch.txt > /dev/null 2>&1
|
||||||
|
APP="sasquatch"
|
||||||
|
FUNCTYPE="patch"
|
||||||
|
EXIT_STATUS="$?"
|
||||||
|
check_exit_status ${EXIT_STATUS} ${APP} ${FUNCTYPE}
|
||||||
|
clean_vars
|
||||||
|
|
||||||
|
echo -e "\n${spaces}${greenplus} Building and installing sasquatch to ${INSTALLED_BIN}"
|
||||||
|
[ -f ${CLONE_DIR}/build.sh ] && chmod +x ${CLONE_DIR}/build.sh
|
||||||
|
cd ${CLONE_DIR}
|
||||||
|
./build.sh > /dev/null 2>&1
|
||||||
|
APP="sasquatch"
|
||||||
|
FUNCTYPE="build"
|
||||||
|
EXIT_STATUS="$?"
|
||||||
|
check_exit_status $EXIT_STATUS $APP $FUNCTYPE
|
||||||
|
clean_vars
|
||||||
|
|
||||||
|
fix_ghidra
|
||||||
|
|
||||||
|
echo -e "\n ${greenplus} IoT Course Setup Complete"
|
||||||
|
}
|
||||||
|
|
||||||
mayor_mpp() {
|
mayor_mpp() {
|
||||||
# additions to PMK 1.3.0 - Mayor MPP Course additions
|
# additions to PMK 1.3.0 - Mayor MPP Course additions
|
||||||
fix_sources
|
fix_sources
|
||||||
|
@ -2433,7 +2513,7 @@ mayor_mpp() {
|
||||||
ln -sf /usr/local/bin/startcovenant.sh /usr/local/bin/covenant
|
ln -sf /usr/local/bin/startcovenant.sh /usr/local/bin/covenant
|
||||||
|
|
||||||
#make desktop icon
|
#make desktop icon
|
||||||
findrealuser=$(who | awk '{print $1}')
|
findrealuser=$(who | awk {'print $1'})
|
||||||
if [[ $findrealuser == "root" ]];
|
if [[ $findrealuser == "root" ]];
|
||||||
then
|
then
|
||||||
echo -e "\n $greenplus creating desktop icon /root/Desktop/Start Covenent"
|
echo -e "\n $greenplus creating desktop icon /root/Desktop/Start Covenent"
|
||||||
|
@ -2619,8 +2699,6 @@ pimpmykali_menu() {
|
||||||
clear
|
clear
|
||||||
echo -e "$asciiart"
|
echo -e "$asciiart"
|
||||||
echo -e "\n Select an option from menu: Rev: $revision Arch: $arch"
|
echo -e "\n Select an option from menu: Rev: $revision Arch: $arch"
|
||||||
# echo -e "\n *** APT UPGRADE WILL ONLY BE CALLED FROM MENU OPTION 9 ***"
|
|
||||||
# echo -e "\n Menu Options:" # function call list
|
|
||||||
echo -e "\n Key Menu Option: Description:"
|
echo -e "\n Key Menu Option: Description:"
|
||||||
echo -e " --- ------------ ------------"
|
echo -e " --- ------------ ------------"
|
||||||
echo -e " 1 - Fix Missing (pip pip3 golang gedit nmapfix build-essential)" # fix_missing
|
echo -e " 1 - Fix Missing (pip pip3 golang gedit nmapfix build-essential)" # fix_missing
|
||||||
|
@ -2639,17 +2717,17 @@ pimpmykali_menu() {
|
||||||
echo -e " T - Reconfigure Timezone current timezone : $(cat /etc/timezone)" # reconfig_timekey
|
echo -e " T - Reconfigure Timezone current timezone : $(cat /etc/timezone)" # reconfig_timekey
|
||||||
echo -e " K - Reconfigure Keyboard current keyb/lang : $(cat /etc/default/keyboard | grep XKBLAYOUT | cut -d "\"" -f2)\n" # reconfig_keyboard
|
echo -e " K - Reconfigure Keyboard current keyb/lang : $(cat /etc/default/keyboard | grep XKBLAYOUT | cut -d "\"" -f2)\n" # reconfig_keyboard
|
||||||
echo -e " Key Stand alone functions: Description:" # optional line
|
echo -e " Key Stand alone functions: Description:" # optional line
|
||||||
echo -e " --- --COURSES---------------- ------------" # optional line
|
echo -e " --- --COURSES-------------------- ------------" # optional line
|
||||||
|
echo -e " Y - Andrew B IoT Hardware Hacking (add requirements for IoT Course)" # iot_course_setup
|
||||||
echo -e " Z - Alex T C# 101 For Hackers (add requirements for C# 101 course)" # csharp_course_setup
|
echo -e " Z - Alex T C# 101 For Hackers (add requirements for C# 101 course)" # csharp_course_setup
|
||||||
echo -e " B - Practical Bugbounty Labs (add requirements for PBB course labs)" # pbb_lab_setup
|
echo -e " B - Practical Bugbounty Labs (add requirements for PBB course labs)" # pbb_lab_setup
|
||||||
echo -e " E - PEH Course WebApp Labs (add requirements for PEH WebApp Labs and installs) " # apt_update fix_libwacom only_upgrade peh_weblab_setup
|
echo -e " E - PEH Course WebApp Labs (add requirements for PEH WebApp Labs and installs) " # apt_update fix_libwacom only_upgrade peh_weblab_setup
|
||||||
echo -e " O - Hacking API Course Setup (add requirements for Hacking API Course)" # hacking_api_prereq was fix_ssh
|
echo -e " O - Hacking API Course Setup (add requirements for Hacking API Course)" # hacking_api_prereq was fix_ssh
|
||||||
echo -e " M - Mayors MPP Course Setup (adds requirments for Mayors MPP Course)" # mayor_mpp
|
echo -e " M - Mayors MPP Course Setup (adds requirments for Mayors MPP Course)" # mayor_mpp
|
||||||
echo -e " A - MAPT Course Setup (adds requirments for MAPT Course)" # mapt_course
|
echo -e " A - MAPT Course Setup (adds requirments for MAPT Course)" # mapt_course
|
||||||
echo -e " --- --UTILS------------------ ------------" # optional line
|
echo -e " --- --UTILS---------------------- ------------" # optional line
|
||||||
echo -e " G - Install Ghidra (github) (install ghidra from github)" # fix_ghidra
|
echo -e " G - Install Ghidra (github) (install ghidra from github)" # fix_ghidra
|
||||||
echo -e " P - Download Lin/WinPeas (adds linpeas to /opt/linpeas and winpeas to /opt/winpeas)" # fix_linwinpeas
|
echo -e " P - Download Lin/WinPeas (adds linpeas to /opt/linpeas and winpeas to /opt/winpeas)" # fix_linwinpeas
|
||||||
# echo -e " B - BPT - TheEssentials (BlindPentesters TheEssentials aprox 8GB of tools)" # bpt function
|
|
||||||
echo -e " I - Install MITM6 (install mitm6 from github)" # fix_mitm6
|
echo -e " I - Install MITM6 (install mitm6 from github)" # fix_mitm6
|
||||||
echo -e " C - Missing Google-Chrome (install google-chrome only)" # check_chrome / fix_chrome
|
echo -e " C - Missing Google-Chrome (install google-chrome only)" # check_chrome / fix_chrome
|
||||||
echo -e " S - Fix Spike (remove spike and install spike v2.9)" # fix_spike
|
echo -e " S - Fix Spike (remove spike and install spike v2.9)" # fix_spike
|
||||||
|
@ -2687,18 +2765,22 @@ pimpmykali_menu() {
|
||||||
g|G) fix_ghidra;;
|
g|G) fix_ghidra;;
|
||||||
h|H) fix_httprobe;;
|
h|H) fix_httprobe;;
|
||||||
i|I) fix_mitm6;;
|
i|I) fix_mitm6;;
|
||||||
|
j|J) ;;
|
||||||
k|K) fix_keyboard; echo -e "\n $greenplus Keyboard is currently set to: $(cat /etc/default/keyboard | grep XKBLAYOUT | cut -d "\"" -f2)";;
|
k|K) fix_keyboard; echo -e "\n $greenplus Keyboard is currently set to: $(cat /etc/default/keyboard | grep XKBLAYOUT | cut -d "\"" -f2)";;
|
||||||
l|L) install_sublime;;
|
l|L) install_sublime;;
|
||||||
m|M) mayor_mpp;;
|
m|M) mayor_mpp;;
|
||||||
n|N) fix_all; fix_upgrade;;
|
n|N) fix_all; fix_upgrade;;
|
||||||
o|O) hacking_api_prereq;; # was fix_ssh
|
o|O) hacking_api_prereq;; # was fix_ssh
|
||||||
p|P) fix_linwinpeas;;
|
p|P) fix_linwinpeas;;
|
||||||
|
q|Q) ;;
|
||||||
|
r|R) ;;
|
||||||
s|S) fix_spike;;
|
s|S) fix_spike;;
|
||||||
t|T) fix_timezone;;
|
t|T) fix_timezone;;
|
||||||
u|U) fix_netexec;;
|
u|U) fix_netexec;;
|
||||||
v|V) install_vscode;;
|
v|V) install_vscode;;
|
||||||
w|W) fix_gowitness;;
|
w|W) fix_gowitness;;
|
||||||
x|X) echo -e "\n\n Exiting pimpmykali.sh - Happy Hacking! \n" ;;
|
x|X) echo -e "\n\n Exiting pimpmykali.sh - Happy Hacking! \n" ;;
|
||||||
|
y|Y) iot_course_setup;;
|
||||||
z|Z) csharp_course_setup;;
|
z|Z) csharp_course_setup;;
|
||||||
"=") get_mirrorlist; best_ping; small_speedtest; large_speedtest; gen_new_sources; cleanup;;
|
"=") get_mirrorlist; best_ping; small_speedtest; large_speedtest; gen_new_sources; cleanup;;
|
||||||
^) install_everything;;
|
^) install_everything;;
|
||||||
|
|
Loading…
Reference in New Issue