diff options
author | Dan Fedele <dan.fedele@gmail.com> | 2023-06-12 22:08:39 -0400 |
---|---|---|
committer | Dan Fedele <dan.fedele@gmail.com> | 2023-06-12 22:08:39 -0400 |
commit | 61d2136b432a041e5bf1dc04503fa5fb05a60631 (patch) | |
tree | 88f602be4449292567d8591719ed508c6031a2f0 | |
parent | 9bf3e9ec191e0baf9baf8f0d7f553a0fa0c28e69 (diff) |
All set for merging, though need to document more next
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | setup.sh | 30 |
2 files changed, 21 insertions, 17 deletions
@@ -7,13 +7,15 @@ And if you don't like my modifications, I encourage you to fork this repo and ma If you just started up a new instance of **Kali**, to get it to a "proper working setup" that I've come to like, simply run the following command from a terminal: ```bash -git clone https://github.com/AgroDan/golden-kali.git && sudo bash ./golden-kali/setup.sh +git clone https://github.com/AgroDan/golden-kali.git && bash ./golden-kali/setup.sh ``` -The previous command used to be a `curl` instruction piped to `bash`. I changed that to a `git clone` instead to change up the way files would be included. It was cleaner and I was able to mess around with ansible's conditional logic a bit more. Note you are still allowing code to execute as the root user to install various tools that *I personally* find very useful. They may not be what you find useful, they may not be what you prefer. Please review the code above as it is all open source for your assurance. Know this: I may be installing malicious software, but I wish no mal-intent to you. Peace, love, and hack all the things. +The previous command used to be a `curl` instruction piped to `bash`. I changed that to a `git clone` instead to change up the way files would be included. It was cleaner and I was able to mess around with ansible's conditional logic a bit more. Additional changes will now prompt you for your password to execute the ansible changes as root. This is necessary to install packages via apt. However now pip and ansible will be installed as the current user rather than the root user. Note you are still allowing code to execute as the root user to install various tools that *I personally* find very useful. They may not be what you find useful, they may not be what you prefer. Please review the code above as it is all open source for your assurance. Know this: I may be installing malicious software, but I wish no mal-intent to you. Peace, love, and hack all the things. ## Changelog +- Latest change: Ansible roles! + I made some significant changes to this repository from the previous iteration. First, the name has been changed to `golden-kali`. Second, I have removed support for ParrotOS. It's generally something I don't use all that often to support it, so this is what you have. I'm sure you can apply all of the ideas here for a ParrotOS build as well if that's your thing. Many of the changes here came as a result of this repository being included as a necessary install step process for the Red Team at [DoE's Cyberforce Competition](https://cyberforce.energy.gov/cyberforce-competition/) in 2022. The code was modified heavily for the event's exhaustive playbook. I took what I had learned there and simply applied it here. @@ -24,4 +26,4 @@ Through exhaustive testing and re-testing, we have determined that this will ins Despite all of our efforts, no one has been able to get this script to work on Apple's M1 architecture. This is for AMD64 only. Sorry! -This script takes a _long_ time to complete. The longest step is patching and updating the machine before executing any of the plays. It is advised for your own sanity to ensure that your machine is patched to the latest before running this script.
\ No newline at end of file +This script takes a _long_ time to complete. The longest step is patching and updating the machine before executing any of the plays. It is advised for your own sanity to ensure that your machine is patched to the latest before running this script. @@ -10,34 +10,36 @@ if [ -z ${BASH} ]; then exit 1 fi -# Are we root? -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as sudo or root." +# Are we root? Because we shouldn't be. +if [[ $EUID -eq 0 ]]; then + echo "This script should be run as a normal user, not root." exit 2 fi PATH_TO_SCRIPT=$(dirname $(readlink -f $0)) -echo "***********************************" -echo "* Installing pip *" -echo "***********************************" +echo "************************************" +echo "* Installing pip *" +echo "************************************" curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py python3 /tmp/get-pip.py --user --no-warn-script-location -export PATH=$PATH:/root/.local/bin +export PATH=$PATH:~/.local/bin -echo "***********************************" -echo "* Installing ansible *" -echo "***********************************" +echo "************************************" +echo "* Installing ansible *" +echo "************************************" pip install ansible -echo "***********************************" -echo "* Running Kali playbook *" -echo "***********************************" +echo "************************************" +echo "* Running Golden Kali Playbook *" +echo "************************************" -ansible-playbook ${PATH_TO_SCRIPT}/main.yml +echo +echo "Please enter your password to configure system:" +ansible-playbook ${PATH_TO_SCRIPT}/main.yml --ask-become-pass echo "***********************************" echo "* Done! *" |