Update Sat Apr 10 09:20:18 AM CDT 2021
This commit is contained in:
parent
fddb9f2fc4
commit
a8b082339f
21
README.md
21
README.md
|
|
@ -16,6 +16,25 @@
|
||||||
- sudo ./pimpmykali.sh
|
- sudo ./pimpmykali.sh
|
||||||
- For a new kali vm, run menu option N
|
- For a new kali vm, run menu option N
|
||||||
|
|
||||||
|
# Revision 1.2.3 - fix_broken_xfce
|
||||||
|
- only_upgrade function modified
|
||||||
|
- function virt_what was called to early in only_upgrade
|
||||||
|
- moved to later part of the only_upgrade function after apt update
|
||||||
|
- fix_broken_xfce function is no longer necessary as of Kali 2021.1
|
||||||
|
- fix_broken_xfce removed from all script processing
|
||||||
|
- fix_broken_xfce has been moved to stand alone function (menu F)
|
||||||
|
- not be called by any other part of the script except (menu F)
|
||||||
|
- fix_broken_xfce (menu F)
|
||||||
|
- left as a stand alone function as a fail-safe for older versions of Kali
|
||||||
|
- fix_broken_xfce code and function will be removed completely at a future date
|
||||||
|
- fix_upgrade function modified
|
||||||
|
- virt_what function was called before run_update
|
||||||
|
- virt_what function moved, now called after run_update
|
||||||
|
- apt_update function added, now gives on screen display of running process function
|
||||||
|
- apt_upgrade function added, now gives on screen display of running process function
|
||||||
|
- apt_autoremove function added, now gives on screen display of running process function
|
||||||
|
|
||||||
|
|
||||||
# Revision 1.2.2 - A number of changes / updates
|
# Revision 1.2.2 - A number of changes / updates
|
||||||
- Added Menu option M added - Install MS Vscode
|
- Added Menu option M added - Install MS Vscode
|
||||||
- individual option, not adding to fix_missing, fix_all or newvm
|
- individual option, not adding to fix_missing, fix_all or newvm
|
||||||
|
|
@ -33,7 +52,7 @@
|
||||||
- Downgrade Metasploit function has been removed - Menu option D
|
- Downgrade Metasploit function has been removed - Menu option D
|
||||||
- virt-what function upgraded, check added for already existing
|
- virt-what function upgraded, check added for already existing
|
||||||
- enable root login prompt moved in the script should appear sooner during execution
|
- enable root login prompt moved in the script should appear sooner during execution
|
||||||
|
|
||||||
# Revision 1.2.1 - Menu Option N Modified
|
# Revision 1.2.1 - Menu Option N Modified
|
||||||
- minor code cleanup, no major changes.
|
- minor code cleanup, no major changes.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.2.2"
|
revision="1.2.3"
|
||||||
|
|
||||||
# unicorn puke:
|
# unicorn puke:
|
||||||
red=$'\e[1;31m'
|
red=$'\e[1;31m'
|
||||||
|
|
@ -69,9 +69,9 @@
|
||||||
# for vbox_fix_shared_folder_permission_denied
|
# for vbox_fix_shared_folder_permission_denied
|
||||||
findgroup=$(groups $finduser | grep -i -c "vboxsf")
|
findgroup=$(groups $finduser | grep -i -c "vboxsf")
|
||||||
|
|
||||||
# Log file declartion
|
# Logging
|
||||||
# logfile=/tmp/pmk.log
|
# LOG_FILE=/tmp/pimpmykali.log
|
||||||
# log='| tee -a $logfile'
|
# exec > >(tee ${LOG_FILE}) 2>&1
|
||||||
|
|
||||||
# silent mode
|
# silent mode
|
||||||
silent='' # uncomment to see all output
|
silent='' # uncomment to see all output
|
||||||
|
|
@ -121,11 +121,39 @@ fix_section () {
|
||||||
section=""
|
section=""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apt_update() {
|
||||||
|
echo -e "\n $greenplus running: apt update \n"
|
||||||
|
eval apt -y update
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_upgrade() {
|
||||||
|
echo -e "\n $greenplus running: apt upgrade \n"
|
||||||
|
eval apt -y upgrade
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_autoremove() {
|
||||||
|
echo -e "\n $greenplus running: apt autoremove \n"
|
||||||
|
eval apt -y autoremove
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_update_complete() {
|
||||||
|
echo -e "\n $greenplus apt update - complete"
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_upgrade_complete() {
|
||||||
|
echo -e "\n $greenplus apt upgrade - complete"
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_autoremove_complete() {
|
||||||
|
echo -e "\n $greenplus apt autoremove - complete"
|
||||||
|
}
|
||||||
|
|
||||||
fix_missing () {
|
fix_missing () {
|
||||||
fix_sources
|
fix_sources
|
||||||
eval apt -y update $silent && eval apt -y autoremove $silent
|
apt_update && apt_update_complete
|
||||||
|
apt_autoremove && apt_autoremove_complete
|
||||||
|
# eval apt -y update $silent && eval apt -y autoremove $silent
|
||||||
eval apt -y remove kali-undercover $silent
|
eval apt -y remove kali-undercover $silent
|
||||||
echo -e "\n $greenplus apt updated "
|
|
||||||
# 02.01.2020 - Added cifs-utils and libguestfs-tools as they are require for priv escalation
|
# 02.01.2020 - Added cifs-utils and libguestfs-tools as they are require for priv escalation
|
||||||
eval apt -y install dkms build-essential autogen automake python3-setuptools python3-distutils python3.9-dev libguestfs-tools cifs-utils $silent
|
eval apt -y install dkms build-essential autogen automake python3-setuptools python3-distutils python3.9-dev libguestfs-tools cifs-utils $silent
|
||||||
python-pip-curl
|
python-pip-curl
|
||||||
|
|
@ -148,8 +176,8 @@ fix_missing () {
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_all () {
|
fix_all () {
|
||||||
make_rootgreatagain $force
|
|
||||||
fix_missing $force
|
fix_missing $force
|
||||||
|
make_rootgreatagain $force
|
||||||
seclists $force
|
seclists $force
|
||||||
install_atom
|
install_atom
|
||||||
fix_flameshot $force
|
fix_flameshot $force
|
||||||
|
|
@ -157,13 +185,19 @@ fix_all () {
|
||||||
fix_smbconf
|
fix_smbconf
|
||||||
fix_impacket
|
fix_impacket
|
||||||
fix_upgrade
|
fix_upgrade
|
||||||
|
# fix_broken_xfce - not be necessary as of 2021.1 - code to be removed from script at later date
|
||||||
# ID10T REMINDER: DONT CALL THESE HERE THEY ARE IN FIX_MISSING!
|
# ID10T REMINDER: DONT CALL THESE HERE THEY ARE IN FIX_MISSING!
|
||||||
# python-pip-curl python3_pip fix_golang fix_nmap
|
# python-pip-curl python3_pip fix_golang fix_nmap
|
||||||
# fix_upgrade is not a part of fix_missing and only
|
# fix_upgrade is not a part of fix_missing and only
|
||||||
# called as sub-function call of fix_all or fix_upgrade itself
|
# called as sub-function call of fix_all or fix_upgrade itself
|
||||||
}
|
}
|
||||||
|
|
||||||
#04.06.21 - rev 1.2.2. - add google-chrome due to gowitness dependancy
|
# lightdm theme change to light or dark mode maybe
|
||||||
|
# cat /etc/lightdm/lightdm-gtk-greeter.conf | sed 's/Kali-Light/Kali-Dark''/'
|
||||||
|
# cat /etc/lightdm/lightdm-gtk-greeter.conf | sed 's/Kali-Dark/Kali-Light''/'
|
||||||
|
# add optional ugly-background fix?
|
||||||
|
|
||||||
|
# 04.06.21 - rev 1.2.2 - add google-chrome due to gowitness dependancy
|
||||||
check_chrome(){
|
check_chrome(){
|
||||||
[[ -f "/usr/bin/google-chrome" ]] && echo -e "\n $greenminus google-chrome already installed - skipping \n" || fix_chrome;
|
[[ -f "/usr/bin/google-chrome" ]] && echo -e "\n $greenminus google-chrome already installed - skipping \n" || fix_chrome;
|
||||||
}
|
}
|
||||||
|
|
@ -207,7 +241,7 @@ fix_pipxlrd () {
|
||||||
}
|
}
|
||||||
|
|
||||||
python-pip-curl () {
|
python-pip-curl () {
|
||||||
check_pip=$(pip --version | grep -i -c "/usr/local/lib/python2.7/dist-packages/pip")
|
check_pip=$(whereis pip | grep -i -c "/usr/local/bin/pip2.7")
|
||||||
if [ $check_pip -ne 1 ]
|
if [ $check_pip -ne 1 ]
|
||||||
then
|
then
|
||||||
echo -e "\n $greenplus installing pip"
|
echo -e "\n $greenplus installing pip"
|
||||||
|
|
@ -426,7 +460,8 @@ fix_bad_apt_hash (){
|
||||||
}
|
}
|
||||||
|
|
||||||
install_atom () {
|
install_atom () {
|
||||||
eval apt -y update
|
apt_update && apt_update_complete
|
||||||
|
#eval apt -y update
|
||||||
eval wget -qO- https://atom.io/download/deb -O /tmp/atom.deb >/dev/null 2>&1
|
eval wget -qO- https://atom.io/download/deb -O /tmp/atom.deb >/dev/null 2>&1
|
||||||
eval dpkg -i /tmp/atom.deb >/dev/null 2>&1
|
eval dpkg -i /tmp/atom.deb >/dev/null 2>&1
|
||||||
eval rm -f /tmp/atom.deb
|
eval rm -f /tmp/atom.deb
|
||||||
|
|
@ -438,7 +473,7 @@ install_sublime () {
|
||||||
eval wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
|
eval wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
|
||||||
eval apt-get install apt-transport-https
|
eval apt-get install apt-transport-https
|
||||||
eval echo "deb https://download.sublimetext.com/ apt/stable/" > /etc/apt/sources.list.d/sublime-text.list
|
eval echo "deb https://download.sublimetext.com/ apt/stable/" > /etc/apt/sources.list.d/sublime-text.list
|
||||||
eval apt update
|
apt_update && apt_update_complete
|
||||||
eval apt -y install sublime-text
|
eval apt -y install sublime-text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -447,7 +482,7 @@ install_vscode () {
|
||||||
eval curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
eval curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||||
eval mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
eval mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
||||||
eval echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list
|
eval echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list
|
||||||
eval apt update && apt install code
|
apt_update && apt_update_complete && apt -y install code
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_sources () {
|
fix_sources () {
|
||||||
|
|
@ -485,8 +520,9 @@ fix_sources () {
|
||||||
|
|
||||||
run_update () {
|
run_update () {
|
||||||
fix_sources
|
fix_sources
|
||||||
echo -e "\n $greenplus starting pimpmyupgrade \n"
|
echo -e "\n $greenplus starting: pimpmyupgrade \n"
|
||||||
eval apt -y update $silent
|
apt_update && apt_update_complete
|
||||||
|
# eval apt -y update $silent
|
||||||
# COMMENTED OUT DUE TO MSF6 RELEASED && apt -y upgrade $silent
|
# COMMENTED OUT DUE TO MSF6 RELEASED && apt -y upgrade $silent
|
||||||
kernel_check=$(ls /lib/modules | sort -n | tail -n 1)
|
kernel_check=$(ls /lib/modules | sort -n | tail -n 1)
|
||||||
echo -e "\n $greenplus installing dkms build-essential linux-headers-$kernel_check \n"
|
echo -e "\n $greenplus installing dkms build-essential linux-headers-$kernel_check \n"
|
||||||
|
|
@ -610,7 +646,7 @@ fix_sead_warning () {
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_sead_run () {
|
fix_sead_run () {
|
||||||
eval apt update $silent
|
apt_update && apt_update_complete
|
||||||
python-pip-curl
|
python-pip-curl
|
||||||
python3_pip
|
python3_pip
|
||||||
eval pip uninstall impacket -y $silent
|
eval pip uninstall impacket -y $silent
|
||||||
|
|
@ -703,26 +739,26 @@ fix_broken_xfce() {
|
||||||
}
|
}
|
||||||
|
|
||||||
only_upgrade () {
|
only_upgrade () {
|
||||||
virt_what
|
|
||||||
fix_sources
|
fix_sources
|
||||||
echo -e "\n $greenplus starting pimpmyupgrade \n"
|
echo -e "\n $greenplus starting pimpmyupgrade \n"
|
||||||
# echo -e "\n $greenplus holding back package: metasploit-framework"
|
# echo -e "\n $greenplus holding back package: metasploit-framework"
|
||||||
# eval apt-mark hold metasploit-framework
|
# eval apt-mark hold metasploit-framework
|
||||||
eval apt -y update $silent && apt -y upgrade $silent
|
apt_update && apt_update_complete && apt_upgrade && apt_upgrade_complete
|
||||||
|
# eval apt -y update && apt -y upgrade
|
||||||
kernel_check=$(ls /lib/modules | sort -n | tail -n 1)
|
kernel_check=$(ls /lib/modules | sort -n | tail -n 1)
|
||||||
echo -e "\n $greenplus installing dkms build-essential linux-headers-$kernel_check \n"
|
echo -e "\n $greenplus installing dkms build-essential linux-headers-$kernel_check \n"
|
||||||
eval apt -y install dkms build-essential linux-headers-amd64 $silent
|
eval apt -y install dkms build-essential linux-headers-amd64 $silent
|
||||||
|
virt_what # Alek fix - 04.10.2021 Function moved
|
||||||
check_vm
|
check_vm
|
||||||
# echo -e "\n $greenplus releasing hold on package: metasploit-framework"
|
# echo -e "\n $greenplus releasing hold on package: metasploit-framework"
|
||||||
# eval apt-mark unhold metasploit-framework
|
# eval apt-mark unhold metasploit-framework
|
||||||
# add fix for broken filemanager / terminal icon
|
# add fix for broken filemanager / terminal icon
|
||||||
fix_broken_xfce
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fix_upgrade () {
|
fix_upgrade () {
|
||||||
virt_what
|
|
||||||
fix_sources
|
fix_sources
|
||||||
run_update
|
run_update
|
||||||
|
virt_what # 04.10.2021 Function moved to be after run_update
|
||||||
check_vm
|
check_vm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -831,9 +867,11 @@ p1lEC0auURW3owsQlTZtf4QtGZgjXYKT4inPtI23oEK7wXlyPnd8arKdKE0EPdUnhIf0v+iE2o
|
||||||
7BgVFVyec3u1OxFw+uRxbvPt8R6+MOpGq5cBAAA=" | gunzip )
|
7BgVFVyec3u1OxFw+uRxbvPt8R6+MOpGq5cBAAA=" | gunzip )
|
||||||
|
|
||||||
pimpmykali_menu () {
|
pimpmykali_menu () {
|
||||||
|
# DATE=$(date +%x); TIME=$(date +%X)
|
||||||
clear
|
clear
|
||||||
echo -e "$asciiart"
|
echo -e "$asciiart"
|
||||||
echo -e "\n Select a option from menu: Rev:$revision"
|
echo -e "\n Select a option from menu: Rev:$revision"
|
||||||
|
#echo -e "\n $DATE $TIME Rev:$revision"
|
||||||
echo -e "\n *** APT UPGRADE WILL ONLY BE CALLED FROM MENU OPTION 9 ***"
|
echo -e "\n *** APT UPGRADE WILL ONLY BE CALLED FROM MENU OPTION 9 ***"
|
||||||
echo -e "\n Menu Options:" # function call list
|
echo -e "\n Menu Options:" # function call list
|
||||||
echo -e "\n 1 - Fix Missing (pip pip3 golang gedit nmapfix build-essential)" # fix_missing
|
echo -e "\n 1 - Fix Missing (pip pip3 golang gedit nmapfix build-essential)" # fix_missing
|
||||||
|
|
@ -850,16 +888,14 @@ pimpmykali_menu () {
|
||||||
echo -e " 0 - Fix ALL (runs only 1 thru 8) \n" # fix_all
|
echo -e " 0 - Fix ALL (runs only 1 thru 8) \n" # fix_all
|
||||||
echo -e " N - NEW VM SETUP - Run this option if this is the first time running pimpmykali" # menu item only no function
|
echo -e " N - NEW VM SETUP - Run this option if this is the first time running pimpmykali" # menu item only no function
|
||||||
echo -e " This will run Fix All (0) and Pimpmyupgrade (9)\n" #
|
echo -e " This will run Fix All (0) and Pimpmyupgrade (9)\n" #
|
||||||
echo -e " Additional Functions : " # optional line
|
echo -e " Stand alone functions (only apply the single selection)" # optional line
|
||||||
echo -e " F - Broken XFCE Icons fix (will be executed in menu N and 9 automatically )" # fix_broken_xfce
|
echo -e " F - Broken XFCE Icons fix (stand-alone functioon: only applies broken xfce fix)" # fix_broken_xfce
|
||||||
echo -e " G - Fix Gedit Conn Refused (fixes gedit as root connection refused )" # fix_root_connectionrefused
|
echo -e " G - Fix Gedit Conn Refused (fixes gedit as root connection refused)" # fix_root_connectionrefused
|
||||||
echo -e " (fixes broken xfce icons TerminalEmulator Not Found)" #
|
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 " M - Install MS-Vscode (install microsoft vscode only)" # install_vscode
|
||||||
echo -e " V - Install MS-Vscode (install microsoft vscode only)" # install_vscode
|
|
||||||
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
|
||||||
echo -e " ! - Nuke Impacket (Type the ! character for this menu item)" # fix_sead_warning
|
echo -e " ! - Nuke Impacket (Type the ! character for this menu item)" # fix_sead_warning
|
||||||
# downgrade metasploit - commented out 04.06.2021
|
# echo -e " D - Downgrade Metasploit (Downgrade from MSF6 to MSF5)" # downgrade_msf # - commented out 04.06.2021
|
||||||
# echo -e " D - Downgrade Metasploit (Downgrade from MSF6 to MSF5)" # downgrade_msf
|
|
||||||
echo -e " B - BlindPentesters 'The Essentials' tools & utilies collection\n" # bpt
|
echo -e " B - BlindPentesters 'The Essentials' tools & utilies collection\n" # bpt
|
||||||
read -n1 -p " Enter 0 thru 9, N, B, D, or ! press X to exit: " menuinput
|
read -n1 -p " Enter 0 thru 9, N, B, D, or ! press X to exit: " menuinput
|
||||||
|
|
||||||
|
|
@ -879,6 +915,7 @@ pimpmykali_menu () {
|
||||||
s|S) fix_spike ;;
|
s|S) fix_spike ;;
|
||||||
g|G) fix_root_connectionrefused ;;
|
g|G) fix_root_connectionrefused ;;
|
||||||
c|C) check_chrome;;
|
c|C) check_chrome;;
|
||||||
|
m|M) install_vscode;;
|
||||||
# g|g) fix_gowitness ;;
|
# g|g) fix_gowitness ;;
|
||||||
n|N) fix_all; only_upgrade;;
|
n|N) fix_all; only_upgrade;;
|
||||||
# d|D) downgrade_msf ;; # commented out 04.06.2021
|
# d|D) downgrade_msf ;; # commented out 04.06.2021
|
||||||
|
|
@ -920,7 +957,7 @@ check_arg () {
|
||||||
--borked) force=1; fix_sead_warning $force ;;
|
--borked) force=1; fix_sead_warning $force ;;
|
||||||
--nmap) fix_nmap ;;
|
--nmap) fix_nmap ;;
|
||||||
--bpt) bpt ;;
|
--bpt) bpt ;;
|
||||||
--vscode) install_vscode ;; # hidden switch
|
--vscode) install_vscode ;;
|
||||||
--subl) install_sublime ;; # hidden switch
|
--subl) install_sublime ;; # hidden switch
|
||||||
--atom) install_atom ;;
|
--atom) install_atom ;;
|
||||||
--upgrade) only_upgrade ;;
|
--upgrade) only_upgrade ;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue