├── .docker └── apt-get-install ├── .dockerignore ├── .github └── workflows │ └── nightly-build.yml ├── .gitignore ├── Dockerfile ├── Dockerfile.archlinux ├── Dockerfile.artful ├── Dockerfile.fedora ├── LICENSE ├── README.md ├── angr-management ├── install └── install-root-debian ├── angr ├── install └── install-root-debian ├── beef ├── install ├── install-root-archlinux └── install-root-debian ├── bin ├── ctf-tools-test-action └── manage-tools ├── burpsuite ├── install ├── install-root-archlinux └── install-root-debian ├── codext └── install ├── commix └── install ├── cribdrag └── install ├── cross2 └── install ├── crosstool ├── build-sample.sh ├── config ├── install ├── install-root-archlinux ├── install-root-debian └── uninstall ├── decomp2dbg └── install ├── df ├── install └── install-root-debian ├── elfkickers └── install ├── elfparser ├── cstdint.patch ├── install └── install-root-debian ├── evilize └── install ├── fastcoll └── install ├── featherduster ├── install └── install-root-debian ├── firmware-mod-kit ├── install ├── install-root-archlinux ├── install-root-debian └── shared-ng.patch ├── foresight └── install ├── galois └── install ├── gdb ├── install ├── install-root-archlinux ├── install-root-debian └── install-root-fedora ├── gef └── install ├── ghidra ├── install └── install-root-debian ├── hash-identifier ├── install └── install-root-debian ├── hashpump-partialhash ├── install ├── install-root-archlinux └── install-root-debian ├── honggfuzz ├── install ├── install-root-archlinux └── install-root-debian ├── ida └── install ├── jdgui ├── install ├── install-root-archlinux └── install-root-debian ├── libc-database ├── install └── install-root-debian ├── manticore ├── install └── install-root-debian ├── mitmproxy ├── install └── install-root-debian ├── msieve ├── install ├── install-root-archlinux └── install-root-debian ├── nonce-disrespect ├── build.patch ├── install └── install-root-debian ├── one_gadget ├── install ├── install-root-archlinux └── install-root-debian ├── pdf-parser └── install ├── peepdf └── install ├── pemcrack ├── install └── install-root-debian ├── pkcrack └── install ├── preeny └── install ├── pwndbg ├── install ├── install-root-archlinux ├── install-root-debian └── install-root-fedora ├── pwninit ├── install └── install-root-debian ├── pwnsh └── install ├── pwntools ├── install ├── install-root-archlinux ├── install-root-debian └── install-root-fedora ├── python2 ├── install └── install-root-debian ├── qemu ├── install ├── install-root-archlinux └── install-root-debian ├── qiling ├── install └── install-root-debian ├── qira ├── install ├── install-root-archlinux ├── install-root-debian ├── qemu.patch └── qira_fix.patch ├── rappel ├── install └── install-root-debian ├── reveng └── install ├── ropper ├── install └── test ├── rp++ └── install ├── rsactftool ├── install └── install-root-debian ├── scrdec18 └── install ├── seccomp-tools ├── install └── install-root-debian ├── shellnoob └── install ├── social-analyzer └── install ├── ssh_decoder └── install ├── sslsplit ├── install ├── install-root-archlinux └── install-root-debian ├── steganabara └── install ├── stegano-tools ├── install └── uninstall ├── stegdetect ├── install ├── install-root-archlinux ├── install-root-debian └── statics.patch ├── stegosaurus └── install ├── stegsolve └── install ├── subbrute └── install ├── taintgrind └── install ├── tor-browser └── install ├── valgrind └── install ├── veles ├── install ├── install-root-archlinux └── install-root-debian ├── villoc └── install ├── volatility └── install ├── volatility3 └── install ├── webgrep ├── install ├── install-root-archlinux ├── install-root-debian ├── install-root-fedora └── install-root-ubuntu ├── xortool └── install ├── xrop ├── install └── install-root-debian ├── xspy ├── install └── install-root-debian ├── yafu ├── install └── test └── zsteg ├── install ├── install-root-archlinux ├── install-root-debian └── uninstall /.docker/apt-get-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | export DEBIAN_FRONTEND="noninteractive" 3 | # update the package lists etc. 4 | apt-get -q update 5 | # this is actually against docker recommendations... But we'll do it anyway in 6 | # case our base image was not yet updated. 7 | apt-get dist-upgrade -y --no-install-recommends --auto-remove 8 | # finally install the package 9 | apt-get install -y --no-install-recommends --auto-remove "$@" 10 | # remove the package lists and apt-get metadata, such that the docker image 11 | # layer stays small 12 | apt-get -q clean 13 | rm -rf /var/lib/apt/lists/* 14 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !.git 3 | !.docker 4 | !bin/ 5 | -------------------------------------------------------------------------------- /.github/workflows/nightly-build.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push 2 | 3 | on: 4 | push: 5 | schedule: 6 | - cron: "0 0 * * *" 7 | workflow_dispatch: 8 | 9 | jobs: 10 | listcheck: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@master 14 | - name: Verify Tool List 15 | id: verify 16 | run: | 17 | diff <( 18 | grep -- --tool-- README.md | tr '[]' ' ' | 19 | awk '{print $4}' | sort 20 | ) <( 21 | ls */install | xargs -n1 dirname | sort 22 | ) 23 | toollist: 24 | runs-on: ubuntu-latest 25 | outputs: 26 | tools: ${{ steps.tools.outputs.tools }} 27 | steps: 28 | - uses: actions/checkout@master 29 | - name: List Tools 30 | id: tools 31 | run: | 32 | ( 33 | echo -n "tools="; 34 | cat README.md | grep -- --tool-- | grep -v -- --no-test-- | ( 35 | if [ ${{ github.event_name }} != "schedule" ] 36 | then 37 | grep -v -- --slow-test-- 38 | else 39 | cat 40 | fi 41 | ) | tr '[]' ' ' | awk '{print $4}' | jq -R . | jq -c -s .; 42 | ) >> "$GITHUB_OUTPUT" 43 | toolcheck: 44 | needs: toollist 45 | strategy: 46 | fail-fast: false 47 | matrix: 48 | tool: ${{ fromJSON(needs.toollist.outputs.tools) }} 49 | runs-on: ubuntu-latest 50 | steps: 51 | - uses: actions/checkout@master 52 | - uses: docker/setup-buildx-action@master 53 | - name: Pull Base 54 | run: | 55 | docker pull ubuntu:noble 56 | - uses: docker/login-action@v1 57 | with: 58 | username: ${{ secrets.DOCKERHUB_USERNAME }} 59 | password: ${{ secrets.DOCKERHUB_TOKEN }} 60 | - name: Build Tool 61 | run: | 62 | NAME=$(echo ${{ matrix.tool }} | tr -cd '0-9A-Za-z-_') 63 | EXTRA=$( grep -qE "^(featherduster|volatility|qira)$" <<< "${{ matrix.tool }}" && echo python2 || echo "" ) 64 | docker build -t ctftools/$NAME --build-arg PREINSTALL="$EXTRA ${{ matrix.tool }}" . 65 | docker push ctftools/$NAME 66 | docker tag ctftools/$NAME ctftools/$NAME:$(date +%Y-%m-%d) 67 | docker push ctftools/$NAME:$(date +%Y-%m-%d) 68 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */* 2 | bin/* 3 | !*/install 4 | !*/uninstall 5 | !*/install-root-* 6 | !*/upgrade 7 | !*/test 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:noble 2 | 3 | # wrapper script for apt-get 4 | COPY .docker/apt-get-install /usr/local/bin/apt-get-install 5 | RUN chmod +x /usr/local/bin/apt-get-install 6 | 7 | RUN sed -i -e "s/Types: deb/Types: deb deb-src/g" /etc/apt/sources.list.d/ubuntu.sources 8 | 9 | RUN apt-get-install build-essential libtool g++ gcc rubygems \ 10 | texinfo curl wget automake autoconf python3 python3-dev git \ 11 | unzip virtualenvwrapper sudo git subversion virtualenvwrapper ca-certificates 12 | 13 | RUN userdel -f -r ubuntu; useradd -m ctf 14 | RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf 15 | 16 | # a bit weird so that we don't invalidate this cache unless manage-tools changes 17 | USER ctf 18 | WORKDIR /home/ctf/tools 19 | ADD --chown=ctf:ctf bin/manage-tools /home/ctf/tools/bin/manage-tools 20 | RUN bin/manage-tools -s setup && rm bin/manage-tools 21 | 22 | # now check out the repo and re-copy the script if modified 23 | ADD --chown=ctf:ctf .git /home/ctf/tools/.git 24 | RUN git checkout . 25 | COPY bin/manage-tools /home/ctf/tools/bin/manage-tools 26 | 27 | ARG PREINSTALL="" 28 | RUN < /etc/pacman.d/mirrorlist.backup \ 6 | && rankmirrors -n 10 /etc/pacman.d/mirrorlist.backup \ 7 | > /etc/pacman.d/mirrorlist 8 | 9 | RUN echo "[multilib]" >> /etc/pacman.conf 10 | RUN echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf 11 | 12 | RUN pacman -Syy \ 13 | && pacman -S --noconfirm archlinux-keyring \ 14 | && pacman -Scc --noconfirm 15 | RUN pacman-key --refresh-keys 16 | RUN pacman -Syu --noconfirm \ 17 | && pacman-db-upgrade \ 18 | && pacman -Scc --noconfirm \ 19 | && pacman -Syu --noconfirm \ 20 | && pacman -Scc --noconfirm 21 | RUN trust extract-compat 22 | RUN pacman -Syu --noconfirm --needed \ 23 | curl wget python3 git subversion \ 24 | python-pip \ 25 | unzip python-virtualenvwrapper \ 26 | zsh grml-zsh-config \ 27 | sudo which \ 28 | && pacman -Scc --noconfirm 29 | 30 | RUN useradd -m ctf 31 | RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf 32 | RUN chsh -s /usr/bin/zsh ctf 33 | 34 | COPY .git /home/ctf/tools/.git 35 | RUN chown -R ctf.ctf /home/ctf/tools 36 | 37 | USER ctf 38 | 39 | WORKDIR /home/ctf/tools 40 | RUN git checkout . 41 | 42 | # add non-commited scripts 43 | USER root 44 | COPY bin/manage-tools /home/ctf/tools/bin/ 45 | RUN chown -R ctf.ctf /home/ctf/tools 46 | 47 | USER ctf 48 | RUN bin/manage-tools -s setup 49 | 50 | WORKDIR /home/ctf 51 | CMD ["zsh", "-i"] 52 | -------------------------------------------------------------------------------- /Dockerfile.artful: -------------------------------------------------------------------------------- 1 | FROM ubuntu:artful 2 | 3 | # wrapper script for apt-get 4 | COPY .docker/apt-get-install /usr/local/bin/apt-get-install 5 | RUN chmod +x /usr/local/bin/apt-get-install 6 | 7 | RUN apt-get-install build-essential libtool g++ gcc \ 8 | texinfo curl wget automake autoconf python python-dev git subversion \ 9 | unzip virtualenvwrapper sudo git virtualenvwrapper 10 | 11 | RUN useradd -m ctf 12 | RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf 13 | 14 | COPY .git /home/ctf/tools/.git 15 | RUN chown -R ctf.ctf /home/ctf/tools 16 | 17 | # git checkout of the files 18 | USER ctf 19 | WORKDIR /home/ctf/tools 20 | RUN git checkout . 21 | 22 | # add non-commited scripts 23 | USER root 24 | COPY bin/manage-tools /home/ctf/tools/bin/ 25 | RUN chown -R ctf.ctf /home/ctf/tools 26 | 27 | # finally run ctf-tools setup 28 | USER ctf 29 | RUN bin/manage-tools -s setup 30 | 31 | WORKDIR /home/ctf 32 | #CMD bash -i 33 | -------------------------------------------------------------------------------- /Dockerfile.fedora: -------------------------------------------------------------------------------- 1 | FROM fedora 2 | 3 | RUN dnf -y install which sudo git redhat-lsb 4 | 5 | RUN useradd -m ctf 6 | COPY .git /home/ctf/tools/.git 7 | RUN chown -R ctf.ctf /home/ctf/tools 8 | 9 | RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf 10 | USER ctf 11 | 12 | WORKDIR /home/ctf/tools 13 | RUN git checkout . 14 | 15 | # add non-commited scripts 16 | USER root 17 | COPY bin/manage-tools /home/ctf/tools/bin/ 18 | COPY bin/ctf-tools-pip /home/ctf/tools/bin/ 19 | COPY bin/ctf-tools-venv-activate /home/ctf/tools/bin/ 20 | COPY bin/ctf-tools-venv-activate3 /home/ctf/tools/bin/ 21 | RUN chown -R ctf.ctf /home/ctf/tools 22 | 23 | USER ctf 24 | RUN bin/manage-tools -s setup 25 | RUN bin/ctf-tools-pip install appdirs 26 | RUN echo 'source $(which ctf-tools-venv-activate)' >> /home/ctf/.bashrc 27 | 28 | WORKDIR /home/ctf 29 | CMD bash -i 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2019-present, Zardus and contributors 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ctf-tools 2 | 3 | This is a collection of setup scripts to create an install of various security research tools. 4 | Of course, this isn't a hard problem, but it's really nice to have them in one place that's easily deployable to new machines and so forth. 5 | The install-scripts for these tools are checked every once in a while, so things should hopefully have a decent chance of working! 6 | 7 | Installers for the following tools are included: 8 | 9 | | Category | Tool | Description | 10 | |----------|------|-------------| 11 | | binary | [angr](http://angr.io) | ![Last Build](https://img.shields.io/docker/v/ctftools/angr?label=built) Next-generation binary analysis engine from Shellphish. | 12 | | binary | [angr-management](http://angr.io) | ![Last Build](https://img.shields.io/docker/v/ctftools/angr-management?label=built) A GUI reverse engineering and decompilation tool. | 13 | | binary | [beef](https://github.com/beefproject/beef) | ![Last Build](https://img.shields.io/docker/v/ctftools/beef?label=built) Browser exploitation framework. | 14 | | binary | [crosstool](http://crosstool-ng.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/crosstool?label=built) Cross-compilers and cross-architecture tools. | 15 | | binary | [cross2](http://kozos.jp/books/asm/asm.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/cross2?label=built) A set of cross-compilation tools from a Japanese book on C. | 16 | | binary | [decomp2dbg](https://github.com/mahaloz/decomp2dbg) | ![Last Build](https://img.shields.io/docker/v/ctftools/decomp2dbg?label=built) A plugin to introduce interactive symbols into your debugger from your decompiler. | 17 | | binary | [elfkickers](http://www.muppetlabs.com/~breadbox/software/elfkickers.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/elfkickers?label=built) A set of utilities for working with ELF files. | 18 | | binary | [elfparser](https://github.com/mentebinaria/elfparser-ng) | ![Last Build](https://img.shields.io/docker/v/ctftools/elfparser?label=built) Multiplatform CLI and GUI tool to show information about ELF files. | 19 | | binary | [evilize](http://www.mathstat.dal.ca/~selinger/md5collision/) | ![Last Build](https://img.shields.io/docker/v/ctftools/evilize?label=built) Tool to create MD5 colliding binaries | 20 | | binary | [gdb](http://www.gnu.org/software/gdb/) | ![Last Build](https://img.shields.io/docker/v/ctftools/gdb?label=built) Up-to-date gdb with python2 bindings. | 21 | | binary | [gef](https://github.com/hugsy/gef) | ![Last Build](https://img.shields.io/docker/v/ctftools/gef?label=built) Enhanced environment for gdb. | 22 | | binary | [ghidra](https://ghidra-sre.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/ghidra?label=built) Open-source reverse engineering and decompilation tool. | 23 | | binary | [honggfuzz](https://github.com/google/honggfuzz) | ![Last Build](https://img.shields.io/docker/v/ctftools/honggfuzz?label=built) A general-purpose, easy-to-use fuzzer with interesting analysis options. | 24 | | binary | [ida](https://hex-rays.com/ida-free) | Decompilation and reversing tool (requires you to download it to ~/Downloads on your own!). | 25 | | binary | [manticore](https://github.com/trailofbits/manticore) | ![Last Build](https://img.shields.io/docker/v/ctftools/manticore?label=built) Manticore is a prototyping tool for dynamic binary analysis, with support for symbolic execution, taint analysis, and binary instrumentation. | 26 | | binary | [one_gadget](https://github.com/david942j/one_gadget) | ![Last Build](https://img.shields.io/docker/v/ctftools/one_gadget?label=built) Magic gadget search for libc. | 27 | | binary | [preeny](https://github.com/zardus/preeny) | ![Last Build](https://img.shields.io/docker/v/ctftools/preeny?label=built) A collection of helpful preloads (compiled for many architectures!). | 28 | | binary | [pwninit](https://github.com/io12/pwninit) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwninit?label=built) Script to automate starting pwning challenges. | 29 | | binary | [pwndbg](https://github.com/pwndbg/pwndbg) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwndbg?label=built) Enhanced environment for gdb. Especially for pwning. | 30 | | binary | [pwnsh](https://github.com/zardus/pwnsh) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwnsh?label=built) Useful shell scripts for assembly, exploitation, etc. | 31 | | binary | [pwntools](https://github.com/Gallopsled/pwntools) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwntools?label=built) Useful CTF utilities. | 32 | | binary | [qemu](http://qemu.org) | ![Last Build](https://img.shields.io/docker/v/ctftools/qemu?label=built) Latest version of qemu! | 33 | | binary | [qiling](https://github.com/qilingframework/qiling) | ![Last Build](https://img.shields.io/docker/v/ctftools/qiling?label=built) A dynamic binary instrumentation framework. | 34 | | binary | [qira](http://qira.me) | ![Last Build](https://img.shields.io/docker/v/ctftools/qira?label=built) Parallel, timeless debugger. | 35 | | binary | [rappel](https://github.com/yrp604/rappel) | ![Last Build](https://img.shields.io/docker/v/ctftools/rappel?label=built) A linux-based assembly REPL. | 36 | | binary | [ropper](https://github.com/sashs/Ropper) | ![Last Build](https://img.shields.io/docker/v/ctftools/ropper?label=built) Another gadget finder. | 37 | | binary | [rp++](https://github.com/0vercl0k/rp) | ![Last Build](https://img.shields.io/docker/v/ctftools/rp?label=built) Another gadget finder. | 38 | | binary | [seccomp-tools](https://github.com/david942j/seccomp-tools) | ![Last Build](https://img.shields.io/docker/v/ctftools/seccomp-tools?label=built) Provides powerful tools for seccomp analysis | 39 | | binary | [shellnoob](https://github.com/reyammer/shellnoob) | ![Last Build](https://img.shields.io/docker/v/ctftools/shellnoob?label=built) Shellcode writing helper. | 40 | | binary | [taintgrind](https://github.com/wmkhoo/taintgrind) | ![Last Build](https://img.shields.io/docker/v/ctftools/taintgrind?label=built) A valgrind taint analysis tool. | 41 | | binary | [valgrind](http://valgrind.org) | ![Last Build](https://img.shields.io/docker/v/ctftools/valgrind?label=built) A Dynamic Binary Instrumentation framework with some built-in tools. | 42 | | binary | [villoc](https://github.com/wapiflapi/villoc) | ![Last Build](https://img.shields.io/docker/v/ctftools/villoc?label=built) Visualization of heap operations. | 43 | | binary | [xrop](https://github.com/acama/xrop) | ![Last Build](https://img.shields.io/docker/v/ctftools/xrop?label=built) Gadget finder. | 44 | | forensics | [firmware-mod-kit](https://code.google.com/p/firmware-mod-kit/) | ![Last Build](https://img.shields.io/docker/v/ctftools/firmware-mod-kit?label=built) Tools for firmware packing/unpacking. | 45 | | forensics | [pdf-parser](http://blog.didierstevens.com/programs/pdf-tools/) | ![Last Build](https://img.shields.io/docker/v/ctftools/pdf-parser?label=built) Tool for digging in PDF files | 46 | | forensics | [peepdf](https://github.com/cert-ee/peepdf) | ![Last Build](https://img.shields.io/docker/v/ctftools/peepdf?label=built) Powerful Python tool to analyze PDF documents. | 47 | | forensics | [scrdec18](https://gist.github.com/bcse/1834878) | ![Last Build](https://img.shields.io/docker/v/ctftools/scrdec18?label=built) A decoder for encoded Windows Scripts. | 48 | | forensics | [volatility](https://github.com/volatilityfoundation/volatility) | ![Last Build](https://img.shields.io/docker/v/ctftools/volatility?label=built) Analyzer for system memory dumps (classic python2 version; requires python2 tool). | 49 | | forensics | [volatility3](https://github.com/volatilityfoundation/volatility3) | ![Last Build](https://img.shields.io/docker/v/ctftools/volatility3?label=built) Analyzer for system memory dumps (latest version). | 50 | | crypto | [codext](https://github.com/dhondta/python-codext) | ![Last Build](https://img.shields.io/docker/v/ctftools/codext?label=built) Python codecs extension featuring CLI tools for encoding/decoding anything including AI-based guessing mode. | 51 | | crypto | [cribdrag](https://github.com/SpiderLabs/cribdrag) | ![Last Build](https://img.shields.io/docker/v/ctftools/cribdrag?label=built) Interactive crib dragging tool (for crypto). | 52 | | crypto | [fastcoll](https://www.win.tue.nl/hashclash/) | ![Last Build](https://img.shields.io/docker/v/ctftools/fastcoll?label=built) An md5sum collision generator. | 53 | | crypto | [foresight](https://github.com/ALSchwalm/foresight) | ![Last Build](https://img.shields.io/docker/v/ctftools/foresight?label=built) A tool for predicting the output of random number generators. To run, launch "foresee". | 54 | | crypto | [featherduster](https://github.com/nccgroup/featherduster) | ![Last Build](https://img.shields.io/docker/v/ctftools/featherduster?label=built) An automated, modular cryptanalysis tool. WARNING: needs python2 (which can be installed with ctf-tools). | 55 | | crypto | [galois](http://web.eecs.utk.edu/~plank/plank/papers/CS-07-593) | ![Last Build](https://img.shields.io/docker/v/ctftools/galois?label=built) A fast galois field arithmetic library/toolkit. | 56 | | crypto | [hashpump-partialhash](https://github.com/mheistermann/HashPump-partialhash) | ![Last Build](https://img.shields.io/docker/v/ctftools/hashpump-partialhash?label=built) Hashpump, supporting partially-unknown hashes. | 57 | | crypto | [hash-identifier](https://code.google.com/p/hash-identifier/source/checkout) | ![Last Build](https://img.shields.io/docker/v/ctftools/hash-identifier?label=built) Simple hash algorithm identifier. | 58 | | crypto | [libc-database](https://github.com/niklasb/libc-database) | ![Last Build](https://img.shields.io/docker/v/ctftools/libc-database?label=built) Build a database of libc offsets to simplify exploitation. | 59 | | crypto | [msieve](http://sourceforge.net/projects/msieve/) | ![Last Build](https://img.shields.io/docker/v/ctftools/msieve?label=built) Msieve is a C library implementing a suite of algorithms to factor large integers. | 60 | | crypto | [nonce-disrespect](https://github.com/nonce-disrespect/nonce-disrespect) | ![Last Build](https://img.shields.io/docker/v/ctftools/nonce-disrespect?label=built) Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS. | 61 | | crypto | [pemcrack](https://github.com/robertdavidgraham/pemcrack) | ![Last Build](https://img.shields.io/docker/v/ctftools/pemcrack?label=built) SSL PEM file cracker. | 62 | | crypto | [pkcrack](https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/pkcrack?label=built) PkZip encryption cracker. | 63 | | crypto | [reveng](http://reveng.sourceforge.net/) | ![Last Build](https://img.shields.io/docker/v/ctftools/reveng?label=built) CRC finder. | 64 | | crypto | [rsactftool](https://github.com/RsaCtfTool/RsaCtfTool) | ![Last Build](https://img.shields.io/docker/v/ctftools/rsactftool?label=built) RSA attack tool. | 65 | | crypto | [ssh_decoder](https://github.com/jjyg/ssh_decoder) | ![Last Build](https://img.shields.io/docker/v/ctftools/ssh_decoder?label=built) A tool for decoding ssh traffic. You will need `ruby1.8` from `https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng` to run this. Run with `ssh_decoder --help` for help, as running it with no arguments causes it to crash. | 66 | | crypto | [sslsplit](https://github.com/droe/sslsplit) | ![Last Build](https://img.shields.io/docker/v/ctftools/sslsplit?label=built) SSL/TLS MITM. | 67 | | crypto | [xortool](https://github.com/hellman/xortool) | ![Last Build](https://img.shields.io/docker/v/ctftools/xortool?label=built) XOR analysis tool. | 68 | | crypto | [yafu](http://sourceforge.net/projects/yafu/) | ![Last Build](https://img.shields.io/docker/v/ctftools/yafu?label=built) Automated integer factorization. | 69 | | web | [burpsuite](http://portswigger.net/burp) | ![Last Build](https://img.shields.io/docker/v/ctftools/burpsuite?label=built) Web proxy to do naughty web stuff. | 70 | | web | [commix](https://github.com/stasinopoulos/commix) | ![Last Build](https://img.shields.io/docker/v/ctftools/commix?label=built) Command injection and exploitation tool. | 71 | | web | [mitmproxy](https://mitmproxy.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/mitmproxy?label=built) CLI Web proxy and python library. | 72 | | web | [subbrute](https://github.com/TheRook/subbrute) | ![Last Build](https://img.shields.io/docker/v/ctftools/subbrute?label=built) A DNS meta-query spider that enumerates DNS records, and subdomains. | 73 | | web | [webgrep](https://github.com/dhondta/webgrep) | ![Last Build](https://img.shields.io/docker/v/ctftools/webgrep?label=built) `grep` for Web pages, with JS deobfuscation, CSS unminifying and OCR on images. | 74 | | stego | [steganabara](http://www.caesum.com/handbook/stego.htm) | ![Last Build](https://img.shields.io/docker/v/ctftools/steganabara?label=built) Another image stenography solver. | 75 | | stego | [stegano-tools](https://github.com/dhondta/stegano-tools) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegano-tools?label=built) A collection of text and image steganography tools (incl LSB, PVD, PIT). | 76 | | stego | [stegdetect](http://www.outguess.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegdetect?label=built) Stenography detection/breaking tool. | 77 | | stego | [stegsolve](http://www.caesum.com/handbook/stego.htm) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegsolve?label=built) Image stenography solver. | 78 | | stego | [stegosaurus](https://github.com/AngelKitty/stegosaurus) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegosaurus?label=built) A steganography tool for embedding arbitrary payloads in Python bytecode (pyc or pyo) files. | 79 | | stego | [zsteg](https://github.com/zed-0xff/zsteg) | ![Last Build](https://img.shields.io/docker/v/ctftools/zsteg?label=built) detect stegano-hidden data in PNG & BMP. | 80 | | misc | [jdgui](http://jd.benow.ca/) | ![Last Build](https://img.shields.io/docker/v/ctftools/jdgui?label=built) Java decompiler. | 81 | | misc | [python2](https://www.python.org/downloads/release/python-2718/) | ![Last Build](https://img.shields.io/docker/v/ctftools/python2?label=built) For when you really need it... | 82 | | misc | [social-analyzer](https://github.com/qeeqbox/social-analyzer) | ![Last Build](https://img.shields.io/docker/v/ctftools/social-analyzer?label=built) Social media reconnaisance tool... | 83 | | misc | [veles](https://codisec.com/veles/) | ![Last Build](https://img.shields.io/docker/v/ctftools/veles?label=built) Binary data analysis and visualization tool. | 84 | | misc | [xspy](https://gitlab.com/kalilinux/packages/xspy) | ![Last Build](https://img.shields.io/docker/v/ctftools/xspy?label=built) Tiny tool to spy on X sessions. | 85 | 86 | There are also some installers for non-CTF stuff to break the monotony! 87 | 88 | | Category | Tool | Description | 89 | |----------|------|-------------| 90 | | game | [df](http://www.bay12games.com/dwarves/) | ![Last Build](https://img.shields.io/docker/v/ctftools/df?label=built) Dwarf Fortress! Something to help you relax after a CTF! | 91 | | web | [tor-browser](https://www.torproject.org/projects/torbrowser.html.en) | ![Last Build](https://img.shields.io/docker/v/ctftools/tor-browser?label=built) Useful when you need to hit a web challenge from different IPs. | 92 | 93 | ## Usage 94 | 95 | To use, do: 96 | 97 | ```bash 98 | # set up the path 99 | /path/to/ctf-tools/bin/manage-tools setup 100 | source ~/.bashrc 101 | 102 | # list the available tools 103 | manage-tools list 104 | 105 | # install gdb, allowing it to try to sudo install dependencies 106 | manage-tools -s install gdb 107 | 108 | # install pwntools, but don't let it sudo install dependencies 109 | manage-tools install pwntools 110 | 111 | # install qemu, but use "nice" to avoid degrading performance during compilation 112 | manage-tools -n install qemu 113 | 114 | # uninstall gdb 115 | manage-tools uninstall gdb 116 | 117 | # uninstall all tools 118 | manage-tools uninstall all 119 | 120 | # search for a tool 121 | manage-tools search preload 122 | ``` 123 | 124 | Where possible, the tools keep the installs very self-contained (i.e., in to tool/ directory), and most uninstalls are just calls to `git clean` (**NOTE**, this is **NOT** careful; everything under the tool directory, including whatever you were working on, is blown away during an uninstall). 125 | 126 | Python and Ruby tools are installed in a tool-specific virtual environment. 127 | If you want to add other packages to this environment, look under the `ctf-tools/TOOL/pipx` or `ctf-tools/TOOL/gems` directories. 128 | 129 | ## Help! 130 | 131 | Something not working? 132 | I didn't write (almost) any of these tools, but hit up [the discord](https://discord.gg/KRcjyn4pBH) if you're desperate. 133 | Maybe some kind soul will help! 134 | 135 | ## Dockerized Tools 136 | 137 | ### Prebuilt Tool Containers 138 | 139 | You can get most of these tools in prebuilt containers from [https://hub.docker.com/r/ctftools](dockerhub). 140 | For example: 141 | 142 | ```console 143 | $ echo hi | docker run -i ctftools/taintgrind taintgrind --taint-stdin=yes /bin/cat 144 | /home/ctf/tools/taintgrind/valgrind-3.21.0/build/bin/valgrind --tool=taintgrind --taint-stdin=yes /bin/cat 145 | ==8== Taintgrind, the taint analysis tool 146 | ==8== Copyright (C) 2010-2018, and GNU GPL'd, by Wei Ming Khoo. 147 | ==8== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info 148 | ==8== Command: /bin/cat 149 | ==8== 150 | 0xFFFFFFFF: _syscall_read | Read:3 | 0x0 | 4a5a000_unknownobj 151 | hi 152 | ==8== 153 | ``` 154 | 155 | ### Building Your Own 156 | 157 | You can build a docker image with: 158 | 159 | ```bash 160 | git clone https://github.com/zardus/ctf-tools 161 | cd ctf-tools 162 | docker build -t ctf-tools --build-arg PREINSTALLED=some-tool . 163 | ``` 164 | 165 | And run it with: 166 | 167 | ```bash 168 | docker run -it ctf-tools 169 | ``` 170 | 171 | The built image will have ctf-tools cloned and ready to go and your tool installed. 172 | 173 | ## Kali Linux 174 | 175 | Kali Linux (Sana and Rolling), due to manually setting certain libraries to not use the latest version available (sometimes being out of date by years) causes some tools to not install at all, or fail in strange ways. 176 | Overriding these libraries breaks other tools included in Kali so your only solution is to either live with some of Kali's tools being broken, use docker, or running another distribution separately such as Ubuntu. 177 | 178 | ## Adding Tools 179 | 180 | To add a tool (say, named *toolname*), do the following: 181 | 182 | 1. Create a `toolname` directory. 183 | 2. Create an `install` script. 184 | 3. Add it to the readme. 185 | 4. (optional) if special uninstall steps are required, create an `uninstall` script. 186 | 187 | ### Install Scripts 188 | 189 | The install script will be run with `$PWD` being `toolname`. It should install the tool into this directory, in as contained a manner as possible. 190 | Ideally, full uninstallation should be possible with a `git clean`. 191 | 192 | The install script should create a `bin` directory and put its executables there. 193 | These executables will be automatically linked into the main `bin` directory for the repo. 194 | They could be launched from any directory, so don't make assumptions about the location of `$0`! 195 | 196 | ## License 197 | 198 | The individual tools are all licensed under their own licenses. 199 | As for ctf-tools itself, it is licensed under BSD 2-Clause License. 200 | If you find it useful, star it on github (https://github.com/zardus/ctf-tools). 201 | 202 | Good luck! 203 | 204 | # See Also 205 | 206 | There's a curated list of CTF tools, but without installers, here: https://github.com/apsdehal/aWEsoMe-cTf. 207 | 208 | There's a Vagrant config with a lot of the bigger frameworks here: https://github.com/thebarbershopper/epictreasure. 209 | 210 | ## Useful CTF tools in apt repos 211 | 212 | As tools get officially packaged, we switch to just suggesting that you apt install them! 213 | 214 | | Category | Source | Tool | Description | 215 | |----------|--------|------|-------------| 216 | | binary | apt | [aflplusplus](https://github.com/AFLplusplus/AFLplusplus) | State-of-the-art fuzzer. | 217 | | binary | apt | [checksec](https://github.com/slimm609/checksec.sh) | Check binary hardening settings. | 218 | | binary | apt | [radare2](http://www.radare.org/) | Some crazy thing crowell likes. | 219 | | binary | apt | [rr](http://rr-project.org) | Record and Replay Debugging Framework | 220 | | binary | apt | [wcc](https://github.com/endrazine/wcc) | The Witchcraft Compiler Collection is a collection of compilation tools to perform binary black magic on the GNU/Linux and other POSIX platforms. | 221 | | forensics | apt | [binwalk](https://github.com/ReFirmLabs/binwalk) | Firmware (and arbitrary file) analysis tool. | 222 | | forensics | apt | [foremost](http://foremost.sourceforge.net/) | File carver. | 223 | | forensics | apt | [dislocker](http://www.hsc.fr/ressources/outils/dislocker/) | Tool for reading Bitlocker encrypted partitions. | 224 | | forensics | apt | [origami-pdf](http://github.com/gdelugre/origami) | PDF manipulator. | 225 | | forensics | apt | [testdisk](http://www.cgsecurity.org/wiki/TestDisk) | Testdisk and photorec for file recovery. | 226 | | web | apt | [dirb](http://dirb.sourceforge.net/) | Web path scanner. | 227 | | web | apt | [dirsearch](https://github.com/maurosoria/dirsearch) | Web path scanner. | 228 | | web | apt | [sqlmap](http://sqlmap.org/) | SQL injection automation engine. | 229 | | stego | apt | [pngtools](https://launchpad.net/ubuntu/+source/pngtools) | PNG's analysis tool. | 230 | | stego | apt | [sonic-visualizer](http://www.sonicvisualiser.org/) | Audio file visualization. | 231 | | networking | apt | [dsniff](http://www.monkey.org/~dugsong/dsniff/) | Grabs passwords and other data from pcaps/network streams. | 232 | | networking | apt | [bettercap](https://www.bettercap.org/) | Network shenanigans swiss army knife. | 233 | | misc | apt | [z3](https://github.com/Z3Prover/z3) | Theorem prover from Microsoft Research. | 234 | 235 | ## Useful CTF tools in docker images 236 | 237 | Previously, this repository included some scripts that were wrappers around `docker pull`. 238 | We trust that you can do that yourself :-) 239 | 240 | | Category | Source | Tool | Description | 241 | |----------|--------|------|-------------| 242 | | binary | docker | [panda](https://github.com/panda-re/panda) | Platform for Architecture-Neutral Dynamic Analysis. | 243 | | stego | Docker | [stego-toolkit](https://github.com/DominicBreuker/stego-toolkit) | A docker image with dozens of steg tools. | 244 | 245 | ## Useful CTF Libraries 246 | 247 | Previously, this repository included library installers. 248 | Because of how bespoke library install preferences are (e.g., unlike a tool, it's not clear if per-library venvs are a desired thing), we've stopped shipping them, and link them here for posterity. 249 | 250 | | Category | Source | Tool | Description | 251 | |----------|--------|------|-------------| 252 | | binary | Library | [capstone](http://www.capstone-engine.org) | Multi-architecture disassembly framework. | 253 | | binary | Library | [keystone](http://www.keystone-engine.org) | Lightweight multi-architecture assembler framework. | 254 | | binary | Library | [lief](https://lief.quarkslab.com/) | Library to Instrument Executable Formats. | 255 | | binary | Library | [miasm](https://github.com/cea-sec/miasm) | Reverse engineering framework in Python. | 256 | | binary | Library | [unicorn](http://www.unicorn-engine.org) | Multi-architecture CPU emulator framework. | 257 | | binary | Library | [virtualsocket](https://github.com/antoniobianchi333/virtualsocket) | A nice library to interact with binaries. | 258 | | crypto | Library | [cryptanalib3](https://github.com/unicornsasfuel/cryptanalib3) | The surviving core of featherduster cryptanalysis tool, updated for python3. | 259 | | crypto | Library | [python-paddingoracle](https://github.com/mwielgoszewski/python-paddingoracle) | Padding oracle attack automation. | 260 | -------------------------------------------------------------------------------- /angr-management/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install angr-management 4 | -------------------------------------------------------------------------------- /angr-management/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | # for angr 5 | apt-get -y install virtualenvwrapper python3-dev python3-pip build-essential libxml2-dev \ 6 | libxslt1-dev git libffi-dev cmake libreadline-dev libtool debootstrap \ 7 | debian-archive-keyring libglib2.0-dev libpixman-1-dev qtdeclarative5-dev \ 8 | binutils-multiarch nasm libc6:i386 libgcc1:i386 libstdc++6:i386 \ 9 | libtinfo6:i386 zlib1g:i386 vim libssl-dev openjdk-8-jdk 10 | -------------------------------------------------------------------------------- /angr/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install angr 4 | -------------------------------------------------------------------------------- /angr/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | # for angr 5 | apt-get -y install virtualenvwrapper python3-dev python3-pip build-essential libxml2-dev \ 6 | libxslt1-dev git libffi-dev cmake libreadline-dev libtool debootstrap \ 7 | debian-archive-keyring libglib2.0-dev libpixman-1-dev qtdeclarative5-dev \ 8 | binutils-multiarch nasm libc6:i386 libgcc1:i386 libstdc++6:i386 \ 9 | libtinfo6:i386 zlib1g:i386 vim libssl-dev openjdk-8-jdk 10 | -------------------------------------------------------------------------------- /beef/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/beefproject/beef 4 | 5 | cd beef 6 | rm Gemfile.lock 7 | bundle install 8 | cd .. 9 | 10 | mkdir bin 11 | cat <bin/beef 12 | #!/bin/bash 13 | export GEM_PATH=$PWD/gems 14 | export GEM_HOME=$PWD/gems 15 | cd $PWD/beef # REQUIRED for ruby crap 16 | ./beef "\$@" 17 | END 18 | chmod 755 bin/beef 19 | -------------------------------------------------------------------------------- /beef/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed \ 4 | ruby python2 ruby-bundler \ 5 | git make gcc openssl patch readline \ 6 | zlib libyaml libffi bzip2 autoconf automake \ 7 | libtool bison sqlite 8 | -------------------------------------------------------------------------------- /beef/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev 4 | apt-get install -y ruby ruby-rubygems ruby-dev ruby-bundler 5 | -------------------------------------------------------------------------------- /bin/ctf-tools-test-action: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | function usage() 4 | { 5 | cat < 7 | 8 | Run a manage-tools actions inside of a docker container, with the current 9 | ctf-tools repository mounted into the container. This is primarily useful for 10 | testing uncommited changes to a tool. 11 | 12 | END 13 | } 14 | 15 | 16 | CTFTOOLS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../" 17 | 18 | DOCKER_DIST="" 19 | DOCKER_CONTAINER="ctftools${DOCKER_DIST}" 20 | 21 | if [[ "$1" == "-h" || "$1" == "--help" ]]; then 22 | usage 23 | exit 0 24 | fi 25 | 26 | if [[ "$1" == "-d" ]]; then 27 | DOCKER_DIST=".$2" 28 | shift 2 29 | fi 30 | 31 | pushd $CTFTOOLS_DIR >/dev/null 32 | set -x 33 | sudo docker build \ 34 | -t "$DOCKER_CONTAINER" \ 35 | -f "Dockerfile${DOCKER_DIST}" \ 36 | . 37 | 38 | sudo docker run --rm -it \ 39 | -v $CTFTOOLS_DIR:/home/ctf/tools:z \ 40 | "$DOCKER_CONTAINER" bash -c "/home/ctf/tools/bin/manage-tools $*" 41 | exit $? 42 | -------------------------------------------------------------------------------- /bin/manage-tools: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu -o pipefail 3 | # set -x 4 | 5 | CTF_TOOLS_ROOT="$(dirname "${BASH_SOURCE[0]}")/.." 6 | 7 | 8 | function usage() 9 | { 10 | cat </dev/null)TOOLS | $TOOL |$(tput sgr0 2>/dev/null) $@" 36 | } 37 | 38 | 39 | function detect_distribution() 40 | { 41 | if which pacman >/dev/null 2>&1; then 42 | echo "archlinux" 43 | elif which apt-get >/dev/null 2>&1; then 44 | if lsb_release -a 2>/dev/null | grep -i ubuntu >/dev/null 2>&1; then 45 | echo "ubuntu" 46 | else 47 | echo "debian" 48 | fi 49 | elif which dnf >/dev/null 2>&1; then 50 | echo "fedora" 51 | else 52 | echo "" 53 | fi 54 | } 55 | 56 | 57 | function base_build_setup_debian() 58 | { 59 | PACKAGE_REQS="build-essential libtool g++ gcc texinfo curl wget automake autoconf python3-dev git subversion unzip virtualenvwrapper lsb-release pipx" 60 | PACKAGE_COUNT=$(echo $PACKAGE_REQS | tr ' ' '\n' | wc -l) 61 | sudo apt-get update 62 | if [ $(dpkg -l $PACKAGE_REQS | grep "^ii" | wc -l) -ne $PACKAGE_COUNT ] 63 | then 64 | if [ "$ALLOW_SUDO" -eq 1 ]; then 65 | sudo apt-get -y install $PACKAGE_REQS 66 | else 67 | TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS" 68 | fi 69 | fi 70 | 71 | if ! dpkg --print-foreign-architectures | grep -q i386 72 | then 73 | if [ "$ALLOW_SUDO" -eq 1 ] 74 | then 75 | sudo dpkg --add-architecture i386 76 | sudo apt-get update 77 | else 78 | TOOL=SETUP tool_log "Certain tools need i386 libraries (enable with 'dpkg --add-architecture i386; apt-get update')." 79 | fi 80 | fi 81 | } 82 | 83 | 84 | function base_build_setup_arch() 85 | { 86 | PACKAGE_REQS="curl wget python3 git subversion unzip python-virtualenvwrapper" 87 | if [ "$ALLOW_SUDO" -eq 1 ]; then 88 | sudo pacman -Syu --noconfirm --needed $PACKAGE_REQS 89 | sudo pacman -Syu --noconfirm --needed base-devel || true 90 | else 91 | TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS" 92 | fi 93 | 94 | if ! grep "^\[multilib\]$" /etc/pacman.conf >/dev/null; then 95 | if [ "$ALLOW_SUDO" -eq 1 ]; then 96 | sudo sh -c 'cat >> /etc/pacman.conf' </dev/null \ 109 | && ! sudo pacman -Qk gcc-multilib >/dev/null 110 | then 111 | sudo pacman -Syy --noconfirm 112 | #sudo pacman -Syu --noconfirm multilib-devel 113 | # unfortunately we cannot do --noconfirm if we might choose to replace 114 | # a package such as gcc with gcc-multilib, therefore this workaround 115 | printf "\ny\ny\ny\n" | sudo pacman -Syu multilib-devel 116 | fi 117 | } 118 | 119 | 120 | function base_build_setup_fedora() 121 | { 122 | PACKAGE_REQS="libtool gcc gcc-c++ clang cmake texinfo curl wget automake autoconf python python-devel git subversion unzip python-virtualenvwrapper redhat-rpm-config" 123 | if [ "$ALLOW_SUDO" -eq 1 ]; then 124 | sudo dnf -y install $PACKAGE_REQS 125 | else 126 | TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS" 127 | fi 128 | 129 | # TODO: check whether we have to explicitly enable i386 package support 130 | } 131 | 132 | 133 | function base_build_setup() 134 | { 135 | case "$1" in 136 | "ubuntu") 137 | ;& # fallthrough 138 | "debian") 139 | base_build_setup_debian 140 | ;; 141 | "archlinux") 142 | base_build_setup_arch 143 | export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 144 | ;; 145 | "fedora") 146 | base_build_setup_fedora 147 | ;; 148 | *) 149 | TOOL=SETUP tool_log "Cannot detect or unsupported distribution" 150 | esac 151 | 152 | ## setup PATH for several shells 153 | 154 | MAGIC="# ctf-tools: PATH setup" 155 | # make sure at least bashrc exists in case of plain VM setup 156 | touch ~/.bashrc 157 | 158 | for f in ~/.bashrc ~/.zshrc; do 159 | if [[ -e "$f" ]]; then 160 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 161 | cat >> "$f" << EOF 162 | $MAGIC 163 | export PATH=$PWD/bin:\$PATH 164 | EOF 165 | fi 166 | fi 167 | done 168 | 169 | f=~/.config/fish/config.fish 170 | if [[ -e "$f" ]]; then 171 | if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then 172 | cat >> "$f" << EOF 173 | $MAGIC 174 | set -x PATH $PWD/bin \$PATH 175 | EOF 176 | fi 177 | fi 178 | } 179 | 180 | 181 | function is_tool_installed() { 182 | git status --ignored "$1" | egrep -q 'Untracked|Ignored' 183 | } 184 | 185 | 186 | function full_upgrade() { 187 | TOOL="FULL-UPGRADE" tool_log "Upgrading all installed tools!" 188 | succ=0 189 | fail=0 190 | declare -a failed 191 | installed=$($0 list -i) 192 | TOOL="FULL-UPGRADE" tool_log "Upgrading tools: $installed" 193 | for t in $installed 194 | do 195 | TOOL="FULL-UPGRADE" tool_log "Upgrading tool $t" 196 | if $0 upgrade $t; then 197 | succ=$((succ+1)) 198 | else 199 | fail=$((fail+1)) 200 | failed[${#failed[@]}]="$t" 201 | fi 202 | done 203 | TOOL="FULL-UPGRADE" tool_log "failed to upgrade ${failed[@]}" 204 | TOOL="FULL-UPGRADE" tool_log "tool full-upgrade stats - sucess=$succ failed=$fail" 205 | } 206 | 207 | function verify_tool_sanity() { 208 | if [[ -z "$TOOL" ]]; then 209 | TOOL="$ACTION" tool_log "must provide at least one tool for $ACTION" 210 | usage 211 | exit 1 212 | fi 213 | 214 | if [[ "$TOOL" == "all" ]]; then 215 | TOOL="$ACTION" tool_log "can't handle \"all\" magic tool directly!" \ 216 | "This is probably a bug you should report." 217 | usage 218 | exit 1 219 | fi 220 | 221 | if [[ ! -d "$CTF_TOOLS_ROOT/$TOOL" ]]; then 222 | TOOL="$ACTION" tool_log "invalid tool $TOOL" 223 | exit 1 224 | fi 225 | } 226 | 227 | 228 | if [[ $# -eq 0 ]]; then 229 | usage 230 | exit 1 231 | fi 232 | 233 | DISTRI=$(detect_distribution) 234 | 235 | while [[ $1 == -* ]] 236 | do 237 | case $1 in 238 | -s) 239 | export ALLOW_SUDO=1 240 | ;; 241 | -n) 242 | export NICE_LEVEL=10 243 | ;; 244 | -f) 245 | export FORCE=1 246 | ;; 247 | -v) 248 | export VERBOSE_OUTPUT=1 249 | ;; 250 | *) 251 | usage 252 | exit 253 | ;; 254 | esac 255 | shift 256 | done 257 | 258 | [[ -z ${ALLOW_SUDO+x} ]] && export ALLOW_SUDO=0 259 | [[ -z ${FORCE+x} ]] && export FORCE=0 260 | [[ -z ${VERBOSE_OUTPUT+x} ]] && export VERBOSE_OUTPUT=0 261 | [[ -z ${NICE_LEVEL+x} ]] && export NICE_LEVEL=0 262 | export EXPECTFAIL=${EXPECTFAIL:-0} 263 | 264 | if [[ $# -ge 1 ]]; then 265 | ACTION="$1" 266 | fi 267 | if [[ $# -eq 2 ]]; then 268 | TOOL="$2" 269 | else 270 | TOOL="" 271 | fi 272 | 273 | # handle the special all tool 274 | if [[ "$TOOL" == "all" ]] 275 | then 276 | case $ACTION in 277 | install) 278 | for t in $($0 list) 279 | do 280 | $0 $ACTION $t 281 | done 282 | exit 0 283 | ;; 284 | bin | uninstall | reinstall) 285 | for t in $($0 list -i) 286 | do 287 | $0 $ACTION $t 288 | done 289 | exit 0 290 | ;; 291 | upgrade) 292 | full_upgrade 293 | exit 0 294 | ;; 295 | *) 296 | TOOL="" tool_log "action $ACTION cannot handle the special \"all\" tool" 297 | usage 298 | exit 1 299 | ;; 300 | esac 301 | fi 302 | 303 | 304 | 305 | cd $(dirname "${BASH_SOURCE[0]}")/.. 306 | 307 | case $ACTION in 308 | setup) 309 | 310 | base_build_setup "$DISTRI" 311 | ;; 312 | list) 313 | for t in * 314 | do 315 | [ ! -e "$t/install" ] && continue 316 | 317 | if [[ "${2:-}" == "" ]]; then 318 | echo "$t" 319 | else 320 | if is_tool_installed "$t"; then 321 | if [[ "$2" == "-i" ]]; then 322 | echo "$t" 323 | fi 324 | else 325 | if [[ "$2" == "-u" ]]; then 326 | echo "$t" 327 | fi 328 | fi 329 | fi 330 | done 331 | ;; 332 | bin) 333 | verify_tool_sanity 334 | if [ ! -d $TOOL/bin ] && [ -d $TOOL/gems/bin ]; then 335 | tool_log "making wrappers for rubygems apps" 336 | 337 | mkdir -p $TOOL/bin 338 | for BIN in $PWD/$TOOL/gems/bin/* 339 | do 340 | cat <$TOOL/bin/$(basename $BIN) 341 | #!/bin/bash 342 | export GEM_PATH=$PWD/$TOOL/gems 343 | export GEM_HOME=$PWD/$TOOL/gems 344 | $BIN "\$@" 345 | END 346 | done 347 | 348 | chmod 755 $TOOL/bin/* 349 | fi 350 | 351 | if [ -d $TOOL/bin ]; then 352 | cd bin 353 | ln -sf ../$TOOL/bin/* . 354 | cd .. 355 | tool_log "bin symlinks updated" 356 | fi 357 | ;; 358 | install) 359 | verify_tool_sanity 360 | cd $TOOL 361 | 362 | if [ "$FORCE" -eq 0 ] && is_tool_installed "." 363 | then 364 | tool_log "appears to already be installed. Uninstall first?" 365 | exit 0 366 | fi 367 | 368 | # the first line in all install and uninstall scripts should have the -e flag, otherwise fail 369 | if [ $(for i in install* uninstall test; do if [ -e "$i" ]; then head -1 "$i"; fi; done | sort | uniq | grep -v '^#!/bin/bash -ex$' | wc -l) -ne 0 ]; 370 | then 371 | tool_log "not all install/uninstall/test scripts start with '#!/bin/bash -ex', which is a must for accurate testing." 372 | exit 1 373 | fi 374 | 375 | tool_log "starting install, logging to $PWD/install.log" 376 | rm -f install.log 377 | 378 | # first get distri specific dependencies 379 | if [[ $(find . -name 'install-root*' | wc -l) -ge 1 ]]; then 380 | INSTALL_ROOT_SCRIPT="./install-root-$DISTRI" 381 | # use debian install script if we are on ubuntu and no ubuntu 382 | # specific install script exists 383 | if [[ "$DISTRI" == "ubuntu" \ 384 | && ! -x "$INSTALL_ROOT_SCRIPT" \ 385 | && -x "./install-root-debian" ]] 386 | then 387 | INSTALL_ROOT_SCRIPT="./install-root-debian" 388 | fi 389 | if [[ -x "$INSTALL_ROOT_SCRIPT" && "$ALLOW_SUDO" -eq 1 ]]; then 390 | set +e 391 | if [[ "$VERBOSE_OUTPUT" -eq 1 ]]; then 392 | sudo env DISTRI=$DISTRI "$INSTALL_ROOT_SCRIPT" 2>&1 | tee -a install.log 393 | else 394 | sudo env DISTRI=$DISTRI "$INSTALL_ROOT_SCRIPT" >> install.log 2>&1 395 | fi 396 | INSTALL_FAILED=$? 397 | set -e 398 | 399 | if [[ "$INSTALL_FAILED" -eq 0 ]]; then 400 | tool_log "system dependencies installed" 401 | else 402 | tool_log "INSTALL FAILED: $INSTALL_ROOT_SCRIPT failed to install dependencies" 403 | cat install.log >&2 404 | exit 1 405 | fi 406 | else 407 | tool_log "Warning: make sure build dependencies are installed!" 408 | fi 409 | fi 410 | 411 | # execute install script 412 | set +e 413 | 414 | export PIPX_HOME=$PWD/pipx 415 | export PIPX_MAN_DIR=$PWD/pipx 416 | export PIPX_BIN_DIR=$PWD/bin 417 | 418 | export GEM_HOME=$PWD/gems 419 | export GEM_PATH=$PWD/gems 420 | 421 | if [ "$VERBOSE_OUTPUT" -eq 1 ]; then 422 | DISTRI=$DISTRI PATH=$CTF_TOOLS_ROOT/bin/:$PATH nice -n$NICE_LEVEL ./install 2>&1 | tee -a install.log 423 | else 424 | DISTRI=$DISTRI PATH=$CTF_TOOLS_ROOT/bin/:$PATH nice -n$NICE_LEVEL ./install >>install.log 2>&1 425 | fi 426 | INSTALL_FAILED=$? 427 | set -e 428 | 429 | if [ "$INSTALL_FAILED" -eq 0 ]; then 430 | tool_log "install finished" 431 | else 432 | tool_log "INSTALL FAILED" 433 | cat install.log >&2 434 | exit 1 435 | fi 436 | 437 | cd .. 438 | $0 bin $TOOL 439 | ;; 440 | uninstall) 441 | verify_tool_sanity 442 | cd $TOOL 443 | 444 | tool_log "starting uninstall, logging to $PWD/uninstall.log" 445 | [ -x ./uninstall ] && ./uninstall >> uninstall.log 2>&1 446 | git clean -dffx . >/dev/null 2>&1 447 | tool_log "uninstall finished" 448 | 449 | cd .. 450 | ;; 451 | upgrade) 452 | if [[ "$TOOL" == "" ]]; then 453 | full_upgrade 454 | exit 0 455 | fi 456 | verify_tool_sanity 457 | cd $TOOL 458 | if [ -x ./upgrade ] 459 | then 460 | ./upgrade 461 | tool_log "upgrade complete!" 462 | else 463 | tool_log "no upgrade script -- reinstalling" 464 | $0 uninstall $TOOL 465 | $0 install $TOOL 466 | fi 467 | ;; 468 | reinstall) 469 | $0 uninstall $TOOL 470 | $0 install $TOOL 471 | ;; 472 | search) 473 | cat README.md | grep "<\!--tool-->" | sed "s/<\!--[^-]*-->//g" | grep -i "$TOOL" 474 | ;; 475 | test) 476 | if [ "$FORCE" -eq 0 ] && ! cat README.md | grep "<\!--tool-->" | grep "| \[$TOOL\](" | grep -q -- "--test--" 477 | then 478 | tool_log "Tests not enabled." 479 | if [ "$EXPECTFAIL" -eq "1" ]; then exit 1; fi 480 | else 481 | if ( 482 | if ! $0 install $TOOL; then exit 1; fi 483 | 484 | cd $TOOL || exit 1 485 | if [ -f ./test ] 486 | then 487 | tool_log "Running test script." 488 | if ! ./test 489 | then 490 | tool_log "$TOOL test failed!" 491 | exit 1 492 | fi 493 | tool_log "test script succeeded!" 494 | else 495 | tool_log "Install succeeded. No test script!" 496 | fi 497 | exit 0 498 | ); 499 | then 500 | if [ "$EXPECTFAIL" -eq "1" ]; then exit 1; else exit 0; fi 501 | else 502 | if [ "$EXPECTFAIL" -eq "1" ]; then exit 0; else exit 1; fi 503 | fi 504 | fi 505 | ;; 506 | *) 507 | echo "TOOLS | ERROR | unknown action $ACTION" 508 | usage 509 | exit 1 510 | ;; 511 | esac 512 | -------------------------------------------------------------------------------- /burpsuite/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget -O ./burp.jar 'https://portswigger.net/DownloadUpdate.ashx?Product=Free' 4 | chmod 755 ./burp.jar 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../burp.jar burpsuite 8 | cd .. 9 | -------------------------------------------------------------------------------- /burpsuite/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed jre7-openjdk 5 | -------------------------------------------------------------------------------- /burpsuite/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | case "$(lsb_release -cs)" in 5 | noble) 6 | apt-get -y install openjdk-21-jre jarwrapper 7 | ;; 8 | xenial) 9 | apt-get -o Dpkg::Options::="--force-overwrite" -y install openjdk-9-jre 10 | ;; 11 | *) 12 | apt-get -y install openjdk-7-jre 13 | ;; 14 | esac 15 | -------------------------------------------------------------------------------- /codext/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install codext 4 | -------------------------------------------------------------------------------- /commix/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/commixproject/commix.git 4 | mkdir bin 5 | cd bin 6 | ln -s ../commix/commix.py 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /cross2/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | FILE=cross2-20130826.tgz 4 | INSTALL_DIR=$PWD 5 | 6 | [ ! -e $FILE ] && wget https://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 | -------------------------------------------------------------------------------- /crosstool/build-sample.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | sample=$1 4 | 5 | [ -e ../toolchains/$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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | pushd crosstool-ng 6 | ./bootstrap 7 | ./configure --enable-local 8 | make -j $(nproc) 9 | #make install 10 | cp ../config .config 11 | 12 | SAMPLES=$(ls samples | tr ',' '\n') 13 | 14 | mkdir -p ../toolchains 15 | for sample in $SAMPLES 16 | do 17 | ../build-sample.sh $sample || echo "$sample" >> ../toolchains/broken 18 | ./ct-ng clean 19 | done 20 | popd 21 | 22 | mkdir -p bin 23 | pushd bin 24 | for sample in $SAMPLES 25 | do 26 | ln -sf ../toolchains/$sample/bin/* . 27 | rm -f '*' 28 | done 29 | popd 30 | -------------------------------------------------------------------------------- /crosstool/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm gperf flex bison help2man gawk ncurses 4 | -------------------------------------------------------------------------------- /crosstool/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y gperf flex bison help2man gawk libncurses5-dev libtool-bin 4 | -------------------------------------------------------------------------------- /crosstool/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e x-tools ] && chmod -R u+w x-tools 4 | rm -rf crosstools-ng 5 | -------------------------------------------------------------------------------- /decomp2dbg/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install decomp2dbg 4 | [ -d ../gdb/venv ] && ../gdb/venv/bin/pip install decomp2dbg 5 | [ -d ../ida/venv ] && ../ida/venv/bin/pip install decomp2dbg 6 | [ -d ../ghidra/venv ] && ../ghidra/venv/bin/pip install decomp2dbg 7 | [ -d ../angr-management/pipx/venvs ] && ../angr-management/pipx/venvs/angr-management/bin/python -m pip install decomp2dbg 8 | 9 | coproc bin/decomp2dbg --install 10 | 11 | # ida 12 | if [ -d $PWD/../ida/*/plugins ] 13 | then 14 | echo y >& ${COPROC[1]} 15 | echo $PWD/../ida/*/plugins >& ${COPROC[1]} 16 | else 17 | echo n >& ${COPROC[1]} 18 | fi 19 | 20 | # binja 21 | echo n >& ${COPROC[1]} 22 | 23 | # ghidra 24 | echo y >& ${COPROC[1]} 25 | echo >& ${COPROC[1]} 26 | 27 | # angr-management 28 | if [ -d $PWD/../angr-management/pipx/venvs ] 29 | then 30 | echo y >& ${COPROC[1]} 31 | echo $PWD/../angr-management/pipx/venvs/angr-management/lib/python3.12/site-packages/angrmanagement/plugins >& ${COPROC[1]} 32 | else 33 | echo n >& ${COPROC[1]} 34 | fi 35 | 36 | # gdb 37 | echo y >& ${COPROC[1]} 38 | echo $HOME/.gdbinit >& ${COPROC[1]} 39 | 40 | if grep -B10 -E "(Stopping|Errno)" <& ${COPROC[0]} 41 | then 42 | echo "FAILED" 43 | exit 1 44 | fi 45 | -------------------------------------------------------------------------------- /df/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir df_linux 4 | pushd df_linux 5 | wget -O - https://www.bay12games.com/dwarves/df_51_06_linux.tar.bz2 | tar xj 6 | popd 7 | 8 | mkdir -p bin 9 | cat < bin/dwarf_fortress 10 | #/bin/bash 11 | cd $PWD/run_df 12 | ./df "\$@" 13 | END 14 | chmod 755 bin/dwarf_fortress 15 | -------------------------------------------------------------------------------- /df/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | sudo apt install -y libsdl2-image-2.0-0 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /elfparser/cstdint.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sectionheaders.hpp b/src/sectionheaders.hpp 2 | index 274d3a2..c65d44b 100644 3 | --- a/src/sectionheaders.hpp 4 | +++ b/src/sectionheaders.hpp 5 | @@ -5,6 +5,7 @@ 6 | #include 7 | #include 8 | #include 9 | +#include 10 | #include 11 | 12 | #include "structures/capabilities.hpp" 13 | -------------------------------------------------------------------------------- /elfparser/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir bin 4 | 5 | git clone https://github.com/mentebinaria/elfparser-ng elfparser-ng 6 | pushd elfparser-ng 7 | git apply ../cstdint.patch 8 | popd 9 | 10 | mkdir qt 11 | pushd qt 12 | cmake ../elfparser-ng 13 | make -j 14 | mv elfparser-ng ../bin/elfparser-gui-ng 15 | popd 16 | 17 | mkdir cli 18 | pushd cli 19 | cmake -D qt=no ../elfparser-ng 20 | make -j 21 | mv elfparser-cli-ng ../bin/ 22 | popd 23 | 24 | rm -rf cli qt elfparser-ng 25 | -------------------------------------------------------------------------------- /elfparser/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | sudo apt-get install -y cmake libboost-all-dev build-essential \ 5 | qtcreator qtdeclarative5-dev libzstd-dev libbz2-dev liblzma-dev \ 6 | qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools 7 | -------------------------------------------------------------------------------- /evilize/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /featherduster/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth=1 https://github.com/nccgroup/featherduster.git 4 | 5 | python2 -m virtualenv venv 6 | venv/bin/pip2 install -e ./featherduster 7 | 8 | mkdir bin 9 | cd bin 10 | ln -s ../venv/bin/featherduster . 11 | -------------------------------------------------------------------------------- /featherduster/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libgmp3-dev libncurses5-dev 5 | 6 | -------------------------------------------------------------------------------- /firmware-mod-kit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/rampageX/firmware-mod-kit 4 | pushd firmware-mod-kit 5 | git apply ../shared-ng.patch 6 | cd src 7 | make 8 | popd 9 | 10 | mkdir -p bin 11 | for i in $PWD/firmware-mod-kit/*.sh 12 | do 13 | cat < bin/$(basename $i) 14 | #!/bin/bash 15 | export PATH="\$PATH:$(dirname $i)" 16 | exec $i "\$@" 17 | END 18 | chmod 755 bin/$(basename $i) 19 | done 20 | 21 | pushd bin 22 | for i in $(file ../firmware-mod-kit/src/{*,*/*} | grep "ELF.*executable" | cut -d: -f1 | cut -b 25-) 23 | do 24 | j=fmk-${i//\//-} 25 | ln -s ../firmware-mod-kit/src/$i $j 26 | done 27 | popd 28 | 29 | sed -i -e "s/SUDO=\"sudo\"/SUDO=\"\"/" firmware-mod-kit/*.sh 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /firmware-mod-kit/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install liblzma-dev python3-magic zlib1g-dev 5 | -------------------------------------------------------------------------------- /firmware-mod-kit/shared-ng.patch: -------------------------------------------------------------------------------- 1 | diff --git a/shared-ng.inc b/shared-ng.inc 2 | index 77e85cf..42b45ee 100644 3 | --- a/shared-ng.inc 4 | +++ b/shared-ng.inc 5 | @@ -1,4 +1,4 @@ 6 | -VERSION=$(cat firmware_mod_kit_version.txt) 7 | +VERSION=$(cat "$(dirname "${BASH_SOURCE[0]}")"/firmware_mod_kit_version.txt) 8 | IMAGE_PARTS="$DIR/image_parts" 9 | LOGS="$DIR/logs" 10 | CONFLOG="$LOGS/config.log" 11 | @@ -8,4 +8,4 @@ FSIMG="$IMAGE_PARTS/rootfs.img" 12 | HEADER_IMAGE="$IMAGE_PARTS/header.img" 13 | FOOTER_IMAGE="$IMAGE_PARTS/footer.img" 14 | FWOUT="$DIR/new-firmware.bin" 15 | -BINWALK="./src/binwalk-2.1.1/src/scripts/binwalk -v" 16 | +BINWALK="$(dirname "${BASH_SOURCE[0]}")/src/binwalk-2.1.1/src/scripts/binwalk -v" 17 | -------------------------------------------------------------------------------- /foresight/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install 'git+https://github.com/ALSchwalm/foresight.git' 4 | -------------------------------------------------------------------------------- /galois/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://web.eecs.utk.edu/~plank/plank/papers/CS-07-593/galois.tar 4 | 5 | mkdir -p galois 6 | cd galois 7 | tar xvf ../galois.tar 8 | make 9 | cd .. 10 | 11 | mkdir -p bin 12 | cd bin 13 | ln -s ../galois/{gf_basic_tester,gf_div,gf_ilog,gf_inverse,gf_log,gf_mult,gf_xor,gf_xor_tester} . 14 | cd .. 15 | -------------------------------------------------------------------------------- /gdb/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -e -o pipefail 3 | 4 | find_latest_gdb_version() { 5 | git ls-remote --tags git://sourceware.org/git/binutils-gdb.git \ 6 | | grep -v users \ 7 | | grep -v '{}' \ 8 | | grep -oh 'gdb-[0-9]\{1,2\}\.[0-9]\{1,2\}\(\.[0-9]\{1,2\}\(\.[0-9]\{1,2\}\)\?\)\?-release' \ 9 | | sort --version-sort -r \ 10 | | sed 's/gdb-//g' \ 11 | | sed 's/-release//g' \ 12 | | head -n 1 13 | } 14 | 15 | VERSION=$(find_latest_gdb_version) 16 | echo $VERSION > 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 | virtualenv venv 25 | source venv/bin/activate 26 | set -x 27 | 28 | PREFIX=$(pwd) 29 | 30 | pushd ./gdb 31 | ./configure \ 32 | --prefix=$PREFIX \ 33 | --with-python=$(which python) \ 34 | --enable-targets=all \ 35 | --with-guile=guile-2.2 36 | make -j $(nproc) 37 | make install 38 | # remove build artifacts 39 | make clean 40 | popd 41 | -------------------------------------------------------------------------------- /gdb/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --needed --noconfirm texinfo guile2.0 5 | -------------------------------------------------------------------------------- /gdb/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install texinfo guile-2.2-dev libgmp-dev libmpfr-dev 5 | -------------------------------------------------------------------------------- /gdb/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y texinfo 4 | -------------------------------------------------------------------------------- /gef/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | wget -O gef.py -q https://gef.blah.cat/py 5 | mkdir bin 6 | cat < bin/gef 7 | #!/bin/bash 8 | gdb -ex "source $PWD/gef.py" "\$@" 9 | END 10 | chmod 755 bin/gef 11 | -------------------------------------------------------------------------------- /ghidra/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # try to get the best of both worlds for local tweaking and global installs 4 | virtualenv --system-site-packages venv 5 | 6 | [ -e https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.1_build/ghidra_11.3.1_PUBLIC_20250219.zip ] || wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.1_build/ghidra_11.3.1_PUBLIC_20250219.zip 7 | [ -e ghidra_11.3.1_PUBLIC ] || unzip ghidra_11.3.1_PUBLIC_20250219.zip 8 | 9 | mkdir -p bin 10 | cat < bin/ghidra 11 | #!/bin/bash 12 | [ -n "\$VIRTUAL_ENV" ] || source $PWD/venv/bin/activate 13 | $PWD/ghidra_11.3.1_PUBLIC/ghidraRun "\$@" 14 | END 15 | chmod 755 bin/ghidra 16 | -------------------------------------------------------------------------------- /ghidra/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt install openjdk-11-jdk jarwrapper -y 4 | -------------------------------------------------------------------------------- /hash-identifier/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hash-identifier/Hash_ID_v1.1.py 4 | chmod 755 Hash_ID_v1.1.py 5 | fromdos Hash_ID_v1.1.py || dos2unix Hash_ID_v1.1.py 6 | 7 | mkdir -p bin 8 | cd bin 9 | ln -s ../Hash_ID_v1.1.py ./hash_id.py 10 | -------------------------------------------------------------------------------- /hash-identifier/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get -y install tofrodos 4 | -------------------------------------------------------------------------------- /hashpump-partialhash/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/mheistermann/HashPump-partialhash.git 4 | cd HashPump-partialhash 5 | make -j $(nproc) 6 | cd .. 7 | 8 | mkdir bin 9 | cd bin 10 | ln -s ../HashPump-partialhash/hashpump . 11 | cd .. 12 | -------------------------------------------------------------------------------- /hashpump-partialhash/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed openssl 5 | -------------------------------------------------------------------------------- /hashpump-partialhash/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev 5 | -------------------------------------------------------------------------------- /honggfuzz/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e honggfuzz ] || git clone --depth 1 https://github.com/google/honggfuzz 4 | cd honggfuzz 5 | make -j 6 | mkdir -p ../bin 7 | cp honggfuzz ../bin 8 | -------------------------------------------------------------------------------- /honggfuzz/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | # apt-get install libbfd-dev libunwind8-dev 5 | pacman -Syu --noconfirm --needed libunwind binutils 6 | -------------------------------------------------------------------------------- /honggfuzz/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get install -y libbfd-dev libunwind8-dev 5 | -------------------------------------------------------------------------------- /ida/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # our venv shenanigans 4 | virtualenv --system-site-packages venv 5 | 6 | tar xvf ~/Downloads/IDA*.tar.gz 7 | 8 | IDA_DIR=$(dirname */libida.so) 9 | 10 | pushd $IDA_DIR 11 | echo 0 | ./idapyswitch 12 | popd 13 | 14 | mkdir bin 15 | cat <bin/ida64 16 | #!/bin/bash 17 | [ -n "\$VIRTUAL_ENV" ] || source $PWD/venv/bin/activate 18 | exec $PWD/[^b]*/ida64 "\$@" 19 | END 20 | chmod 755 bin/ida64 21 | -------------------------------------------------------------------------------- /jdgui/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir bin 4 | [ -e bin/jd-gui.jar ] || wget https://github.com/java-decompiler/jd-gui/releases/download/v1.6.6/jd-gui-1.6.6.jar -O bin/jd-gui.jar 5 | chmod 755 bin/jd-gui.jar 6 | chmod 755 bin/jd-gui.jar 7 | -------------------------------------------------------------------------------- /jdgui/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed jre7-openjdk 5 | -------------------------------------------------------------------------------- /jdgui/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | 5 | case "$(lsb_release -cs)" in 6 | noble) 7 | apt-get -y install openjdk-21-jre 8 | ;; 9 | bookworm) 10 | apt-get -y install openjdk-17-jre 11 | ;; 12 | xenial) 13 | apt-get -o Dpkg::Options::="--force-overwrite" -y install openjdk-9-jre 14 | ;; 15 | *) 16 | apt-get -y install openjdk-7-jre 17 | ;; 18 | esac 19 | 20 | sudo apt install -y jarwrapper 21 | -------------------------------------------------------------------------------- /libc-database/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e libc-database ] || git clone https://github.com/niklasb/libc-database 4 | 5 | mkdir -p bin 6 | for i in add dump find get identify download 7 | do 8 | cat < 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 all 16 | -------------------------------------------------------------------------------- /libc-database/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt-get install -y \ 4 | binutils file \ 5 | wget \ 6 | rpm2cpio cpio \ 7 | zstd jq 8 | -------------------------------------------------------------------------------- /manticore/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install --python $(which pypy3) "manticore[native]" 4 | -------------------------------------------------------------------------------- /manticore/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | set -eu -o pipefail 4 | 5 | apt-get -y install pypy3 pypy3-dev 6 | -------------------------------------------------------------------------------- /mitmproxy/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install mitmproxy 4 | -------------------------------------------------------------------------------- /mitmproxy/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev libffi-dev libtiff5-dev libjpeg8-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk libxml2-dev libxslt1-dev 5 | 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /msieve/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed gmp 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /nonce-disrespect/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt-get install -y libntl-dev libgmp-dev 4 | -------------------------------------------------------------------------------- /one_gadget/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install one_gadget 4 | -------------------------------------------------------------------------------- /one_gadget/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed ruby 4 | -------------------------------------------------------------------------------- /one_gadget/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y ruby 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /peepdf/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install "git+https://github.com/cert-ee/peepdf" 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pemcrack/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev 5 | 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /preeny/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/zardus/preeny 4 | PATH=$PWD/../crosstool/bin:$PATH 5 | 6 | cd preeny 7 | for i in ../../crosstool/bin/*-gcc 8 | do 9 | t=$(basename $i) 10 | CC=$t make -j $(nproc) -i 11 | done 12 | PLATFORM=-m32 setarch i686 make -i 13 | mv x86_64-linux-gnu i686-linux-gnu 14 | make -i 15 | -------------------------------------------------------------------------------- /pwndbg/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | #git clone --depth 1 https://github.com/pwndbg/pwndbg 4 | wget https://github.com/pwndbg/pwndbg/releases/download/2025.02.19/pwndbg_2025.02.19_x86_64-portable.tar.xz 5 | tar xvf pwndbg_*-portable.tar.xz --strip-components 2 6 | -------------------------------------------------------------------------------- /pwndbg/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | # install system wide, s.t. pwndbg works also with system qemu 4 | pacman -Syu --noconfirm python-psutil python2-psutil \ 5 | capstone python-capstone python2-capstone \ 6 | unicorn python-unicorn python2-unicorn \ 7 | python-future python2-future \ 8 | python-ptrace python2-ptrace \ 9 | python-six python2-six \ 10 | python-pyelftools python2-pyelftools \ 11 | python-pycparser python2-pycparser 12 | -------------------------------------------------------------------------------- /pwndbg/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt-get -y install python3-dev python3-pip \ 4 | libglib2.0-dev libc6-dbg 5 | 6 | if uname -m | grep x86_64 > /dev/null; then 7 | sudo apt-get install libc6-dbg:i386 || true 8 | fi 9 | -------------------------------------------------------------------------------- /pwndbg/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y dnf-plugins-core 4 | dnf debuginfo-install -y glibc 5 | -------------------------------------------------------------------------------- /pwninit/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | mkdir bin 4 | pushd bin 5 | wget https://github.com/io12/pwninit/releases/download/3.3.1/pwninit 6 | chmod 755 pwninit 7 | -------------------------------------------------------------------------------- /pwninit/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt-get install -y patchelf 4 | -------------------------------------------------------------------------------- /pwnsh/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone https://github.com/zardus/pwnsh 4 | pushd pwnsh 5 | ./update-syscalls.sh 6 | popd 7 | 8 | mkdir bin 9 | pushd bin 10 | ln -s ../pwnsh/scripts/* . 11 | -------------------------------------------------------------------------------- /pwntools/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth=1 https://github.com/Gallopsled/pwntools.git 4 | pipx install -e ./pwntools 5 | -------------------------------------------------------------------------------- /pwntools/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed binutils openssl libffi 4 | -------------------------------------------------------------------------------- /pwntools/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y python3-pip python3-dev git libssl-dev libffi-dev build-essential 4 | -------------------------------------------------------------------------------- /pwntools/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | dnf install -y binutils binutils-devel libffi-devel openssl-devel 4 | -------------------------------------------------------------------------------- /python2/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -d pyenv ] || git clone --depth=1 https://github.com/pyenv/pyenv 4 | export PYENV_ROOT=$PWD/pyenv-root 5 | pyenv/bin/pyenv install 2.7.18 6 | 7 | mkdir bin 8 | cd bin 9 | ln -s ../pyenv-root/versions/2.7.18/bin/{easy_install-2.7,pip2.7,python2.7,python2.7-gdb.py,pip2,python2,python2.7-config,python2-config} . 10 | 11 | ./pip2 install virtualenv 12 | -------------------------------------------------------------------------------- /python2/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | # pyvenv 5 | apt-get -y install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev 6 | 7 | apt-get -y install libgmp3-dev libncurses5-dev 8 | 9 | -------------------------------------------------------------------------------- /qemu/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | find_latest_qemu_version() { 4 | git ls-remote --tags https://gitlab.com/qemu-project/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" https://gitlab.com/qemu-project/qemu.git 15 | 16 | set +x 17 | virtualenv venv 18 | source venv/bin/activate 19 | pip install sphinx sphinx_rtd_theme 20 | set -x 21 | 22 | prefix="--prefix=$(pwd)" 23 | python="--python=$(which python)" 24 | build_flags="" 25 | 26 | mkdir build 27 | pushd build 28 | if ! ../qemu/configure "$prefix" "$python" $build_flags; then 29 | echo "Updating QEMU submodules in case dependencies are missing" 30 | pushd ../qemu/ 31 | git submodule init 32 | git submodule update --recursive 33 | popd 34 | 35 | # redo configure step 36 | ../qemu/configure "$prefix" "$python" $build_flags 37 | fi 38 | make -j $(nproc) 39 | 40 | make install 41 | # remove build artifacts - qemu is huge otherwise... 42 | make clean 43 | popd 44 | rm -rf build 45 | -------------------------------------------------------------------------------- /qemu/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed python2 pixman dtc 4 | -------------------------------------------------------------------------------- /qemu/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y python3 pkg-config zlib1g-dev \ 4 | libglib2.0-dev libpixman-1-dev libfdt-dev ninja-build flex bison 5 | -------------------------------------------------------------------------------- /qiling/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | virtualenv venv 4 | source venv/bin/activate 5 | 6 | git clone -b dev --depth 1 https://github.com/qilingframework/qiling.git 7 | pushd qiling 8 | git submodule update --init --recursive 9 | pip install . 10 | popd 11 | 12 | cp qiling/qltui.py venv/lib/python3.12/site-packages 13 | 14 | mkdir -p bin 15 | cat <bin/qltool 16 | #!/bin/bash 17 | source $PWD/venv/bin/activate 18 | exec $PWD/qiling/qltool "\$@" 19 | END 20 | chmod 755 bin/qltool 21 | -------------------------------------------------------------------------------- /qiling/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | 4 | # from https://docs.qiling.io/en/latest/install/, but seems insane 5 | export DEBIAN_FRONTEND=noninteractive 6 | sudo apt install -y ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential \ 7 | bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ 8 | git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ 9 | libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ 10 | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip libpython3-dev qemu-utils \ 11 | rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev 12 | -------------------------------------------------------------------------------- /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 | git apply ../qira_fix.patch 16 | ./install.sh 17 | 18 | cd .. 19 | mkdir -p bin 20 | cd bin 21 | ln -s ../qira/qira qira 22 | cd .. 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /qira/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install libssl-dev build-essential python3-dev python3-pip debootstrap libjpeg-dev zlib1g-dev unzip wget graphviz software-properties-common libgmp-dev llvm-19-dev time ocaml ocaml-native-compilers camlp4-extra opam clang python3-virtualenv wget flex bison libtool automake autoconf autotools-dev pkg-config libglib2.0-dev libevent-dev 5 | apt-get -y build-dep qemu 6 | -------------------------------------------------------------------------------- /qira/qemu.patch: -------------------------------------------------------------------------------- 1 | diff --git a/block/gluster.c b/block/gluster.c 2 | index 0857c14..8dd3fad 100644 3 | --- a/block/gluster.c 4 | +++ b/block/gluster.c 5 | @@ -511,7 +511,7 @@ static int qemu_gluster_create(const char *filename, 6 | if (!fd) { 7 | ret = -errno; 8 | } else { 9 | - if (!glfs_ftruncate(fd, total_size)) { 10 | + if (!glfs_ftruncate(fd, total_size, NULL, NULL)) { 11 | if (prealloc && qemu_gluster_zerofill(fd, 0, total_size)) { 12 | ret = -errno; 13 | } 14 | @@ -567,7 +567,7 @@ static int qemu_gluster_truncate(BlockDriverState *bs, int64_t offset) 15 | int ret; 16 | BDRVGlusterState *s = bs->opaque; 17 | 18 | - ret = glfs_ftruncate(s->fd, offset); 19 | + ret = glfs_ftruncate(s->fd, offset, NULL, NULL); 20 | if (ret < 0) { 21 | return -errno; 22 | } 23 | diff --git a/linux-user/strace.c b/linux-user/strace.c 24 | index f7a8bf2..6550b29 100644 25 | --- a/linux-user/strace.c 26 | +++ b/linux-user/strace.c 27 | @@ -1,4 +1,5 @@ 28 | #include 29 | +#include 30 | #include 31 | #include 32 | #include 33 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c 34 | index d395f62..30a871f 100644 35 | --- a/linux-user/syscall.c 36 | +++ b/linux-user/syscall.c 37 | @@ -92,6 +92,8 @@ int __clone2(int (*fn)(void *), void *child_stack_base, 38 | #define tchars host_tchars /* same as target */ 39 | #define ltchars host_ltchars /* same as target */ 40 | 41 | +#define stime(x) clock_settime(CLOCK_REALTIME, (struct timespec*){x,0}) 42 | + 43 | #include 44 | #include 45 | #include 46 | @@ -204,15 +206,6 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ 47 | #define TARGET_NR__llseek TARGET_NR_llseek 48 | #endif 49 | 50 | -#ifdef __NR_gettid 51 | -_syscall0(int, gettid) 52 | -#else 53 | -/* This is a replacement for the host gettid() and must return a host 54 | - errno. */ 55 | -static int gettid(void) { 56 | - return -ENOSYS; 57 | -} 58 | -#endif 59 | #if defined(TARGET_NR_getdents) && defined(__NR_getdents) 60 | _syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count); 61 | #endif 62 | diff --git a/qga/commands-posix.c b/qga/commands-posix.c 63 | index c2ff970..e6c9f51 100644 64 | --- a/qga/commands-posix.c 65 | +++ b/qga/commands-posix.c 66 | @@ -15,6 +15,7 @@ 67 | #include 68 | #include 69 | #include 70 | +#include 71 | #include 72 | #include 73 | #include 74 | diff --git a/user-exec.c b/user-exec.c 75 | index 8ad89a4..50c7cba 100644 76 | --- a/user-exec.c 77 | +++ b/user-exec.c 78 | @@ -58,7 +58,7 @@ static void exception_action(CPUState *cpu) 79 | void cpu_resume_from_signal(CPUState *cpu, void *puc) 80 | { 81 | #ifdef __linux__ 82 | - struct ucontext *uc = puc; 83 | + ucontext_t *uc = puc; 84 | #elif defined(__OpenBSD__) 85 | struct sigcontext *uc = puc; 86 | #endif 87 | @@ -172,7 +172,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 88 | #elif defined(__OpenBSD__) 89 | struct sigcontext *uc = puc; 90 | #else 91 | - struct ucontext *uc = puc; 92 | + ucontext_t *uc = puc; 93 | #endif 94 | unsigned long pc; 95 | int trapno; 96 | @@ -227,7 +227,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 97 | #elif defined(__OpenBSD__) 98 | struct sigcontext *uc = puc; 99 | #else 100 | - struct ucontext *uc = puc; 101 | + ucontext_t *uc = puc; 102 | #endif 103 | 104 | pc = PC_sig(uc); 105 | @@ -289,7 +289,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 106 | 107 | #ifdef __APPLE__ 108 | #include 109 | -typedef struct ucontext SIGCONTEXT; 110 | +typedef ucontext_t SIGCONTEXT; 111 | /* All Registers access - only for local access */ 112 | #define REG_sig(reg_name, context) \ 113 | ((context)->uc_mcontext->ss.reg_name) 114 | @@ -332,7 +332,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 115 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 116 | ucontext_t *uc = puc; 117 | #else 118 | - struct ucontext *uc = puc; 119 | + ucontext_t *uc = puc; 120 | #endif 121 | unsigned long pc; 122 | int is_write; 123 | @@ -359,7 +359,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 124 | void *puc) 125 | { 126 | siginfo_t *info = pinfo; 127 | - struct ucontext *uc = puc; 128 | + ucontext_t *uc = puc; 129 | uint32_t *pc = uc->uc_mcontext.sc_pc; 130 | uint32_t insn = *pc; 131 | int is_write = 0; 132 | @@ -457,7 +457,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 133 | #if defined(__NetBSD__) 134 | ucontext_t *uc = puc; 135 | #else 136 | - struct ucontext *uc = puc; 137 | + ucontext_t *uc = puc; 138 | #endif 139 | unsigned long pc; 140 | int is_write; 141 | @@ -484,7 +484,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 142 | int cpu_signal_handler(int host_signum, void *pinfo, void *puc) 143 | { 144 | siginfo_t *info = pinfo; 145 | - struct ucontext *uc = puc; 146 | + ucontext_t *uc = puc; 147 | uintptr_t pc = uc->uc_mcontext.pc; 148 | uint32_t insn = *(uint32_t *)pc; 149 | bool is_write; 150 | @@ -513,7 +513,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 151 | void *puc) 152 | { 153 | siginfo_t *info = pinfo; 154 | - struct ucontext *uc = puc; 155 | + ucontext_t *uc = puc; 156 | unsigned long pc; 157 | int is_write; 158 | 159 | @@ -535,7 +535,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 160 | int cpu_signal_handler(int host_signum, void *pinfo, void *puc) 161 | { 162 | siginfo_t *info = pinfo; 163 | - struct ucontext *uc = puc; 164 | + ucontext_t *uc = puc; 165 | unsigned long ip; 166 | int is_write = 0; 167 | 168 | @@ -566,7 +566,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 169 | void *puc) 170 | { 171 | siginfo_t *info = pinfo; 172 | - struct ucontext *uc = puc; 173 | + ucontext_t *uc = puc; 174 | unsigned long pc; 175 | uint16_t *pinsn; 176 | int is_write = 0; 177 | @@ -619,7 +619,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 178 | void *puc) 179 | { 180 | siginfo_t *info = pinfo; 181 | - struct ucontext *uc = puc; 182 | + ucontext_t *uc = puc; 183 | greg_t pc = uc->uc_mcontext.pc; 184 | int is_write; 185 | 186 | @@ -635,7 +635,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, 187 | void *puc) 188 | { 189 | siginfo_t *info = pinfo; 190 | - struct ucontext *uc = puc; 191 | + ucontext_t *uc = puc; 192 | unsigned long pc = uc->uc_mcontext.sc_iaoq[0]; 193 | uint32_t insn = *(uint32_t *)pc; 194 | int is_write = 0; 195 | diff --git a/util/memfd.c b/util/memfd.c 196 | index 7c40691..1f3de72 100644 197 | --- a/util/memfd.c 198 | +++ b/util/memfd.c 199 | @@ -40,7 +40,7 @@ 200 | #include 201 | #include 202 | 203 | -static int memfd_create(const char *name, unsigned int flags) 204 | +int memfd_create(const char *name, unsigned int flags) 205 | { 206 | #ifdef __NR_memfd_create 207 | return syscall(__NR_memfd_create, name, flags); 208 | -------------------------------------------------------------------------------- /qira/qira_fix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/install.sh b/install.sh 2 | index 7fa4885..374bfc0 100755 3 | --- a/install.sh 4 | +++ b/install.sh 5 | @@ -10,6 +10,12 @@ else 6 | echo "*** You'll need to install Ubuntu or get a working build env for qemu and python yourself ***" 7 | fi 8 | 9 | +echo "building python venv" 10 | +python2 -m virtualenv venv 11 | +source venv/bin/activate 12 | +pip install --upgrade pip 13 | +pip install --upgrade -r requirements.txt 14 | + 15 | # build qemu 16 | if [[ "$(uname)" == 'Linux' ]]; then 17 | if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then 18 | @@ -27,12 +33,6 @@ else 19 | echo "See other backends in qira/tracers, PIN may work on Windows and OS X" 20 | fi 21 | 22 | -echo "building python venv" 23 | -virtualenv venv 24 | -source venv/bin/activate 25 | -pip install --upgrade pip 26 | -pip install --upgrade -r requirements.txt 27 | - 28 | echo "running tests" 29 | ./run_tests.sh 30 | 31 | diff --git a/tracers/qemu_build.sh b/tracers/qemu_build.sh 32 | index 4f5e030..4f50e6c 100755 33 | --- a/tracers/qemu_build.sh 34 | +++ b/tracers/qemu_build.sh 35 | @@ -7,5 +7,6 @@ if [ ! -d qemu/qemu ]; then 36 | fi 37 | 38 | cd qemu/qemu 39 | -./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --cpu=unknown --python=python 40 | +git apply ../../../../qemu.patch 41 | +./configure --target-list=i386-linux-user,x86_64-linux-user,arm-linux-user,ppc-linux-user,aarch64-linux-user,mips-linux-user,mipsel-linux-user --enable-tcg-interpreter --enable-debug-tcg --cpu=unknown --python=python --disable-werror 42 | make -j$(getconf _NPROCESSORS_ONLN) 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /reveng/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://downloads.sourceforge.net/project/reveng/3.0.6/reveng-3.0.6.tar.gz 4 | tar -xf reveng-3.0.6.tar.gz 5 | cd reveng-3.0.6 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-3.0.6/reveng bin 13 | -------------------------------------------------------------------------------- /ropper/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install ropper 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /rp++/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | wget https://github.com/0vercl0k/rp/releases/download/v2.1.4/rp-lin-gcc.zip 4 | unzip rp-lin-gcc.zip 5 | mkdir bin 6 | mv rp-lin bin/rp++ 7 | chmod 755 bin/rp++ 8 | -------------------------------------------------------------------------------- /rsactftool/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | virtualenv venv 4 | source venv/bin/activate 5 | 6 | git clone --depth 1 https://github.com/Ganapati/RsaCtfTool 7 | pushd RsaCtfTool 8 | pip install -r requirements.txt 9 | popd 10 | 11 | mkdir bin 12 | cat <bin/RsaCtfTool.py 13 | #!/bin/bash 14 | source $PWD/venv/bin/activate 15 | exec $PWD/RsaCtfTool/RsaCtfTool.py "\$@" 16 | END 17 | chmod 755 bin/* 18 | -------------------------------------------------------------------------------- /rsactftool/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | sudo apt-get install -y libgmp3-dev libmpc-dev 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /seccomp-tools/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install seccomp-tools 4 | -------------------------------------------------------------------------------- /seccomp-tools/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y ruby ruby-dev 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /social-analyzer/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install social-analyzer 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sslsplit/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --noconfirm --needed libevent 5 | -------------------------------------------------------------------------------- /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 libnet1-dev libpcap-dev 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /stegano-tools/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | virtualenv venv 4 | source venv/bin/activate 5 | pip install tinyscript 6 | 7 | [ -e stegano-tools ] || git clone --recurse https://github.com/dhondta/stegano-tools 8 | 9 | mkdir -p bin 10 | for F in `find stegano-tools -type f -iname "*.py"`; do 11 | N="${F##*/}" 12 | N="${N%.py}" 13 | P1="`pwd`/$F" 14 | P2="$VIRTUAL_ENV/bin/$N" 15 | echo "$N" 16 | chmod +x $P1 17 | cp $P1 $P2 18 | sed -i '1s|.*|#!'"$VIRTUAL_ENV"'/bin/python3|' $P2 19 | ln -s $P2 bin/$N 20 | done 21 | -------------------------------------------------------------------------------- /stegano-tools/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | for F in paddinganograph stegolsb stegopit stegopvd; do 4 | rm -f $HOME/tools/bin/$F 5 | rm -f $HOME/.virtualenvs/ctftools/bin/$F 6 | rm -f $HOME/.virtualenvs/ctftools3/bin/$F 7 | done 8 | -------------------------------------------------------------------------------- /stegdetect/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | INST_DIR="$PWD" 4 | 5 | git clone --depth 1 https://github.com/sparticvs/stegdetect 6 | 7 | mkdir -p bin etc man/man1 share/stegbreak 8 | pushd stegdetect 9 | git remote set-branches origin '*' 10 | git fetch -v --depth=1 11 | git checkout dev/fix-compilation 12 | git apply ../statics.patch 13 | linux32 autoreconf -i -f 14 | # what the actual fuck 15 | linux32 ./configure --prefix="$INST_DIR" 16 | sed -i -e "s/#ifndef HAVE_TIMERADD//" config.h 17 | linux32 make 18 | linux32 make install 19 | popd 20 | 21 | wget https://launchpadlibrarian.net/16697277/rules.ini -O share/stegbreak/rules.ini 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /stegdetect/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install automake1.11 automake autotools-dev libevent-dev libmagic-dev 5 | apt-get install -y libjpeg*-turbo*-dev 6 | -------------------------------------------------------------------------------- /stegdetect/statics.patch: -------------------------------------------------------------------------------- 1 | diff --git a/break_jsteg.c b/break_jsteg.c 2 | index 8b3cef9..c630794 100644 3 | --- a/break_jsteg.c 4 | +++ b/break_jsteg.c 5 | @@ -68,7 +68,7 @@ int break_jsteg(struct jstegobj *, struct arc4_stream *); 6 | 7 | int break_jsteg_filetest(char *filename, struct jstegobj *obj) 8 | { 9 | - extern int noprint; 10 | + static int noprint; 11 | 12 | const char *magic_str = magic_buffer(ms_cookie, obj->header, sizeof(obj->header)); 13 | if (NULL == magic_str) 14 | @@ -224,7 +224,7 @@ crack_jsteg(char *filename, char *word, void *obj) 15 | 16 | tas = as; 17 | if (break_jsteg(jstegob, &tas)) { 18 | - extern int noprint; 19 | + static int noprint; 20 | int i; 21 | u_int8_t header[JSTEGHEADER]; 22 | 23 | diff --git a/break_outguess.c b/break_outguess.c 24 | index 5ca351b..550737c 100644 25 | --- a/break_outguess.c 26 | +++ b/break_outguess.c 27 | @@ -258,7 +258,7 @@ crack_outguess(char *filename, char *word, void *obj) 28 | tit = it; 29 | if (break_outguess(ogob, &tas, &tit, &buf, &buflen)) { 30 | int i; 31 | - extern int noprint; 32 | + static int noprint; 33 | fprintf(stdout, "%s : outguess[v0.13b](%s)[", 34 | filename, word); 35 | noprint = 0; 36 | diff --git a/common.c b/common.c 37 | index 43573e6..224ae79 100644 38 | --- a/common.c 39 | +++ b/common.c 40 | @@ -163,8 +163,8 @@ stego_set_eoi_callback(void (*cb)(void *)) 41 | void 42 | stego_set_callback(void (*cb)(int, short), enum order order) 43 | { 44 | - extern void (*stego_mcu_order)(int, short); 45 | - extern void (*stego_natural_order)(int, short); 46 | + static void (*stego_mcu_order)(int, short); 47 | + static void (*stego_natural_order)(int, short); 48 | 49 | switch (order) { 50 | case ORDER_MCU: 51 | diff --git a/stegdetect.c b/stegdetect.c 52 | index 330fd9b..fd53e5d 100644 53 | --- a/stegdetect.c 54 | +++ b/stegdetect.c 55 | @@ -78,7 +78,7 @@ char *progname; 56 | float DCThist[257]; 57 | float scale = 1; /* Sensitivity scaling */ 58 | 59 | -extern int debug; 60 | +int debug; 61 | static int quiet = 0; 62 | static int ispositive = 0; /* Current images contain stego */ 63 | static char *transformname; /* Current transform name */ 64 | @@ -1023,7 +1023,7 @@ out: 65 | detect_print(void) 66 | { 67 | int i; 68 | - extern int noprint; 69 | + static int noprint; 70 | u_char *buf = detect_buffer; 71 | size_t buflen = detect_buflen; 72 | char *what = "appended"; 73 | -------------------------------------------------------------------------------- /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 | mkdir bin 8 | 9 | cd bin 10 | 11 | ln -s ../stegosaurus/stegosaurus . 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /subbrute/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | git clone --depth 1 https://github.com/TheRook/subbrute.git 4 | 5 | mkdir -p bin 6 | cd bin 7 | ln -s ../subbrute/subbrute.py subbrute 8 | cd .. 9 | -------------------------------------------------------------------------------- /taintgrind/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | curl https://sourceware.org/pub/valgrind/valgrind-3.21.0.tar.bz2 | tar xj 4 | cd valgrind-3.21.0 5 | 6 | git clone --depth 1 https://github.com/wmkhoo/taintgrind.git 7 | cd taintgrind 8 | ./build_taintgrind.sh 9 | cd ../../ 10 | 11 | mkdir -p bin 12 | cat <bin/taintgrind 13 | #!/bin/bash 14 | exec $PWD/valgrind-3.21.0/build/bin/taintgrind "\$@" 15 | END 16 | cat <bin/taintgrind-log2dot 17 | #!/bin/bash 18 | exec python3 $PWD/valgrind-3.21.0/taintgrind/log2dot.py "\$@" 19 | END 20 | chmod 755 bin/* 21 | -------------------------------------------------------------------------------- /tor-browser/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | REL_PATH=$(curl https://www.torproject.org/download/ | grep -i tor-browser-linux-x86_64 | grep 'xz"' | sed -e 's/.*href="//' -e 's/">.*//') 4 | wget https://www.torproject.org/$REL_PATH -O - | tar xvJ 5 | 6 | mkdir -p bin 7 | cat <bin/tor-browser 8 | #!/bin/bash 9 | cd $PWD/tor-browser 10 | ./start-tor-browser.desktop "\$@" 11 | END 12 | chmod 755 bin/* 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /veles/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed cmake zlib qt5-base 4 | -------------------------------------------------------------------------------- /veles/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y cmake zlib1g-dev qtbase5-dev 4 | -------------------------------------------------------------------------------- /villoc/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | PIN_NAME=pin-external-3.31-98869-gfa6f126a8-gcc-linux 4 | curl https://software.intel.com/sites/landingpage/pintool/downloads/$PIN_NAME.tar.gz | tar xz 5 | export PIN_ROOT=$PWD/$PIN_NAME 6 | 7 | git clone --depth 1 https://github.com/wapiflapi/villoc 8 | cd villoc/tracers/pintool 9 | make PIN_ROOT=$PIN_ROOT 10 | cd ../../ 11 | chmod 755 villoc.py 12 | cd .. 13 | 14 | mkdir -p bin 15 | cd bin 16 | ln -s ../villoc/villoc.py . 17 | cd .. 18 | -------------------------------------------------------------------------------- /volatility/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e volatility ] || git clone --depth 1 https://github.com/volatilityfoundation/volatility 4 | 5 | python2 -m virtualenv venv 6 | venv/bin/pip2 install -e ./volatility 7 | venv/bin/pip2 install distorm3 8 | venv/bin/pip2 install pycrypto 9 | 10 | mkdir bin 11 | cd bin 12 | ln -s ../venv/bin/vol* . 13 | -------------------------------------------------------------------------------- /volatility3/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install volatility3 4 | -------------------------------------------------------------------------------- /webgrep/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install 'git+https://github.com/dhondta/webgrep.git' 4 | -------------------------------------------------------------------------------- /webgrep/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | pacman -Syu --needed --noconfirm binutils grep imagemagick perl-image-exiftool steghide tesseract 5 | -------------------------------------------------------------------------------- /webgrep/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install binutils grep imagemagick libimage-exiftool-perl steghide tesseract-ocr 5 | -------------------------------------------------------------------------------- /webgrep/install-root-fedora: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | dnf install perl-Image-ExifTool.noarch 5 | dnf install -y binutils grep imagemagick steghide tesseract 6 | -------------------------------------------------------------------------------- /webgrep/install-root-ubuntu: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | set -eu -o pipefail 3 | 4 | apt-get -y install binutils grep imagemagick exiftool steghide tesseract-ocr 5 | -------------------------------------------------------------------------------- /xortool/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pipx install 'git+https://github.com/hellman/xortool.git' 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /xrop/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get update 4 | apt-get install -y zlib1g-dev 5 | 6 | -------------------------------------------------------------------------------- /xspy/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | [ -e xspy ] || git clone https://gitlab.com/kalilinux/packages/xspy 4 | mkdir -p bin 5 | gcc -o bin/xspy xspy/Xspy.c -lX11 6 | -------------------------------------------------------------------------------- /xspy/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y libx11-dev 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /zsteg/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | gem install zsteg 4 | -------------------------------------------------------------------------------- /zsteg/install-root-archlinux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | pacman -Syu --noconfirm --needed ruby 4 | -------------------------------------------------------------------------------- /zsteg/install-root-debian: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | apt-get install -y ruby 4 | -------------------------------------------------------------------------------- /zsteg/uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | echo "Y" | gem uninstall --user-install zsteg 4 | --------------------------------------------------------------------------------