(Bonus) Other Customizations
If you like altering your OS to make it your own or finding alternative programs, I can highly suggest the following to any user:
- Terminator - Replace GNOME terminal
- ZSH/Oh-My-ZSH - Replace bash with a different shell
- Tmux - Terminal multiplexer (allows you to run multiple terminals in a single window) - very helpful when connecting via SSH (Like 'screen' but "better').
- Alias - Shortcut commands
Terminator
To install:
Code:
apt-get -y install terminator
This then allows you to do split terminal windows as well as many other features.
ZSH/Oh-My-ZSH
To install:
Code:
apt-get -y install zsh && curl "https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh" | zsh
For some of the features this shell can do: http://www.slideshare.net/jaguardesi...shell-16194692.
...There is fish/oh-my-fish as another alternative, however, I personally prefer ZSH/Oh-My-ZSH.
Tmux
To install:
Code:
apt-get -y install tmux
Once in a tmux session (run: tmux new), you are able to run whatever commands you like, in however many sessions, switching between all the windows.
If you are SSH in, you are then able to disconnect from SSH at any stage and your programs will still be running. You just need to SSH back into the box and reattach tmux (run: tmux attach) and everything will be exactly the same as where you left off.
There are also many other features which tmux can do. This is only a single example
If you're using OSX, you should be using 'iTerm 2' (Free & Open Source Terminal replacement) which ingrates fully with tmux.
Alias
This is something in-built to most shells.
In a sense, you can make up a 'new' command, or overwrite a currently installed program.
Example:
New command (you can start up the necessary services required for the metasploit framework, then start msfconsole in quiet mode itself)
Code:
alias msfc="systemctl start postgresql; msfdb start; msfconsole -q \"[email protected]\""
Overwrite program (when running nmap now, every time it will add --reason and --open in the command line arguments)
Code:
alias nmap="nmap --reason --open"
Examples of more:
Code:
alias tmux="tmux attach || tmux new"
alias axel="axel -a"
alias screen="screen -xRR"
alias mkdir="mkdir -pv"
alias ports="netstat -tulanp"
alias header="curl -I"
alias nmap="nmap --reason --open"
alias aircrack-ng="aircrack-ng -z"
alias airodump-ng="airodump-ng --manufacturer --wps --uptime"
alias msfc="systemctl start postgresql; msfdb start; msfconsole -q \"[email protected]\""
alias openvas="openvas-stop; openvas-start; sleep 3; xdg-open https://127.0.0.1:9392/ >/dev/null 2>&1"
alias wwwroot="cd /var/www/"
alias ftproot="cd /var/ftp/"
alias tftproot="cd /var/tftp/"
alias sambaroot="cd /var/samba/"
alias vmroot="cd /mnt/hgfs/"
alias edb="cd /usr/share/exploitdb/exploitdb/"
alias wordlist="cd /usr/share/wordlist/"
## Extract file, example. "ex package.tar.bz2"
ex() {
if [[ -f $1 ]]; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo $1 cannot be extracted ;;
esac
else
echo $1 is not a valid file
fi
}
Please note, you can 'skip' using alias by putting '\' in front.
Example (based on the nmap alias before - will not use --reason or --open):
Alternatively, you can put in the applications full path (/usr/bin/nmap) and it will not do it.