├── .github └── workflows │ └── docker.yml ├── .ver ├── Dockerfile ├── README.md ├── files ├── ssj ├── ssj.desktop └── ssj.png ├── home ├── .bashrc ├── .hushlogin ├── .profile └── .tmux.conf ├── install.sh ├── screenshots ├── mint_ssj_application_launcher.png ├── mint_ssj_burpsuite.png ├── mint_ssj_ettercap.png ├── mint_ssj_msf_nmap.png ├── mint_ssj_wireshark.png ├── ubuntu_ssj_application_launcher.png ├── ubuntu_ssj_burpsuite.png ├── ubuntu_ssj_ettercap.png ├── ubuntu_ssj_msf_nmap.png └── ubuntu_ssj_wireshark.png └── uninstall.sh /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'main' 7 | paths: 8 | - '.ver' 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: docker login 16 | env: 17 | DOCKER_PASSWORD: ${{ secrets.GIT_TOKEN_MAIN }} 18 | run: docker login ghcr.io -u thirdbyte -p $DOCKER_PASSWORD 19 | - name: docker build 20 | run: docker build -t ghcr.io/thirdbyte/ssj:latest . 21 | - name: docker push 22 | run: docker push ghcr.io/thirdbyte/ssj:latest 23 | -------------------------------------------------------------------------------- /.ver: -------------------------------------------------------------------------------- 1 | ## 2023.3 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM kalilinux/kali-last-release 2 | 3 | RUN echo "deb http://kali.download/kali kali-last-snapshot main contrib non-free" > /etc/apt/sources.list && \ 4 | apt-get -y update && \ 5 | apt-get -y dist-upgrade && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get install -y nano curl wget git ncat dbus-x11 python2 python3 python3-pip p7zip-full p7zip-rar p7zip unzip net-tools build-essential iputils-ping pciutils iproute2 bash-completion kali-linux-default pcmanfm leafpad terminator tmux && \ 7 | apt-get -y autoremove && \ 8 | apt-get -y clean && \ 9 | rm -rf /var/lib/apt/lists/* && \ 10 | mkdir -p /usr/local/bin && \ 11 | echo '#!/bin/bash' > /usr/local/bin/gui && \ 12 | echo '$@ &>/dev/null &' >> /usr/local/bin/gui && \ 13 | chmod +x /usr/local/bin/gui && \ 14 | wget https://raw.githubusercontent.com/thirdbyte/ssj/main/home/.bashrc -O /root/.bashrc && \ 15 | touch /root/.hushlogin && \ 16 | echo 'set -g history-limit 10000' > /root/.tmux.conf 17 | 18 | CMD ["/usr/bin/terminator"] 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SSJ - Your everyday Linux distribution gone Super Saiyan. 2 | 3 | ![ssj](https://raw.githubusercontent.com/thirdbyte/ssj/main/files/ssj.png) 4 | 5 | ## Introduction 6 | 7 | SSJ is a silly little script that makes use of [Docker](https://www.docker.com/) installed on your everyday Linux distribution (Ubuntu, Debian, etc.) and magically arms it with hundreds of penetration testing and forensic tools. 8 | 9 | ## Technical Details 10 | 11 | SSJ pulls a Docker image that uses [Kali Linux](https://www.kali.org/) base image,`kalilinux/kali-last-release` with `kali-linux-default` metapackages installed over it. It uses the `kali.download/kali` mirror and `kali-last-snapshot` branch. With SSJ, you can run GUI applications like Burpsuite, Wireshark, Ettercap, etc. from within the container on your everyday Linux distribution, thanks to `--privileged` container capabilities and `xhost` universal access control. This script creates a `.desktop` file (the Application Launcher) for you that initiates the `docker run` command to run the container. So, the only thing you need to do is, find SSJ in your applicaiton drawer or menu and click on it to launch it. A `terminator` window will popup with all your pentesting and forensics tools in it. Execute `gui burpsuite` to fire up the proxy, `gui wireshark` to fire up the packet analyzer and like that, you have access to hundreds of tools and packages that are there in Kali Linux (particularly the `kali-linux-default` metapackages), right on your everyday Linux distribution. Also, contrary to virtual machines, that are either networked behind a virtual NAT or bridged along with the host operating system, SSJ utilizes the host network namespace as it is, using `--net=host`, which means that the SSJ container will have direct access to all the network interfaces as the host Linux distribution and will also share the same IP addresses. 12 | 13 | ## Prerequisites 14 | + Internet. 15 | + 15GB of disk space. 16 | + `git` & `iputils-ping` must be installed. 17 | + `docker` must be installed and the user must be present in the `docker` group. 18 | 19 | ## Installation 20 | 21 | + `curl -sL https://raw.githubusercontent.com/thirdbyte/ssj/main/install.sh | bash` 22 | 23 | (This takes variable time depending upon your Internet speed. It pulls the Docker image from Docker Hub that weighs around 5GB.) 24 | 25 | + `sudo chown -R 0:0 $HOME/.ssj` 26 | 27 | + Reboot. 28 | 29 | ## Usage 30 | 31 | 1. Access the application drawer/menu on your Linux distribution to find SSJ. 32 | 2. Launch SSJ. 33 | 3. A `terminator` terminal will pop up. 34 | 4. Use this terminal to launch any tool by executing them using their respective package names. For an example: `msfconsole`, `gui burpsuite`, `gui wireshark`, etc. 35 | 5. You can save any file in the `/root/` directory inside the container and find it at `$HOME/.ssj` on your host Linux distribution. 36 | 37 | ## Screenshots 38 | 39 | **Tested on:** Ubuntu 20.04.1 LTS (GNOME), Linux Mint 20 Ulyana (Cinnamon) 40 | 41 | **Notice**: The screenshots underneath represent `xfce4-terminal` which is now replaced with `terminator`. 42 | 43 | ![Ubuntu Application Launcher](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/ubuntu_ssj_application_launcher.png) 44 | 45 | ![Ubuntu Burpsuite](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/ubuntu_ssj_burpsuite.png) 46 | 47 | ![Ubuntu Wireshark](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/ubuntu_ssj_wireshark.png) 48 | 49 | ![Ubuntu Ettercap](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/ubuntu_ssj_ettercap.png) 50 | 51 | ![Ubuntu Metasploit & Nmap](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/ubuntu_ssj_msf_nmap.png) 52 | 53 | ![Mint Application Launcher](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/mint_ssj_application_launcher.png) 54 | 55 | ![Mint Burpsuite](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/mint_ssj_burpsuite.png) 56 | 57 | ![Mint Wireshark](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/mint_ssj_wireshark.png) 58 | 59 | ![Mint Ettercap](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/mint_ssj_ettercap.png) 60 | 61 | ![Mint Metasploit & Nmap](https://raw.githubusercontent.com/thirdbyte/ssj/main/screenshots/mint_ssj_msf_nmap.png) 62 | 63 | ## Plugins 64 | 65 | + [Add Tools](https://github.com/thirdbyte/ssj-plugin-add-tools): A convenient script that lets you add more tools to SSJ that are not a part of either the `kali-linux-default` metapackage. 66 | 67 | ## Updates 68 | 69 | Since SSJ uses `kali-last-snapshot` branch of Kali Linux repositories, you don't need to update it until a new snapshot version (`2020.1`, `2020.2`, `2020.3`, etc.) of Kali Linux gets released. Once, a new version gets released, redo the [installation](https://github.com/thirdbyte/ssj#installation) and if you are using [Add Tools](https://github.com/thirdbyte/ssj-plugin-add-tools) plugin, you'll need to re-execute the `add-tools` script as well. 70 | 71 | ## Troubleshooting 72 | 73 | + Since the container runs with the root user privileges, the files created in the `/root` directory have the owner set to root. On the host Linux distribution, this directory is `$HOME/.ssj`. All the files and sub directories inside `$HOME/.ssj` will require the root user of the host Linux distribution in case any data needs to be written to or deleted from this directory. 74 | 75 | ## Limitations 76 | 77 | + SSJ uses Docker's `--privileged` container capabilities and `--net=host` networking. These are known to introduce security risks in production environments. SSJ also adds a universal access control to `xhost` for making GUI applications work, but immidiately closes it once SSJ's `terminator` is exited. This might allow any application to access the X server or GUI of your host Linux distribution in particular for the time SSJ is running which can be a security or a privacy concern for many. 78 | + Audio input/ouput does not work as of now. 79 | + SSJ is a preconfigured & immutable toolkit, which means that any changes made to the filesystem (except `/root/`) will not persist. For creating mutable & customized containers, check out [kalidock](https://github.com/thirdbyte/kalidock). 80 | 81 | ## Uninstallation 82 | 83 | 1. `curl -sL https://raw.githubusercontent.com/thirdbyte/ssj/main/uninstall.sh | bash` 84 | 2. `sudo rm -rf $HOME/.ssj/` 85 | 86 | ## And... 87 | 88 | This script was created out of curiosity. This might solve a lot of problems. This might create new ones as well. It comes with no commitments whatsoever. You may do anything you wish to do with this script and are solely responsible for it. You can still feel free to file issues in case you experience any of them. Cheers! 89 | -------------------------------------------------------------------------------- /files/ssj: -------------------------------------------------------------------------------- 1 | xhost +local:root && docker run --init --rm --shm-size=4g --workdir=/root --hostname=ssj --net=host --privileged -e DISPLAY -v $HOME/.ssj:/root ghcr.io/thirdbyte/ssj:latest terminator && if ! ps aux | grep '[d]ocker' | grep -q 'ssj'; then xhost -local:root; fi 2 | -------------------------------------------------------------------------------- /files/ssj.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=SSJ 3 | Exec=ssj 4 | Type=Application 5 | Icon=ssj.png 6 | -------------------------------------------------------------------------------- /files/ssj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/files/ssj.png -------------------------------------------------------------------------------- /home/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color|*-256color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | prompt_color='\[\033[1;34m\]' 61 | path_color='\[\033[1;32m\]' 62 | if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user 63 | prompt_color='\[\033[1;31m\]' 64 | path_color='\[\033[1;34m\]' 65 | fi 66 | PS1='${debian_chroot:+($debian_chroot)}'$prompt_color'\u@\h\[\033[00m\]:'$path_color'\w\[\033[00m\]\$ ' 67 | unset prompt_color path_color 68 | else 69 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 70 | fi 71 | unset color_prompt force_color_prompt 72 | 73 | # If this is an xterm set the title to user@host:dir 74 | case "$TERM" in 75 | xterm*|rxvt*) 76 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 77 | ;; 78 | *) 79 | ;; 80 | esac 81 | 82 | # enable color support of ls, less and man, and also add handy aliases 83 | if [ -x /usr/bin/dircolors ]; then 84 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 85 | alias ls='ls --color=auto' 86 | #alias dir='dir --color=auto' 87 | #alias vdir='vdir --color=auto' 88 | 89 | alias grep='grep --color=auto' 90 | alias fgrep='fgrep --color=auto' 91 | alias egrep='egrep --color=auto' 92 | alias diff='diff --color=auto' 93 | alias ip='ip --color=auto' 94 | 95 | export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink 96 | export LESS_TERMCAP_md=$'\E[1;36m' # begin bold 97 | export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink 98 | export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video 99 | export LESS_TERMCAP_se=$'\E[0m' # reset reverse video 100 | export LESS_TERMCAP_us=$'\E[1;32m' # begin underline 101 | export LESS_TERMCAP_ue=$'\E[0m' # reset underline 102 | fi 103 | 104 | # colored GCC warnings and errors 105 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 106 | 107 | # some more ls aliases 108 | alias ll='ls -l' 109 | alias la='ls -A' 110 | alias l='ls -CF' 111 | 112 | # Alias definitions. 113 | # You may want to put all your additions into a separate file like 114 | # ~/.bash_aliases, instead of adding them here directly. 115 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 116 | 117 | if [ -f ~/.bash_aliases ]; then 118 | . ~/.bash_aliases 119 | fi 120 | 121 | # enable programmable completion features (you don't need to enable 122 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 123 | # sources /etc/bash.bashrc). 124 | if ! shopt -oq posix; then 125 | if [ -f /usr/share/bash-completion/bash_completion ]; then 126 | . /usr/share/bash-completion/bash_completion 127 | elif [ -f /etc/bash_completion ]; then 128 | . /etc/bash_completion 129 | fi 130 | fi 131 | 132 | PATH=$HOME/bin:$HOME/.local/bin:$PATH 133 | alias burpsuite='java -jar /usr/bin/burpsuite' 134 | -------------------------------------------------------------------------------- /home/.hushlogin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/home/.hushlogin -------------------------------------------------------------------------------- /home/.profile: -------------------------------------------------------------------------------- 1 | # if running bash 2 | if [ -n "$BASH_VERSION" ]; then 3 | # include .bashrc if it exists 4 | if [ -f "$HOME/.bashrc" ]; then 5 | . "$HOME/.bashrc" 6 | fi 7 | fi 8 | -------------------------------------------------------------------------------- /home/.tmux.conf: -------------------------------------------------------------------------------- 1 | set -g history-limit 10000 2 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check { 4 | 5 | if ! docker --version &>/dev/null; then 6 | echo "Docker is not installed. Terminating..." 7 | exit 1 8 | fi 9 | 10 | if ! groups | grep -q "docker"; then 11 | echo "The user '$USER' is not present in the 'docker' group. Terminating..." 12 | exit 1 13 | fi 14 | 15 | if ! git --version &>/dev/null; then 16 | echo "Git is not installed. Terminating..." 17 | exit 1 18 | fi 19 | 20 | if ! ping -q -c 1 -W 1 github.com &>/dev/null; then 21 | echo "Could not connect to the Internet. Terminating..." 22 | exit 1 23 | fi 24 | 25 | } 26 | 27 | function init_dir { 28 | 29 | mkdir -p $HOME/.ssj 30 | mkdir -p $HOME/.local/bin 31 | mkdir -p $HOME/.local/share/applications 32 | mkdir -p $HOME/.local/share/icons 33 | 34 | } 35 | 36 | function cp_files { 37 | 38 | cp -r /tmp/ssj/home/. $HOME/.ssj/ 39 | cp /tmp/ssj/files/ssj $HOME/.local/bin/ 40 | cp /tmp/ssj/files/ssj.desktop $HOME/.local/share/applications/ 41 | cp /tmp/ssj/files/ssj.png $HOME/.local/share/icons/ 42 | 43 | } 44 | 45 | function add_path { 46 | 47 | if ! echo $PATH | grep -q "$HOME/.local/bin"; then 48 | echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.bashrc 49 | source $HOME/.bashrc 50 | fi 51 | 52 | } 53 | 54 | check 55 | 56 | docker pull ghcr.io/thirdbyte/ssj:latest && \ 57 | git clone https://github.com/thirdbyte/ssj /tmp/ssj && \ 58 | init_dir && \ 59 | cp_files && \ 60 | chmod +x $HOME/.local/bin/ssj && \ 61 | add_path && \ 62 | rm -rf /tmp/ssj && \ 63 | echo "" && \ 64 | echo "Installation successful! Please reboot." 65 | 66 | docker image rm $(docker images -q --filter "dangling=true") &>/dev/null 67 | -------------------------------------------------------------------------------- /screenshots/mint_ssj_application_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/mint_ssj_application_launcher.png -------------------------------------------------------------------------------- /screenshots/mint_ssj_burpsuite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/mint_ssj_burpsuite.png -------------------------------------------------------------------------------- /screenshots/mint_ssj_ettercap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/mint_ssj_ettercap.png -------------------------------------------------------------------------------- /screenshots/mint_ssj_msf_nmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/mint_ssj_msf_nmap.png -------------------------------------------------------------------------------- /screenshots/mint_ssj_wireshark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/mint_ssj_wireshark.png -------------------------------------------------------------------------------- /screenshots/ubuntu_ssj_application_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/ubuntu_ssj_application_launcher.png -------------------------------------------------------------------------------- /screenshots/ubuntu_ssj_burpsuite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/ubuntu_ssj_burpsuite.png -------------------------------------------------------------------------------- /screenshots/ubuntu_ssj_ettercap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/ubuntu_ssj_ettercap.png -------------------------------------------------------------------------------- /screenshots/ubuntu_ssj_msf_nmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/ubuntu_ssj_msf_nmap.png -------------------------------------------------------------------------------- /screenshots/ubuntu_ssj_wireshark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdbyte/ssj/6302e0f39345767b5bb9b3fe5247f1caa1b1f5f6/screenshots/ubuntu_ssj_wireshark.png -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check { 4 | 5 | if ! docker --version >/dev/null; then 6 | echo "Docker is not installed. Terminating..." 7 | exit 1 8 | fi 9 | 10 | if ! groups | grep -q "docker"; then 11 | echo "The user '$USER' is not present in the 'docker' group. Terminating..." 12 | exit 1 13 | fi 14 | 15 | } 16 | 17 | check 18 | 19 | docker image rm ghcr.io/thirdbyte/ssj:latest --force &>/dev/null 20 | docker image rm ssj:latest --force &>/dev/null 21 | docker image rm $(docker images -q --filter "dangling=true") --force &>/dev/null 22 | rm -rf $HOME/.ssj &>/dev/null 23 | rm -rf $HOME/.local/bin/ssj &>/dev/null 24 | rm -rf $HOME/.local/share/applications/ssj.desktop &>/dev/null 25 | rm -rf $HOME/.local/share/icons/ssj.png &>/dev/null 26 | rm -rf /tmp/ssj &>/dev/null 27 | --------------------------------------------------------------------------------