├── LICENSE ├── README.md └── Tools ├── Android ├── android-sdk │ ├── install │ ├── install-root-archlinux │ └── install-root-debian └── apktool │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── Binary ├── afl │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── angr │ ├── install │ └── install-root-debian ├── barf │ ├── install │ ├── install-root-debian │ └── uninstall ├── bindead │ ├── install │ └── install-root-debian ├── checksec │ └── install ├── codereason │ ├── install │ └── install-root-debian ├── cross2 │ └── install ├── crosstool │ ├── build-sample.sh │ ├── config │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── uninstall ├── elfkickers │ └── install ├── elfparser │ ├── install │ └── install-root-debian ├── evilize │ └── install ├── gdb-heap │ ├── install │ ├── install-root-debian │ └── install-root-fedora ├── gdb │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── install-root-fedora ├── gef │ └── install ├── honggfuzz │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── libheap │ ├── install │ ├── install-root-debian │ └── install-root-fedora ├── manticore │ ├── install │ ├── install-root-debian │ └── uninstall ├── miasm │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ ├── install-root-fedora │ └── uninstall ├── one_gadget │ └── install ├── panda │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ ├── install-root-ubuntu │ └── uninstall ├── pathgrind │ ├── install │ ├── install-root-debian │ └── pathgrind.patch ├── peda │ └── install ├── preeny │ └── install ├── pwndbg │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── install-root-fedora ├── pwntools │ ├── install │ ├── install-root-archlinux │ ├── install-root-fedora │ ├── install-root-ubuntu │ └── uninstall ├── python-pin │ └── install ├── qemu │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── qira │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── qira_fix.patch ├── radare2 │ ├── install │ └── uninstall ├── rappel │ ├── install │ └── install-root-debian ├── ropper │ ├── install │ └── test ├── rp++ │ └── install ├── rr │ ├── configure-system │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── install-root-fedora ├── scratchabit │ └── install ├── scratchablock │ ├── install │ ├── install-root-debian │ └── uninstall ├── seccomp-tools │ └── install ├── shellnoob │ └── install ├── shellsploit │ └── install ├── snowman │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── install-root-fedora ├── taintgrind │ └── install ├── valgrind │ └── install ├── villoc │ └── install ├── virtualsocket │ └── install ├── wcc │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── install-root-fedora └── xrop │ ├── install │ └── install-root-debian ├── Crypto ├── cribdrag │ └── install ├── fastcoll │ └── install ├── featherduster │ ├── install │ ├── install-root-debian │ └── uninstall ├── foresight │ ├── install │ └── uninstall ├── galois │ └── install ├── hash-identifier │ ├── install │ └── install-root-debian ├── hashkill │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── hashpump-partialhash │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── hashpump │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── uninstall ├── libc-database │ └── install ├── littleblackbox │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── msieve │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── nonce-disrespect │ ├── build.patch │ ├── install │ └── install-root-debian ├── pemcrack │ ├── install │ └── install-root-debian ├── pkcrack │ └── install ├── python-paddingoracle │ ├── install │ └── uninstall ├── reveng │ └── install ├── ssh_decoder │ └── install ├── sslsplit │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── xortool │ ├── install │ └── uninstall └── yafu │ ├── install │ └── test ├── Forensics ├── binwalk │ ├── install │ └── uninstall ├── dislocker │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── exetractor │ └── install ├── firmware-mod-kit │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── pdf-parser │ └── install ├── peepdf │ └── install ├── scrdec18 │ └── install └── testdisk │ └── install ├── Misc ├── jdgui │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── veles │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── xspy │ ├── install │ └── install-root-debian ├── youtube-dl │ └── install └── z3 │ ├── install │ ├── test │ └── uninstall ├── Stego ├── sonic-visualizer │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── steganabara │ └── install ├── stegdetect │ ├── install │ ├── install-root-archlinux │ └── install-root-debian ├── stegosaurus │ └── install ├── stegsolve │ └── install └── zsteg │ ├── install │ ├── install-root-archlinux │ ├── install-root-debian │ └── uninstall └── Web ├── burpsuite ├── install ├── install-root-archlinux └── install-root-debian ├── commix └── install ├── dirb ├── install ├── install-root-archlinux └── install-root-debian ├── dirsearch └── install ├── mitmproxy ├── install ├── install-root-debian └── uninstall ├── sqlmap ├── install ├── install-root-archlinux └── install-root-debian └── subbrute └── install /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 flag搬运工 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CTF-Tools 2 | 这里存放的是我们团队做CTF题目的时候经常用到的一些工具 3 | -------------------------------------------------------------------------------- /Tools/Android/android-sdk/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e android-sdk_r24.4.1-linux.tgz ] || wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz 4 | [ -e android-sdk-linux ] || tar xfz android-sdk_r24.4.1-linux.tgz 5 | 6 | mkdir -p bin 7 | cd android-sdk-linux 8 | python -c 'for i in range(10): print "y"+"\n"*1024' | tools/android update sdk --no-ui 9 | 10 | cd ../bin 11 | ln -sf ../android-sdk-linux/platform-tools/{adb,fastboot} . 12 | -------------------------------------------------------------------------------- /Tools/Android/android-sdk/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed jre7-openjdk jdk7-openjdk 5 | -------------------------------------------------------------------------------- /Tools/Android/android-sdk/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | case "$(lsb_release -cs)" in 5 | xenial) 6 | # need to overwrite because of an ubuntu packaging error(!) 7 | apt-get -y -o Dpkg::Options::="--force-overwrite" install openjdk-9-jre openjdk-9-jdk 8 | ;; 9 | *) 10 | apt-get -y install openjdk-7-jre openjdk-7-jdk 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /Tools/Android/apktool/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | VERSION=2.2.4 3 | 4 | mkdir bin 5 | cd bin 6 | wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool 7 | wget "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$VERSION.jar" 8 | ln -s "apktool_$VERSION.jar" apktool.jar 9 | chmod 755 apktool 10 | chmod 755 apktool.jar 11 | cd .. 12 | -------------------------------------------------------------------------------- /Tools/Android/apktool/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed jre8-openjdk 5 | -------------------------------------------------------------------------------- /Tools/Android/apktool/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get install -y default-jre 5 | -------------------------------------------------------------------------------- /Tools/Binary/afl/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # 4 | # AFL 5 | # 6 | 7 | curl http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz | tar xz 8 | mv afl-* afl 9 | cd afl 10 | make -j $(nproc) 11 | cd qemu_mode 12 | # try to detect if python2 and 3 are installed 13 | if which python2 >/dev/null; then 14 | sed -i 's/python/python2/' ./build_qemu_support.sh 15 | sed -i 's!configure!configure --python=\$(which python2)!' ./build_qemu_support.sh 16 | fi 17 | ./build_qemu_support.sh 18 | cd ../../ 19 | 20 | mkdir -p bin 21 | cd bin 22 | ln -sf ../afl/{afl-as,afl-cmin,afl-gcc,afl-gotcpu,afl-plot,afl-qemu-trace,afl-showmap,afl-tmin,afl-whatsup} . 23 | cd .. 24 | 25 | cat < bin/afl-fuzz 26 | #!/bin/bash 27 | $PWD/afl/afl-fuzz "\$@" 28 | END 29 | chmod 755 bin/afl-fuzz 30 | 31 | # 32 | # multiafl 33 | # 34 | 35 | git clone --depth 1 https://github.com/zardus/multiafl 36 | cd bin 37 | ln -s ../multiafl/multiafl 38 | cd .. 39 | -------------------------------------------------------------------------------- /Tools/Binary/afl/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed bison qemu 5 | -------------------------------------------------------------------------------- /Tools/Binary/afl/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y build-dep qemu 5 | 6 | case "$(lsb_release -cs)" in 7 | xenial) 8 | apt-get -y install bison libtool-bin 9 | ;; 10 | *) 11 | apt-get -y install bison 12 | ;; 13 | esac 14 | -------------------------------------------------------------------------------- /Tools/Binary/angr/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | source ctf-tools-venv-activate 4 | 5 | #[ -e $VIRTUAL_ENV/lib/python2.7/site-packages/PyQt4 ] || ln -s /usr/lib/python2.7/dist-packages/PyQt4 $VIRTUAL_ENV/lib/python2.7/site-packages/ 6 | #[ -e $VIRTUAL_ENV/lib/python2.7/site-packages/sip.so ] || ln -s /usr/lib/python2.7/dist-packages/sip.so $VIRTUAL_ENV/lib/python2.7/site-packages/ 7 | #[ -e $VIRTUAL_ENV/lib/python2.7/site-packages/pygraphviz ] || ln -s /usr/lib/pymodules/python2.7/pygraphviz $VIRTUAL_ENV/lib/python2.7/site-packages/ 8 | 9 | git clone --depth 1 https://github.com/angr/angr-dev 10 | GIT_ASKPASS=echo angr-dev/setup.sh -w -r https://git:@github.com/salls angrop 11 | rm -rf angr-dev/wheels 12 | 13 | mkdir -p bin 14 | cd bin 15 | cat < angr-management 16 | #!/bin/bash -e 17 | 18 | $VIRTUAL_ENV/bin/python -m angrmanagement "\$@" 19 | END 20 | chmod 755 angr-management 21 | cd .. 22 | -------------------------------------------------------------------------------- /Tools/Binary/angr/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | # for angr 5 | apt-get -y install virtualenvwrapper python2.7-dev build-essential libxml2-dev libxslt1-dev git libffi-dev cmake libreadline-dev libtool debootstrap debian-archive-keyring libglib2.0-dev libpixman-1-dev libqt4-dev graphviz-dev binutils-multiarch nasm libc6:i386 libgcc1:i386 libstdc++6:i386 libtinfo5:i386 zlib1g:i386 6 | 7 | # for angr-management 8 | apt-get -y install python-qt4 python-sip python-pygraphviz 9 | -------------------------------------------------------------------------------- /Tools/Binary/barf/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # it's z3! 4 | ctf-tools-pip install https://github.com/zardus/z3/archive/pypy-and-setup.zip 5 | 6 | set +e 7 | source ${VIRTUALENVWRAPPER_SCRIPT} 8 | workon ctftools 9 | set -e 10 | 11 | # pybfd can't be installed with pip 12 | git clone --depth 1 https://github.com/Groundworkstech/pybfd 13 | cd pybfd/ 14 | python setup.py install 15 | cd .. 16 | 17 | # install pyasmjit 18 | git clone --depth 1 https://github.com/programa-stic/pyasmjit.git 19 | cd pyasmjit 20 | python setup.py install 21 | cd .. 22 | 23 | # install barf 24 | git clone --depth 1 https://github.com/programa-stic/barf-project 25 | cd barf-project/ 26 | python setup.py install 27 | cd .. 28 | 29 | mkdir -p bin 30 | ln -s $(which BARFgadgets) bin/barfgadgets 31 | -------------------------------------------------------------------------------- /Tools/Binary/barf/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install binutils-multiarch-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/barf/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y barf pyasmjit 4 | rm -f $VIRTUAL_ENV/bin/BARFgadgets 5 | -------------------------------------------------------------------------------- /Tools/Binary/bindead/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR="$PWD" 4 | 5 | [ -e bindead ] || git clone --depth 1 https://bitbucket.org/mihaila/bindead.git 6 | cd bindead 7 | JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre ./build.sh 8 | mvn install 9 | cd .. 10 | 11 | [ -e p9 ] || git clone --depth 1 https://bitbucket.org/mihaila/p9.git 12 | cd p9 13 | JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre ./build.sh 14 | unzip p9.zip 15 | cd .. 16 | 17 | mkdir -p bin 18 | cat < bin/bindead 19 | #!/bin/bash 20 | JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre java -jar $INST_DIR/bindead/bindead.jar "\$@" 21 | END 22 | cat < bin/p9 23 | #!/bin/bash 24 | $INST_DIR/p9/p9/bin/p9 --jdkhome /usr/lib/jvm/java-7-openjdk-amd64/jre "\$@" 25 | END 26 | chmod 755 bin/* 27 | -------------------------------------------------------------------------------- /Tools/Binary/bindead/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | case "$(lsb_release -cs)" in 5 | xenial) 6 | apt-get -o Dpkg::Options::="--force-overwrite" -y install maven libprotobuf-dev openjdk-9-jre openjdk-9-jdk 7 | ;; 8 | *) 9 | apt-get -y install maven libprotobuf-dev openjdk-7-jre openjdk-7-jdk 10 | ;; 11 | esac 12 | -------------------------------------------------------------------------------- /Tools/Binary/checksec/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/slimm609/checksec.sh 4 | mkdir bin 5 | cd bin 6 | ln -s ../checksec.sh/checksec . 7 | -------------------------------------------------------------------------------- /Tools/Binary/codereason/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/trailofbits/codereason 4 | cd codereason 5 | find . -type f -exec sed -i 's:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain::g' {} \; 6 | ./install_vex.sh 7 | # This step fails in travis-ci because of CMake 3.2 not finding Boost, while docker has CMake 2.8 which finds Boost just fine 8 | ./make.sh 9 | cd .. 10 | 11 | mkdir -p bin 12 | cd bin 13 | ln -s ../codereason/build/bin/* . 14 | cd .. 15 | -------------------------------------------------------------------------------- /Tools/Binary/codereason/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install build-essential gcc g++ make cmake libboost-dev libprotobuf-dev protobuf-compiler libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-date-time-dev libboost-regex-dev libboost-all-dev 5 | 6 | -------------------------------------------------------------------------------- /Tools/Binary/cross2/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | FILE=cross2-20130826.tgz 4 | INSTALL_DIR=$PWD 5 | 6 | [ ! -e $FILE ] && wget http://kozos.jp/books/asm/$FILE 7 | tar xf $FILE 8 | 9 | cd cross2/toolchain 10 | ./fetch.sh 11 | ./setup.sh 12 | cd .. 13 | sed -i -e "s|#makeopt=.*|makeopt='-j'|" config.sh 14 | sed -i -e "s|install_dir.*|install_dir=\"$INSTALL_DIR\"|" config.sh 15 | cd build 16 | ./build-install-all.sh 17 | 18 | mkdir -p bin 19 | cd bin 20 | for i in ../*/bin/* 21 | do 22 | F=$(basename $i) 23 | D=$(basename $(dirname $(dirname $i))) 24 | [ -f $D-$F ] || ln -s $i $D-$F 25 | done 26 | cd .. 27 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/build-sample.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | sample=$1 4 | 5 | [ -e ../x-tools/$sample ] && echo "Already built: $sample" && exit 6 | HOME=$(dirname $PWD) CT_PREFIX=$(dirname $PWD)/toolchains ./ct-ng $sample 7 | yes '' | HOME=$(dirname $PWD) CT_PREFIX=$(dirname $PWD)/toolchains ./ct-ng build.$(nproc) 8 | rm -rf .build/$sample 9 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # crosstool-NG 1.20.0 Configuration 4 | # Thu May 7 05:26:28 2015 5 | # 6 | CT_CONFIGURE_has_make381=y 7 | CT_CONFIGURE_has_xz=y 8 | CT_CONFIGURE_has_svn=y 9 | CT_MODULES=y 10 | 11 | # 12 | # Paths and misc options 13 | # 14 | 15 | # 16 | # crosstool-NG behavior 17 | # 18 | # CT_OBSOLETE is not set 19 | # CT_EXPERIMENTAL is not set 20 | # CT_DEBUG_CT is not set 21 | 22 | # 23 | # Paths 24 | # 25 | CT_LOCAL_TARBALLS_DIR="" 26 | CT_WORK_DIR="${CT_TOP_DIR}/.build" 27 | CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}" 28 | CT_INSTALL_DIR="${CT_PREFIX_DIR}" 29 | CT_RM_RF_PREFIX_DIR=y 30 | CT_REMOVE_DOCS=y 31 | CT_INSTALL_DIR_RO=y 32 | CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y 33 | 34 | # 35 | # Downloading 36 | # 37 | # CT_FORBID_DOWNLOAD is not set 38 | # CT_FORCE_DOWNLOAD is not set 39 | CT_CONNECT_TIMEOUT=10 40 | # CT_ONLY_DOWNLOAD is not set 41 | # CT_USE_MIRROR is not set 42 | 43 | # 44 | # Extracting 45 | # 46 | # CT_FORCE_EXTRACT is not set 47 | CT_OVERIDE_CONFIG_GUESS_SUB=y 48 | # CT_ONLY_EXTRACT is not set 49 | CT_PATCH_BUNDLED=y 50 | # CT_PATCH_LOCAL is not set 51 | # CT_PATCH_BUNDLED_LOCAL is not set 52 | # CT_PATCH_LOCAL_BUNDLED is not set 53 | # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set 54 | # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set 55 | # CT_PATCH_NONE is not set 56 | CT_PATCH_ORDER="bundled" 57 | 58 | # 59 | # Build behavior 60 | # 61 | CT_PARALLEL_JOBS=0 62 | CT_LOAD="" 63 | CT_USE_PIPES=y 64 | CT_EXTRA_CFLAGS_FOR_BUILD="" 65 | CT_EXTRA_LDFLAGS_FOR_BUILD="" 66 | CT_EXTRA_CFLAGS_FOR_HOST="" 67 | CT_EXTRA_LDFLAGS_FOR_HOST="" 68 | # CT_CONFIG_SHELL_SH is not set 69 | # CT_CONFIG_SHELL_ASH is not set 70 | CT_CONFIG_SHELL_BASH=y 71 | # CT_CONFIG_SHELL_CUSTOM is not set 72 | CT_CONFIG_SHELL="${bash}" 73 | 74 | # 75 | # Logging 76 | # 77 | # CT_LOG_ERROR is not set 78 | # CT_LOG_WARN is not set 79 | CT_LOG_INFO=y 80 | # CT_LOG_EXTRA is not set 81 | # CT_LOG_ALL is not set 82 | # CT_LOG_DEBUG is not set 83 | CT_LOG_LEVEL_MAX="INFO" 84 | # CT_LOG_SEE_TOOLS_WARN is not set 85 | CT_LOG_PROGRESS_BAR=y 86 | CT_LOG_TO_FILE=y 87 | CT_LOG_FILE_COMPRESS=y 88 | 89 | # 90 | # Target options 91 | # 92 | CT_ARCH="alpha" 93 | CT_ARCH_SUPPORTS_32=y 94 | CT_ARCH_SUPPORTS_WITH_CPU=y 95 | CT_ARCH_SUPPORTS_WITH_TUNE=y 96 | CT_ARCH_DEFAULT_32=y 97 | CT_ARCH_CPU="" 98 | CT_ARCH_TUNE="" 99 | CT_ARCH_32=y 100 | CT_ARCH_BITNESS=32 101 | CT_TARGET_CFLAGS="" 102 | CT_TARGET_LDFLAGS="" 103 | CT_ARCH_alpha=y 104 | # CT_ARCH_arm is not set 105 | # CT_ARCH_avr32 is not set 106 | # CT_ARCH_blackfin is not set 107 | # CT_ARCH_m68k is not set 108 | # CT_ARCH_mips is not set 109 | # CT_ARCH_nios2 is not set 110 | # CT_ARCH_powerpc is not set 111 | # CT_ARCH_s390 is not set 112 | # CT_ARCH_sh is not set 113 | # CT_ARCH_sparc is not set 114 | # CT_ARCH_x86 is not set 115 | CT_ARCH_alpha_AVAILABLE=y 116 | CT_ARCH_arm_AVAILABLE=y 117 | CT_ARCH_avr32_AVAILABLE=y 118 | CT_ARCH_blackfin_AVAILABLE=y 119 | CT_ARCH_m68k_AVAILABLE=y 120 | CT_ARCH_microblaze_AVAILABLE=y 121 | CT_ARCH_mips_AVAILABLE=y 122 | CT_ARCH_nios2_AVAILABLE=y 123 | CT_ARCH_powerpc_AVAILABLE=y 124 | CT_ARCH_s390_AVAILABLE=y 125 | CT_ARCH_sh_AVAILABLE=y 126 | CT_ARCH_sparc_AVAILABLE=y 127 | CT_ARCH_x86_AVAILABLE=y 128 | CT_ARCH_SUFFIX="" 129 | 130 | # 131 | # Generic target options 132 | # 133 | # CT_MULTILIB is not set 134 | CT_ARCH_USE_MMU=y 135 | 136 | # 137 | # Target optimisations 138 | # 139 | CT_ARCH_FLOAT="" 140 | 141 | # 142 | # alpha other options 143 | # 144 | CT_ARCH_ALPHA_EV4=y 145 | # CT_ARCH_ALPHA_EV45 is not set 146 | # CT_ARCH_ALPHA_EV5 is not set 147 | # CT_ARCH_ALPHA_EV56 is not set 148 | # CT_ARCH_ALPHA_EV6 is not set 149 | # CT_ARCH_ALPHA_EV67 is not set 150 | CT_ARCH_ALPHA_VARIANT="ev4" 151 | 152 | # 153 | # Toolchain options 154 | # 155 | 156 | # 157 | # General toolchain options 158 | # 159 | CT_FORCE_SYSROOT=y 160 | CT_USE_SYSROOT=y 161 | CT_SYSROOT_NAME="sysroot" 162 | CT_SYSROOT_DIR_PREFIX="" 163 | CT_WANTS_STATIC_LINK=y 164 | # CT_STATIC_TOOLCHAIN is not set 165 | CT_TOOLCHAIN_PKGVERSION="" 166 | CT_TOOLCHAIN_BUGURL="" 167 | 168 | # 169 | # Tuple completion and aliasing 170 | # 171 | CT_TARGET_VENDOR="unknown" 172 | CT_TARGET_ALIAS_SED_EXPR="" 173 | CT_TARGET_ALIAS="" 174 | 175 | # 176 | # Toolchain type 177 | # 178 | CT_CROSS=y 179 | # CT_CANADIAN is not set 180 | CT_TOOLCHAIN_TYPE="cross" 181 | 182 | # 183 | # Build system 184 | # 185 | CT_BUILD="" 186 | CT_BUILD_PREFIX="" 187 | CT_BUILD_SUFFIX="" 188 | 189 | # 190 | # Misc options 191 | # 192 | # CT_TOOLCHAIN_ENABLE_NLS is not set 193 | 194 | # 195 | # Operating System 196 | # 197 | CT_BARE_METAL=y 198 | CT_KERNEL="bare-metal" 199 | CT_KERNEL_bare_metal=y 200 | # CT_KERNEL_linux is not set 201 | CT_KERNEL_bare_metal_AVAILABLE=y 202 | CT_KERNEL_linux_AVAILABLE=y 203 | CT_KERNEL_windows_AVAILABLE=y 204 | 205 | # 206 | # Common kernel options 207 | # 208 | 209 | # 210 | # Binary utilities 211 | # 212 | CT_ARCH_BINFMT_ELF=y 213 | CT_BINUTILS="binutils" 214 | CT_BINUTILS_binutils=y 215 | 216 | # 217 | # GNU binutils 218 | # 219 | # CT_CC_BINUTILS_SHOW_LINARO is not set 220 | CT_BINUTILS_V_2_25=y 221 | # CT_BINUTILS_V_2_24 is not set 222 | # CT_BINUTILS_V_2_23_2 is not set 223 | # CT_BINUTILS_V_2_23_1 is not set 224 | # CT_BINUTILS_V_2_22 is not set 225 | # CT_BINUTILS_V_2_21_53 is not set 226 | # CT_BINUTILS_V_2_21_1a is not set 227 | # CT_BINUTILS_V_2_20_1a is not set 228 | # CT_BINUTILS_V_2_19_1a is not set 229 | # CT_BINUTILS_V_2_18a is not set 230 | CT_BINUTILS_VERSION="2.25" 231 | CT_BINUTILS_2_25_or_later=y 232 | CT_BINUTILS_2_24_or_later=y 233 | CT_BINUTILS_2_23_or_later=y 234 | CT_BINUTILS_2_22_or_later=y 235 | CT_BINUTILS_2_21_or_later=y 236 | CT_BINUTILS_2_20_or_later=y 237 | CT_BINUTILS_2_19_or_later=y 238 | CT_BINUTILS_2_18_or_later=y 239 | CT_BINUTILS_HAS_HASH_STYLE=y 240 | CT_BINUTILS_HAS_GOLD=y 241 | CT_BINUTILS_HAS_PLUGINS=y 242 | CT_BINUTILS_HAS_PKGVERSION_BUGURL=y 243 | CT_BINUTILS_LINKER_LD=y 244 | CT_BINUTILS_LINKERS_LIST="ld" 245 | CT_BINUTILS_LINKER_DEFAULT="bfd" 246 | # CT_BINUTILS_PLUGINS is not set 247 | CT_BINUTILS_EXTRA_CONFIG_ARRAY="" 248 | 249 | # 250 | # binutils other options 251 | # 252 | 253 | # 254 | # C-library 255 | # 256 | CT_LIBC="newlib" 257 | CT_LIBC_VERSION="2.2.0" 258 | CT_LIBC_newlib=y 259 | # CT_LIBC_none is not set 260 | CT_LIBC_glibc_AVAILABLE=y 261 | CT_THREADS="none" 262 | CT_LIBC_mingw_AVAILABLE=y 263 | CT_LIBC_musl_AVAILABLE=y 264 | CT_LIBC_newlib_AVAILABLE=y 265 | # CT_CC_NEWLIB_SHOW_LINARO is not set 266 | CT_LIBC_NEWLIB_V_2_2_0=y 267 | # CT_LIBC_NEWLIB_V_2_1_0 is not set 268 | # CT_LIBC_NEWLIB_V_2_0_0 is not set 269 | # CT_LIBC_NEWLIB_V_1_20_0 is not set 270 | # CT_LIBC_NEWLIB_V_1_19_0 is not set 271 | # CT_LIBC_NEWLIB_V_1_18_0 is not set 272 | # CT_LIBC_NEWLIB_V_1_17_0 is not set 273 | 274 | # 275 | # Architecture specific options 276 | # 277 | CT_LIBC_none_AVAILABLE=y 278 | CT_LIBC_uClibc_AVAILABLE=y 279 | CT_LIBC_SUPPORT_THREADS_NONE=y 280 | 281 | # 282 | # Common C library options 283 | # 284 | CT_THREADS_NONE=y 285 | 286 | # 287 | # newlib other options 288 | # 289 | # CT_LIBC_NEWLIB_IO_C99FMT is not set 290 | # CT_LIBC_NEWLIB_IO_LL is not set 291 | # CT_LIBC_NEWLIB_IO_FLOAT is not set 292 | # CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS is not set 293 | CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE=y 294 | CT_LIBC_NEWLIB_EXTRA_CONFIG_ARRAY="" 295 | 296 | # 297 | # C compiler 298 | # 299 | CT_CC="gcc" 300 | CT_CC_VERSION="5.1.0" 301 | CT_CC_CORE_PASS_2_NEEDED=y 302 | CT_CC_gcc=y 303 | # CT_CC_GCC_SHOW_LINARO is not set 304 | CT_CC_V_5_1=y 305 | # CT_CC_V_4_9_2 is not set 306 | # CT_CC_V_4_9_1 is not set 307 | # CT_CC_V_4_9_0 is not set 308 | # CT_CC_V_4_8_4 is not set 309 | # CT_CC_V_4_8_3 is not set 310 | # CT_CC_V_4_8_2 is not set 311 | # CT_CC_V_4_8_1 is not set 312 | # CT_CC_V_4_8_0 is not set 313 | # CT_CC_V_4_7_4 is not set 314 | # CT_CC_V_4_7_3 is not set 315 | # CT_CC_V_4_7_2 is not set 316 | # CT_CC_V_4_7_1 is not set 317 | # CT_CC_V_4_7_0 is not set 318 | # CT_CC_V_4_6_4 is not set 319 | # CT_CC_V_4_6_3 is not set 320 | # CT_CC_V_4_6_2 is not set 321 | # CT_CC_V_4_6_1 is not set 322 | # CT_CC_V_4_6_0 is not set 323 | # CT_CC_V_4_5_3 is not set 324 | # CT_CC_V_4_5_2 is not set 325 | # CT_CC_V_4_5_1 is not set 326 | # CT_CC_V_4_5_0 is not set 327 | # CT_CC_V_4_4_7 is not set 328 | # CT_CC_V_4_4_6 is not set 329 | # CT_CC_V_4_4_5 is not set 330 | # CT_CC_V_4_4_4 is not set 331 | # CT_CC_V_4_4_3 is not set 332 | # CT_CC_V_4_4_2 is not set 333 | # CT_CC_V_4_4_1 is not set 334 | # CT_CC_V_4_4_0 is not set 335 | # CT_CC_V_4_3_6 is not set 336 | # CT_CC_V_4_3_5 is not set 337 | # CT_CC_V_4_3_4 is not set 338 | # CT_CC_V_4_3_3 is not set 339 | # CT_CC_V_4_3_2 is not set 340 | # CT_CC_V_4_3_1 is not set 341 | # CT_CC_V_4_2_4 is not set 342 | # CT_CC_V_4_2_2 is not set 343 | CT_CC_GCC_4_2_or_later=y 344 | CT_CC_GCC_4_3_or_later=y 345 | CT_CC_GCC_4_4_or_later=y 346 | CT_CC_GCC_4_5_or_later=y 347 | CT_CC_GCC_4_6_or_later=y 348 | CT_CC_GCC_4_7_or_later=y 349 | CT_CC_GCC_4_8_or_later=y 350 | CT_CC_GCC_4_9_or_later=y 351 | CT_CC_GCC_5_1=y 352 | CT_CC_GCC_5_1_or_later=y 353 | CT_CC_GCC_HAS_GRAPHITE=y 354 | CT_CC_GCC_USE_GRAPHITE=y 355 | CT_CC_GCC_HAS_LTO=y 356 | CT_CC_GCC_USE_LTO=y 357 | CT_CC_GCC_HAS_PKGVERSION_BUGURL=y 358 | CT_CC_GCC_HAS_BUILD_ID=y 359 | CT_CC_GCC_HAS_LNK_HASH_STYLE=y 360 | CT_CC_GCC_USE_GMP_MPFR=y 361 | CT_CC_GCC_USE_MPC=y 362 | CT_CC_GCC_HAS_LIBQUADMATH=y 363 | CT_CC_GCC_HAS_LIBSANITIZER=y 364 | # CT_CC_LANG_FORTRAN is not set 365 | CT_CC_SUPPORT_CXX=y 366 | CT_CC_SUPPORT_FORTRAN=y 367 | CT_CC_SUPPORT_JAVA=y 368 | CT_CC_SUPPORT_ADA=y 369 | CT_CC_SUPPORT_OBJC=y 370 | CT_CC_SUPPORT_OBJCXX=y 371 | CT_CC_SUPPORT_GOLANG=y 372 | 373 | # 374 | # Additional supported languages: 375 | # 376 | # CT_CC_LANG_CXX is not set 377 | 378 | # 379 | # gcc other options 380 | # 381 | CT_CC_ENABLE_CXX_FLAGS="" 382 | CT_CC_CORE_EXTRA_CONFIG_ARRAY="" 383 | CT_CC_EXTRA_CONFIG_ARRAY="" 384 | CT_CC_STATIC_LIBSTDCXX=y 385 | # CT_CC_GCC_SYSTEM_ZLIB is not set 386 | 387 | # 388 | # Optimisation features 389 | # 390 | 391 | # 392 | # Settings for libraries running on target 393 | # 394 | CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y 395 | # CT_CC_GCC_LIBMUDFLAP is not set 396 | # CT_CC_GCC_LIBGOMP is not set 397 | # CT_CC_GCC_LIBSSP is not set 398 | # CT_CC_GCC_LIBQUADMATH is not set 399 | 400 | # 401 | # Misc. obscure options. 402 | # 403 | # CT_CC_GCC_DISABLE_PCH is not set 404 | CT_CC_GCC_LDBL_128=m 405 | # CT_CC_GCC_BUILD_ID is not set 406 | CT_CC_GCC_LNK_HASH_STYLE_DEFAULT=y 407 | # CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set 408 | # CT_CC_GCC_LNK_HASH_STYLE_GNU is not set 409 | # CT_CC_GCC_LNK_HASH_STYLE_BOTH is not set 410 | CT_CC_GCC_LNK_HASH_STYLE="" 411 | CT_CC_GCC_DEC_FLOAT_AUTO=y 412 | # CT_CC_GCC_DEC_FLOAT_BID is not set 413 | # CT_CC_GCC_DEC_FLOAT_DPD is not set 414 | # CT_CC_GCC_DEC_FLOATS_NO is not set 415 | 416 | # 417 | # Debug facilities 418 | # 419 | # CT_DEBUG_dmalloc is not set 420 | # CT_DEBUG_duma is not set 421 | # CT_DEBUG_gdb is not set 422 | # CT_DEBUG_ltrace is not set 423 | # CT_DEBUG_strace is not set 424 | 425 | # 426 | # Companion libraries 427 | # 428 | CT_COMPLIBS_NEEDED=y 429 | CT_GMP_NEEDED=y 430 | CT_MPFR_NEEDED=y 431 | CT_ISL_NEEDED=y 432 | CT_MPC_NEEDED=y 433 | CT_COMPLIBS=y 434 | CT_GMP=y 435 | CT_MPFR=y 436 | CT_ISL=y 437 | CT_MPC=y 438 | CT_GMP_V_6_0_0=y 439 | # CT_GMP_V_5_1_3 is not set 440 | # CT_GMP_V_5_1_1 is not set 441 | # CT_GMP_V_5_0_2 is not set 442 | # CT_GMP_V_5_0_1 is not set 443 | # CT_GMP_V_4_3_2 is not set 444 | # CT_GMP_V_4_3_1 is not set 445 | # CT_GMP_V_4_3_0 is not set 446 | CT_GMP_5_0_2_or_later=y 447 | CT_GMP_VERSION="6.0.0a" 448 | CT_MPFR_V_3_1_2=y 449 | # CT_MPFR_V_3_1_0 is not set 450 | # CT_MPFR_V_3_0_1 is not set 451 | # CT_MPFR_V_3_0_0 is not set 452 | # CT_MPFR_V_2_4_2 is not set 453 | # CT_MPFR_V_2_4_1 is not set 454 | # CT_MPFR_V_2_4_0 is not set 455 | CT_MPFR_VERSION="3.1.2" 456 | CT_ISL_V_0_14=y 457 | # CT_ISL_V_0_12_2 is not set 458 | CT_ISL_VERSION="0.14" 459 | CT_MPC_V_1_0_2=y 460 | # CT_MPC_V_1_0_1 is not set 461 | # CT_MPC_V_1_0 is not set 462 | # CT_MPC_V_0_9 is not set 463 | # CT_MPC_V_0_8_2 is not set 464 | # CT_MPC_V_0_8_1 is not set 465 | # CT_MPC_V_0_7 is not set 466 | CT_MPC_VERSION="1.0.2" 467 | 468 | # 469 | # Companion libraries common options 470 | # 471 | # CT_COMPLIBS_CHECK is not set 472 | 473 | # 474 | # Companion tools 475 | # 476 | 477 | # 478 | # READ HELP before you say 'Y' below !!! 479 | # 480 | # CT_COMP_TOOLS is not set 481 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir -p src 4 | [ -e crosstool-ng ] || git clone --depth 1 https://github.com/crosstool-ng/crosstool-ng.git 5 | cd crosstool-ng 6 | ./bootstrap 7 | ./configure --enable-local 8 | make -j $(nproc) 9 | make install 10 | cp ../config .config 11 | 12 | SAMPLES="alphaev56-unknown-linux-gnu alphaev67-unknown-linux-gnu arm-bare_newlib_cortex_m3_nommu-eabi arm-cortex_a15-linux-gnueabi arm-cortexa5-linux-uclibcgnueabihf arm-cortex_a8-linux-gnueabi arm-cortexa9_neon-linux-gnueabihf armeb-unknown-eabi armeb-unknown-linux-gnueabi armeb-unknown-linux-uclibcgnueabi arm-unknown-eabi arm-unknown-linux-gnueabi arm-unknown-linux-uclibcgnueabi arm-unknown-linux-uclibcgnueabihf armv6-rpi-linux-gnueabi avr32-unknown-none bfin-unknown-linux-uclibc i586-geode-linux-uclibc i586-mingw32msvc,i686-none-linux-gnu i686-nptl-linux-gnu i686-unknown-mingw32 m68k-unknown-elf m68k-unknown-uclinux-uclibc mips64el-n32-linux-uclibc mips64el-n64-linux-uclibc mips-ar2315-linux-gnu mipsel-sde-elf mipsel-unknown-linux-gnu mips-malta-linux-gnu mips-unknown-elf mips-unknown-linux-uclibc nios2-elf-mingw32 powerpc-405-linux-gnu powerpc64-unknown-linux-gnu powerpc-860-linux-gnu powerpc-e300c3-linux-gnu powerpc-e500v2-linux-gnuspe powerpc-unknown-linux-gnu powerpc-unknown-linux-uclibc powerpc-unknown_nofpu-linux-gnu s390-ibm-linux-gnu s390x-ibm-linux-gnu sh4-unknown-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu x86_64-unknown-linux-uclibc x86_64-unknown-mingw32" 13 | 14 | mkdir -p ../x-tools 15 | for sample in $SAMPLES 16 | do 17 | ../build-sample.sh $sample || echo "$sample" >> ../x-tools/broken 18 | ./ct-ng clean 19 | done 20 | cd .. 21 | 22 | mkdir -p bin 23 | cd bin 24 | for sample in $SAMPLES 25 | do 26 | ln -sf ../x-tools/$sample/bin/* . 27 | rm -f '*' 28 | done 29 | cd .. 30 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm gperf flex bison help2man gawk ncurses 4 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y gperf flex bison help2man gawk libncurses5-dev 4 | -------------------------------------------------------------------------------- /Tools/Binary/crosstool/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e x-tools ] && chmod -R u+w x-tools 4 | rm -rf crosstools-ng 5 | -------------------------------------------------------------------------------- /Tools/Binary/elfkickers/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/BR903/ELFkickers 4 | cd ELFkickers 5 | make -j $(nproc) 6 | cd .. 7 | mv ELFkickers/bin ./bin 8 | -------------------------------------------------------------------------------- /Tools/Binary/elfparser/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget http://www.elfparser.com/release/elfparser_x86_64_1.4.0.deb 4 | dpkg -x elfparser_x86_64_1.4.0.deb . 5 | mkdir -p bin 6 | mv usr/local/bin/elfparser bin/ 7 | rm -rf usr 8 | -------------------------------------------------------------------------------- /Tools/Binary/elfparser/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get install -y libqt5widgets5 5 | -------------------------------------------------------------------------------- /Tools/Binary/evilize/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget http://www.mscs.dal.ca/~selinger/md5collision/downloads/evilize-0.2.tar.gz 4 | tar zvxf evilize-0.2.tar.gz 5 | cd evilize-0.2 6 | make -j $(nproc) 7 | cd .. 8 | mkdir bin 9 | cd bin 10 | ln -s ../evilize-0.2/evilize . 11 | ln -s ../evilize-0.2/md5coll . 12 | -------------------------------------------------------------------------------- /Tools/Binary/gdb-heap/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth=1 https://github.com/rogerhu/gdb-heap || true 4 | 5 | cd gdb-heap 6 | # make sure gdbinit exists 7 | touch ~/.gdbinit 8 | if ! grep "init-gdb-heap" ~/.gdbinit; then 9 | cat >> ~/.gdbinit < gdb_version 17 | 18 | rm -rf "gdb" || true 19 | curl "https://ftp.gnu.org/gnu/gdb/gdb-$VERSION.tar.gz" | tar xz 20 | mv "gdb-$VERSION" "gdb" 21 | 22 | set +x 23 | # move to ctftools virtual env 24 | source ctf-tools-venv-activate 25 | set -x 26 | 27 | PREFIX=$(pwd) 28 | 29 | pushd ./gdb 30 | ./configure \ 31 | --prefix=$PREFIX \ 32 | --with-python=$(which python) \ 33 | --enable-targets=all \ 34 | --with-guile=guile-2.0 35 | make -j $(nproc) 36 | make install 37 | # remove build artifacts 38 | make clean 39 | popd 40 | 41 | # reduce binary size a little... 42 | strip bin/gdb || true 43 | strip bin/gdbserver || true 44 | -------------------------------------------------------------------------------- /Tools/Binary/gdb/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --needed --noconfirm texinfo guile2.0 5 | -------------------------------------------------------------------------------- /Tools/Binary/gdb/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install texinfo guile-2.0-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/gdb/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y texinfo 4 | -------------------------------------------------------------------------------- /Tools/Binary/gef/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | git clone --depth 1 https://github.com/hugsy/gef.git 5 | 6 | mkdir bin 7 | cat > bin/gdb-gef <> ~/.gdbinit <> ~/.gdbinit </dev/null 2>&1 ; then 8 | export LLVM_CONFIG=$(which llvm-config-3.9) 9 | ctf-tools-pip install "llvmlite==0.16" 10 | elif which llvm-config-3.8 >/dev/null 2>&1 ; then 11 | export LLVM_CONFIG=$(which llvm-config-3.8) 12 | ctf-tools-pip install "llvmlite==0.15" 13 | elif which llvm-config >/dev/null 2>&1; then 14 | # let's hope for the best 15 | ctf-tools-pip install llvmlite 16 | else 17 | echo "Skipping llvmlite install!" 18 | fi 19 | 20 | ctf-tools-pip install -e elfesteem 21 | ctf-tools-pip install -e miasm 22 | -------------------------------------------------------------------------------- /Tools/Binary/miasm/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --needed --noconfirm \ 4 | zlib libstdc++5 llvm clang libedit 5 | -------------------------------------------------------------------------------- /Tools/Binary/miasm/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y \ 4 | zlib1g zlib1g-dev \ 5 | libstdc++6 \ 6 | llvm-3.8 llvm-3.8-dev clang-3.8 \ 7 | libedit2 libedit-dev 8 | -------------------------------------------------------------------------------- /Tools/Binary/miasm/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y zlib zlib-devel \ 4 | libstdc++-devel libstdc++ libstdc++-static \ 5 | llvm llvm-devel \ 6 | libedit libedit-devel 7 | -------------------------------------------------------------------------------- /Tools/Binary/miasm/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y llvmlite elfesteem miasm || true 4 | -------------------------------------------------------------------------------- /Tools/Binary/one_gadget/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install --user-install one_gadget 4 | 5 | GEM_BIN_PATH=$(gem environment | grep "USER INSTALL" | awk -F ': ' '{ print $2 }')/bin 6 | 7 | MAGIC="# ctf-tools: gem install" 8 | for f in ~/.bashrc ~/.zshrc; do 9 | if [[ -e "$f" ]]; then 10 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 11 | cat >> "$f" << EOF 12 | $MAGIC 13 | export PATH=\$PATH:$GEM_BIN_PATH 14 | EOF 15 | fi 16 | fi 17 | done 18 | 19 | f=~/.config/fish/config.fish 20 | if [[ -e "$f" ]]; then 21 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 22 | cat >> "$f" << EOF 23 | $MAGIC 24 | set -x PATH \$PATH $GEM_BIN_PATH 25 | EOF 26 | fi 27 | fi 28 | -------------------------------------------------------------------------------- /Tools/Binary/panda/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e panda ] || git clone --recursive https://github.com/panda-re/panda 4 | 5 | # git includes submodules hence recursive 6 | 7 | ctf-tools-pip install -U pycparser 8 | 9 | git clone git://git.code.sf.net/p/libdwarf/code libdwarf-code 10 | 11 | # move to ctftools virtual env 12 | source ctf-tools-venv-activate 13 | 14 | pushd libdwarf-code 15 | ./configure --enable-shared 16 | make -j $(nproc) 17 | mkdir -p ../include 18 | mkdir -p ../lib 19 | cp libdwarf/libdwarf.h ../include 20 | cp libdwarf/dwarf.h ../include 21 | cp libdwarf/libdwarf.so ../lib 22 | popd 23 | 24 | #sed -i -e "s|/usr/local|$PWD|" panda/build.sh 25 | export QEMU_CFLAGS="-I $PWD/include" 26 | export QEMU_CXXFLAGS="-I $PWD/include" 27 | #export LDFLAGS="-L $PWD/lib" 28 | mkdir -p panda/build 29 | cd panda/build 30 | ../build.sh "$@" 31 | cd ../../ 32 | 33 | # link binaries 34 | mkdir -p bin 35 | cd bin 36 | ln -s ../panda/build/i386-softmmu/qemu-system-i386 ./panda-qemu-system-i386 37 | ln -s ../panda/build/arm-softmmu/qemu-system-arm ./panda-qemu-system-arm 38 | ln -s ../panda/build/x86_64-softmmu/qemu-system-x86_64 ./panda-qemu-system-x86_64 39 | for i in ../panda/scripts/*.py 40 | do 41 | ln -s $i ./panda-$(basename $i) 42 | done 43 | cd .. 44 | -------------------------------------------------------------------------------- /Tools/Binary/panda/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --needed --noconfirm nasm openssl libpcap subversion curl \ 5 | autoconf libtool libc++ unzip clang llvm 6 | -------------------------------------------------------------------------------- /Tools/Binary/panda/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install nasm libssl-dev libpcap-dev subversion curl \ 5 | autoconf libtool libc++-dev llvm-3.3-dev clang-3.3 unzip \ 6 | protobuf-c-compiler protobuf-compiler libprotobuf-dev pkg-config \ 7 | libglib2.0-dev libdwarf-dev 8 | -------------------------------------------------------------------------------- /Tools/Binary/panda/install-root-ubuntu: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get update 5 | #apt-get -y build-dep qemu 6 | apt-get -y install software-properties-common 7 | add-apt-repository -y ppa:phulin/panda 8 | apt-get update 9 | apt-get -y install nasm libssl-dev libpcap-dev libelf-dev \ 10 | libc++-dev llvm-3.3-dev clang-3.3 libprotoc-dev \ 11 | protobuf-c-compiler protobuf-compiler libprotobuf-c0-dev pkg-config \ 12 | libglib2.0-dev libcapstone-dev libdwarf-dev python-pycparser 13 | -------------------------------------------------------------------------------- /Tools/Binary/panda/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y pycparser || true 4 | -------------------------------------------------------------------------------- /Tools/Binary/pathgrind/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/codelion/pathgrind.git 4 | cd pathgrind 5 | git apply ../pathgrind.patch 6 | ./install.sh 7 | chmod 755 fuzz/fuzz.py fuzz/gui.py fuzz/plotfuzz.py 8 | cd ../ 9 | 10 | mkdir -p bin 11 | 12 | cat < bin/pathgrind-fuzz 13 | #!/bin/sh 14 | cd "$PWD/pathgrind/" 15 | python fuzz/fuzz.py "\$@" 16 | END 17 | 18 | cat < bin/pathgrind-gui 19 | #!/bin/sh 20 | cd "$PWD/pathgrind/" 21 | python fuzz/gui.py "\$@" 22 | END 23 | 24 | cat < bin/pathgrind-plot 25 | #!/bin/sh 26 | cd "$PWD/pathgrind/" 27 | python fuzz/plotfuzz.py "\$@" 28 | END 29 | 30 | chmod 755 bin/pathgrind-* 31 | -------------------------------------------------------------------------------- /Tools/Binary/pathgrind/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libc6-dev-i386 libc6-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/pathgrind/pathgrind.patch: -------------------------------------------------------------------------------- 1 | diff --git a/valgrind-r12356/configure.in b/valgrind-r12356/configure.in 2 | index 946baa8..6775185 100644 3 | --- a/valgrind-r12356/configure.in 4 | +++ b/valgrind-r12356/configure.in 5 | @@ -791,6 +791,13 @@ case "${GLIBC_VERSION}" in 6 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" 7 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" 8 | ;; 9 | + 2.19) 10 | + AC_MSG_RESULT(2.19 family) 11 | + AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x]) 12 | + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" 13 | + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" 14 | + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" 15 | + ;; 16 | darwin) 17 | AC_MSG_RESULT(Darwin) 18 | AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) 19 | diff --git a/valgrind-r12356/coregrind/m_debuginfo/readstabs.c b/valgrind-r12356/coregrind/m_debuginfo/readstabs.c 20 | index e62721b..1865f71 100644 21 | --- a/valgrind-r12356/coregrind/m_debuginfo/readstabs.c 22 | +++ b/valgrind-r12356/coregrind/m_debuginfo/readstabs.c 23 | @@ -52,7 +52,7 @@ 24 | 25 | /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ 26 | #if defined(VGO_linux) 27 | -# include /* stabs defns */ 28 | +# include /* stabs defns */ 29 | #elif defined(VGO_darwin) 30 | # include 31 | # define n_other n_sect 32 | -------------------------------------------------------------------------------- /Tools/Binary/peda/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | git clone --depth 1 https://github.com/longld/peda.git 5 | 6 | mkdir bin 7 | cat > bin/gdb-peda <> ~/.gdbinit <> bin/pwndbg <> ~/.gdbinit < /dev/null; then 7 | sudo apt-get install libc6-dbg:i386 || true 8 | fi 9 | -------------------------------------------------------------------------------- /Tools/Binary/pwndbg/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y dnf-plugins-core 4 | dnf debuginfo-install -y glibc 5 | -------------------------------------------------------------------------------- /Tools/Binary/pwntools/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth=1 https://github.com/Gallopsled/pwntools.git 4 | ctf-tools-pip install --upgrade appdirs 5 | ctf-tools-pip install --upgrade -e pwntools 6 | -------------------------------------------------------------------------------- /Tools/Binary/pwntools/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed binutils openssl libffi 4 | -------------------------------------------------------------------------------- /Tools/Binary/pwntools/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y binutils binutils-devel libffi-devel openssl-devel 4 | -------------------------------------------------------------------------------- /Tools/Binary/pwntools/install-root-ubuntu: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential 4 | 5 | if [[ $(lsb_release -rs | sed 's/\(..\)\.../\1/') -lt 16 ]]; then 6 | echo "using pwntools binutils ppa for pre-xenial ubuntu" 7 | apt-get -y install software-properties-common 8 | apt-add-repository -y ppa:pwntools/binutils 9 | apt-get update 10 | apt-get -y install binutils-.*-linux-gnu 11 | fi 12 | -------------------------------------------------------------------------------- /Tools/Binary/pwntools/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y pwntools || true 4 | -------------------------------------------------------------------------------- /Tools/Binary/python-pin/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | curl https://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz | tar xz 4 | export PIN_ROOT=$PWD/pin-2.14-71313-gcc.4.4.7-linux 5 | 6 | git clone --depth 1 https://github.com/blankwall/Python_Pin.git 7 | cd Python_Pin 8 | make PIN_ROOT=$PIN_ROOT 9 | cd .. 10 | 11 | mkdir -p bin 12 | cat < bin/python-pin 13 | #!/bin/bash -e 14 | 15 | SCRIPT=\$1 16 | shift 17 | $PWD/pin-2.14-71313-gcc.4.4.7-linux/pin.sh -t $PWD/Python_Pin/obj-intel64/Python_Pin.so -m \$SCRIPT -- "\$@" 18 | END 19 | chmod 755 bin/python-pin 20 | -------------------------------------------------------------------------------- /Tools/Binary/qemu/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | find_latest_qemu_version() { 4 | git ls-remote --tags git://git.qemu.org/qemu.git \ 5 | | grep -v '\-rc' \ 6 | | grep -oh 'v[0-9]\{1,2\}\.[0-9]\{1,2\}\(\.[0-9]\{1,2\}\(\.[0-9]\{0,2\}\)\?\)\?' \ 7 | | sort --version-sort -r \ 8 | | head -n 1 9 | } 10 | 11 | #VERSION=v2.10.1 12 | VERSION=$(find_latest_qemu_version) 13 | echo $VERSION > qemu_version 14 | git clone --depth=1 -b "$VERSION" git://git.qemu-project.org/qemu.git 15 | 16 | set +x 17 | source ctf-tools-venv-activate 18 | set -x 19 | 20 | prefix="--prefix=$(pwd)" 21 | python="--python=$(which python)" 22 | build_flags="" 23 | 24 | mkdir build 25 | pushd build 26 | if ! ../qemu/configure "$prefix" "$python" $build_flags; then 27 | echo "Updating QEMU submodules in case dependencies are missing" 28 | pushd ../qemu/ 29 | git submodule init 30 | git submodule update --recursive 31 | popd 32 | 33 | # redo configure step 34 | ../qemu/configure "$prefix" "$python" $build_flags 35 | fi 36 | make -j $(nproc) 37 | 38 | make install 39 | # remove build artifacts - qemu is huge otherwise... 40 | make clean 41 | popd 42 | rm -rf build 43 | -------------------------------------------------------------------------------- /Tools/Binary/qemu/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed python2 pixman dtc 4 | -------------------------------------------------------------------------------- /Tools/Binary/qemu/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y python pkg-config zlib1g-dev \ 4 | libglib2.0-dev libpixman-1-dev libfdt-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/qira/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir nosudo 4 | cat < nosudo/sudo 5 | #!/bin/bash 6 | echo SUDO BLOCKED: "\$@" 7 | END 8 | chmod 755 nosudo/sudo 9 | 10 | git clone --depth 1 https://github.com/BinaryAnalysisPlatform/qira.git 11 | #export HOME=$PWD 12 | export PATH=$PWD/nosudo:$PATH 13 | cd qira 14 | 15 | # pip install bap, indeed... 16 | sed -i 's/WITH_BAP = True/WITH_BAP = False/' middleware/qira_config.py 17 | sed -i '/eval $(opam config env)/d' qira 18 | sed -i 's/\.\/bap_install.sh/#.\/bap_install.sh/g' install.sh 19 | 20 | ./install.sh 21 | git apply ../qira_fix.patch 22 | 23 | cd .. 24 | mkdir -p bin 25 | cd bin 26 | ln -s ../qira/qira qira 27 | cd .. 28 | -------------------------------------------------------------------------------- /Tools/Binary/qira/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed python2-pip openssl libjpeg-turbo zlib \ 5 | unzip wget graphviz gmp llvm clang ocaml llvm-ocaml python2-virtualenv \ 6 | wget flex bison libtool automake autoconf pkg-config libevent glib2 7 | -------------------------------------------------------------------------------- /Tools/Binary/qira/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install python-pip libssl-dev build-essential python-dev python-pip debootstrap libjpeg-dev zlib1g-dev unzip wget graphviz software-properties-common libgmp-dev llvm-3.4-dev time clang-3.4 ocaml ocaml-native-compilers camlp4-extra opam clang python-virtualenv wget flex bison libtool automake autoconf autotools-dev pkg-config libglib2.0-dev libevent-2.0-5 5 | apt-get -y build-dep qemu 6 | 7 | # plugin deps 8 | apt-get -y install libssl1.0.0:i386 9 | -------------------------------------------------------------------------------- /Tools/Binary/qira/qira_fix.patch: -------------------------------------------------------------------------------- 1 | From 4dfae62014575bd2d19d0adf072e00c3ddd7fffe Mon Sep 17 00:00:00 2001 2 | From: pwnslinger 3 | Date: Fri, 6 Jul 2018 15:22:08 -0700 4 | Subject: [PATCH] issue 202 fix 5 | 6 | --- 7 | middleware/qira_webserver.py | 8 ++++++-- 8 | middleware/qira_webstatic.py | 5 +++-- 9 | requirements.txt | 3 ++- 10 | run_tests.sh | 10 ++++++++-- 11 | 4 files changed, 19 insertions(+), 7 deletions(-) 12 | 13 | diff --git a/middleware/qira_webserver.py b/middleware/qira_webserver.py 14 | index 3eac66a..3d51317 100644 15 | --- a/middleware/qira_webserver.py 16 | +++ b/middleware/qira_webserver.py 17 | @@ -38,7 +38,8 @@ def func_wrapper(*args, **kwargs): 18 | LIMIT = 0 19 | 20 | from flask import Flask, Response, redirect, request 21 | -from flask.ext.socketio import SocketIO, emit 22 | +#from flask.ext.socketio import SocketIO, emit 23 | +from flask_socketio import SocketIO, emit 24 | 25 | # http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run 26 | import threading 27 | @@ -66,6 +67,7 @@ def push_trace_update(i): 28 | t.needs_update = False 29 | 30 | def push_updates(full = True): 31 | + 32 | socketio.emit('pmaps', program.get_pmaps(), namespace='/qira') 33 | socketio.emit('maxclnum', program.get_maxclnum(), namespace='/qira') 34 | socketio.emit('arch', list(program.tregs), namespace='/qira') 35 | @@ -431,7 +433,9 @@ def run_server(largs, lprogram): 36 | print "****** starting WEB SERVER on %s:%d" % (qira_config.HOST, qira_config.WEB_PORT) 37 | threading.Thread(target=mwpoller).start() 38 | try: 39 | - socketio.run(app, host=qira_config.HOST, port=qira_config.WEB_PORT, log=open("/dev/null", "w")) 40 | + #socketio.run(app, host=qira_config.HOST, port=qira_config.WEB_PORT, log=open("/dev/null", "w")) 41 | + socketio.run(app, host=qira_config.HOST, port=qira_config.WEB_PORT, 42 | + log_output=False) 43 | except KeyboardInterrupt: 44 | print "*** User raised KeyboardInterrupt" 45 | exit() 46 | diff --git a/middleware/qira_webstatic.py b/middleware/qira_webstatic.py 47 | index 778f4bc..c1e5478 100644 48 | --- a/middleware/qira_webstatic.py 49 | +++ b/middleware/qira_webstatic.py 50 | @@ -9,7 +9,8 @@ 51 | from qira_webserver import app 52 | 53 | from flask import Flask, Response, redirect, request 54 | -from flask.ext.socketio import SocketIO, emit 55 | +#from flask.ext.socketio import SocketIO, emit 56 | +from flask_socketio import SocketIO, emit 57 | 58 | from qira_base import * 59 | import json 60 | @@ -81,7 +82,7 @@ def graph_dot(): 61 | os.system("dot /tmp/in.dot > /tmp/out.dot") 62 | ret = open("/tmp/out.dot").read() 63 | #print "DOT RESPONSE", ret 64 | - return ret 65 | + return ret 66 | 67 | # currently if we aren't using static, we don't want to draw the staticview 68 | # or be able to makefunction 69 | diff --git a/requirements.txt b/requirements.txt 70 | index c46478f..8a69c04 100644 71 | --- a/requirements.txt 72 | +++ b/requirements.txt 73 | @@ -12,5 +12,6 @@ capstone 74 | hexdump 75 | nose 76 | ./qiradb 77 | -https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709 78 | +pyparsing>=2.1.4 79 | +#https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709 80 | 81 | diff --git a/run_tests.sh b/run_tests.sh 82 | index 0e65d07..2411c1c 100755 83 | --- a/run_tests.sh 84 | +++ b/run_tests.sh 85 | @@ -36,8 +36,14 @@ fi 86 | # phantomjs 87 | # use phantomjs2.0 for non-draft WebSockets protol 88 | # unforunately this doesn't ship with Ubuntu by default 89 | - 90 | -sudo apt-get install $LIBICU 91 | +if [ $(sudo apt-get install $LIBICU; echo $?) != 100 ]; then 92 | + echo "libcsu55 installed successfully." 93 | +else 94 | + echo "missing dependencies, fixing source" 95 | + echo -e "deb http://security.ubuntu.com/ubuntu trusty-security main" | sudo tee -a /etc/apt/sources.list 96 | + sudo apt-get update 97 | + sudo apt-get install $LIBICU 98 | +fi 99 | 100 | wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-$VER.tar.bz2 101 | tar xf ./phantomjs-2.0.0-ubuntu-$VER.tar.bz2 102 | -------------------------------------------------------------------------------- /Tools/Binary/radare2/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/radare/radare2.git 4 | cd radare2/ 5 | ./configure --prefix=$(dirname $PWD) 6 | make -j $(nproc) 7 | make install 8 | cd .. 9 | 10 | cd bin 11 | for i in ???* 12 | do 13 | mv $i $i.real 14 | cat < $i 15 | #!/bin/bash 16 | LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$PWD/../lib $PWD/$i.real "\$@" 17 | END 18 | chmod 755 $i 19 | done 20 | 21 | ctf-tools-pip install -U r2pipe 22 | -------------------------------------------------------------------------------- /Tools/Binary/radare2/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y r2pipe || true 4 | -------------------------------------------------------------------------------- /Tools/Binary/rappel/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/yrp604/rappel 4 | cd rappel 5 | make 6 | cd .. 7 | 8 | mkdir -p bin 9 | cd bin 10 | ln -s ../rappel/bin/* . 11 | cd .. 12 | -------------------------------------------------------------------------------- /Tools/Binary/rappel/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y libedit-dev nasm 4 | apt-get install -y libedit-dev:i386 || true 5 | -------------------------------------------------------------------------------- /Tools/Binary/ropper/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e ropper ] || git clone --depth 1 https://github.com/sashs/Ropper.git ropper 4 | 5 | ctf-tools-pip install --no-binary -I capstone 6 | ctf-tools-pip install filebytes 7 | ctf-tools-pip install -e ropper 8 | -------------------------------------------------------------------------------- /Tools/Binary/ropper/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | set +e 4 | source ${VIRTUALENVWRAPPER_SCRIPT} 5 | workon ctftools 6 | set -e 7 | 8 | [ $(ropper --file /bin/false | wc -l) -gt 400 ] || exit 1 9 | exit 0 10 | -------------------------------------------------------------------------------- /Tools/Binary/rp++/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | 4 | # 64bit test 5 | if [[ $(uname -m) == 'x86_64' ]]; 6 | then 7 | BIN="rp-lin-x64" 8 | else 9 | BIN="rp-lin-x86" 10 | fi 11 | 12 | wget https://github.com/downloads/0vercl0k/rp/$BIN 13 | mv $BIN rp++ 14 | mkdir bin 15 | chmod 755 rp++ 16 | mv rp++ bin 17 | -------------------------------------------------------------------------------- /Tools/Binary/rr/configure-system: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | echo 'kernel.perf_event_paranoid = 1' | sudo tee /etc/sysctl.d/10-rr.conf 4 | -------------------------------------------------------------------------------- /Tools/Binary/rr/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/mozilla/rr.git 4 | mkdir build 5 | cd build 6 | cmake -DCMAKE_INSTALL_PREFIX=.. -G Ninja ../rr 7 | ninja || ninja-build 8 | ninja install || ninja-build install 9 | -------------------------------------------------------------------------------- /Tools/Binary/rr/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed \ 4 | ccache cmake gdb python2-pexpect ninja zlib 5 | ./configure-system 6 | -------------------------------------------------------------------------------- /Tools/Binary/rr/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y ccache cmake make g++-multilib gdb \ 4 | pkg-config libz-dev realpath python-pexpect manpages-dev git zlib1g-dev \ 5 | ninja-build 6 | ./configure-system 7 | -------------------------------------------------------------------------------- /Tools/Binary/rr/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y \ 4 | ccache cmake make gcc gcc-c++ gdb \ 5 | glibc-devel glibc-devel.i686 libstdc++-devel libstdc++-devel.i686 zlib-devel \ 6 | python-pexpect man-pages ninja-build 7 | ./configure-system 8 | -------------------------------------------------------------------------------- /Tools/Binary/scratchabit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --recursive https://github.com/pfalcon/ScratchABit 4 | 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../ScratchABit/ScratchABit.py ./scratchabit.py 8 | cd .. 9 | -------------------------------------------------------------------------------- /Tools/Binary/scratchablock/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | #move to ctftools virtual env - warning you'll have to activate the 4 | #virtualenv to use the scripts unless you install the pypl packages 5 | #outside the venv for Python 3 6 | source ctf-tools-venv-activate3 7 | 8 | pip install --upgrade nose 9 | pip install --upgrade pyyaml 10 | 11 | git clone --recursive https://github.com/pfalcon/ScratchABlock 12 | 13 | mkdir -p bin 14 | cd bin 15 | ln -s ../ScratchABlock/apply_xform.py ./scratchablock-apply_xform.py 16 | ln -s ../ScratchABlock/asmprinter.py ./scratchablock-asmprinter.py 17 | ln -s ../ScratchABlock/dump_c.py ./scratchablock-dump_c.py 18 | ln -s ../ScratchABlock/funcdb_dot.py ./scratchablock-funcdb_dot.py 19 | ln -s ../ScratchABlock/funcdb_util.py ./scratchablock-funcdb_util.py 20 | ln -s ../ScratchABlock/make_callgraph.sh ./scratchablock-make_callgraph.sh 21 | ln -s ../ScratchABlock/parse_asm.py ./scratchablock-parse_asm.py 22 | cd .. 23 | -------------------------------------------------------------------------------- /Tools/Binary/scratchablock/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get update 4 | apt-get install -y python3-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/scratchablock/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip3 uninstall -y nose || true 4 | ctf-tools-pip3 uninstall -y pyyaml || true 5 | -------------------------------------------------------------------------------- /Tools/Binary/seccomp-tools/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install --user-install seccomp-tools 4 | 5 | GEM_BIN_PATH=$(gem environment | grep "USER INSTALL" | awk -F ': ' '{ print $2 }')/bin 6 | 7 | MAGIC="# ctf-tools: gem install" 8 | for f in ~/.bashrc ~/.zshrc; do 9 | if [[ -e "$f" ]]; then 10 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 11 | cat >> "$f" << EOF 12 | $MAGIC 13 | export PATH=\$PATH:$GEM_BIN_PATH 14 | EOF 15 | fi 16 | fi 17 | done 18 | 19 | f=~/.config/fish/config.fish 20 | if [[ -e "$f" ]]; then 21 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 22 | cat >> "$f" << EOF 23 | $MAGIC 24 | set -x PATH \$PATH $GEM_BIN_PATH 25 | EOF 26 | fi 27 | fi 28 | -------------------------------------------------------------------------------- /Tools/Binary/shellnoob/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/reyammer/shellnoob 4 | 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../shellnoob/shellnoob.py . 8 | cd .. 9 | -------------------------------------------------------------------------------- /Tools/Binary/shellsploit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/raildex1/shellsploit-framework.git 4 | cd shellsploit-framework 5 | 6 | set +e 7 | source ${VIRTUALENVWRAPPER_SCRIPT} 8 | workon ctftools 9 | set -e 10 | python easyinstall.py install 11 | cd .. 12 | 13 | mkdir -p bin 14 | cd bin 15 | ln -sf $VIRTUAL_ENV/bin/shellsploit . 16 | cd .. 17 | deactivate 18 | -------------------------------------------------------------------------------- /Tools/Binary/snowman/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR=$PWD 4 | 5 | [ -e snowman ] || git clone --depth 1 https://github.com/yegord/snowman 6 | cd snowman 7 | mkdir build 8 | cd build 9 | cmake -D CMAKE_INSTALL_PREFIX=$INST_DIR ../src 10 | cmake --build . 11 | cmake --build . --target install 12 | -------------------------------------------------------------------------------- /Tools/Binary/snowman/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --needed --noconfirm boost boost-libs cmake 5 | -------------------------------------------------------------------------------- /Tools/Binary/snowman/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libboost-dev cmake libqt4-dev 5 | -------------------------------------------------------------------------------- /Tools/Binary/snowman/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | dnf install -y boost cmake qt5-base qqt5-base-devel 5 | -------------------------------------------------------------------------------- /Tools/Binary/taintgrind/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR=$PWD 4 | 5 | curl http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 | tar xj 6 | cd valgrind-3.12.0 7 | ./autogen.sh 8 | ./configure --prefix=$INST_DIR 9 | make -j $(nproc) 10 | make install 11 | 12 | git clone --depth 1 https://github.com/wmkhoo/taintgrind.git 13 | cd taintgrind 14 | ../autogen.sh 15 | ./configure --prefix=$INST_DIR 16 | make -j $(nproc) 17 | make install 18 | cd ../../ 19 | 20 | cd bin 21 | for i in * 22 | do 23 | mv $i taintgrind-$i 24 | done 25 | -------------------------------------------------------------------------------- /Tools/Binary/valgrind/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR=$PWD 4 | 5 | curl ftp://sourceware.org/pub/valgrind/valgrind-3.13.0.tar.bz2 | tar xj 6 | cd valgrind-3.13.0 7 | ./autogen.sh 8 | ./configure --prefix=$INST_DIR 9 | make -j $(nproc) 10 | make install 11 | -------------------------------------------------------------------------------- /Tools/Binary/villoc/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | curl https://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz | tar xz 4 | export PIN_ROOT=$PWD/pin-2.14-71313-gcc.4.4.7-linux 5 | 6 | git clone --depth 1 https://github.com/wapiflapi/villoc 7 | cd villoc/pintool 8 | make PIN_ROOT=$PIN_ROOT 9 | cd ../ 10 | chmod 755 villoc.py 11 | cd .. 12 | 13 | mkdir -p bin 14 | cd bin 15 | ln -s ../villoc/villoc.py . 16 | cd .. 17 | -------------------------------------------------------------------------------- /Tools/Binary/virtualsocket/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/antoniobianchi333/virtualsocket.git 4 | ctf-tools-pip install -e virtualsocket/ 5 | 6 | -------------------------------------------------------------------------------- /Tools/Binary/wcc/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/endrazine/wcc 4 | pushd wcc 5 | git submodule init 6 | git submodule update 7 | 8 | # fedora doesn't have stropts.h since apparently it's unsupported on linux 9 | # anyway. wcc compiles fines without it. 10 | if [[ "$DISTRI" == "fedora" ]]; then 11 | sed -i "s&#include &/*#include */&g" \ 12 | src/wsh/include/libwitch/wsh.h 13 | fi 14 | 15 | 16 | make 17 | mv bin/ ../ 18 | popd 19 | pushd bin/ 20 | sed -i "s&/usr/bin/wsh&$(pwd)/wsh&" ./wcch 21 | -------------------------------------------------------------------------------- /Tools/Binary/wcc/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed clang uthash readline capstone \ 5 | libelf binutils gsl 6 | -------------------------------------------------------------------------------- /Tools/Binary/wcc/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install clang libbfd-dev uthash-dev \ 5 | libelf-dev libcapstone-dev \ 6 | libreadline6 libreadline6-dev \ 7 | libiberty-dev libgsl-dev 8 | -------------------------------------------------------------------------------- /Tools/Binary/wcc/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | dnf install -y clang clang-libs clang-devel binutils binutils-devel \ 5 | uthash-devel elfutils-libelf elfutils-libelf-devel capstone \ 6 | capstone-devel readline readline-devel gsl gsl-devel 7 | -------------------------------------------------------------------------------- /Tools/Binary/xrop/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/acama/xrop.git 4 | cd xrop 5 | git submodule update --init --recursive 6 | make -j 1 # Watch out!! -j $(nproc) makes the build fail 7 | cd .. 8 | 9 | mkdir -p bin 10 | cd bin 11 | ln -s ../xrop/xrop . 12 | cd .. 13 | -------------------------------------------------------------------------------- /Tools/Binary/xrop/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get update 4 | apt-get install -y zlib1g-dev 5 | 6 | -------------------------------------------------------------------------------- /Tools/Crypto/cribdrag/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/SpiderLabs/cribdrag 4 | 5 | mkdir bin 6 | cd bin 7 | ln -s ../cribdrag/* . 8 | cd .. 9 | -------------------------------------------------------------------------------- /Tools/Crypto/fastcoll/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e fastcoll ] || git clone https://github.com/upbit/clone-fastcoll fastcoll 4 | cd fastcoll 5 | make 6 | 7 | cd .. 8 | mkdir bin 9 | cp fastcoll/fastcoll bin 10 | -------------------------------------------------------------------------------- /Tools/Crypto/featherduster/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth=1 https://github.com/nccgroup/featherduster.git 4 | ctf-tools-pip install --upgrade -e featherduster 5 | 6 | mkdir bin || true 7 | cd bin 8 | cat > featherduster < bin/libc-database-$i 9 | cd $PWD/libc-database/ 10 | ./$i "$@" 11 | END 12 | chmod 755 bin/libc-database-$i 13 | done 14 | 15 | bin/libc-database-get 16 | -------------------------------------------------------------------------------- /Tools/Crypto/littleblackbox/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/devttys0/littleblackbox.git 4 | INST_DIR=$PWD 5 | cd littleblackbox/src 6 | ./configure --prefix=$INST_DIR 7 | make -j $(nproc) 8 | 9 | mkdir -p $INST_DIR/share/man/man1 $INST_DIR/bin 10 | make -i install 11 | cp lbb.db $INST_DIR 12 | 13 | cd $INST_DIR/bin 14 | mv littleblackbox littleblackbox.real 15 | cat < littleblackbox 16 | #!/bin/bash 17 | cd $INST_DIR 18 | bin/littleblackbox.real "\$@" 19 | END 20 | chmod 755 littleblackbox 21 | -------------------------------------------------------------------------------- /Tools/Crypto/littleblackbox/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed openssl libpcap sqlite 5 | -------------------------------------------------------------------------------- /Tools/Crypto/littleblackbox/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev libpcap-dev libsqlite3-dev 5 | -------------------------------------------------------------------------------- /Tools/Crypto/msieve/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir bin 4 | wget -O msieve.tar.gz "https://downloads.sourceforge.net/project/msieve/msieve/Msieve v1.53/msieve153_src.tar.gz" 5 | tar -xf msieve.tar.gz 6 | 7 | cd msieve-* 8 | make all 9 | cp msieve ../bin 10 | -------------------------------------------------------------------------------- /Tools/Crypto/msieve/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed gmp 5 | -------------------------------------------------------------------------------- /Tools/Crypto/msieve/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libgmp3-dev libgmp-dev libz-dev 5 | -------------------------------------------------------------------------------- /Tools/Crypto/nonce-disrespect/build.patch: -------------------------------------------------------------------------------- 1 | diff --git a/tool/Makefile b/tool/Makefile 2 | index 39983c2..60c8dfc 100644 3 | --- a/tool/Makefile 4 | +++ b/tool/Makefile 5 | @@ -4,10 +4,10 @@ LDLIBS += -lgmp -lntl 6 | all : recover forge 7 | 8 | recover : recover.o gcm.o 9 | - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(LDLIBS) $^ 10 | + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(LDLIBS) $^ $(LDLIBS) 11 | 12 | forge : forge.o gcm.o 13 | - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(LDLIBS) $^ 14 | + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(LDLIBS) $^ $(LDLIBS) 15 | 16 | %.o : %.cpp 17 | $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $^ 18 | -------------------------------------------------------------------------------- /Tools/Crypto/nonce-disrespect/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/nonce-disrespect/nonce-disrespect.git 4 | git -C nonce-disrespect apply $PWD/build.patch 5 | make -C nonce-disrespect/tool 6 | 7 | mkdir bin 8 | cp nonce-disrespect/tool/forge bin/ 9 | cp nonce-disrespect/tool/recover bin/ 10 | -------------------------------------------------------------------------------- /Tools/Crypto/nonce-disrespect/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | apt-get install libntl-dev 4 | -------------------------------------------------------------------------------- /Tools/Crypto/pemcrack/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/robertdavidgraham/pemcrack.git 4 | cd pemcrack 5 | make 6 | cd .. 7 | 8 | mkdir -p bin 9 | cp pemcrack/bin/pemcrack bin/ 10 | -------------------------------------------------------------------------------- /Tools/Crypto/pemcrack/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev 5 | 6 | -------------------------------------------------------------------------------- /Tools/Crypto/pkcrack/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-1.2.2.tar.gz 4 | tar xzf pkcrack-1.2.2.tar.gz 5 | cd pkcrack-1.2.2/src 6 | make 7 | 8 | mkdir -p ../../bin 9 | cp extract findkey makekey pkcrack zipdecrypt ../../bin 10 | cd ../../ 11 | -------------------------------------------------------------------------------- /Tools/Crypto/python-paddingoracle/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/mwielgoszewski/python-paddingoracle.git 4 | ctf-tools-pip install -e python-paddingoracle 5 | -------------------------------------------------------------------------------- /Tools/Crypto/python-paddingoracle/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y python-paddingoracle || true 4 | -------------------------------------------------------------------------------- /Tools/Crypto/reveng/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://downloads.sourceforge.net/project/reveng/1.5.1/reveng-1.5.1.tar.gz 4 | tar -xf reveng-1.5.1.tar.gz 5 | cd reveng-1.5.1 6 | sed -i -e "s/^#define BMP_BIT.*/#define BMP_BIT 64/" config.h 7 | sed -i -e "s/^#define BMP_SUB.*/#define BMP_SUB 32/" config.h 8 | make -j $(nproc) 9 | cd .. 10 | 11 | mkdir -p bin 12 | cp reveng-1.5.1/reveng bin 13 | -------------------------------------------------------------------------------- /Tools/Crypto/ssh_decoder/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/jjyg/ssh_decoder.git 4 | chmod 755 ssh_decoder/ssh_decoder.rb 5 | 6 | mkdir bin 7 | cd bin 8 | ln -s ../ssh_decoder/ssh_decoder.rb ssh_decoder 9 | cd .. 10 | -------------------------------------------------------------------------------- /Tools/Crypto/sslsplit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/droe/sslsplit 4 | cd sslsplit 5 | make -j $(nproc) 6 | cd .. 7 | 8 | mkdir bin 9 | cp sslsplit/sslsplit bin/ 10 | -------------------------------------------------------------------------------- /Tools/Crypto/sslsplit/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed libevent 5 | -------------------------------------------------------------------------------- /Tools/Crypto/sslsplit/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libevent-dev pkg-config libssl-dev 5 | -------------------------------------------------------------------------------- /Tools/Crypto/xortool/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip install --upgrade 'git+https://github.com/hellman/xortool.git' 4 | -------------------------------------------------------------------------------- /Tools/Crypto/xortool/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y xortool || true 4 | -------------------------------------------------------------------------------- /Tools/Crypto/yafu/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir yafu 4 | mkdir bin 5 | cd yafu 6 | wget "https://downloads.sourceforge.net/project/yafu/1.34/yafu-1.34.zip" -O yafu.zip 7 | unzip yafu.zip 8 | chmod 755 yafu 9 | mv yafu ../bin 10 | -------------------------------------------------------------------------------- /Tools/Crypto/yafu/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | RESULT=$(./bin/yafu 'factor(10)' | grep "^P" | tr -d '\n') 4 | [ "$RESULT" == "P1 = 2P1 = 5" ] || exit 1 5 | 6 | ./bin/yafu 'factor(427836528347651349523452345)' | grep "^P" | grep -q 3290292219611 7 | -------------------------------------------------------------------------------- /Tools/Forensics/binwalk/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/devttys0/binwalk.git 4 | ctf-tools-pip install -e binwalk 5 | 6 | source ctf-tools-venv-activate 7 | mkdir -p bin 8 | ln -s $VIRTUAL_ENV/bin/binwalk bin 9 | -------------------------------------------------------------------------------- /Tools/Forensics/binwalk/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | ctf-tools-pip uninstall -y binwalk || true 4 | -------------------------------------------------------------------------------- /Tools/Forensics/dislocker/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget -O dislocker.tar.gz https://github.com/Aorimn/dislocker/archive/v0.7.1.tar.gz 4 | tar xf dislocker.tar.gz 5 | DISLOCKERDIR=$(ls -d dislocker-*) 6 | cd $DISLOCKERDIR 7 | 8 | cmake . 9 | make -j $(nproc) 10 | cd .. 11 | mkdir bin 12 | cd bin 13 | ls -l ../$DISLOCKERDIR/src/ 14 | 15 | ln -s ../$DISLOCKERDIR/src/dislocker-bek . 16 | ln -s ../$DISLOCKERDIR/src/dislocker-file . 17 | ln -s ../$DISLOCKERDIR/src/dislocker-fuse . 18 | ln -s ../$DISLOCKERDIR/src/dislocker-metadata . 19 | -------------------------------------------------------------------------------- /Tools/Forensics/dislocker/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed mbedtls fuse 5 | -------------------------------------------------------------------------------- /Tools/Forensics/dislocker/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | case "$(lsb_release -cs)" in 5 | xenial) 6 | apt-get -y install gcc cmake make libfuse-dev libmbedtls-dev ruby-dev 7 | ;; 8 | *) 9 | apt-get -y install gcc cmake make libfuse-dev libpolarssl-dev ruby-dev 10 | ;; 11 | esac 12 | -------------------------------------------------------------------------------- /Tools/Forensics/exetractor/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/kholia/exetractor-clone.git 4 | 5 | mkdir bin 6 | cd bin 7 | ln -s ../exetractor-clone/ArchiveViewer.py ../exetractor-clone/ArchiveExtractor.py ../exetractor-clone/exetractor.py . 8 | cd .. 9 | -------------------------------------------------------------------------------- /Tools/Forensics/firmware-mod-kit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/mirror/firmware-mod-kit.git 4 | cd firmware-mod-kit/src 5 | ./configure 6 | make 7 | cd ../.. 8 | 9 | mkdir -p bin 10 | for i in firmware-mod-kit/*.sh 11 | do 12 | echo "$(dirname $(readlink -m $0))/$i \"\$@\"" > bin/$(basename $i) 13 | chmod 755 bin/$(basename $i) 14 | done 15 | 16 | sed -i -e "s/SUDO=\"sudo\"/SUDO=\"\"/" firmware-mod-kit/*.sh 17 | -------------------------------------------------------------------------------- /Tools/Forensics/firmware-mod-kit/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed zlib xz python2-magic 5 | -------------------------------------------------------------------------------- /Tools/Forensics/firmware-mod-kit/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install liblzma-dev python-magic zlib1g-dev 5 | -------------------------------------------------------------------------------- /Tools/Forensics/pdf-parser/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://didierstevens.com/files/software/pdf-parser_V0_6_7.zip 4 | unzip pdf-parser_V0_6_7.zip 5 | mkdir -p bin 6 | mv pdf-parser.py bin/pdf-parser 7 | chmod 755 bin/pdf-parser 8 | -------------------------------------------------------------------------------- /Tools/Forensics/peepdf/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e peepdf ] || git clone --depth 1 https://github.com/jesparza/peepdf 4 | 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../peepdf/peepdf.py . 8 | ln -s ../peepdf/jjdecode . 9 | cd .. 10 | -------------------------------------------------------------------------------- /Tools/Forensics/scrdec18/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget "https://gist.githubusercontent.com/bcse/1834878/raw/7483fb72abbb32aa69b853fdcc9f6f72e7568677/scrdec18.c" 4 | mkdir -p bin 5 | gcc -o bin/scrdec18 scrdec18.c 6 | -------------------------------------------------------------------------------- /Tools/Forensics/testdisk/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | curl https://www.cgsecurity.org/testdisk-7.0.linux26-x86_64.tar.bz2 | tar xj 4 | 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../testdisk-7.0/*_static . 8 | cd .. 9 | -------------------------------------------------------------------------------- /Tools/Misc/jdgui/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e jd-gui-1.4.0.jar ] || wget https://github.com/java-decompiler/jd-gui/releases/download/v1.4.0/jd-gui-1.4.0.jar 4 | 5 | mkdir -p bin 6 | cat < bin/jd-gui 7 | #/bin/bash -e 8 | java -jar $PWD/jd-gui-1.4.0.jar "\$@" 9 | END 10 | chmod 755 bin/jd-gui 11 | -------------------------------------------------------------------------------- /Tools/Misc/jdgui/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed jre7-openjdk 5 | -------------------------------------------------------------------------------- /Tools/Misc/jdgui/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | 5 | case "$(lsb_release -cs)" in 6 | xenial) 7 | apt-get -o Dpkg::Options::="--force-overwrite" -y install openjdk-9-jre 8 | ;; 9 | *) 10 | apt-get -y install openjdk-7-jre 11 | ;; 12 | esac 13 | -------------------------------------------------------------------------------- /Tools/Misc/veles/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget -O src.tar.gz https://codisec.com/wp-content/uploads/2016/12/Veles_2016.12_Source.tar.gz 4 | tar xf src.tar.gz 5 | mkdir build 6 | cd build 7 | cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=.. ../veles-2016.12 8 | make -j8 9 | make install 10 | -------------------------------------------------------------------------------- /Tools/Misc/veles/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed cmake zlib qt5-base 4 | -------------------------------------------------------------------------------- /Tools/Misc/veles/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y cmake zlib1g-dev qtbase5-dev 4 | -------------------------------------------------------------------------------- /Tools/Misc/xspy/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e xspy ] || git clone git://git.kali.org/packages/xspy.git 4 | mkdir -p bin 5 | gcc -o bin/xspy xspy/Xspy.c -lX11 6 | -------------------------------------------------------------------------------- /Tools/Misc/xspy/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y libx11-dev 4 | -------------------------------------------------------------------------------- /Tools/Misc/youtube-dl/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://yt-dl.org/latest/youtube-dl 4 | chmod 755 youtube-dl 5 | mkdir -p bin 6 | mv youtube-dl bin 7 | -------------------------------------------------------------------------------- /Tools/Misc/z3/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/Z3Prover/z3 4 | cd z3 5 | 6 | # move to ctftools virtual env 7 | set +e 8 | source ${VIRTUALENVWRAPPER_SCRIPT} 9 | workon ctftools 10 | set -e 11 | 12 | # install z3 13 | python scripts/mk_make.py --python 14 | cd build 15 | make 16 | make install 17 | 18 | deactivate 19 | -------------------------------------------------------------------------------- /Tools/Misc/z3/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | set +e 4 | source ${VIRTUALENVWRAPPER_SCRIPT} 5 | workon ctftools 6 | set -e 7 | 8 | python -c 'import z3; print(z3.get_version_string())' || exit 1 9 | exit 0 10 | -------------------------------------------------------------------------------- /Tools/Misc/z3/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | cd z3/build 4 | make uninstall 5 | -------------------------------------------------------------------------------- /Tools/Stego/sonic-visualizer/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR=$PWD 4 | 5 | wget --no-check-certificate -O - https://code.soundsoftware.ac.uk/attachments/download/1675/sonic-visualiser-2.5.tar.gz | tar xz 6 | cd sonic-visualiser-2.5 7 | ./configure --prefix=$INST_DIR 8 | make -j $(nproc) 9 | #make install 10 | 11 | mkdir -p bin 12 | cd bin 13 | ln -s ../sonic-visualiser-2.5/sonic-visualiser . 14 | cd .. 15 | -------------------------------------------------------------------------------- /Tools/Stego/sonic-visualizer/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed bzip2 fftw libsndfile libsamplerate \ 5 | vamp-plugin-sdk rubberband sord liblo liblrdf liboggz libfishsound \ 6 | libid3tag portaudio libmad qt5-base 7 | -------------------------------------------------------------------------------- /Tools/Stego/sonic-visualizer/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libbz2-dev libfftw3-dev libsndfile1-dev libsamplerate0-dev vamp-plugin-sdk librubberband-dev libsord-dev liblo-dev liblrdf0-dev liboggz2-dev libfishsound1-dev libid3tag0-dev libportaudio-dev libmad0-dev qt5-qmake qt5-default libasound-dev 5 | -------------------------------------------------------------------------------- /Tools/Stego/steganabara/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | curl http://www.caesum.com/handbook/steganabara-1.1.1.tar.gz | tar xz 4 | mkdir -p bin 5 | cat < bin/steganabara 6 | #!/bin/bash -e 7 | java -cp $PWD/Steganabara/bin steganabara.Steganabara 8 | END 9 | chmod 755 bin/steganabara 10 | -------------------------------------------------------------------------------- /Tools/Stego/stegdetect/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR="$PWD" 4 | 5 | git clone --depth 1 https://github.com/AlexandreFournier/stegdetect.git 6 | 7 | mkdir -p bin etc man/man1 share/stegbreak 8 | cd stegdetect 9 | linux32 ./configure --prefix="$INST_DIR" 10 | linux32 make 11 | linux32 make install 12 | cd .. 13 | 14 | wget https://launchpadlibrarian.net/16697277/rules.ini -O share/stegbreak/rules.ini 15 | -------------------------------------------------------------------------------- /Tools/Stego/stegdetect/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | echo "ERROR: archlinux has no aclocal-1.4. only $(aclocal --version | head -n 1)" 5 | exit 1 6 | 7 | pacman -Syu --noconfirm --needed automake 8 | -------------------------------------------------------------------------------- /Tools/Stego/stegdetect/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install automake1.4 automake autotools-dev libevent-dev 5 | -------------------------------------------------------------------------------- /Tools/Stego/stegosaurus/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR="$PWD" 4 | 5 | git clone --depth 1 https://github.com/AngelKitty/stegosaurus.git 6 | 7 | chmod -R 777 stegosaurus/ 8 | 9 | cd stegosaurus/ 10 | 11 | -------------------------------------------------------------------------------- /Tools/Stego/stegsolve/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget http://www.caesum.com/handbook/Stegsolve.jar -O stegsolve.jar 4 | chmod +x stegsolve.jar 5 | mkdir bin 6 | mv stegsolve.jar bin/ 7 | 8 | -------------------------------------------------------------------------------- /Tools/Stego/zsteg/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install --user-install zsteg 4 | 5 | GEM_BIN_PATH=$(gem environment | grep "USER INSTALL" | awk -F ': ' '{ print $2 }')/bin 6 | 7 | MAGIC="# ctf-tools: gem install" 8 | for f in ~/.bashrc ~/.zshrc; do 9 | if [[ -e "$f" ]]; then 10 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 11 | cat >> "$f" </dev/null 2>&1; then 22 | cat >> "$f" <