Last active
January 15, 2019 13:00
-
-
Save terceranexus6/0f5a1d3f9967115a4b0d05fc764cb759 to your computer and use it in GitHub Desktop.
Configure debian for basic security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BLUE='\033[0;36m' | |
RED='\033[0;31m' | |
PURPLE='\033[0;35m' | |
NC='\033[0m' # No Color | |
FILE="/tmp/out.$$" | |
GREP="/bin/grep" | |
# check if root | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root." 1>&2 | |
exit 1 | |
else | |
echo -e "${BLUE}This script uses apt, not apt-get. See here (https://askubuntu.com/questions/445384/what-is-the-difference-between-apt-and-apt-get) why, it's not due the colorful options! ${NC}" | |
echo -e "${BLUE}Updating the system...${NC}" | |
apt update | |
echo -e "${BLUE}Installing the basics in case they are not installed...${NC}" | |
echo -e "${BLUE}Installing build-assential...${NC}" | |
apt install build-essential | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing openssl...${NC}" | |
apt install openssl | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing git...${NC}" | |
apt install git | |
apt install git-core | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing keepass{NC}" | |
apt install keepass2 | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing ghex{NC}" | |
apt install ghex | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${PURPLE}Remember to configure git ssh, for more information check https://stackoverflow.com/questions/1595848/configuring-git-over-ssh-to-login-once and https://help.github.com/articles/connecting-to-github-with-ssh/${NC}" | |
echo -e "${BLUE}Installing GPG${NC}" | |
apt install gnupg | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing Network Mapper (nmap)${NC}" | |
apt install nmap | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing Open Vpn${NC}" | |
apt install openvpn | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing cryptsetup${NC}" | |
install cryptsetup | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${PURPLE}For setting up the partition visit: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks ${NC}" | |
echo -e "${BLUE}Installing Sublime${NC}" | |
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3083_amd64.deb | |
dpkg -i sublime-text_build-3083_amd64.deb | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Nikto is in a .tar file attached ${NC} ${PURPLE} remember to configure it.${NC}" | |
echo -e "${BLUE}Installing Burp.${NC}" | |
./burpsuite_community_linux_v1_7_36.sh | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${PURPLE}For installing metasploit please check this https://www.darkoperator.com/installing-metasploit-in-ubunt/${NC}" | |
echo -e "${PURPLE}For installing suricata execute the script suricata_install.sh or check this link http://xmodulo.com/install-suricata-intrusion-detection-system-linux.html ${NC}" | |
echo -e "${PURPLE}For installing suricata execute the script radare-install.sh${NC}" | |
echo -e "${BLUE}Installing TCPDUMP${NC}" | |
apt install tcpdump | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Installing Wireshark${NC}" | |
apt install wireshark | |
echo -e "${BLUE}Setting-up so non-root users can capture live packets of interfaces${NC}" | |
setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Getting John the Ripper${NC}" | |
wget http://www.openwall.com/john/j/john-1.8.0-jumbo-1.tar.xz | |
tar xf john-1.8.0-jumbo-1.tar.xz | |
apt install libssl-dev | |
cd john-1.8.0-jumbo-1/src && ./configure && make | |
echo -e "${PURPLE}For executing, check: https://unix.stackexchange.com/questions/223758/how-do-i-get-john-the-ripper-running-on-a-recent-version-of-debian-or-ubuntu#223759${NC}" | |
echo -e "${BLUE}Done.${NC}" | |
echo -e "${BLUE}Updating... ${NC}" | |
apt update | |
echo -e "${BLUE}Upgrading... ${NC}" | |
apt upgrade | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment