├── .gitignore ├── Dockerfile ├── Makefile ├── README.md ├── Vagrantfile ├── autoinstall.sh ├── desktop.sh ├── dev.sh ├── embedded.sh ├── files ├── bin │ └── add-apt-repository.sh ├── etc │ ├── emdebian.list │ ├── google-chrome.list │ ├── sources.list │ ├── tor.list │ ├── ubuntuzilla.list │ └── virtualbox.list └── home │ ├── bash_aliases │ └── screenrc ├── hardware.sh ├── helper.sh ├── internet.sh ├── patches ├── 0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch ├── ath9k-htc-channels-unlock.patch └── modwifi.patch ├── pentest.sh ├── phone.sh ├── postinstall.sh ├── shell.sh ├── test.sh ├── video.sh ├── vm.sh └── wireless.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### JetBrains template 3 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 4 | 5 | #*.iml 6 | 7 | ## Directory-based project format: 8 | .idea/ 9 | # if you remove the above rule, at least ignore the following: 10 | 11 | ### Python template 12 | # Byte-compiled / optimized / DLL files 13 | __pycache__/ 14 | *.py[cod] 15 | 16 | # C extensions 17 | *.so 18 | 19 | # Distribution / packaging 20 | .Python 21 | env/ 22 | build/ 23 | develop-eggs/ 24 | dist/ 25 | downloads/ 26 | eggs/ 27 | lib/ 28 | lib64/ 29 | parts/ 30 | sdist/ 31 | var/ 32 | *.egg-info/ 33 | .installed.cfg 34 | *.egg 35 | 36 | # PyInstaller 37 | # Usually these files are written by a python script from a template 38 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 39 | *.manifest 40 | *.spec 41 | 42 | # Installer logs 43 | pip-log.txt 44 | pip-delete-this-directory.txt 45 | 46 | # Unit test / coverage reports 47 | htmlcov/ 48 | .tox/ 49 | .coverage 50 | .cache 51 | nosetests.xml 52 | coverage.xml 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | 61 | # Sphinx documentation 62 | docs/_build/ 63 | 64 | # PyBuilder 65 | target/ 66 | 67 | 68 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM kalilinux/kali-linux-docker 2 | # Metadata params 3 | ARG BUILD_DATE 4 | ARG VERSION 5 | ARG VCS_URL 6 | ARG VCS_REF 7 | 8 | LABEL org.label-schema.build-date=$BUILD_DATE \ 9 | org.label-schema.vcs-url=$VCS_URL \ 10 | org.label-schema.vcs-ref=$VCS_REF \ 11 | org.label-schema.version=$VERSION \ 12 | org.label-schema.name='Kali Linux' \ 13 | org.label-schema.description='Official Kali Linux docker image' \ 14 | org.label-schema.usage='https://www.kali.org/news/official-kali-linux-docker-images/' \ 15 | org.label-schema.url='https://www.kali.org/' \ 16 | org.label-schema.vendor='Offensive Security' \ 17 | org.label-schema.schema-version='1.0' \ 18 | org.label-schema.docker.cmd='docker run --rm kalilinux/kali-linux-docker' \ 19 | org.label-schema.docker.cmd.devel='docker run --rm -ti kalilinux/kali-linux-docker' \ 20 | org.label-schema.docker.debug='docker logs $CONTAINER' \ 21 | io.github.offensive-security.docker.dockerfile="Dockerfile" \ 22 | io.github.offensive-security.license="GPLv3" \ 23 | MAINTAINER="Steev Klimaszewski " 24 | RUN echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list && \ 25 | echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list 26 | ENV DEBIAN_FRONTEND noninteractive 27 | RUN set -x \ 28 | && apt-get -yqq update \ 29 | && apt-get -yqq dist-upgrade \ 30 | && apt-get clean 31 | CMD ["bash"] 32 | RUN apt-get -yqq install git make cmake 33 | RUN git clone https://github.com/0x90/kali-scripts /tmp/kali-scripts 34 | RUN cd /tmp/kali-scripts && git pull && make dev-all 35 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # kali-scripts reborn to Makefile 2 | # author: @090h 3 | # 4 | PROJECT := kali-scripts 5 | CC := gcc 6 | EUID := $(shell id -u -r) 7 | DESTDIR ?=/usr 8 | PREFIX ?= $(DESTDIR) 9 | TMPDIR=/tmp/kali-scripts 10 | CRDADIR=/lib/crda 11 | CRDADB=${CRDADIR}/regulatory.bin 12 | TOP ?= $(shell pwd) 13 | THIS := ${TOP}/Makefile 14 | ROOT_DIR := ${CURDIR} 15 | MODWIFI_RELEASE=modwifi-4.7.4-experimental-1.tar.gz 16 | MODWIFI_URL=https://github.com/vanhoefm/modwifi/raw/master/releases/${MODWIFI_RELEASE} 17 | .DEFAULT_GOAL := help 18 | .PHONY: help clean archivers 32bit common-tools deps wifi wireless-db reaver dev-ide 19 | 20 | # Macros 21 | .CLEAR=\x1b[0m 22 | .BOLD=\x1b[01m 23 | .RED=\x1b[31;01m 24 | .GREEN=\x1b[32;01m 25 | .YELLOW=\x1b[33;01m 26 | 27 | # Check for root 28 | check: 29 | ifneq ($(EUID),0) 30 | @echo "Please run as root user" 31 | @exit 1 32 | endif 33 | 34 | # Re-usable target for yes no prompt. Usage: make .prompt-yesno message="Is it yes or no?" 35 | # Will exit with error if not yes 36 | .prompt-yesno2: 37 | @exec 9<&0 0&2 || (echo N >&2 && exit 1) 42 | 43 | # Re-usable target for yes no prompt. Usage: make .prompt-yesno message="Is it yes or no?" 44 | # Will exit with error if not yes 45 | .prompt-yesno: 46 | @exec 8<&0 0 $(message) [Y]:" && echo $$REPLY))" in \ 49 | [nN]) echo -e "\n > $(.YELLOW)[ABORTED]$(.CLEAR)" && exit 1 ;; \ 50 | esac && echo -e "" 51 | ([[ ! -z $$FOUNDATION_NO_WAIT ]] && \ 52 | echo -e " > $(.GREEN)[AUTO CONTINUING]$(.CLEAR)" || \ 53 | echo -e " > $(.GREEN)[CONTINUING]$(.CLEAR)") 54 | 55 | define gitclone 56 | $(eval repo := $(TMPDIR)/$(shell basename $(1))) 57 | @if [ ! -d $(repo) ]; then git clone --recursive $(1) $(repo); fi; 58 | endef 59 | 60 | 61 | default: help; 62 | 63 | ##: list - list available make targets 64 | list: 65 | @grep -v "#" Makefile|grep '^[^#.]*:$$' | awk -F: '{ print $$1 }' 66 | 67 | #: help - display callable targets * 68 | help: 69 | @echo "\n\t`printf "\033[32m"`\t .:[Kali Scripts reb0rn to Makefile]:.`printf "\033[0m"`" 70 | @echo "\t+---------------------------------------------------------------+" 71 | @egrep -o "^#: (.+)" [Mm]akefile |sort| sed "s/#: / * `printf "\033[32m"`/"| sed "s/ - /`printf "\033[0m"` - /" 72 | @echo "\t+---------------------------------------------------------------+" 73 | @echo "\t\t`printf "\033[32m"` greetz fly to all DC7499 community`printf "\033[0m"`" 74 | @echo "\t\t`printf "\033[32m"` ~~-< @090h 2018 >-~~`printf "\033[0m"`\n" 75 | 76 | #: clean - cleanup source code and unused packages * 77 | clean: 78 | @echo "Cleaning packages" 79 | apt-get -y autoremove && apt-get -y clean 80 | @echo "Cleaning temp directory: $(TMPDIR)" 81 | @rm -rf $(TMPDIR) 82 | 83 | #: fresh - update kali-scripts repo * 84 | fresh: 85 | git pull 86 | 87 | #: upgrade - update and upgrade current system * 88 | upgrade: 89 | apt-get update && apt-get upgrade -y 90 | 91 | #: kali - install Kali Linux repos and soft * 92 | kali: 93 | echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list 94 | echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list 95 | sudo apt-get update -y 96 | sudo apt-get install kali-archive-keyring -y 97 | sudo apt-get update -y 98 | sudo apt-get -y install kali-linux-wireless kali-linux-sdr 99 | 100 | ##: archivers - install archivers 101 | archivers: 102 | @echo "installing archivers.." 103 | @apt-get -y install gzip bzip2 tar lzma arj lhasa p7zip-full cabextract unace unrar zip unzip \ 104 | sharutils uudeview mpack cabextract file-roller zlib1g zlib1g-dev liblzma-dev liblzo2-dev 105 | 106 | ##: 32bit - install 32 bit tools and libraries 107 | 32bit: 108 | @if [ `getconf LONG_BIT` != "64" ] ; then exit 1; fi 109 | @echo "64-bit OS detected. installing 32-bit libs..." 110 | dpkg --add-architecture i386 111 | apt-get update -y && apt-get install -y libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 112 | 113 | ##: common - install common tools 114 | common: 115 | @echo "installing common tools.." 116 | apt-get install -y terminator tmux htop iftop iotop mc screen curl wget 117 | ################################# deps ######################################### 118 | 119 | ################################# ssh ########################################## 120 | ##: sshd - Configure SSHD * 121 | sshd: 122 | @echo "Configuring SSHD" 123 | make .prompt-yesno message="Enable root login via SSHD with password?" && make sshd-root 124 | make .prompt-yesno message="Do you want to install fresh sshd/ssh keys?" && make sshd-keys 125 | systemctl restart ssh 126 | 127 | ##: sshd-root - Enable root login via SSHD with password auth 128 | sshd-root: 129 | @echo "Enabling root login with password" 130 | sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config && systemctl restart ssh 131 | 132 | ##: sshd-keys - Regenerate SSH keys 133 | sshd-keys: 134 | @echo "Removing old host keys.." 135 | rm -rf /etc/ssh/ssh_host_* 136 | @echo "Regenerating host keys.." 137 | dpkg-reconfigure openssh-server 138 | mkdir /etc/ssh/default_kali_keys && mv /etc/ssh/ssh_host* /etc/ssh/default_kali_keys/ 139 | dpkg-reconfigure openssh-server 140 | @echo "please make sure that those keys differ" 141 | md5sum /etc/ssh/default_kali_keys/* 142 | md5sum /etc/ssh/ssh_host* 143 | service ssh try-restart 144 | ssh-keygen -t rsa -b 2048 145 | ################################# ssh ########################################## 146 | 147 | ################################# dev ########################################## 148 | ##: dev-vcs - instal VCS (git, hg,cvs) 149 | dev-vcs: 150 | @echo "Installing VCS (git, hg,cvs)" 151 | @apt-get install -y git subversion mercurial 152 | 153 | ##: dev-build - install build tools and environment 154 | dev-build: 155 | @echo "Istalling development tools and environment" 156 | @apt-get install -y cmake cmake-data module-assistant build-essential patch g++ gcc gcc-multilib \ 157 | dkms patchutils strace wdiff pkg-config automake autoconf flex bison gawk flex gettext \ 158 | linux-source libncurses5-dev libreadline6 libreadline6-dev \ 159 | libbz2-dev zlib1g-dev fakeroot ncurses-dev libtool libmagickcore-dev libmagick++-dev libmagickwand-dev \ 160 | libyaml-dev libxslt1-dev libxml2-dev libxslt-dev libc6-dev python-pip libsqlite3-dev sqlite3 161 | # linux-headers-`uname -r` 162 | 163 | ##: dev-crypto - install crypto libraries 164 | dev-crypto: 165 | @echo "installing crypto libs" 166 | @apt-get install -y openssl libssl-dev python-m2crypto libgcrypt20 libgcrypt20-dev cracklib-runtime 167 | 168 | ##: dev-ide - install IDE (Atom,PyCharm, etc) 169 | dev-ide: 170 | @echo "installing Atom IDE" 171 | curl -L https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add - 172 | echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list 173 | apt-get update && apt-get install -y atom 174 | 175 | ##: dev-network - install different network libraries * 176 | dev-network: 177 | @echo "installing network libs" 178 | @apt-get install -y libpcap-dev libpcap0.8 libpcap0.8-dev libdnet \ 179 | libnetfilter-queue-dev libnl-genl-3-dev libssh2-1-dev 180 | 181 | ##: dev-android - install Android SDK/NDK and other tools * 182 | dev-android: dev-java deps 183 | @echo "Installing Android Studio dependencies (ADB, KVM, QEMU)" 184 | sudo apt install -y gcc-multilib g++-multilib libc6-dev-i386 qemu-kvm mesa-utils adb 185 | @echo "Adding Android Studio repository" 186 | @echo "deb http://ppa.launchpad.net/maarten-fonville/android-studio/ubuntu trusty main" > /etc/apt/sources.list.d/android.list 187 | @echo "Adding Android Studio key: 4DEA8909DC6A13A3" 188 | apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 4DEA8909DC6A13A3 189 | apt-get update && apt -y install android-studio netbeans-installer 190 | 191 | ##: dev-crossdev - install cross platfrorm dev tools 192 | dev-crossdev: deps 193 | # http://www.emdebian.org/crosstools.html 194 | @echo "installing Emdebian, xapt" 195 | apt-get install emdebian-archive-keyring xapt -y 196 | # sudo apt-get install gcc-msp430 binutils-msp430 msp430-libc msp430mcu mspdebug 197 | # apt_add_source emdebian 198 | # cp -f "files/etc/emdebian.list" /etc/apt/sources.list.d/emdebian.list && apt-get update -y 199 | echo "deb http://ftp.us.debian.org/debian/ squeeze main" > /etc/apt/sources.list.d/emdebian.list 200 | echo "deb http://www.emdebian.org/debian/ squeeze main" >> /etc/apt/sources.list.d/emdebian.list 201 | echo "deb http://www.emdebian.org/debian/ oldstable main" >> /etc/apt/sources.list/emdebian.list 202 | apt-get update -y 203 | @echo "installing GCC-4.4 for mips, mipsel" 204 | apt-get install -y linux-libc-dev-mipsel-cross libc6-mipsel-cross libc6-dev-mipsel-cross \ 205 | binutils-mipsel-linux-gnu gcc-4.4-mipsel-linux-gnu g++-4.4-mipsel-linux-gnu 206 | apt-get install -y linux-libc-dev-mips-cross libc6-mips-cross libc6-dev-mips-cross \ 207 | binutils-mips-linux-gnu gcc-4.4-mips-linux-gnu g++-4.4-mips-linux-gnu -y 208 | 209 | ##: dev-python - install python developer environment * 210 | dev-python: dev-vcs dev-db 211 | @echo "installing pyenv, pip and other python modules" 212 | apt-get install -y python-dev bpython python-pip python-twisted python-shodan \ 213 | python-virtualenv python-pygments python-tornado python-sqlalchemy python-lxml python-pymongo \ 214 | python-gnuplot python-matplotlib python-scipy python-requests python-gevent \ 215 | python-numpy python-gi-dev python-psycopg2 swig doxygen python-lzma python3 python3-pip \ 216 | python-opengl python-qt4 python-qt4-gl libqt4-opengl python-pyqtgraph python-pyside \ 217 | python-pip python-dev cython 218 | pip install cookiecutter 219 | @if [ ! -d ~/.pyenv ]; then \ 220 | curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash ; \ 221 | else \ 222 | echo "PyEnv already installed"; \ 223 | fi; 224 | 225 | ##: dev-java - install Oracle Java * 226 | dev-java: 227 | @echo "installing webupd8team repo..." 228 | @echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/java.list 229 | @echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list.d/java.list 230 | @echo "adding webupd8team key EEA14886" 231 | @apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 232 | @apt-get update && apt-get install -y oracle-java8-installer oracle-java8-set-default 233 | source /etc/profile 234 | ################################# dev ########################################## 235 | 236 | ################################# regdb ######################################## 237 | #: wifi-regdb - install wireles-regdb with unlocked freq/amp * 238 | wifi-regdb: wifi-common 239 | @echo "Cloning repos wireless-db repos." 240 | $(call gitclone,https://github.com/0x90/crda-ct) 241 | $(call gitclone,https://github.com/0x90/wireless-regdb) 242 | @echo "Building and installing deps for building wireless-db" 243 | $(MAKE) -C $(repo) && install ${TMPDIR}/wireless-regdb/regulatory.bin ${CRDADB} 244 | @echo "Copying certs.." 245 | install ${TMPDIR}/wireless-regdb/root.key.pub.pem ${TMPDIR}/crda-ct/pubkeys/ 246 | install ${CRDADIR}/pubkeys/benh@debian.org.key.pub.pem ${TMPDIR}/crda-ct/pubkeys/ 247 | @echo "Building and installing CRDA" 248 | cd ${TMPDIR}/crda-ct && export REG_BIN=${CRDADB} && make && make install 249 | 250 | # TODO: check and add 251 | wifi-frequency-hacker: 252 | git clone https://github.com/singe/wifi-frequency-hacker ${TMPDIR}/wifi-frequency-hacker 253 | cp /lib/crda/regulatory.bin /lib/crda/regulatory.bin.orig 254 | install ${TMPDIR}/wifi-frequency-hacker/regulatory.bin /lib/crda/ 255 | install ${TMPDIR}/wifi-frequency-hacker/singe.key.pub.pem /lib/crda/pubkeys/ 256 | ################################# regdb ######################################## 257 | 258 | ################################# libs ######################################### 259 | 260 | ##: lorcon - install Lorcon library with python bindings * 261 | lorcon: 262 | $(call gitclone,https://github.com/0x90/lorcon) 263 | @echo "installing Lorcon from $(repo)" 264 | @cd $(repo) && ./configure --prefix=$(PREFIX) && make && make install 265 | @echo "installing pylorcon2 bindings" 266 | @cd $(repo)/pylorcon2 && python setup.py build && python setup.py install 267 | 268 | ##: libuwifi - WiFi lib with injection/monitor/channel support * 269 | libuwifi: 270 | $(call gitclone,https://github.com/br101/libuwifi) 271 | @echo "installing Lorcon from $(repo)" 272 | @cd $(repo) && ./configure --prefix=$(PREFIX) && make && make install 273 | 274 | ##: libtins - WiFi lib with injection/monitor/channel support * 275 | libtins: 276 | $(call gitclone,https://github.com/mfontanini/libtins.git) 277 | mkdir $(repo)/build && cd $(repo)/build 278 | cmake ../ -DLIBTINS_ENABLE_CXX11=1 && make && make install 279 | 280 | #: wifi-python - install python libraries for WiFi * 281 | python-wifi: 282 | @echo "Installing python network libs.." 283 | pip install wifi scapy==2.3.2 impacket pcapy pcappy 284 | @echo "Installing pythonwifi library" 285 | pip install "git+https://github.com/pingflood/pythonwifi.git" 286 | @echo "Installling PyRIC (new Lorcon)" 287 | pip install "git+https://github.com/wraith-wireless/PyRIC#egg=PyRIC" 288 | # @echo "Installling cycapture for libpcap+libtins bindings" 289 | # pip install "git+https://github.com/stephane-martin/cycapture#egg=cycapture" 290 | # @if [ ! -d ${TMPDIR}/cycapture ]; then \ 291 | # @echo "Downloading cycapture"; \ 292 | # git clone --recursive https://github.com/stephane-martin/cycapture ${TMPDIR}/cycapture;\ 293 | # fi; 294 | # ${TMPDIR}/cycapture/setup.py install 295 | @echo "Installing itame for dealing with MPDU/MSDU frames" 296 | apt install libtins-dev libboost-dev -y 297 | pip install itamae 298 | # @echo "Installing pytins..." 299 | # $(call gitclone,https://github.com/mfontanini/pytins) 300 | # cd $(repo) && make && make install 301 | @echo "Installing py80211" 302 | pip install "git+https://github.com/0x90/py80211#egg=py80211" 303 | 304 | # https://github.com/wraith-wireless/wraith 305 | # https://github.com/bcopeland/python-radiotap 306 | # https://github.com/weaknetlabs/libpcap-80211-c 307 | # https://github.com/0x90/wifi-arsenal/tree/master/libmoep-1.1 308 | # https://github.com/moepinet/moepdefend 309 | ################################# libs ######################################## 310 | 311 | ################################ deauth ####################################### 312 | wifijammer: 313 | @echo "Installing mdk3" 314 | apt-get install -y mdk3 315 | @echo "Installing wifijammer" 316 | pip install "git+https://github.com/0x90/wifijammer#egg=wifijammer" 317 | # pip install git+https://github.com/llazzaro/wifijammer.git 318 | 319 | zizzania: 320 | @echo "Installing zizzania dependencies" 321 | apt-get install -y scons libpcap-dev uthash-dev 322 | @echo "Installing zizzania" 323 | $(call gitclone,https://github.com/cyrus-and/zizzania) 324 | cd $(repo) && make && make install 325 | ################################ deauth ####################################### 326 | 327 | ################################## WPA ######################################## 328 | ##: wifi-common - install common WiFi hacking tools 329 | wifi-common: 330 | @echo "installing WiFi tools and dependecies" 331 | apt-get install -y kismet kismet-plugins giskismet mdk3 linssid \ 332 | wavemon rfkill iw tshark fern-wifi-cracker wifite 333 | 334 | horst: 335 | sudo apt-get install libncurses5-dev libnl-3-dev libnl-genl-3-dev 336 | git clone --recursive https://github.com/br101/horst ${TMPDIR}/horst 337 | 338 | ##: aircrack - install EXPERIMENTAL build of aircrack-ng * 339 | aircrack: 340 | @echo "Installing aircrack-ng from source..." 341 | apt-get install -y libgcrypt20-dev 342 | $(call gitclone,https://github.com/aircrack-ng/aircrack-ng) 343 | cd $(repo) && make sqlite=true experimental=true ext_scripts=true pcre=true gcrypt=true libnl=true 344 | cd $(repo) && make strip && make install 345 | 346 | ##: airoscript - install airoscript * 347 | airoscript: 348 | @echo "Installing airoscript-ng from source..." 349 | svn co http://svn.aircrack-ng.org/branch/airoscript-ng/ ${TMPDIR}/airoscript-ng 350 | cd ${TMPDIR}/airoscript-ng && make install 351 | 352 | ##: airgraph - install airgraph tool * 353 | airgraph: 354 | @echo "Installing airgraph-ng from source..." 355 | svn co http://svn.aircrack-ng.org/trunk/scripts/airgraph-ng ${TMPDIR}/airgraph-ng 356 | cd ${TMPDIR}/airgraph-ng && make install 357 | 358 | ##: handshaker - install tool for easy handshake capture * 359 | handshaker: deps reaver pixiewps 360 | apt-get install -y beep bc 361 | $(call gitclone,https://github.com/d4rkcat/HandShaker) 362 | cd $(repo) && make install 363 | 364 | ##: pyrit - install latest version of Pyrit from sources * 365 | pyrit: deps 366 | # NB: Updating from 2.3.2 to 2.3.3 breaks pyrit 367 | # https://github.com/JPaulMora/Pyrit/issues/500 368 | pip install scapy==2.3.2 369 | # apt-get install pyrit 370 | @echo "installing Pyrit from source" 371 | $(call gitclone,https://github.com/JPaulMora/Pyrit) 372 | cd $(repo) && python setup.py clean && python setup.py build && python setup.py install 373 | 374 | brute-common: 375 | @echo "Installing common bruteforce tools for WiFi" 376 | apt-get install -y hashcat cowpatty john 377 | 378 | ##: airhammer - WPA-Enterprise horizontal brute-force tool * 379 | air-hammer: 380 | @echo "Installing Air-Hammer - A WPA Enterprise horizontal brute-force attack tool" 381 | # TODO: https://github.com/Wh1t3Rh1n0/air-hammer 382 | 383 | ##: wpa-bruteforcer - WPA brute-force for AP without clients * 384 | wpa-bruteforcer: 385 | # TODO: https://github.com/SYWorks/wpa-bruteforcer 386 | pip install "git+https://github.com/0x90/wpa-bruteforcer#egg=wpa-bruteforcer" 387 | 388 | ##: wordlist 389 | wordlist: 390 | @echo "Installing standard wordlists" 391 | apt-get install -y wordlists 392 | cd /usr/share/wordlists/ && gunzip rockyou.txt.gz 393 | @echo "Downloading wordlists for WPA/WPA2 brute" 394 | git clone https://github.com/kennyn510/wpa2-wordlists /usr/share/wordlists/wpa2-wordlists 395 | ################################## WPA ######################################## 396 | 397 | ################################## WPS ######################################## 398 | ##: reaver - install fresh version of reaver-wps-fork-t6x * 399 | reaver: 400 | # @if [ -e /usr/bin/reaver ]; then \ 401 | # @echo "Trying to remove original reaver-wps"; \ 402 | # sudo dpkg -r --force-depends reaver; \ 403 | # fi; 404 | @echo "Installing reaver-wps-fork-t6x from github" 405 | $(call gitclone,https://github.com/t6x/reaver-wps-fork-t6x) 406 | cd $(repo)/src/ && ./configure --prefix=$(PREFIX) && make && make install 407 | 408 | ##: reaver-spoof - install reaver-spoof with MAC spoof support * 409 | reaver-spoof: 410 | $(call gitclone,https://github.com/gabrielrcouto/reaver-wps) 411 | # cd $(repo)/src/ && ./configure --prefix=$(PREFIX) && make && make install 412 | cd $(repo)/src/ && ./configure && make && make install 413 | mv /usr/local/bin/reaver /usr/local/bin/reaver-spoof 414 | 415 | ##: pixiewps - install fresh pixiewps from Github * 416 | pixiewps: 417 | @echo "Trying to remove original pixiewps" 418 | # sudo dpkg -r --force-depends pixiewps 419 | $(call gitclone,https://github.com/wiire/pixiewps) 420 | cd $(repo)/src/ && make && make install 421 | 422 | ##: penetrator - install penetrator from source * 423 | penetrator: 424 | $(call gitclone,https://github.com/xXx-stalin-666-money-xXx/penetrator-wps) 425 | cd $(repo) && ./install.sh; 426 | 427 | ##: wpsik - install wpsik - WPS info gathering tool * 428 | wpsik: 429 | @echo "Installling wpsik" 430 | pip install "git+https://github.com/0x90/wpsik#egg=wpsik" 431 | 432 | ##TODO: add bully 433 | ################################# WPS ########################################## 434 | 435 | ############################### autopwn ######################################## 436 | ##: wifite - install correct version of wifite * 437 | wifite: deps reaver pixiewps 438 | $(call gitclone,https://github.com/derv82/wifite) 439 | install -m 755 $(repo)/wifite.py /usr/bin/wifite-old 440 | $(call gitclone,https://github.com/aanarchyy/wifite-mod-pixiewps) 441 | install -m 755 $(repo)/wifite-ng /usr/bin/wifite-ng 442 | 443 | ##: autopixiewps - install autopwner script for pixiewps * 444 | autopixiewps: 445 | pip install "git+https://github.com/0x90/AutoPixieWps#egg=AutoPixieWps" 446 | 447 | ##: autoreaver - install autoreaver * 448 | autoreaver: 449 | apt-get install -y lshw 450 | @if [ ! -d /usr/share/auto-reaver ]; then \ 451 | git clone https://github.com/DominikStyp/auto-reaver /usr/share/auto-reaver \ 452 | fi; 453 | 454 | wpsbreak: 455 | @if [ ! -d /usr/share/HT_WPS-Break ]; then \ 456 | git clone https://github.com/radi944/HT_WPS-Break /usr/share/HT_WPS-Break \ 457 | fi; 458 | 459 | autowps: 460 | @if [ ! -d /usr/share/wifiAutoWPS ]; then \ 461 | git clone https://github.com/arnaucode/wifiAutoWPS /usr/share/wifiAutoWPS \ 462 | fi; 463 | 464 | airgeddon: deps reaver pixiewps 465 | apt-get install -y crunch isc-dhcp-server sslstrip lighttpd 466 | git clone https://github.com/v1s1t0r1sh3r3/airgeddon.git /usr/share/airgeddon 467 | chmod +x /usr/share/airgeddon/airgeddon.sh 468 | ln -s /usr/share/airgeddon/airgeddon.sh /usr/bin/airgeddon 469 | 470 | fluxion: 471 | @echo "Installing fluxion dependencies" 472 | sudo apt-get install -y isc-dhcp-server lighttpd macchanger php-cgi hostapd bully rfkill \ 473 | zenity psmisc gawk curl nmap php-cgi lua-lpeg 474 | $(call gitclone,https://github.com/deltaxflux/fluxion) 475 | cd $(repo) && ./Installer.sh 476 | 477 | atear: 478 | @echo "Installing AtEar dependencies" 479 | apt-get install -y aircrack-ng tshark hostapd python-dev python-flask python-paramiko \ 480 | python-psycopg2 python-pyodbc python-sqlite 481 | git clone https://github.com/NORMA-Inc/AtEar.git /usr/share/AtEar/ 482 | cd /usr/share/AtEar/install.sh && sudo chmod +x install.sh && sudo ./install.sh 483 | 484 | # TODO: Add soft 485 | # https://github.com/derv82/wifite2 486 | # https://github.com/esc0rtd3w/wifi-hacker 487 | # https://github.com/vnik5287/wpa-autopwn 488 | # https://github.com/adelashraf/cenarius 489 | # https://github.com/esc0rtd3w/wifi-hacker 490 | # https://github.com/vnik5287/wpa-autopwn 491 | # https://github.com/adelashraf/cenarius 492 | ################################ all in one ################################### 493 | 494 | ################################### recon ##################################### 495 | ##: wifi-recon - install tools fot WiFi reconnaissance * 496 | wifi-recon: 497 | @echo "Installing WRAITH: Wireless Reconnaissance And Intelligent Target Harvesting" 498 | pip install 'git+https://github.com/wraith-wireless/wraith#egg=wraith' 499 | # https://github.com/blaa/WifiStalker 500 | @echo "Installing WIG" 501 | pip install pcapy impacket 502 | # https://github.com/6e726d/WIG 503 | @echo "Installing Snoopy-NG" 504 | # https://github.com/sensepost/snoopy-ng 505 | @echo "Installing wifi-radar" 506 | # pip install scapy netaddr git+https://github.com/pingflood/pythonwifi.git 507 | # https://github.com/stef/wireless-radar 508 | pip install wireless-radar 509 | setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/python2.7 510 | 511 | ##: wifi-ids - install IDS/IPS for WiFi * 512 | wifi-ids: 513 | @echo "Installing WAIDPS" 514 | pip install "git+https://github.com/0x90/waidps#egg=waidps" 515 | # pip install pycrypto 516 | # https://github.com/SYWorks/waidps 517 | @echo "Installing wireless-ids" 518 | # https://github.com/SYWorks/wireless-ids 519 | @echo "Installing WiWo" 520 | # https://github.com/CoreSecurity/wiwo 521 | ################################### recon ##################################### 522 | 523 | ################################## hotspot ##################################### 524 | ##: hotspotd - install hotspotd for easy AP configuration * 525 | hotspotd: 526 | @echo "Installing hotspotd.." 527 | $(call gitclone,https://github.com/0x90/hotspotd) 528 | cd $(repo) && sudo python2 setup.py install 529 | # https://github.com/oblique/create_ap 530 | 531 | wifipumpkin: 532 | git clone https://github.com/P0cL4bs/WiFi-Pumpkin.git ${TMPDIR}/WiFi-Pumpkin 533 | cd ${TMPDIR}/WiFi-Pumpkin && chmod +x installer.sh && ./installer.sh --install 534 | 535 | createap: 536 | @echo "Installing create_ap.." 537 | $(call gitclone,https://github.com/oblique/create_ap) 538 | cd $(repo)/create_ap && sudo make install 539 | 540 | linset: 541 | apt-get install -y isc-dhcp-server lighttpd macchanger php5-cgi macchanger-gtk hostapd 542 | git clone https://github.com/vk496/linset 543 | cd linset && chmod +x linset && ./linset 544 | 545 | rogueap-deps: 546 | apt-get install -y dnsmasq cupid-wpasupplicant hostapd mana-toolkit cupid-hostapd freeradius-wpe hostapd-wpe 547 | 548 | ## TODO: add soft 549 | # https://github.com/wouter-glasswall/rogueap 550 | # https://github.com/xdavidhu/mitmAP 551 | # https://github.com/entropy1337/infernal-twin 552 | # https://github.com/Nick-the-Greek/Aerial 553 | # https://github.com/zackiles/Rspoof 554 | # https://github.com/baggybin/LokiPi 555 | ################################## RogueAP ##################################### 556 | 557 | ################################# Spectral ##################################### 558 | ##: wireless-spectral - install spectral scan tools * 559 | speccy: 560 | git clone https://github.com/bcopeland/speccy ${TMPDIR}/speccy 561 | 562 | ath9k-spectral-scan: 563 | git clone https://github.com/kazikcz/ath9k-spectral-scan ${TMPDIR}/ath9k-spectral-scan 564 | # TODO: https://github.com/terbo/sigmon 565 | # TODO: https://github.com/s7jones/Wifi-Signal-Plotter 566 | ################################# Spectral ##################################### 567 | 568 | ################################## Kernel ###################################### 569 | ##: wifi-kernel - install EXPERIMENTAL kernel for 80211 debug * 570 | wifi-kernel: 571 | @echo "Installing kernel source dependencies" 572 | @if [ ! -d /usr/src/linux-source-4.8 ]; then \ 573 | @echo "Unpacking kernel"; \ 574 | cd /usr/src/ && unxz linux-source-4.8.tar.xz && tar xvf linux-source-4.8.tar;\ 575 | fi; 576 | @echo "Configuring kernel.." 577 | cp /boot/config-4.8.0-kali1-amd64 /usr/src/linux-source-4.8/.config 578 | scripts/config --disable CC_STACKPROTECTOR_STRONG 579 | @echo "Applying kernel patches" 580 | # http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8-rc2/0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch 581 | patch -p1 -d /usr/src/linux-source-4.8 < patches/0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch 582 | @echo "Building kernel package" 583 | export CONCURRENCY_LEVEL=$(cat /proc/cpuinfo | grep processor | wc -l) 584 | make-kpkg clean 585 | fakeroot make-kpkg kernel_image 586 | 587 | @echo "Install the Modified Kernel" 588 | dpkg -i ../linux-image-3.14.5_3.14.5-10.00.Custom_amd64.deb 589 | update-initramfs -c -k 3.14.5 590 | update-grub2 591 | ################################## Kernel ##################################### 592 | 593 | ################################## ModWiFi #################################### 594 | modwifi-dependencies: 595 | @echo "Installing modwifi dependencies" 596 | # apt-get install -y g++ libssl-dev libnl-3-dev libnl-genl-3-dev 597 | apt-get install -y kernel-package ncurses-dev fakeroot linux-source 598 | @echo "Downloading modwifi: %{MODWIFI_RELEASE}" 599 | @if [ ! -d ${TMPDIR}/modwifi ]; then \ 600 | mkdir -p ${TMPDIR}/modwifi ; \ 601 | cd ${TMPDIR}/modwifi && wget ${MODWIFI_URL} && tar -xzf modwifi-*.tar.gz ; \ 602 | else \ 603 | echo "Found downloaded modwifi release."; \ 604 | fi; 605 | 606 | modwifi-kernel: 607 | @echo "Installing modwifi kernel" 608 | git clone -b research https://github.com/vanhoefm/ ${TMPDIR}/modwifi/linux 609 | cd ${TMPDIR}/modwifi/linux && make && make install 610 | 611 | modwifi-ath9k: 612 | @echo "Installing modwifi tools" 613 | git clone -b research https://github.com/vanhoefm/modwifi-ath9k-htc ${TMPDIR}/modwifi/ath9k-htc 614 | cd ${TMPDIR}/modwifi/ath9k-htc && make && make install 615 | 616 | modwifi-backports: 617 | @echo "Installing modwifi backports dependencies" 618 | apt-get install coccinelle splatch 619 | @echo "Installing modwifi backports" 620 | git clone -b research https://github.com/vanhoefm/modwifi-backports ${TMPDIR}/modwifi/backports 621 | cd ${TMPDIR}/modwifi/backports && make && make install 622 | 623 | modwifi-drivers: 624 | @echo "Installing modwifi drivers..." 625 | cd ${TMPDIR}/modwifi/drivers && make defconfig-ath9k-debug && make && make install 626 | 627 | modwifi-firmware: 628 | @echo "Backuping ath9k_htc firmware..." 629 | cp /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw.bak 630 | cp /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw.bak 631 | @echo "Installing modwifi firmware..." 632 | cp ${TMPDIR}/modwifi/target_firmware/htc_7010.fw /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw 633 | cp ${TMPDIR}/modwifi/target_firmware/htc_9271.fw /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw 634 | 635 | modwifi-tools: 636 | @echo "Installing modwifi tools" 637 | apt-get install -y g++ libssl-dev libnl-3-dev libnl-genl-3-dev 638 | git clone -b master https://github.com/vanhoefm/modwifi-tools ${TMPDIR}/modwifi/tools 639 | mkdir -p ${TMPDIR}/modwifi/tools/build 640 | cd ${TMPDIR}/modwifi/tools/build && cmake .. && make all 641 | install ${TMPDIR}/modwifi/tools/build/channelmitm /usr/bin 642 | install ${TMPDIR}/modwifi/tools/build/constantjam /usr/bin 643 | install ${TMPDIR}/modwifi/tools/build/fastreply /usr/bin 644 | install ${TMPDIR}/modwifi/tools/build/reactivejam /usr/bin 645 | ################################## modwifi ###################################### 646 | 647 | ################################ bluetooth ##################################### 648 | ##: bluetooth - install bluetooth hacking tools * 649 | bluetooth: 650 | @echo "installing deps for bluetooth hacking" 651 | apt-get install -y anyremote redfang spooftooph python-bluez obexfs bluewho btscanner \ 652 | bluelog libbluetooth-dev spectools libncurses-dev libpcre3-dev spooftooph sakis3g ubertooth \ 653 | gpsd bluesnarfer bluez-tools bluewho wireshark wireshark-dev libwireshark-dev 654 | # TODO: add check for x86_x64 655 | # apt-get install -y libopenobex1:i386 libopenobex1-dev:i386 libbluetooth-dev:i386 656 | ################################ Bluetooth ##################################### 657 | 658 | ################################## subghz ###################################### 659 | ##: subghz - install tools for sughz bands: 433/866/915Mhz * 660 | subghz: 661 | @echo "installing ISM dependencies" 662 | apt-get install -y sdcc binutils make 663 | @echo "installing ISM hacking tools for 433/866/915Mhz" 664 | apt-get install rfcat libusb-1.0-0 python-usb 665 | ################################## subghz ###################################### 666 | 667 | ################################## nrf24 ###################################### 668 | nrf24-deps: 669 | @echo "Cloning NRF24 arsenal" 670 | $(call gitclone,https://github.com/0x90/nrf24-arsenal) 671 | @echo "installing NRF24 dependencies" 672 | apt-get install -y sdcc binutils 673 | pip install -U pip 674 | pip install -U -I pyusb 675 | pip install -U platformio 676 | # pio platform install timsp430 teensy windows_x86 nxplpc espressif32 linux_arm ststm32 microchippic32 677 | 678 | nrf24-firmware: 679 | # https://github.com/BastilleResearch/nrf-research-firmware 680 | @echo "Build research firmware for nRF24LU1+" 681 | $(MAKE) -C ${TMPDIR}/nrf24-arsenal/mousejack/nrf-research-firmware 682 | @echo "Build firmware for Crazyradio" 683 | $(MAKE) -C ${TMPDIR}/nrf24-arsenal/crazyradio-firmware 684 | # TODO: add support for Crazyradio PA via make CRPA=1 685 | # @echo "Use make nrf24-flash-research to flash proper firmware" 686 | 687 | ## Flashing the Firmware 688 | nrf24-flash: 689 | @if $(MAKE) -s -f $(THIS) .prompt-yesno message="Do you want to flash Research firmware over USB? "; then \ 690 | $(MAKE) -C ${TMPDIR}/nrf24-arsenal/mousejack/nrf-research-firmware install; \ 691 | fi; 692 | @if make .prompt-yesno message="Do you want to flash Crazyradio firmware over USB? "; then \ 693 | cd ${TMPDIR}/nrf24-arsenal/crazyradio-firmware/usbtools ; \ 694 | python ../usbtools/launchBootloader.py; \ 695 | python ../usbtools/nrfbootload.py flash bin/cradio.bin; \ 696 | fi; 697 | 698 | nrf24-flash-research: 699 | $(MAKE) -C ${TMPDIR}/nrf24-arsenal/mousejack/nrf-research-firmware install 700 | 701 | nrf24-flash-logitech: 702 | $(MAKE) -C ${TMPDIR}/nrf24-arsenal/mousejack/nrf-research-firmware logitech_install 703 | 704 | nrf24-flash-crazyradio: 705 | cd ${TMPDIR}/nrf24-arsenal/crazyradio-firmware/usbtools && \ 706 | python launchBootloader.py && \ 707 | python nrfbootload.py flash bin/cradio.bin 708 | ################################## nrf24 ####################################### 709 | 710 | ################################## reverse ###################################### 711 | ##: reverse-deps - install dependencies for reverse engineering 712 | reverse-deps: 713 | apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 714 | 715 | ##: reverse-android - install tools for reverse Android engineering 716 | reverse-android: dev-android dev-java 717 | apt-get install -y abootimg smali android-sdk apktool dex2jar 718 | 719 | ##: reverse-firmware - install firmware RE/MOD tools 720 | reverse-firmware: 721 | apt-get install firmware-mod-kit -y 722 | @echo "install sasquatch to extract non-standard SquashFS images" 723 | $(call gitclone,https://github.com/devttys0/sasquatch) 724 | cd $(repo) && ./build.sh # make && sudo make install 725 | @echo "installing binwalk" 726 | $(call gitclone,https://github.com/devttys0/binwalk) 727 | cd $(repo) && y| ./deps.sh && pip install . 728 | @echo "installing firmadyne" 729 | $(call gitclone,https://github.com/firmadyne/firmadyne) 730 | @echo "installing firmwalker" 731 | $(call gitclone,https://github.com/craigz28/firmwalker) 732 | 733 | ##: reverse-disasm - install disassemblers for RE 734 | reverse-disasm: 735 | @apt install capstone radare2 -y 736 | 737 | ##: reverse-debug - install debuggers for RE 738 | reverse-debug: 739 | @apt install gdb voltron frida -y 740 | 741 | ##: reverse-avatar - install Avatar symbol execution 742 | reverse-avatar: 743 | @echo "install all build-deps" 744 | apt-get build-dep qemu llvm 745 | apt-get install -y liblua5.1-dev libsdl1.2-dev libsigc++-2.0-dev binutils-dev python-docutils python-pygments nasm 746 | @echo "Get the source code from github" 747 | $(call gitclone,https://github.com/eurecom-s3/s2e) 748 | @echo "It will take some time to build..." 749 | cd $(repo) && mkdir build && cd build && make -j -f ../s2e/Makefile 750 | @echo "installing Avatar module from github" 751 | # http://llvm.org/devmtg/2014-02/slides/bruno-avatar.pdf 752 | pip3 install git+https://github.com/eurecom-s3/avatar-python.git#egg=avatar 753 | # install all build-deps 754 | apt-get build-dep openocd 755 | git clone --recursive git://git.code.sf.net/p/openocd/code $(TMPDIR)/openocd 756 | cd $(TMPDIR)/openocd && autoreconf -i && ./configure --prefix=$(PREFIX) && make -j && make install 757 | ################################## reverse ###################################### 758 | 759 | 760 | ################################# hardware ##################################### 761 | diy: 762 | apt-get install -y python-rpi.gpio python-smbus i2c-tools 763 | pip install spidev 764 | 765 | ##: hardware - install generic hardware hacking tools 766 | hardware-generic: deps dev 767 | @echo "installing hardware hacking tools" 768 | apt-get install -y ftdi-eeprom libftdi1 python-ftdi1 python3-ftdi1 minicom \ 769 | python-serial cutecom libftdi-dev skyeye flashrom libusb-1.0-0-dev \ 770 | arduino esptool # openocd 771 | 772 | ##: hardware-signal - install signal analysis tools 773 | hardware-signal: 774 | # TODO: OLS install 775 | apt-get install -y libsigrok0-dev sigrok-cli libsigrokdecode0-dev autoconf-archive \ 776 | libglib2.0-dev libglibmm-2.4-dev libzip-dev check default-jdk libqt4-dev libboost-dev \ 777 | libboost-system-dev libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev \ 778 | libboost-filesystem-dev 779 | $(call gitclone,git://sigrok.org/libserialport) 780 | cd $(repo) && ./autogen.sh && ./configure && make && make install 781 | $(call gitclone,git://sigrok.org/libsigrok) 782 | cd $(repo) && ./autogen.sh && ./configure && make && make install 783 | $(call gitclone,git://sigrok.org/pulseview) 784 | cd $(repo) && cmake . && make && make install 785 | ################################# hardware ##################################### 786 | 787 | ################################# summary ###################################### 788 | #: deps - install basic dependecies and common tools * 789 | deps: archivers common 790 | #: dev-all - install ALL development tools * 791 | dev-all: deps dev-vcs dev-python dev-build dev-crypto dev-network dev-ide dev-java dev-crossdev 792 | #: dev-mini - install ALL development tools * 793 | dev-mini: deps dev-vcs dev-python dev-build dev-crypto dev-network 794 | #: wifi-deauth - tools for 80211 deauth: wifijammer, zizzania * 795 | wifi-deauth: wifijammer zizzania 796 | #: wifi-wpa - isetup ALL attacks on WPA/WPA2/WPA-Enterprise * 797 | wifi-wpa: wifi-deauth wifite airgeddon handshaker 798 | #: wifi-wps - install ALL WPS pwning tools and scripts * 799 | wifi-wps: penetrator pixiewps wpsik reaver 800 | #: wifi-all - install ALL tools for Wi-Fi hacking * 801 | wifi-all: fresh dev wifi-rogueap python-wifi wifi-autopwn wifi-wps wifi-wpa 802 | #: nrf24 - Nordic Semiconductor NRF24XXX hacking tools * 803 | nrf24: nrf24-deps nrf24-firmware 804 | #: ism - soft for unlicensed bands: 433/866/915Mhz 2.4Ghz * 805 | ism: subghz nrf24 wifi bluetooth 806 | #: reverse - install tools for RE (reverse engineering) * 807 | reverse: reverse-deps reverse-avatar 808 | #: hardware - install hardware hacking tools * 809 | hardware: hardware-generic hardware-signal 810 | #: all - install EVERYTHING from EVERY category * 811 | all: clean upgrade wireless hardware firmware 812 | ################################# summary ###################################### 813 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kali scripts 2 | 3 | Welcome to kali-scripts repository, which is created to help managing Kali Linux software installation. 4 | Scripts are in development at the moment, so many bugs are present. 5 | Please review code before launching. Feel free to commit bugs/patches. 6 | 7 | ## Contents 8 | 9 | This scripts are pretended to be used to automate installation or deployment of Kali Linux. 10 | Every script can be launched separately except helper.sh which us just a functions storage file. 11 | 12 | autoinstall.sh - install ALL in AUTO mode 13 | desktop.sh - desktop environment installation and postinstall configuration (Gnome, XFCE, KDE) 14 | dev.sh - developer tools (GCC, Python, Ruby) 15 | embedded.sh - embedded developer toolchains (MIPS, ARM) 16 | hardware.sh - stuff to deal with hardware (Arduino, OLS, Sigrok) 17 | helper.sh - misc helpful functions 18 | internet.sh - browsers (Chrome, Firefox, Chromium) and IM (Jabber, Skype) 19 | phone.sh - tools for communication with mobile phones (iOS, Android) 20 | pentest.sh - pentest tools installation script (MITMf,) 21 | postinstall.sh - common software installation and configuration (SSH, GDM, MSF, PostgreSQL) 22 | video.sh - video drivers installation script (Nvidia, AMD) 23 | vm.sh - script to install vm hypervisors or vm tools (VirtualBox, VMWare, Parallels) 24 | wireless.sh - wireless stuff (WiFi, Bluetooth, SDR) 25 | 26 | ## Makefile 27 | 28 | New version of Kali scripts is beeing developeb. Try it! 29 | ``` 30 | make 31 | make dev-mini 32 | ``` 33 | 34 | ## Docker 35 | 36 | Docker build examople: 37 | ``` 38 | docker build --squash --rm -t . 39 | ``` 40 | 41 | ## TODO 42 | 43 | Ideas and plans, things todo: 44 | - Check everything to work under Kali 2018.1 45 | - Check everything to work under Parrot 46 | - Migrate from scripts to Makefile 47 | - Use wifi-arsenal, sdr-arsenal, bluetooth-arsenal.... 48 | - Dockerfile with kali-scripts 49 | - Vagrantfile with kali-scripts 50 | 51 | 52 | https://www.offensive-security.com/kali-linux/top-10-post-install-tips/ 53 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION = "2" 6 | 7 | Vagrant.configure("2") do |config| 8 | 9 | ### KALI 10 | config.vm.define "kali", primary: true do |kali| 11 | kali.vm.network "private_network", ip: "172.16.189.5", :adapter => 2, :mac => "080027f34a5d" 12 | kali.vm.box = "Kali_vmware_2015-07-28T05:54:07Z.box" 13 | 14 | kali.vm.provider "virtualbox" do |vb| 15 | vb.gui = true 16 | end 17 | 18 | kali.vm.provider "vmware_workstation" do |vmw| 19 | vmw.gui = true 20 | end 21 | 22 | kali.vm.provider "vmware_desktop" do |vmd| 23 | vmd.gui = true 24 | end 25 | 26 | kali.vm.provider "vmware_fusion" do |vmf| 27 | vmf.gui = true 28 | end 29 | 30 | kali.vm.provider :parallels do |parallels| 31 | parallels.gui = true 32 | end 33 | 34 | kali.vm.provider "docker" do |docker| 35 | docker.gui = true 36 | docker.name = 'kali' 37 | end 38 | end 39 | 40 | end -------------------------------------------------------------------------------- /autoinstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Automatic installation script. 4 | # 5 | 6 | . desktop.sh 7 | . dev.sh 8 | . embedded.sh 9 | . hardware.sh 10 | . helper.sh 11 | . internet.sh 12 | . pentest.sh 13 | . phone.sh 14 | . postinstall.sh 15 | . video.sh 16 | . vm.sh 17 | . wireless.sh 18 | 19 | ASKMODE="AUTO" 20 | 21 | postinstall 22 | 23 | install_vm 24 | install_internet 25 | install_dev 26 | install_pentest 27 | install_embedded 28 | install_wireless 29 | install_hardware 30 | #install_desktop 31 | #install_video 32 | -------------------------------------------------------------------------------- /desktop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | . helper.sh 4 | 5 | 6 | #TODO: check bugs with dconf, add check for X11 session 7 | config_gnome(){ 8 | if ask "Do you want to tweak Gnome 3?" Y; then 9 | apt-get install -y gnome-tweak-tool nautilus-open-terminal 10 | 11 | if ask "Do you want to install some terminal changes and tweaks?" Y; then 12 | gconftool-2 --type bool --set /apps/gnome-terminal/profiles/Default/scrollback_unlimited true #Terminal -> Edit -> Profile Preferences -> Scrolling -> Scrollback: Unlimited -> Close 13 | gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_darkness 0.85611499999999996 # Not working 100%! 14 | gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_type transparent 15 | fi 16 | 17 | #TODO: add check for X11 session 18 | if ask "Enable real transparency?" Y; then 19 | gsettings set org.gnome.metacity compositing-manager true 20 | fi 21 | 22 | if ask "Do you want to change Gnome pannel settings?" Y; then 23 | gsettings set org.gnome.gnome-panel.layout toplevel-id-list "['top-panel']" 24 | dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/toplevel-id "'top-panel'" 25 | dconf write /org/gnome/gnome-panel/layout/objects/window-list/toplevel-id "'top-panel'" 26 | dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel/orientation "'top'" #"'right'" # Issue with window-list 27 | dconf write /org/gnome/gnome-panel/layout/objects/menu-bar/pack-type "'start'" 28 | dconf write /org/gnome/gnome-panel/layout/objects/menu-bar/pack-index 0 29 | dconf write /org/gnome/gnome-panel/layout/objects/window-list/pack-type "'start'" # "'center'" 30 | dconf write /org/gnome/gnome-panel/layout/objects/window-list/pack-index 5 #0 31 | dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/pack-type "'end'" 32 | dconf write /org/gnome/gnome-panel/layout/objects/clock/pack-type "'end'" 33 | dconf write /org/gnome/gnome-panel/layout/objects/user-menu/pack-type "'end'" 34 | dconf write /org/gnome/gnome-panel/layout/objects/notification-area/pack-type "'end'" 35 | dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/pack-index 1 36 | dconf write /org/gnome/gnome-panel/layout/objects/clock/pack-index 2 37 | dconf write /org/gnome/gnome-panel/layout/objects/user-menu/pack-index 3 38 | dconf write /org/gnome/gnome-panel/layout/objects/notification-area/pack-index 4 39 | fi 40 | 41 | if ask "Enable Auto hide pannels?" N; then 42 | dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel/auto-hide true 43 | fi 44 | 45 | if ask "Add top 10 tools to toolbar?" Y; then 46 | dconf load /org/gnome/gnome-panel/layout/objects/object-10-top/ << EOT 47 | [instance-config] 48 | menu-path='applications:/Kali/Top 10 Security Tools/' 49 | tooltip='Top 10 Security Tools' 50 | 51 | [/] 52 | object-iid='PanelInternalFactory::MenuButton' 53 | toplevel-id='top-panel' 54 | pack-type='start' 55 | pack-index=4 56 | EOT 57 | dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'object-10-top']/")" 58 | fi 59 | 60 | if ask "Show desktop applet?" Y; then 61 | dconf load /org/gnome/gnome-panel/layout/objects/object-show-desktop/ << EOT 62 | [/] 63 | object-iid='WnckletFactory::ShowDesktopApplet' 64 | toplevel-id='top-panel' 65 | pack-type='end' 66 | pack-index=0 67 | EOT 68 | dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'object-show-desktop']/")" 69 | fi 70 | 71 | if ask "Remove nasty notifications by installing notify-osd?" Y; then 72 | apt-get install -y notify-osd 73 | fi 74 | 75 | if ask "Fix icon top 10 shortcut icon?" Y; then 76 | convert /usr/share/icons/hicolor/48x48/apps/k.png -negate /usr/share/icons/hicolor/48x48/apps/k-invert.png 77 | #/usr/share/icons/gnome/48x48/status/security-medium.png 78 | fi 79 | 80 | if ask "Enable only two workspaces" Y; then 81 | gsettings set org.gnome.desktop.wm.preferences num-workspaces 2 #gconftool-2 --type int --set /apps/metacity/general/num_workspaces 2 #dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/instance-config/num-rows 4 82 | gsettings set org.gnome.shell.overrides dynamic-workspaces false 83 | fi 84 | 85 | if ask "Smaller title bar?" Y; then 86 | #sed -i "/title_vertical_pad/s/value=\"[0-9]\{1,2\}\"/value=\"0\"/g" /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml 87 | #sed -i 's/title_scale=".*"/title_scale="small"/g' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml 88 | gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Droid Bold 10' # 'Cantarell Bold 11' 89 | gsettings set org.gnome.desktop.wm.preferences titlebar-uses-system-font false 90 | fi 91 | 92 | if ask "Hide desktop icon?" Y; then 93 | dconf write /org/gnome/nautilus/desktop/computer-icon-visible false 94 | fi 95 | 96 | if ask "Restart GNOME panel to apply/take effect (Need to restart xserver)" Y; then 97 | #killall gnome-panel && gnome-panel& #Still need to logoff! 98 | mkdir -p ~/.config/gtk-2.0/ 99 | if [ -e ~/.config/gtk-2.0/gtkfilechooser.ini ]; then 100 | sed -i 's/^.*ShowHidden.*/ShowHidden=true/' ~/.config/gtk-2.0/gtkfilechooser.ini; 101 | else 102 | echo -e "\n[Filechooser Settings]\nLocationMode=path-bar\nShowHidden=true\nExpandFolders=false\nShowSizeColumn=true\nGeometryX=66\nGeometryY=39\nGeometryWidth=780\nGeometryHeight=618\nSortColumn=name\nSortOrder=ascending" > ~/.config/gtk-2.0/gtkfilechooser.ini; 103 | fi 104 | fi 105 | 106 | if ask "Show Hidden Files: Enabled?" Y; then 107 | dconf write /org/gnome/nautilus/preferences/show-hidden-files true 108 | fi 109 | 110 | if ask "Add bookmarks?" N; then 111 | if [ ! -e ~/.gtk-bookmarks.bkup ]; then 112 | cp -f ~/.gtk-bookmarks{,.bkup}; 113 | fi 114 | echo -e 'file:///var/www www\nfile:///usr/share apps\nfile:///tmp tmp\nfile:///usr/local/src/ src' >> ~/.gtk-bookmarks 115 | #Places -> Location: {/usr/share,/var/www/,/tmp/, /usr/local/src/} -> Bookmarks -> Add bookmark 116 | fi 117 | fi 118 | } 119 | 120 | install_kde(){ 121 | # How to install KDE Plasma Desktop Environment in Kali Linux: 122 | apt-get install kali-defaults kali-root-login desktop-base kde-plasma-desktop 123 | 124 | # How to install Netbook KDE Plasma Desktop Environment in Kali Linux: 125 | # apt-get install kali-defaults kali-root-login desktop-base kde-plasma-netbook 126 | 127 | # How to install Standard Debian selected packages and frameworks in Kali Linux: 128 | # apt-get install kali-defaults kali-root-login desktop-base kde-standard 129 | 130 | # How to install KDE Full Install in Kali Linux: 131 | # apt-get install kali-defaults kali-root-login desktop-base kde-full 132 | 133 | # How to remove KDE on Kali Linux: 134 | # apt-get remove kde-plasma-desktop kde-plasma-netbook kde-standard 135 | } 136 | 137 | # Install XFCE4 138 | install_xfce(){ 139 | apt-get install -y kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies 140 | } 141 | 142 | # Configure XFCE4 in Kali Linux 143 | config_xfce(){ 144 | # Set XFCE to as default session manager 145 | update-alternatives --config x-session-manager 146 | 147 | # 148 | mkdir -p /root/.config/xfce4/{desktop,menu,panel,xfconf,xfwm4}/ 149 | mkdir -p /root/.config/xfce4/panel/launcher-1{5,6,7,9} 150 | mkdir -p /root/.config/xfce4/xfconf/xfce-perchannel-xml/ 151 | mkdir -p /root/.themes/ 152 | 153 | # 154 | echo -e "[Wastebasket]\nrow=2\ncol=0\n\n[File System]\nrow=1\ncol=0\n\n[Home]\nrow=0\ncol=0" > /root/.config/xfce4/desktop/icons.screen0.rc 155 | echo -e "show_button_icon=true\nshow_button_label=false\nlabel=Places\nshow_icons=true\nshow_volumes=true\nmount_open_volumes=false\nshow_bookmarks=true\nshow_recent=true\nshow_recent_clear=true\nshow_recent_number=10\nsearch_cmd=" > /root/.config/xfce4/panel/places-23.rc 156 | echo -e "card=PlaybackES1371AudioPCI97AnalogStereoPulseAudioMixer\ntrack=Master\ncommand=xfce4-mixer" > /root/.config/xfce4/panel/xfce4-mixer-plugin-24.rc 157 | echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Iceweasel\nComment=Browse the World Wide Web\nGenericName=Web Browser\nX-GNOME-FullName=Iceweasel Web Browser\nExec=iceweasel %u\nTerminal=false\nX-MultipleArgs=false\nType=Application\nIcon=iceweasel\nCategories=Network;WebBrowser;\nMimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;\nStartupWMClass=Iceweasel\nStartupNotify=true\nX-XFCE-Source=file:///usr/share/applications/iceweasel.desktop" > /root/.config/xfce4/panel/launcher-15/13684522587.desktop 158 | echo -e "[Desktop Entry]\nVersion=1.0\nType=Application\nExec=exo-open --launch TerminalEmulator\nIcon=utilities-terminal\nStartupNotify=false\nTerminal=false\nCategories=Utility;X-XFCE;X-Xfce-Toplevel;\nOnlyShowIn=XFCE;\nName=Terminal Emulator\nName[en_GB]=Terminal Emulator\nComment=Use the command line\nComment[en_GB]=Use the command line\nX-XFCE-Source=file:///usr/share/applications/exo-terminal-emulator.desktop" > /root/.config/xfce4/panel/launcher-16/13684522758.desktop 159 | echo -e "[Desktop Entry]\nType=Application\nVersion=1.0\nName=Geany\nName[en_GB]=Geany\nGenericName=Integrated Development Environment\nGenericName[en_GB]=Integrated Development Environment\nComment=A fast and lightweight IDE using GTK2\nComment[en_GB]=A fast and lightweight IDE using GTK2\nExec=geany %F\nIcon=geany\nTerminal=false\nCategories=GTK;Development;IDE;\nMimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;\nStartupNotify=true\nX-XFCE-Source=file:///usr/share/applications/geany.desktop" > /root/.config/xfce4/panel/launcher-17/13684522859.desktop 160 | echo -e "[Desktop Entry]\nVersion=1.0\nName=Application Finder\nName[en_GB]=Application Finder\nComment=Find and launch applications installed on your system\nComment[en_GB]=Find and launch applications installed on your system\nExec=xfce4-appfinder\nIcon=xfce4-appfinder\nStartupNotify=true\nTerminal=false\nType=Application\nCategories=X-XFCE;Utility;\nX-XFCE-Source=file:///usr/share/applications/xfce4-appfinder.desktop" > /root/.config/xfce4/panel/launcher-19/136845425410.desktop 161 | echo -e '\n\n\n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml 162 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml 163 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml 164 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-mixer.xml 165 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml 166 | echo -e '\n\n\n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml 167 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml 168 | echo -e '\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n' > /root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml 169 | echo -e '\n\tTop 10\n\t\n\ttop10.directory\n\t\n\t\ttop10\n\t\n' > /root/.config/xfce4/menu/top10.menu 170 | sed -i 's/^enable=.*/enable=False/' /etc/xdg/user-dirs.conf 171 | 172 | # sed -i 's/^XDG_/#XDG_/; s/^#XDG_DESKTOP/XDG_DESKTOP/;' /root/.config/user-dirs.dirs 173 | # rm -rf /root/{Documents,Downloads,Music,Pictures,Public,Templates,Videos}/ 174 | #rm -r /root/.cache/sessions/* 175 | 176 | # Install Shiki-Colors-Light-Menus and gnome-brave on demand 177 | # if ask "Do you want to install Shiki-Colors-Light-Menus and gnome-brave?" Y; then 178 | # wget http://xfce-look.org/CONTENT/content-files/142110-Shiki-Colors-Light-Menus.tar.gz -O /tmp/Shiki-Colors-Light-Menus.tar.gz 179 | # tar zxf /tmp/Shiki-Colors-Light-Menus.tar.gz -C /root/.themes/ 180 | # xfconf-query -c xsettings -p /Net/ThemeName -s "Shiki-Colors-Light-Menus" 181 | # xfconf-query -c xsettings -p /Net/IconThemeName -s "gnome-brave" 182 | # fi 183 | 184 | # print_status "Enable compositing. Needed to be run with X11!" 185 | # xfconf-query -c xfwm4 -p /general/use_compositing -s true 186 | 187 | # print_status "Configure Thunar file browser (Need to re-login for effect)" 188 | # #TODO: check file existance 189 | # if [ ! -e /root/.config/Thunar/thunarrc ]; then 190 | # echo -e "[Configuration]\nLastShowHidden=TRUE" > /root/.config/Thunar/thunarrc; 191 | # else 192 | # sed -i 's/LastShowHidden=.*/LastShowHidden=TRUE/' /root/.config/Thunar/thunarrc; 193 | # fi 194 | } 195 | 196 | install_desktop(){ 197 | if ask "Do you want to install XFCE4?" N; then 198 | install_xfce 199 | 200 | if ask "Configure XFCE??" Y; then 201 | config_xfce 202 | fi 203 | fi 204 | 205 | if ask "Install KDE?" N; then 206 | install_kde 207 | fi 208 | 209 | if ask "Config GNOME?" Y; then 210 | config_gnome 211 | fi 212 | } 213 | 214 | if [ "${0##*/}" = "desktop.sh" ]; then 215 | install_desktop 216 | fi -------------------------------------------------------------------------------- /dev.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | . postinstall.sh 4 | 5 | install_jdk(){ 6 | apt-get -y install default-jdk openjdk-6-jdk 7 | apt_add_repo ppa:webupd8team/java 8 | 9 | #TODO: Can we agree the license in auto mode? 10 | apt-get install oracle-java7-installer -y 11 | } 12 | 13 | install_python(){ 14 | if ask "Install pip and other python modules" Y; then 15 | apt-get -y install bpython python-setuptools python-twisted python-shodan \ 16 | python-virtualenv python-pygments python-tornado python-sqlalchemy python-lxml python-pymongo \ 17 | python-gnuplot python-matplotlib python-pandas python-scipy \ 18 | python-requests python-gevent 19 | pip install virtualenvwrapper cookiecutter 20 | fi 21 | 22 | if ask "Install Jetbrains PyCharm Community Edition?" N; then 23 | cd /opt 24 | wget http://download-cf.jetbrains.com/python/pycharm-community-4.5.3.tar.gz 25 | tar xzvf pycharm-community-*.tar.gz 26 | rm -f pycharm-community-*.tar.gz 27 | mv pycharm-community-* pycharm-community 28 | fi 29 | } 30 | 31 | install_ruby(){ 32 | if ask "Do you want to install RVM ands set ruby-1.9.5 to default?" Y; then 33 | curl -L https://get.rvm.io | bash -s stable 34 | source /usr/local/rvm/scripts/rvm 35 | rvm install 1.9.5 && rvm use 1.9.5 --default 36 | # source /etc/profile.d/rvm.sh 37 | 38 | # This loads RVM into a shell session. 39 | #echo [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" >> ~/.bashrc 40 | echo source /usr/local/rvm/scripts/rvm >> ~/.bashrc 41 | fi 42 | 43 | if ask "Do you want to install ruby and extras?" Y; then 44 | # This tells RubyGems to not generate documentation for every library it installs. 45 | echo "gem: --no-rdoc --no-ri" > ~/.gemrc 46 | 47 | apt-get -y install ruby-full ruby-dev libpcap-ruby libpcap-dev libsp-gxmlcpp-dev libsp-gxmlcpp1 libxslt1.1 libxslt1-dev libxrandr-dev libfox-1.6-dev 48 | update-alternatives --config ruby 49 | 50 | gem install bundler risu ffi multi_json childprocess selenium-webdriver mechanize fxruby net-http-digest_auth pcaprub \ 51 | net-http-persistent nokogiri domain_name unf webrobots ntlm-http net-http-pipeline nfqueue pry colorize mechanize 52 | fi 53 | } 54 | 55 | install_dev(){ 56 | print_status "Installing development tools and environment" 57 | echo "deb http://security.debian.org/debian-security wheezy/updates main" >> /etc/apt/sources.list 58 | apt-get update -y 59 | apt-get install -y cmake cmake-data autoconf build-essential module-assistant libncurses5-dev zlib1g-dev gawk flex gettext \ 60 | gcc gcc-multilib dkms make patchutils strace wdiff linux-headers-amd64 autoconf automake libssl-dev \ 61 | kernel-package libncurses5-dev fakeroot bzip2 linux-source openssl libreadline7 libreadline-dev git-core zlib1g zlib1g-dev libssl-dev \ 62 | libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison \ 63 | libmysqlclient18 libmagickwand-6.q16-dev libmagickcore-6.q16-dev libmagick++-6.q16-dev libmagickcore-dev libmagick++-dev libmagickwand-dev \ 64 | libnetfilter-queue-dev git subversion mercurial 65 | check_success 66 | print_status "System Pre-requirements" 67 | 68 | if ask "Install i386 support? Install to compile old software!" Y; then 69 | install_32bit 70 | fi 71 | 72 | if ask "Install JDK?" Y; then 73 | install_jdk 74 | fi 75 | 76 | if ask "Install Python tools?" Y; then 77 | install_python 78 | fi 79 | 80 | if ask "Install RVM+Ruby?" Y; then 81 | install_ruby 82 | fi 83 | 84 | if ask "Install Sublime?" N; then 85 | apt_add_repo ppa:webupd8team/sublime-text-3 86 | apt-get install sublime-text-installer 87 | fi 88 | 89 | if ask "Install MinGW compiler+tools?" N; then 90 | apt-get install -y binutils-mingw-w64 gcc-mingw-w64 mingw-w64 \ 91 | mingw-w64-x86-64-dev mingw-w64-i686-dev 92 | fi 93 | } 94 | 95 | if [ "${0##*/}" = "dev.sh" ]; then 96 | install_dev 97 | fi 98 | -------------------------------------------------------------------------------- /embedded.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # TODO: add https://github.com/pieceofsummer/squashfs-tools 3 | # TODO: install from git 4 | # https://github.com/devttys0/binwalk 5 | 6 | . postinstall.sh 7 | 8 | install_sasquatch(){ 9 | print_status "Installing sasquatch dependencies" 10 | sudo apt-get install build-essential liblzma-dev liblzo2-dev zlib1g-dev 11 | 12 | cd /tmp 13 | print_status "Install sasquatch to extract non-standard SquashFS images" 14 | git clone https://github.com/devttys0/sasquatch 15 | cd sasquatch && make && sudo make install 16 | cd .. && rm -rf /tmp/sasquatch 17 | } 18 | 19 | install_binwalk(){ 20 | print_status "Installing binwalk dependencies" 21 | apt-get install python-lzma libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy python-pip 22 | 23 | print_status "Installing binwalk" 24 | pip install pyqtgraph binwalk 25 | } 26 | 27 | install_emdebian(){ 28 | # http://www.emdebian.org/crosstools.html 29 | print_status "Installing Emdebian, xapt" 30 | apt-get install emdebian-archive-keyring xapt -y 31 | apt_add_source emdebian 32 | cp -f "files/etc/emdebian.list" /etc/apt/sources.list.d/emdebian.list && apt-get update -y 33 | # echo "deb http://ftp.us.debian.org/debian/ squeeze main" > /etc/apt/sources.list.d/emdebian.list 34 | # echo "deb http://www.emdebian.org/debian/ squeeze main" >> /etc/apt/sources.list.d/emdebian.list 35 | # echo "deb http://www.emdebian.org/debian/ oldstable main" >> /etc/apt/sources.list/emdebian.list 36 | apt-get update -y 37 | 38 | print_status "Installing GCC-4.4 for mips, mipsel" 39 | #apt-get install binutils-mipsel-linux-gnu binutils-mips-linux-gnu gcc-4.4-mips-linux-gnu gcc-4.4-mipsel-linux-gnu -y 40 | apt-get install linux-libc-dev-mipsel-cross libc6-mipsel-cross libc6-dev-mipsel-cross binutils-mipsel-linux-gnu gcc-4.4-mipsel-linux-gnu g++-4.4-mipsel-linux-gnu -y 41 | apt-get install linux-libc-dev-mips-cross libc6-mips-cross libc6-dev-mips-cross binutils-mips-linux-gnu gcc-4.4-mips-linux-gnu g++-4.4-mips-linux-gnu -y 42 | 43 | #echo deb http://www.emdebian.org/debian stable main >> /etc/apt/sources.list 44 | #wget http://http.us.debian.org/debian/pool/main/g/gmp/libgmp3c2_4.3.2+dfsg-1_amd64.deb -O /tmp/libgmp3c2_4.3.2+dfsg-1_amd64.deb 45 | #dpkg -i /tmp/libgmp3c2_4.3.2+dfsg-1_amd64.deb 46 | # apt-get install g++-4.4-arm-linux-gnueabi -y 47 | } 48 | 49 | install_linaro_toolchains(){ 50 | # http://elinux.org/Toolchains 51 | print_status "Installing Linaro toolchains..." 52 | mkdir -p /root/toolchains/arm 53 | cd /root/toolchains/arm 54 | git clone https://github.com/offensive-security/gcc-arm-linux-gnueabihf-4.7 55 | git clone https://github.com/offensive-security/gcc-arm-eabi-linaro-4.6.2 56 | 57 | print_status "To use Linaro toolchains do this." 58 | print_status "export ARCH=arm" 59 | print_status "export CROSS_COMPILE=/root/toolchains/arm" 60 | print_status "gcc something.c" 61 | } 62 | 63 | install_embedded(){ 64 | print_status "Installing archivers and other dependecies" 65 | install_archivers 66 | apt-get -y install mtd-utils openjdk-6-jdk cramfsprogs cramfsswap squashfs-tools 67 | 68 | if ask "Install Emdebian crossdev?" Y; then 69 | install_emdebian 70 | fi 71 | 72 | if ask "Install sasquatch?" Y; then 73 | install_sasquatch 74 | fi 75 | 76 | if ask "Install binwalk and dependencies?" Y; then 77 | install_binwalk 78 | fi 79 | 80 | if ask "Install Linaro toolchains?" N; then 81 | install_linaro_toolchains 82 | fi 83 | } 84 | 85 | if [ "${0##*/}" = "embedded.sh" ]; then 86 | install_embedded 87 | fi 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /files/bin/add-apt-repository.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ $# -eq 1 ] 3 | NM=`uname -a && date` 4 | NAME=`echo $NM | md5sum | cut -f1 -d" "` 5 | then 6 | ppa_name=`echo "$1" | cut -d":" -f2 -s` 7 | if [ -z "$ppa_name" ] 8 | then 9 | echo "PPA name not found" 10 | echo "Utility to add PPA repositories in your debian machine" 11 | echo "$0 ppa:user/ppa-name" 12 | else 13 | echo "$ppa_name" 14 | echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu lucid main" >> /etc/apt/sources.list 15 | apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt 16 | key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3` 17 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key 18 | rm -rf /tmp/${NAME}_apt_add_key.txt 19 | fi 20 | else 21 | echo "Utility to add PPA repositories in your debian machine" 22 | echo "$0 ppa:user/ppa-name" 23 | fi 24 | -------------------------------------------------------------------------------- /files/etc/emdebian.list: -------------------------------------------------------------------------------- 1 | deb http://ftp.us.debian.org/debian/ squeeze main 2 | deb http://www.emdebian.org/debian/ squeeze main 3 | deb http://www.emdebian.org/debian/ oldstable main -------------------------------------------------------------------------------- /files/etc/google-chrome.list: -------------------------------------------------------------------------------- 1 | deb http://dl.google.com/linux/chrome/deb/ stable main -------------------------------------------------------------------------------- /files/etc/sources.list: -------------------------------------------------------------------------------- 1 | #Official Repo Kali linux 2 | deb http://http.kali.org/ /kali main contrib non-free 3 | deb http://http.kali.org/ /wheezy main contrib non-free 4 | 5 | deb http://http.kali.org/kali kali-dev main contrib non-free 6 | deb-src http://http.kali.org/kali kali-dev main contrib non-free 7 | 8 | deb http://http.kali.org/kali kali main contrib non-free 9 | deb-src http://http.kali.org/kali kali main contrib non-free 10 | 11 | # Security updates 12 | deb http://security.kali.org/kali-security kali/updates main contrib non-free 13 | deb-src http://security.kali.org/kali-security kali/updates main contrib non-free 14 | 15 | # Debian compatibility 16 | # deb http://http.kali.org/kali kali-dev main/debian-installer 17 | # deb http://http.kali.org/kali kali main/debian-installer 18 | 19 | # Bleeding edge repo Kali linux 20 | # deb http://repo.kali.org/kali kali-bleeding-edge main 21 | 22 | 23 | -------------------------------------------------------------------------------- /files/etc/tor.list: -------------------------------------------------------------------------------- 1 | deb http://deb.torproject.org/torproject.org wheezy main -------------------------------------------------------------------------------- /files/etc/ubuntuzilla.list: -------------------------------------------------------------------------------- 1 | deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main -------------------------------------------------------------------------------- /files/etc/virtualbox.list: -------------------------------------------------------------------------------- 1 | deb http://download.virtualbox.org/virtualbox/debian wheezy contrib -------------------------------------------------------------------------------- /files/home/bash_aliases: -------------------------------------------------------------------------------- 1 | alias cd..="cd .." 2 | alias ..="cd.." 3 | 4 | alias grep="grep --color=auto" 5 | alias fgrep="fgrep --color=auto" 6 | alias egrep="egrep --color=auto" 7 | 8 | alias psg="ps aux | grep " 9 | 10 | alias search="apt-cache search" 11 | alias ins="apt-get install" 12 | alias rem="apt-get purge" 13 | alias upd="apt-get update" 14 | alias upg="apt-get upgrade" 15 | alias upup="apt-get update -y && sudo apt-get upgrade -y" 16 | 17 | alias pbcopy='xsel --clipboard --input' 18 | alias pbpaste='xsel --clipboard --output' 19 | 20 | alias ls="ls -halG --color=auto" 21 | alias l="ls -hl --color=auto" 22 | alias edit-aliases="vi ~/.bash_aliases && source ~/.bash_aliases" 23 | 24 | alias sqlm='sqlmap -o --batch --exclude-sysdbs --random-agent' 25 | alias myaddy='dig +short -x `curl ifconfig.me`' 26 | 27 | ### Extract file, example. "ex package.tar.bz2" 28 | ex() { 29 | if [[ -f $1 ]]; then 30 | case $1 in 31 | *.tar.bz2) tar xjf $1 ;; 32 | *.tar.gz) tar xzf $1 ;; 33 | *.bz2) bunzip2 $1 ;; 34 | *.rar) rar x $1 ;; 35 | *.gz) gunzip $1 ;; 36 | *.tar) tar xf $1 ;; 37 | *.tbz2) tar xjf $1 ;; 38 | *.tgz) tar xzf $1 ;; 39 | *.zip) unzip $1 ;; 40 | *.Z) uncompress $1 ;; 41 | *.7z) 7z x $1 ;; 42 | *) echo $1 cannot be extracted ;; 43 | esac 44 | else 45 | echo $1 is not a valid file 46 | fi 47 | } -------------------------------------------------------------------------------- /files/home/screenrc: -------------------------------------------------------------------------------- 1 | # Don't display the copyright page 2 | startup_message off 3 | 4 | # tab-completion flash in heading bar 5 | vbell off 6 | 7 | # keep scrollback n lines 8 | defscrollback 1000 9 | 10 | # hardstatus is a bar of text that is visible in all screens 11 | hardstatus on 12 | hardstatus alwayslastline 13 | hardstatus string '%{gk}%{G}%H %{g}[%{Y}%l%{g}] %= %{wk}%?%-w%?%{=b kR}(%{W}%n %t%?(%u)%?%{=b kR})%{= kw}%?%+w%?%?%= %{g} %{Y} %Y-%m-%d %C%a %{W}' 14 | 15 | # title bar 16 | termcapinfo xterm ti@:te@ 17 | 18 | # default windows (syntax: screen -t label order command) 19 | screen -t bash1 0 20 | screen -t bash2 1 21 | 22 | # select the default window 23 | select 1 -------------------------------------------------------------------------------- /hardware.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | . helper.sh 4 | 5 | install_arduino(){ 6 | apt-get install -y arduino 7 | } 8 | 9 | install_uart_tools(){ 10 | apt-get install -y ftdi-eeprom libftdi1 python-ftdi minicom python-serial cutecom libftdi-dev python-ftdi -y 11 | } 12 | 13 | install_onchip(){ 14 | apt-get install -y skyeye openocd 15 | } 16 | 17 | install_rom_tools(){ 18 | apt-get install -y flashrom 19 | } 20 | 21 | install_signal_analysis() 22 | { 23 | # TODO: OLS install 24 | apt-get install -y libsigrok0-dev sigrok libsigrokdecode0-dev git-core gcc g++ make autoconf autoconf-archive \ 25 | automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev libusb-1.0-0-dev libftdi-dev check \ 26 | doxygen python-numpy python-dev python-gi-dev python-setuptools swig default-jdk 27 | 28 | cd /tmp && mkdir sigrok 29 | cd sigrok 30 | 31 | #libserial 32 | git clone git://sigrok.org/libserialport 33 | cd libserialport 34 | ./autogen.sh &&./configure && make && make install 35 | cd .. 36 | 37 | #SIGROK 38 | git clone git://sigrok.org/libsigrok 39 | cd libsigrok 40 | ./autogen.sh &&./configure && make && make install 41 | cd .. 42 | 43 | # SIGROK GUI dependencies 44 | sudo apt-get install cmake libqt4-dev libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev 45 | apt-get install git-core g++ make cmake libtool pkg-config \ 46 | libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev\ 47 | libboost-filesystem-dev libboost-system-dev 48 | 49 | # SIGROK GUI 50 | git clone git://sigrok.org/pulseview 51 | cd pulseview 52 | ./autogen.sh &&./configure && make && make install 53 | cd ../.. 54 | 55 | rm -rf /tmp/sigrok 56 | } 57 | 58 | install_avatar(){ 59 | print_status "Install all build-dependencies" 60 | apt-get build-dep qemu llvm 61 | apt-get install build-essential subversion git gettext liblua5.1-dev libsdl1.2-dev libsigc++-2.0-dev binutils-dev python-docutils python-pygments nasm 62 | 63 | print_status "Get the source code from github" 64 | git clone https://github.com/eurecom-s3/s2e.git 65 | 66 | print_status "It will take some time to build..." 67 | mkdir build 68 | cd build 69 | make -j -f ../s2e/Makefile 70 | 71 | print_status "Installing Python3 and dependencies" 72 | sudo apt-get install -y python3 python3-pip 73 | 74 | print_status "Installing Avatar module from github" 75 | # http://llvm.org/devmtg/2014-02/slides/bruno-avatar.pdf 76 | sudo pip-3.2 install git+https://github.com/eurecom-s3/avatar-python.git#egg=avatar 77 | 78 | if ask "Do you want to install OpenOCD patched version?" Y; then 79 | # Install all build-dependencies 80 | apt-get build-dep openocd 81 | 82 | # Get the source code from github 83 | git clone git://git.code.sf.net/p/openocd/code openocd 84 | cd openocd 85 | git submodule init && git submodule update 86 | 87 | # Configure OpenOCD (make sure to enable the driver for your adapter) 88 | autoreconf -i && ./configure 89 | 90 | # Build and install 91 | make -j && make install 92 | fi 93 | } 94 | 95 | install_fpga(){ 96 | print_status "Installling tools for FPGA..." 97 | } 98 | 99 | install_hardware(){ 100 | if ask "Install tools for Arduino?" Y; then 101 | install_arduino 102 | fi 103 | 104 | if ask "Install tools for UART, FTDI libs?" Y; then 105 | install_uart_tools 106 | fi 107 | 108 | if ask "Install tool for onchip debugging and emulation" Y; then 109 | if ask "Do you want to install Avatar?" N; then 110 | install_avatar 111 | else 112 | install_onchip 113 | fi 114 | fi 115 | 116 | if ask "Install tools for signal analysis (OLS,)?" Y; then 117 | install_signal_analysis 118 | fi 119 | 120 | if ask "Install tools for FPGA?" Y; then 121 | install_fpga 122 | fi 123 | } 124 | 125 | if [ "${0##*/}" = "hardware.sh" ]; then 126 | install_hardware 127 | fi 128 | -------------------------------------------------------------------------------- /helper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | print_status(){ 4 | echo -e "\x1B[01;34m[*]\x1B[0m $1" 5 | } 6 | 7 | print_good(){ 8 | echo -e "\x1B[01;32m[*]\x1B[0m $1" 9 | } 10 | 11 | print_error(){ 12 | echo -e "\x1B[01;31m[*]\x1B[0m $1" 13 | } 14 | 15 | print_notification(){ 16 | echo -e "\x1B[01;33m[*]\x1B[0m $1" 17 | } 18 | 19 | apt_upgrade(){ 20 | apt-get update && apt-get upgrade -y 21 | } 22 | 23 | apt_super_upgrade(){ 24 | apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y 25 | } 26 | 27 | apt_cleanup(){ 28 | apt-get -y autoremove && apt-get -y clean 29 | } 30 | 31 | install_add_apt_repo(){ 32 | cp files/bin/add-apt-repository.sh /usr/sbin/add-apt-repository 33 | chmod o+x /usr/sbin/add-apt-repository 34 | } 35 | 36 | apt_echo_sources(){ 37 | echo "$1" > "/etc/apt/sources.list.d/$2.list" 38 | } 39 | 40 | apt_add_source(){ 41 | cp -f "files/etc/$1.list" "/etc/apt/sources.list.d/$1.list" && apt-get update -y 42 | } 43 | 44 | apt_add_repo(){ 45 | if [ ! -f /usr/sbin/add-apt-repository ]; then 46 | print_notification "File /usr/sbin/add-apt-repository not found! Installing..." 47 | install_add_apt_repo 48 | fi 49 | add-apt-repository "$1" && apt-get update -y 50 | } 51 | 52 | apt_add_key(){ 53 | wget -q "$1" -O- | sudo apt-key add - 54 | } 55 | 56 | check_euid(){ 57 | # print_status "Checking for root privs." 58 | if [[ $EUID -ne 0 ]]; then 59 | print_error "This script must be ran with sudo or root privileges, or this isn't going to work." 60 | exit 1 61 | # else 62 | # print_good "w00t w00t we are root!" 63 | fi 64 | } 65 | 66 | command_exists() { 67 | type "$1" &> /dev/null ; 68 | } 69 | 70 | check_success(){ 71 | if [ $? -eq 0 ]; then 72 | print_good "Procedure successful." 73 | else 74 | print_error "Procedure unsucessful! Exiting..." 75 | exit 1 76 | fi 77 | } 78 | 79 | ask(){ 80 | if [ "$ASKMODE" = "WIZARD" ]; then 81 | while true; do 82 | if [ "${2:-}" = "Y" ]; then 83 | prompt="Y/n" 84 | default=Y 85 | elif [ "${2:-}" = "N" ]; then 86 | prompt="y/N" 87 | default=N 88 | else 89 | prompt="y/n" 90 | default= 91 | fi 92 | 93 | read -p "$1 [$prompt] " REPLY 94 | if [ -z "$REPLY" ]; then 95 | REPLY=${default} 96 | fi 97 | 98 | case "$REPLY" in 99 | Y*|y*) return 0 ;; 100 | N*|n*) return 1 ;; 101 | esac 102 | done 103 | elif [ "$ASKMODE" = "YES" ]; then 104 | return 1; 105 | elif [ "$ASKMODE" = "NO" ]; then 106 | return 0; 107 | elif [ "$ASKMODE" = "AUTO" ]; then 108 | case "$default" in 109 | Y*|y*) return 0 ;; 110 | N*|n*) return 1 ;; 111 | esac 112 | fi 113 | } 114 | 115 | pause(){ 116 | read -sn 1 -p "Press any key to continue..." 117 | } 118 | 119 | read_default(){ 120 | return read -e -p "$1" -i "$2" 121 | } 122 | 123 | write_with_backup(){ 124 | if [ -f $2 ]; then 125 | print_notification "$2 found, backuping to $2.bak" 126 | cp "$2" "$2.bak" 127 | fi 128 | cp -f "$1" "$2" 129 | 130 | } 131 | 132 | show_help(){ 133 | echo "Usage: cmd [-h] [-y] [-n] [-a] [-u]" 134 | echo "-h - help message" 135 | echo "-y - yes to all dialog questions" 136 | echo "-n - no to all questions" 137 | echo "-a - auto mode: choose default" 138 | echo "-u - update scripts" 139 | } 140 | 141 | # Main 142 | ASKMODE="WIZARD" 143 | while getopts ":ahnuyv" opt; do 144 | case ${opt} in 145 | h|\?) show_help;; 146 | a) ASKMODE="AUTO";; 147 | n) ASKMODE="NO";; 148 | y) ASKMODE="YES";; 149 | u) git pull;; 150 | v) verbose=1;; 151 | esac 152 | done 153 | 154 | check_euid 155 | -------------------------------------------------------------------------------- /internet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Browsers, TOR and IM 3 | . helper.sh 4 | 5 | install_chrome(){ 6 | print_status "Adding Google Chrome to APT..." 7 | # wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 8 | # echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list 9 | # apt-get update -y && apt-get install google-chrome-stable -y 10 | apt_add_key "https://dl-ssl.google.com/linux/linux_signing_key.pub" 11 | # apt_add_sources "deb http://dl.google.com/linux/chrome/deb/ stable main" "google-chrome" 12 | apt_add_source "google-chrome" 13 | apt-get install google-chrome-stable -y 14 | 15 | print_status "Patching Google Chrome to run as root.." 16 | cp /usr/bin/google-chrome /usr/bin/google-chrome.old && sed -i 's/^\(exec.*\)$/\1 --user-data-dir/' /usr/bin/google-chrome 17 | } 18 | 19 | install_chromium(){ 20 | apt-get install -y chromium 21 | echo "# simply override settings above" >> /etc/chromium/default 22 | echo 'CHROMIUM_FLAGS="--password-store=detect --user-data-dir"' >> /etc/chromium/default 23 | } 24 | 25 | install_firefox(){ 26 | apt-get remove iceweasel 27 | apt_add_source "ubuntuzilla" 28 | # echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" > /etc/apt/sources.list.d/ubuntuzilla.list 29 | apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29 30 | apt-get update -y && apt-get install firefox-mozilla-build -y 31 | } 32 | 33 | install_browsers(){ 34 | if ask "Do you want to install Chromium (and allowing run as root) ?" Y; then 35 | install_chromium 36 | fi 37 | 38 | if ask "Do you want to install Google Chrome (and allowing run as root) ?" Y; then 39 | install_chrome 40 | fi 41 | 42 | if ask "Do you want to install Firefox?" Y; then 43 | install_firefox 44 | fi 45 | 46 | if ask "Do you want to install the Flash player?" Y; then 47 | apt-get -y install flashplugin-nonfree 48 | fi 49 | 50 | if ask "Do you want to install OWASP Mantra browser?" Y; then 51 | apt-get install -y owasp-mantra-ff 52 | fi 53 | } 54 | 55 | install_skype(){ 56 | dpkg --add-architecture i386 && apt-get update -y 57 | 58 | cd /tmp 59 | wget -O skype-install.deb http://www.skype.com/go/getskype-linux-deb 60 | dpkg -i skype-install.deb 61 | apt-get -f install 62 | 63 | apt-get install -y gdebi 64 | # apt-get -f install 65 | apt-get autoclean 66 | } 67 | 68 | install_tor(){ 69 | apt-get install tor vidalia privoxy -y 70 | echo forward-socks4a / 127.0.0.1:9050 . >> /etc/privoxy/config 71 | 72 | mkdir -p /var/run/tor 73 | chown debian-tor:debian-tor /var/run/tor 74 | chmod 02750 /var/run/tor 75 | 76 | # /etc/init.d/tor start 77 | # /etc/init.d/privoxy start 78 | #USE SOCKS PROXY 127.0.0.1:9059 79 | } 80 | 81 | install_internet(){ 82 | if ask "Do you want to install some browsers (Chrome, Firefox, OWASP Mantra)?" N; then 83 | install_browsers 84 | fi 85 | 86 | if ask "Do you want to install TOR?" N; then 87 | install_tor 88 | fi 89 | 90 | if ask "Do you want to install Skype?" N; then 91 | install_skype 92 | fi 93 | 94 | if ask "Do you want to install pidgin and an OTR chat plugin?" N; then 95 | apt-get -y install pidgin pidgin-otr 96 | fi 97 | 98 | if ask "Install Dropbox? " N; then 99 | apt-get install -y nautilus-dropbox 100 | fi 101 | } 102 | 103 | if [ "${0##*/}" = "internet.sh" ]; then 104 | install_internet 105 | fi -------------------------------------------------------------------------------- /patches/0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch: -------------------------------------------------------------------------------- 1 | From 1577157a0f2f49e1231653c5d20fa5a2d092d93a Mon Sep 17 00:00:00 2001 2 | From: Steve Beattie 3 | Date: Tue, 10 May 2016 12:44:04 +0100 4 | Subject: [PATCH 2/4] UBUNTU: SAUCE: (no-up) disable -pie when gcc has it 5 | enabled by default 6 | 7 | In Ubuntu 16.10, gcc's defaults have been set to build Position 8 | Independent Executables (PIE) on amd64 and ppc64le (gcc was configured 9 | this way for s390x in Ubuntu 16.04 LTS). This breaks the kernel build on 10 | amd64. The following patch disables pie for x86 builds (though not yet 11 | verified to work with gcc configured to build PIE by default i386 -- 12 | we're not planning to enable it for that architecture). 13 | 14 | The intent is for this patch to go upstream after expanding it to 15 | additional architectures where needed, but I wanted to ensure that 16 | we could build 16.10 kernels first. I've successfully built kernels 17 | and booted them with this patch applied using the 16.10 compiler. 18 | 19 | Patch is against yakkety.git, but also applies with minor movement 20 | (no fuzz) against current linus.git. 21 | 22 | Signed-off-by: Steve Beattie 23 | [apw@canonical.com: shifted up so works in arch/ 26 | Acked-by: Tim Gardner 27 | Acked-by: Stefan Bader 28 | Signed-off-by: Kamal Mostafa 29 | --- 30 | Makefile | 6 ++++++ 31 | 1 file changed, 6 insertions(+) 32 | 33 | diff --git a/Makefile b/Makefile 34 | index 5c18baa..e342473 100644 35 | --- a/Makefile 36 | +++ b/Makefile 37 | @@ -612,6 +612,12 @@ endif # $(dot-config) 38 | # Defaults to vmlinux, but the arch makefile usually adds further targets 39 | all: vmlinux 40 | 41 | +# force no-pie for distro compilers that enable pie by default 42 | +KBUILD_CFLAGS += $(call cc-option, -fno-pie) 43 | +KBUILD_CFLAGS += $(call cc-option, -no-pie) 44 | +KBUILD_AFLAGS += $(call cc-option, -fno-pie) 45 | +KBUILD_CPPFLAGS += $(call cc-option, -fno-pie) 46 | + 47 | # The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default 48 | # values of the respective KBUILD_* variables 49 | ARCH_CPPFLAGS := 50 | -- 51 | 2.7.4 52 | 53 | -------------------------------------------------------------------------------- /patches/ath9k-htc-channels-unlock.patch: -------------------------------------------------------------------------------- 1 | diff --git a/drivers/drivers/net/wireless/ath/ath9k/common-init.c b/drivers-patched/drivers/net/wireless/ath/ath9k/common-init.c 2 | index 8b4f7fd..6effd68 100644 3 | --- a/drivers/drivers/net/wireless/ath/ath9k/common-init.c 4 | +++ b/drivers-patched/drivers/net/wireless/ath/ath9k/common-init.c 5 | @@ -23,6 +23,7 @@ 6 | .center_freq = (_freq), \ 7 | .hw_value = (_idx), \ 8 | .max_power = 20, \ 9 | + .max_power = 30, \ 10 | } 11 | 12 | #define CHAN5G(_freq, _idx) { \ 13 | @@ -30,6 +31,7 @@ 14 | .center_freq = (_freq), \ 15 | .hw_value = (_idx), \ 16 | .max_power = 20, \ 17 | + .max_power = 30, \ 18 | } 19 | 20 | /* Some 2 GHz radios are actually tunable on 2312-2732 21 | @@ -37,6 +39,26 @@ 22 | * we have calibration data for all cards though to make 23 | * this static */ 24 | static const struct ieee80211_channel ath9k_2ghz_chantable[] = { 25 | + CHAN2G(2312, 33), /* Channel -19 */ 26 | + CHAN2G(2317, 32), /* Channel -18 */ 27 | + CHAN2G(2322, 31), /* Channel -17 */ 28 | + CHAN2G(2327, 30), /* Channel -16 */ 29 | + CHAN2G(2332, 29), /* Channel -15 */ 30 | + CHAN2G(2337, 28), /* Channel -14 */ 31 | + CHAN2G(2342, 27), /* Channel -13 */ 32 | + CHAN2G(2347, 26), /* Channel -12 */ 33 | + CHAN2G(2352, 25), /* Channel -11 */ 34 | + CHAN2G(2357, 24), /* Channel -10 */ 35 | + CHAN2G(2362, 23), /* Channel -9 */ 36 | + CHAN2G(2367, 22), /* Channel -8 */ 37 | + CHAN2G(2372, 21), /* Channel -7 */ 38 | + CHAN2G(2377, 20), /* Channel -6 */ 39 | + CHAN2G(2382, 19), /* Channel -5 */ 40 | + CHAN2G(2387, 18), /* Channel -4 */ 41 | + CHAN2G(2392, 17), /* Channel -3 */ 42 | + CHAN2G(2397, 16), /* Channel -2 */ 43 | + CHAN2G(2402, 15), /* Channel -1 */ 44 | + CHAN2G(2407, 14), /* Channel 0 */ 45 | CHAN2G(2412, 0), /* Channel 1 */ 46 | CHAN2G(2417, 1), /* Channel 2 */ 47 | CHAN2G(2422, 2), /* Channel 3 */ 48 | diff --git a/drivers/drivers/net/wireless/ath/regd.c b/drivers-patched/drivers/net/wireless/ath/regd.c 49 | index 11e6132..6fd7657 100644 50 | --- a/drivers/drivers/net/wireless/ath/regd.c 51 | +++ b/drivers-patched/drivers/net/wireless/ath/regd.c 52 | @@ -33,7 +33,7 @@ static int __ath_regd_init(struct ath_regulatory *reg); 53 | */ 54 | 55 | /* Only these channels all allow active scan on all world regulatory domains */ 56 | -#define ATH9K_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0) 57 | +#define ATH9K_2GHZ_CH01_11 REG_RULE(2312-10, 2462+10, 40, 0, 20, 0) 58 | 59 | /* We enable active scan on these a case by case basis by regulatory domain */ 60 | #define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\ 61 | diff --git a/drivers/net/wireless/util.c b/drivers-patched/net/wireless/util.c 62 | index 0553cea..e8aa09d 100644 63 | --- a/drivers/net/wireless/util.c 64 | +++ b/drivers-patched/net/wireless/util.c 65 | @@ -69,14 +69,17 @@ int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) 66 | { 67 | /* see 802.11 17.3.8.3.2 and Annex J 68 | * there are overlapping channel numbers in 5GHz and 2GHz bands */ 69 | - if (chan <= 0) 70 | - return 0; /* not supported */ 71 | + // if (chan <= 0) 72 | + // return 0; /* not supported */ 73 | switch (band) { 74 | case NL80211_BAND_2GHZ: 75 | - if (chan == 14) 76 | - return 2484; 77 | - else if (chan < 14) 78 | - return 2407 + chan * 5; 79 | + return 2407 + chan * 5; 80 | + // if (chan == 14) 81 | + // return 2484; 82 | + // else if (chan < 14) 83 | + // return 2407 + chan * 5; 84 | + // else if ( (chan > 14) && (chan < 34) ) 85 | + // return 2407 - (chan-15)*5, /* Channel -1 */ 86 | break; 87 | case NL80211_BAND_5GHZ: 88 | if (chan >= 182 && chan <= 196) 89 | -------------------------------------------------------------------------------- /patches/modwifi.patch: -------------------------------------------------------------------------------- 1 | diff -rupN drivers/drivers/net/wireless/ath/ath9k/common-init.c drivers-patched/drivers/net/wireless/ath/ath9k/common-init.c 2 | --- drivers/drivers/net/wireless/ath/ath9k/common-init.c 2016-09-19 17:39:30.000000000 +0300 3 | +++ drivers-patched/drivers/net/wireless/ath/ath9k/common-init.c 2016-11-29 17:38:10.000000000 +0300 4 | @@ -23,6 +23,7 @@ 5 | .center_freq = (_freq), \ 6 | .hw_value = (_idx), \ 7 | .max_power = 20, \ 8 | + .max_power = 30, \ 9 | } 10 | 11 | #define CHAN5G(_freq, _idx) { \ 12 | @@ -30,6 +31,7 @@ 13 | .center_freq = (_freq), \ 14 | .hw_value = (_idx), \ 15 | .max_power = 20, \ 16 | + .max_power = 30, \ 17 | } 18 | 19 | /* Some 2 GHz radios are actually tunable on 2312-2732 20 | @@ -37,6 +39,26 @@ 21 | * we have calibration data for all cards though to make 22 | * this static */ 23 | static const struct ieee80211_channel ath9k_2ghz_chantable[] = { 24 | + CHAN2G(2312, 33), /* Channel -19 */ 25 | + CHAN2G(2317, 32), /* Channel -18 */ 26 | + CHAN2G(2322, 31), /* Channel -17 */ 27 | + CHAN2G(2327, 30), /* Channel -16 */ 28 | + CHAN2G(2332, 29), /* Channel -15 */ 29 | + CHAN2G(2337, 28), /* Channel -14 */ 30 | + CHAN2G(2342, 27), /* Channel -13 */ 31 | + CHAN2G(2347, 26), /* Channel -12 */ 32 | + CHAN2G(2352, 25), /* Channel -11 */ 33 | + CHAN2G(2357, 24), /* Channel -10 */ 34 | + CHAN2G(2362, 23), /* Channel -9 */ 35 | + CHAN2G(2367, 22), /* Channel -8 */ 36 | + CHAN2G(2372, 21), /* Channel -7 */ 37 | + CHAN2G(2377, 20), /* Channel -6 */ 38 | + CHAN2G(2382, 19), /* Channel -5 */ 39 | + CHAN2G(2387, 18), /* Channel -4 */ 40 | + CHAN2G(2392, 17), /* Channel -3 */ 41 | + CHAN2G(2397, 16), /* Channel -2 */ 42 | + CHAN2G(2402, 15), /* Channel -1 */ 43 | + CHAN2G(2407, 14), /* Channel 0 */ 44 | CHAN2G(2412, 0), /* Channel 1 */ 45 | CHAN2G(2417, 1), /* Channel 2 */ 46 | CHAN2G(2422, 2), /* Channel 3 */ 47 | diff -rupN drivers/drivers/net/wireless/ath/regd.c drivers-patched/drivers/net/wireless/ath/regd.c 48 | --- drivers/drivers/net/wireless/ath/regd.c 2016-09-19 17:39:29.000000000 +0300 49 | +++ drivers-patched/drivers/net/wireless/ath/regd.c 2016-11-29 16:34:52.000000000 +0300 50 | @@ -33,7 +33,7 @@ static int __ath_regd_init(struct ath_re 51 | */ 52 | 53 | /* Only these channels all allow active scan on all world regulatory domains */ 54 | -#define ATH9K_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0) 55 | +#define ATH9K_2GHZ_CH01_11 REG_RULE(2312-10, 2462+10, 40, 0, 20, 0) 56 | 57 | /* We enable active scan on these a case by case basis by regulatory domain */ 58 | #define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\ 59 | diff -rupN drivers/net/wireless/util.c drivers-patched/net/wireless/util.c 60 | --- drivers/net/wireless/util.c 2016-09-19 17:39:30.000000000 +0300 61 | +++ drivers-patched/net/wireless/util.c 2016-11-29 17:31:53.000000000 +0300 62 | @@ -69,14 +69,17 @@ int ieee80211_channel_to_frequency(int c 63 | { 64 | /* see 802.11 17.3.8.3.2 and Annex J 65 | * there are overlapping channel numbers in 5GHz and 2GHz bands */ 66 | - if (chan <= 0) 67 | - return 0; /* not supported */ 68 | + // if (chan <= 0) 69 | + // return 0; /* not supported */ 70 | switch (band) { 71 | case NL80211_BAND_2GHZ: 72 | - if (chan == 14) 73 | - return 2484; 74 | - else if (chan < 14) 75 | - return 2407 + chan * 5; 76 | + return 2407 + chan * 5; 77 | + // if (chan == 14) 78 | + // return 2484; 79 | + // else if (chan < 14) 80 | + // return 2407 + chan * 5; 81 | + // else if ( (chan > 14) && (chan < 34) ) 82 | + // return 2407 - (chan-15)*5, /* Channel -1 */ 83 | break; 84 | case NL80211_BAND_5GHZ: 85 | if (chan >= 182 && chan <= 196) 86 | -------------------------------------------------------------------------------- /pentest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Kali Linux additional tools installation script 3 | . helper.sh 4 | . postinstall.sh 5 | 6 | install_pentest(){ 7 | 8 | if ask "Do you want to install armitage, mimikatz, unicornscan, and zenmap.. ?" Y; then 9 | print_status "Installing armitage, mimikatz, unicornscan, and zenmap.." 10 | apt-get -y install armitage mimikatz unicornscan zenmap 11 | check_success 12 | print_notification "Newly installed tools should be located on your default PATH." 13 | 14 | #This is a simple git pull of the Cortana .cna script repository available on github. 15 | if ! [ -d /opt/cortana ]; then 16 | print_status "Grabbing Armitage Cortana Scripts via github.."; 17 | git clone http://www.github.com/rsmudge/cortana-scripts.git /opt/cortana; 18 | check_success; 19 | print_notification "Cortana scripts installed under /opt/cortana."; 20 | fi 21 | fi 22 | 23 | if ask "Do you want to install BeEF,arachni,w3af, WATOBO?" Y; then 24 | apt-get -y install beef-xss arachni w3af 25 | fi 26 | 27 | if ask "Do you want to install Veil?" Y; then 28 | apt-get install -y veil-* 29 | fi 30 | 31 | if ask "Do you want to install OWASP tools? (zaproxy,mantra)" Y; then 32 | apt-get install -y zaproxy owasp-mantra-ff 33 | fi 34 | 35 | if ask "Do you want to install OWTF?" Y; then 36 | git clone https://github.com/7a/owtf/ /tmp/owtf 37 | python /tmp/owtf/install/install.py 38 | fi 39 | 40 | 41 | 42 | if ask "Do you want to install TOR?" N; then 43 | apt_add_source "tor" 44 | 45 | gpg --keyserver keys.gnupg.net --recv 886DDD89 46 | gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - 47 | 48 | apt-get update 49 | apt-get install -y deb.torproject.org-keyring tor tor-geoipdb polipo vidalia privoxy 50 | mv /etc/polipo/config /etc/polipo/config.orig 51 | wget https://gitweb.torproject.org/torbrowser.git/blob_plain/ae4aa49ad9100a50eec049d0a419fac63a84d874:/build-scripts/config/polipo.conf -O /etc/polipo/config 52 | 53 | service tor restart 54 | service polipo restart 55 | 56 | update-rc.d tor enable 57 | update-rc.d polipo enable 58 | fi 59 | 60 | if ask "Install SVN version of fuzzdb?" Y; then 61 | print_status "Installing SVN version of fuzzdb in /usr/share/fuzzdb and keeping it updated." 62 | if [ -d /usr/share/fuzzdb ]; then 63 | cd /usr/share/fuzzdb 64 | svn up 65 | else 66 | print_notification "Fuzzdb not found, installing at /usr/share/fuzzdb." 67 | cd /usr/share 68 | svn co http://fuzzdb.googlecode.com/svn/trunk fuzzdb 69 | fi 70 | print_good "Installed or updated Fuzzdb to /usr/share/fuzzdb." 71 | fi 72 | 73 | } 74 | 75 | install_mitm(){ 76 | print_notification "Installing MITM tools.." 77 | apt-get install -y hamster-sidejack ferret-sidejack dsniff snarf ngrep ghost-phisher mitmf fruity-wifi bettercap 78 | 79 | if ask "Do you want to install Intercepter-NG?" Y; then 80 | print_notification "Installing dependencies" 81 | #install_32bit 82 | apt-get install unzip wget lib32ncurses5-dev -y 83 | 84 | print_notification "Download & unpack" 85 | cd /tmp 86 | wget http://sniff.su/Intercepter-NG.CE.05.zip 87 | unzip Intercepter-NG.CE.05.zip 88 | mv intercepter_linux /usr/bin/intercepter 89 | chmod +x /usr/bin/intercepter 90 | fi 91 | } 92 | 93 | # Main 94 | if [ "${0##*/}" = "pentest.sh" ]; then 95 | if ask "Do you want install pentest tools?" Y; then 96 | install_pentest 97 | fi 98 | 99 | if ask "Do you want install MITM tools?" Y; then 100 | install_mitm 101 | fi 102 | fi 103 | -------------------------------------------------------------------------------- /phone.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | . helper.sh 4 | 5 | install_ios_tools(){ 6 | apt-get install -y ifuse ipheth-utils iphone-backup-analyzer libimobiledevice-utils libimobiledevice2 python-imobiledevice usbmuxd 7 | } 8 | 9 | install_msf_on_iphone(){ 10 | apt-get update && apt-get dist-upgrade && apt-get install wget subversion 11 | 12 | wget http://ininjas.com/repo/debs/ruby_1.9.2-p180-1-1_iphoneos-arm.deb 13 | wget http://ininjas.com/repo/debs/iconv_1.14-1_iphoneos-arm.deb 14 | wget http://ininjas.com/repo/debs/zlib_1.2.3-1_iphoneos-arm.deb 15 | 16 | dpkg -i iconv_1.14-1_iphoneos-arm.deb 17 | dpkg -i zlib_1.2.3-1_iphoneos-arm.deb 18 | dpkg -i ruby_1.9.2-p180-1-1_iphoneos-arm.deb 19 | 20 | cd /private/var 21 | svn co https://www.metasploit.com/svn/framework3/trunk/ msf3 22 | ruby msfconsole 23 | } 24 | 25 | install_android_tools(){ 26 | apt-get install -y abootimg smali android-sdk apktool dex2jar 27 | apt_add_repo ppa:nilarimogard/webupd8 28 | apt-get install -y android-tools-adb android-tools-fastboot 29 | } 30 | 31 | install_phone_tools() 32 | { 33 | apt-get install gammu 34 | 35 | if ask "Install tools for iOS hacking?" Y; then 36 | install_ios_tools 37 | fi 38 | 39 | if ask "Install tools for Andoid hacking?" Y; then 40 | install_android_tools 41 | fi 42 | } 43 | 44 | if [ "${0##*/}" = "phone.sh" ]; then 45 | install_phone_tools 46 | fi -------------------------------------------------------------------------------- /postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Install and configure commonly used tools 3 | . helper.sh 4 | 5 | install_archivers(){ 6 | print_status "Installing archivers.." 7 | apt-get -y install gzip bzip2 tar lzma arj lhasa p7zip-full cabextract unace rar unrar zip unzip \ 8 | sharutils uudeview mpack arj cabextract file-roller zlib1g zlib1g-dev liblzma-dev liblzo2-dev 9 | } 10 | 11 | install_32bit(){ 12 | if [ `getconf LONG_BIT` = "64" ] ; then 13 | if ask "64-bit OS detected. Installing 32-bit libs?" Y; then 14 | dpkg --add-architecture i386 && apt-get update -y && apt-get install lib32z1 lib32ncurses5 -y 15 | check_success 16 | fi 17 | fi 18 | } 19 | 20 | install_common_tools(){ 21 | print_status "Installing common tools.." 22 | apt-get install -y terminator tmux htop iftop iotop mc screen curl wget git 23 | } 24 | 25 | install_zsh(){ 26 | apt-get install zsh -y 27 | if ask "Do you want to install oh-my-zsh?" Y; then 28 | if command_exists curl ; then 29 | curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh 30 | elif command_exists wget ; then 31 | wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh 32 | fi 33 | fi 34 | } 35 | 36 | config_gdm(){ 37 | #TODO: check and fix! 38 | if ask "Do you want to auto login on startup?" Y; then 39 | sed -i 's,# Automatic,Automatic,g' /etc/gdm3/daemon.conf 40 | fi 41 | 42 | if ask "Do you want to enable numlock on boot?" N; then 43 | apt-get -y install numlockx 44 | cp -n /etc/gdm3/Init/Default{,.bkup} 45 | grep -q '/usr/bin/numlockx' /etc/gdm3/Init/Default || sed -i 's#exit 0#if [ -x /usr/bin/numlockx ]; then\n/usr/bin/numlockx on\nfi\nexit 0#' /etc/gdm3/Init/Default 46 | fi 47 | } 48 | 49 | config_ssh(){ 50 | print_status "Сonfiguring sshd. Current OpenSSH status:" 51 | service ssh status 52 | 53 | #TODO: check this! 54 | if ask "Do you want to install fresh sshd/ssh keys? (might be good if you're using the vmware image)" N; then 55 | print_status "Removing old host keys.." 56 | rm -rf /etc/ssh/ssh_host_* 57 | check_success 58 | print_status "Regenerating host keys.." 59 | dpkg-reconfigure openssh-server 60 | check_success 61 | 62 | mkdir /etc/ssh/default_kali_keys 63 | mv /etc/ssh/ssh_host* /etc/ssh/default_kali_keys/ 64 | dpkg-reconfigure openssh-server 65 | echo "please make sure that those keys differ" 66 | md5sum /etc/ssh/default_kali_keys/* 67 | md5sum /etc/ssh/ssh_host* 68 | service ssh try-restart 69 | ssh-keygen -t rsa -b 2048 70 | fi 71 | 72 | if ask "Enable X11 Forwarding support" Y; then 73 | sed -i -e 's/\#X11Forwarding no/X11Forwarding yes/' /etc/ssh/sshd_config 74 | sed -i -e 's/\#X11DisplayOffset/X11DisplayOffset/' /etc/ssh/sshd_config 75 | sed -i -e 's/\#X11UseLocalhost/X11UseLocalhost/' /etc/ssh/sshd_config 76 | sed -i -e 's/\#AllowTcpForwarding/AllowTcpForwarding/' /etc/ssh/sshd_config 77 | fi 78 | 79 | if ask "Enable SSHD to start on boot?" Y; then 80 | update-rc.d ssh enable 81 | fi 82 | 83 | if ask "Enabling visual hostkeys in your .ssh/config?" Y; then 84 | mkdir -p ~/.ssh && echo "VisualHostKey=yes" >> ~/.ssh/config 85 | fi 86 | 87 | if ask "Start sshd?" Y; then 88 | service ssh start 89 | fi 90 | } 91 | 92 | config_metasploit(){ 93 | update-rc.d postgresql enable && update-rc.d metasploit enable 94 | 95 | # MSF first init. 96 | service postgresql start 97 | service metasploit stop 98 | service metasploit start 99 | msfupdate 100 | # echo exit > /tmp/msf.rc 101 | # msfconsole -r /tmp/msf.rc 102 | # rm /tmp/msf.rc 103 | } 104 | 105 | config_grub(){ 106 | sed -i -e "s,^GRUB_TIMEOUT=.*,GRUB_TIMEOUT=0," /etc/default/grub 107 | echo "GRUB_HIDDEN_TIMEOUT=0" >> /etc/default/grub 108 | echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" >> /etc/default/grub 109 | update-grub 110 | } 111 | 112 | config_personal(){ 113 | print_status "Installing ~/.screenrc" 114 | write_with_backup files/home/bash_aliases ~/.screenrc 115 | 116 | print_status "Installing ~/.bash_aliases" 117 | write_with_backup files/home/bash_aliases ~/.bash_aliases 118 | } 119 | 120 | postinstall(){ 121 | if ask "Install common tools (mostly fixes and essentials)?" Y; then 122 | print_status "Adding some essential packages." 123 | apt-get install -y cifs-utils libssl-dev ipcalc \ 124 | emacsen-common libltdl-dev libpcap0.8-dev libtool libxmlrpc-core-c3 xdotool openssl libreadline6 libreadline6-dev \ 125 | libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libc6-dev libncurses5-dev bison libmysqlclient-dev libmagickcore-dev \ 126 | libmagick++-dev libmagickwand-dev libnetfilter-queue-dev autotools-dev cdbs check checkinstall dctrl-tools debian-keyring \ 127 | devscripts dh-make diffstat dput equivs libapt-pkg-perl libauthen-sasl-perl libclass-accessor-perl libclass-inspector-perl \ 128 | libcommon-sense-perl libconvert-binhex-perl libcrypt-ssleay-perl libdevel-symdump-perl libfcgi-perl libhtml-template-perl \ 129 | libio-pty-perl libio-socket-ssl-perl libio-string-perl libio-stringy-perl libipc-run-perl libjson-perl libjson-xs-perl libmime-tools-perl\ 130 | libnet-libidn-perl libnet-ssleay-perl libossp-uuid-perl libossp-uuid16 libparse-debcontrol-perl libparse-debianchangelog-perl \ 131 | libpod-coverage-perl libsoap-lite-perl libsub-name-perl libtask-weaken-perl libterm-size-perl libtest-pod-perl \ 132 | libxml-namespacesupport-perl libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl libyaml-syck-perl lintian 133 | 134 | install_32bit 135 | install_common_tools 136 | 137 | if ask "Install archivers?" Y; then 138 | install_archivers 139 | fi 140 | 141 | if ask "Install ZSH and oh-my-zsh?" Y; then 142 | install_zsh 143 | fi 144 | fi 145 | 146 | if ask "Config SSH?" Y; then 147 | config_ssh 148 | fi 149 | 150 | if ask "MSF first init. Do you want to install armitage,postgres,metasploit to run on boot?" Y; then 151 | config_metasploit 152 | fi 153 | 154 | if ask "Install personal config: bash alises and other speed hacks?" N; then 155 | config_personal 156 | fi 157 | 158 | if ask "Configure GDM options (Autologon, NumLock)?" N; then 159 | config_gdm 160 | fi 161 | 162 | if ask "Do you want to change the grub default timeout to 0 sec?" N; then 163 | config_grub 164 | fi 165 | 166 | if ask "Do you want a different hostname on every boot?" N; then 167 | grep -q "hostname" /etc/rc.local hostname || sed -i 's#^exit 0#hostname $(cat /dev/urandom | tr -dc "A-Za-z" | head -c8)\nexit 0#' /etc/rc.local 168 | fi 169 | } 170 | 171 | if [ "${0##*/}" = "postinstall.sh" ]; then 172 | postinstall 173 | fi 174 | -------------------------------------------------------------------------------- /shell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install zsh+prezto+powerline 3 | 4 | # zsh 5 | apt install zsh fontconfig rake -y 6 | 7 | # screen 8 | apt install screen tmux -y 9 | 10 | # https://github.com/skwp/dotfiles 11 | sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh `" 12 | 13 | # colorls 14 | gem install colorls 15 | -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt 4 | cp add-apt-repository.sh.txt /usr/sbin/add-apt-repository 5 | chmod o+x /usr/sbin/add-apt-repository 6 | chown root:root /usr/sbin/add-apt-repository 7 | -------------------------------------------------------------------------------- /video.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Installation script for AMD/NVIDIA video drivers. 3 | 4 | . helper.sh 5 | 6 | 7 | install_ati_driver(){ 8 | apt-get update -y 9 | apt-get install -y firmware-linux-nonfree amd-opencl-icd linux-headers-$(uname -r) fglrx-atieventsd fglrx-driver fglrx-control fglrx-modules-dkms -y 10 | aticonfig --initial -f 11 | } 12 | 13 | install_nvidia_cuda(){ 14 | apt_super_upgrade 15 | aptitude -r install linux-headers-$(uname -r) 16 | apt-get install -y nvidia-xconfig nvidia-kernel-dkms 17 | apt-get install -y firmware-linux-nonfree nvidia-opencl-icd nvidia-cuda-toolkut 18 | } 19 | 20 | install_nvidia_docker(){ 21 | id=$(. /etc/os-release;echo $ID) 22 | version_id=$(. /etc/os-release;echo $VERSION_ID) 23 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 24 | 25 | if [[ $id == 'kali' ]]; then 26 | distribution=ubuntu18.04 27 | fi 28 | 29 | curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey |sudo apt-key add - 30 | curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \ 31 | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list 32 | sudo apt update && sudo apt -y install nvidia-container-toolkit 33 | } 34 | 35 | install_video_driver(){ 36 | if ask "Install ATI/AMD driver fglrx?" N; then 37 | install_ati_driver 38 | fi 39 | 40 | if ask "Install NVIDIA driver nouveau?" N; then 41 | install_nvidia_driver 42 | fi 43 | } 44 | 45 | if [ "${0##*/}" = "video.sh" ]; then 46 | install_video_driver 47 | fi 48 | -------------------------------------------------------------------------------- /vm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . helper.sh 3 | 4 | check_vt(){ 5 | apt-get update && apt-get install msr-tools 6 | modprobe msr 7 | 8 | msr_vt=`rdmsr 0x3A` 9 | if [ "$msr_vt" = "1" ]; then 10 | return 0 11 | elif [ "$msr_vt" = "5" ]; then 12 | return 1 13 | else 14 | echo "Strange VT-D MSR value: $msr_vt" 15 | return 0 16 | fi 17 | } 18 | 19 | install_virtualbox(){ 20 | print_status "Add VirtualBox repo" 21 | apt_add_source "virtualbox" 22 | 23 | print_status "Trying to add Oracle VirtualBox key" 24 | apt_add_key "https://www.virtualbox.org/download/oracle_vbox.asc" 25 | 26 | apt-get update -y && apt-get install dkms -y && apt-get install virtualbox-4.3 -y 27 | } 28 | 29 | install_virtualbox_tools(){ 30 | print_status "Installing Oracle VirtualBox tools" 31 | } 32 | 33 | install_vmware_tools(){ 34 | if ask "Do you want to install vmware-tools?" Y; then 35 | apt-get install -y xserver-xorg-input-vmmouse 36 | echo cups enabled >> /usr/bin/update-rc.d 37 | echo vmware-tools enabled >> /usr/bin/update-rc.d 38 | 39 | ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/ 40 | read -p "please choose 'install vmware tools' on your host and hit any key when done" 41 | echo 42 | 43 | mkdir /mnt/vmware 44 | mount /dev/cdrom /mnt/vmware 45 | tar zxpf /mnt/vmware/VMwareTools-*.tar.gz -C /tmp/ 46 | /tmp/vmware-tools-distrib/vmware-install.pl default 47 | rm -rf /mnt/vmware && rm -rf /tmp/vmware-* 48 | fi 49 | } 50 | 51 | install_parallels_tools(){ 52 | # TODO: Fix it. 53 | # Parallels 9 + Kali Linux 1.0.6 (kernel 3.12) 54 | # print_status "Mount Tools CD in virtual machine (Virtual Machine -> Install/Reinstall Parallels Tools)" 55 | # pause 56 | print_status "Preparing environment" 57 | apt-get install -y gcc dkms make linux-headers-$(uname -r) 58 | 59 | print_status "Copying Parallels tools from CD" 60 | cp -R /media/cdrom0 /tmp/ 61 | 62 | # Download the patch from http://pastebin.com/8imsrmcN 63 | curl http://pastebin.com/raw.php?i=8imsrmcN > /tmp/parallels-tools-linux-3.12-prl-fs-9.0.23350.941886.patch 64 | 65 | # Make temporary copy of Parallels Tools, enter and patch it: 66 | #$ cp -R /media/$USER/Parallels\ Tools /tmp/ 67 | #$ cd /tmp/Parallels\ Tools/kmods 68 | #$ tar -xaf prl_mod.tar.gz 69 | #$ patch -p1 -d prl_fs < parallels-tools-linux-3.12-prl-fs-9.0.23350.941886.patch 70 | #$ tar -czf prl_mod.tar.gz prl_eth prl_fs prl_fs_freeze prl_tg Makefile.kmods dkms.conf 71 | 72 | # Parallels 9 + Kali Linux 1.0.6 (kernel 3.12) 73 | mount -o exec /dev/hdb /media/Parallels\ Tools 74 | #cp -R /media/$USER/Parallels\ Tools /tmp/ 75 | 76 | cp -R /media/cdrom0 /tmp/ 77 | # cd /tmp/Parallels\ Tools/kmods 78 | cd /tmp/cdrom0/kmods 79 | 80 | # Patch from http://forum.parallels.com/showthread.php?294092-Fix-Patch-for-Parallel-Tools-9-0-23350-to-support-Linux-Kernel-3-12-%28Ubuntu-14-04%29 81 | tar -xaf prl_mod.tar.gz 82 | patch -p1 -d prl_fs < parallels-tools-linux-3.12-prl-fs-9.0.23350.941886.patch 83 | tar -czf prl_mod.tar.gz prl_eth prl_fs prl_fs_freeze prl_tg Makefile.kmods dkms.conf 84 | 85 | #4. Install normally: 86 | #$ sudo /tmp/Parallels\ Tools/install 87 | ../install 88 | } 89 | 90 | 91 | install_vm_host(){ 92 | # TODO: Check if VT is available 93 | if ask "Do you want to install VirtualBox?" N; then 94 | echo "Installing VirtualBox..." 95 | install_virtualbox 96 | fi 97 | 98 | if ask "Do you want to install QEMU?" N; then 99 | echo "Installing QEMU..." 100 | apt-get install qemu-system-arm qemu-system-mips qemu-system-common qemu-system-x86 qemu virt-manager virtinst -y 101 | fi 102 | } 103 | 104 | install_vm_tools(){ 105 | # TODO: Get VM type 106 | dmi=`dmidecode | awk '/VMware Virtual Platform/ {print $3}'` 107 | if [[ "$dmi" == *VMware* ]]; then 108 | if ask "It seems you're running kali as VMWare guest, do you want to install vmware-tools?" Y; then 109 | install_vmware_tools 110 | fi 111 | fi 112 | 113 | install_virtualbox_tools 114 | } 115 | 116 | install_vm(){ 117 | # # http://www.dmo.ca/blog/detecting-virtualization-on-linux/ 118 | install_vm_tools 119 | 120 | 121 | install_vm_host 122 | # install_parallels_tools 123 | # apt-get install virt-what 124 | 125 | #VMWare 126 | #dmidecode | awk '/VMware Virtual Platform/ {print $3,$4,$5}' 127 | #Run lspci and check for the string 'VirtualBox'. 128 | #You could run lspci | grep VirtualBox. 129 | #You could also run lsusb and check the string 'VirtualBox'. Such as lsusb | grep VirtualBox. 130 | #Also dmesg works, run dmesg | grep VirtualBox or dmesg | grep virtual. 131 | } 132 | 133 | if [ "${0##*/}" = "vm.sh" ]; then 134 | install_vm 135 | fi -------------------------------------------------------------------------------- /wireless.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | . helper.sh 4 | 5 | install_wifi_basic(){ 6 | print_status "Installing WiFi dependecies..." 7 | sudo apt-get install -y build-essential make patch openssl pkg-config libssl-dev zlib1g zlib1g-dev libssh2-1-dev \ 8 | gettext libpcap0.8 libpcap0.8-dev python-scapy python-dev cracklib-runtime libpcap-dev sqlite3 libsqlite3-dev libssl-dev 9 | 10 | print_status "Installing WiFi tools and dependecies" 11 | sudo apt-get install -y kali-linux-wireless aircrack-ng kismet kismet-plugins giskismet horst wavemon urfkill \ 12 | hostapd dnsmasq iw tshark horst linssid cupid-wpasupplicant cupid-hostapd 13 | apt-get install libncurses5-dev libnl-genl-3-dev -y 14 | 15 | echo "Install CUDA support" 16 | apt-get install nvidia-cuda-toolkit nvidia-opencl-icd 17 | } 18 | 19 | install_patched_wireless_db(){ 20 | print_status "Installing dependencies for building wireless-db" 21 | apt-get install -y python-m2crypto libgcrypt20 libgcrypt20-dev git gcc libnl-genl-3-dev 22 | 23 | print_status "Cloning repos.." 24 | cd /tmp 25 | git clone https://github.com/0x90/crda-ct 26 | git clone https://github.com/0x90/wireless-regdb 27 | 28 | print_status "Building and installing dependencies for building wireless-db" 29 | cd wireless-regdb/ 30 | make && cp regulatory.bin /lib/crda/regulatory.bin 31 | 32 | print_status "Copying certs.." 33 | cp root.key.pub.pem ../crda-ct/pubkeys/ 34 | cp /lib/crda/pubkeys/benh@debian.org.key.pub.pem ../crda-ct/pubkeys/ 35 | 36 | print_status "Building and installing CRDA" 37 | cd ../crda-ct 38 | # REG_BIN path fix for Kali Linux 39 | export REG_BIN=/lib/crda/regulatory.bin 40 | make && make install 41 | 42 | print_status "Cleanup.." 43 | cd /tmp 44 | rm -rf crda-ct wireless-db 45 | } 46 | 47 | # https://forums.kali.org/showthread.php?25715-How-to-install-Wifite-mod-pixiewps-and-reaver-wps-fork-t6x-to-nethunter 48 | install_wifite_fork(){ 49 | apt-get install libsqlite3-dev libpcap-dev -y 50 | cd /tmp 51 | 52 | git clone https://github.com/derv82/wifite.git 53 | git clone https://github.com/aanarchyy/wifite-mod-pixiewps.git 54 | git clone https://github.com/t6x/reaver-wps-fork-t6x.git 55 | git clone https://github.com/wiire/pixiewps.git 56 | 57 | cd pixiewps/src/ 58 | make && make install 59 | cd /tmp/reaver-wps-fork-t6x/src/ 60 | ./configure && make && make install 61 | 62 | cp /tmp/wifite/wifite.py /usr/bin/wifite-old 63 | chmod +x /usr/bin/wifite-old 64 | cp /tmp/wifite-mod-pixiewps/wifite-ng /usr/bin/wifite-ng 65 | chmod +x /usr/bin/wifite-ng 66 | 67 | cd /tmp 68 | rm -rf wifite 69 | rm -rf wifite-mod-pixiewps 70 | rm -rf reaver-wps-fork-t6x 71 | rm -rf pixiewps 72 | } 73 | 74 | install_lorcon(){ 75 | echo "Installing Lorcon" 76 | cd /tmp 77 | git clone https://github.com/0x90/lorcon 78 | cd lorcon 79 | ./configure --prefix=/usr && make && make install 80 | 81 | # install pylorcon 82 | echo "Install pylorcon2" 83 | cd pylorcon2 84 | python setup.py build && python setup.py install 85 | } 86 | 87 | install_horst(){ 88 | # http://br1.einfach.org/tech/horst/ 89 | apt-get install libncurses5-dev libnl-genl-3-dev -y 90 | cd /tmp 91 | git clone git://br1.einfach.org/horst 92 | cd horst 93 | make && cp horst /usr/bin 94 | rm -rf /tmp/horst 95 | } 96 | 97 | install_penetrator(){ 98 | apt-get install libpcap-dev libssl-dev -y 99 | cd /tmp 100 | git clone https://github.com/xXx-stalin-666-money-xXx/penetrator-wps.git 101 | cd penetrator-wps/ 102 | ./install.sh 103 | cp penetrator /usr/bin 104 | } 105 | 106 | install_hotspotd(){ 107 | echo "Install hotspotd dependencies" 108 | apt install hostapd dnsmasq -y 109 | 110 | echo "Installing hotspotd" 111 | cd /tmp 112 | git clone https://github.com/0x90/hotspotd 113 | cd hotspotd 114 | sudo python2 setup.py install 115 | 116 | rm -rf /tmp/hotspotd 117 | } 118 | 119 | install_mana(){ 120 | echo "Install MANA dependencies" 121 | apt-get --yes install build-essential pkg-config git libnl-genl-3-dev libssl-dev 122 | 123 | echo "clone hostapd MANA" 124 | cd /tmp 125 | git clone https://github.com/sensepost/hostapd-mana 126 | cd hostapd-mana 127 | make -C hostapd 128 | make -C hostapd install 129 | ln -s /usr/local/bin/hostapd /usr/bin/hostapd-mana 130 | 131 | echo "Install berate_ap" 132 | git clone https://github.com/sensepost/berate_ap 133 | cd berate_ap 134 | make && make install 135 | 136 | echo "Cleaning up" 137 | rm -rf /tmp/hostapd-mana /tmp/berate_ap 138 | # TODO: https://github.com/sensepost/wpa_sycophant 139 | } 140 | 141 | install_hccapx(){ 142 | echo "Installing hcxtools dependencies" 143 | apt-get install -y libssl-dev libz-dev libpcap-dev libcurl4-openssl-dev 144 | 145 | echo "Installing hcxtools" 146 | cd /tmp 147 | git clone https://github.com/ZerBea/hcxtools 148 | cd hcxtools 149 | make && make install 150 | 151 | echo "Installing hcxdumptool" 152 | cd /tmp 153 | git clone https://github.com/ZerBea/hcxdumptool 154 | cd hcxdumptool 155 | make && make install 156 | 157 | 158 | # go get github.com/vlad-s/hcpxread 159 | 160 | echo "Cleanup" 161 | rm -rf /tmp/hcxdumptool /tmp/hcxdumptool 162 | 163 | # https://github.com/hashcat/hashcat 164 | # https://github.com/hashcat/hashcat-utils 165 | } 166 | 167 | # TODO: https://github.com/ghostop14/sparrow-wifi/ 168 | 169 | install_wifi(){ 170 | if ask "Install basic wireless hacking tools?" Y; then 171 | install_wifi_basic 172 | fi 173 | 174 | if ask "Install patched wireless-db?" Y; then 175 | install_patched_wireless_db 176 | fi 177 | 178 | if ask "Install tools to manage *.hccapx files" Y; then 179 | install_hccapx 180 | fi 181 | 182 | if ask "Install Lorcon library with python bindings?" Y; then 183 | install_lorcon 184 | fi 185 | 186 | if ask "Install hotspotd?" Y; then 187 | install_hotspotd 188 | fi 189 | 190 | if ask "Install berate_ap & MANA" Y; then 191 | install_mana 192 | fi 193 | 194 | if ask "Install WPS penetrator?" N; then 195 | install_penetrator 196 | fi 197 | 198 | } 199 | 200 | install_bluetooth(){ 201 | print_status "Installing dependencies for bluetooth hacking" 202 | apt-get install cmake libusb-1.0-0-dev make gcc g++ pkg-config libpcap-dev \ 203 | python-numpy python-pyside python-qt4 build-essential libpcap-dev 204 | 205 | print_status "Installing BlueMaho, redfang, spooftooph, obexfs, bluewho, btscanner and others" 206 | # wget "https://wiki.thc.org/BlueMaho?action=AttachFile&do=get&target=bluemaho_v090417.tgz" 207 | apt-get install -y anyremote redfang spooftooph python-bluez obexfs bluepot bluewho btscanner \ 208 | bluez-utils bluelog libbluetooth-dev spectools bluemaho 209 | apt-get install -y libopenobex1:i386 libopenobex1-dev:i386 libbluetooth-dev:i386 210 | 211 | if ask "Install ubertooth hacking tools?" Y; then 212 | print_status "Installing dependencies for bluetooth hacking" 213 | sudo apt-get install libpcap0.8-dev libcap-dev pkg-config build-essential libnl-dev libncurses-dev libpcre3-dev libpcap-dev \ 214 | libcap-dev obexfs redfang spooftooph sakis3g ubertooth gpsd btscanner bluelog bluesnarfer bluez-tools bluewho 215 | 216 | if ask "Install bluetooth hacking tools?" Y; then 217 | print_status "Installing dependencies for bluetooth hacking" 218 | apt-get install wireshark wireshark-dev libwireshark3 libwireshark-dev 219 | 220 | cd libbtbb-2014-02-R2/wireshark/plugins/btbb 221 | mkdir build 222 | cd build 223 | cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/wireshark/libwireshark3/plugins .. 224 | make && make install 225 | fi 226 | fi 227 | } 228 | 229 | install_sdr(){ 230 | apt-get install -y kali-linux-sdr 231 | } 232 | 233 | if [ "${0##*/}" = "wireless.sh" ]; then 234 | if ask "Install WiFi hacking tools?" Y; then 235 | install_wifi 236 | fi 237 | 238 | if ask "Install Bluetooth hacking tools + Kismet + BTBB from source?" N; then 239 | install_bluetooth 240 | fi 241 | 242 | if ask "Install SDR tools?" Y; then 243 | install_sdr 244 | fi 245 | fi 246 | --------------------------------------------------------------------------------