Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructuring of the whole project #2

Merged
merged 17 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__pycache__
*.swp
*.pyc
ctfs/
build*/
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:16.04
SHELL ["/bin/bash", "-c"]

RUN apt update -y

# Install utils
RUN apt install -y \
vim \
tmux \
tree \
curl \
git

# Install GCC and multilibs to allow x86 compilation
RUN apt install -y build-essential gcc-multilib

# Install Python 2.7
RUN apt install -y python-minimal && curl -L https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2
RUN pip2 install virtualenv

# Bootstrap angr_ctf using Python 2.7
# TODO: Use Python 3.7 once finding a replacement for templite module
ARG ANGR_CTF='/home/angr_ctf'
RUN git clone --depth=1 https://github.com/giladreich/angr_ctf.git $ANGR_CTF
WORKDIR $ANGR_CTF
RUN virtualenv -p /usr/bin/python2 venv && \
source venv/bin/activate && \
pip2 install -r requirements.txt && \
python2 package.py ctfs/

# Installing Python 3.7 in order to get Angr installed.
# Also adding the virtualenv to .bashrc by default in order to have Angr working when
# starting a new terminal session within the container to test things.
RUN apt install -y software-properties-common libffi-dev && add-apt-repository -y ppa:deadsnakes/ppa
RUN apt update && apt install -y python3.7
RUN virtualenv -p /usr/bin/python3.7 venv3
RUN echo "source $(realpath venv3)/bin/activate" >> ~/.bashrc
RUN source $(realpath venv3)/bin/activate && pip3 install angr

WORKDIR $ANGR_CTF/ctfs
6 changes: 0 additions & 6 deletions README

This file was deleted.

9 changes: 9 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# docker rmi -f $(docker images -a -q) && docker builder prune
docker build -t angr_ctf .
container_id=$(docker create angr_ctf)
docker cp $container_id:/home/angr_ctf/ctfs - > angr_ctfs.tar
docker rm -v $container_id
tar -xzf angr_ctfs.tar
rm angr_ctfs.tar
Binary file removed dist/00_angr_find
Binary file not shown.
Binary file removed dist/01_angr_avoid
Binary file not shown.
Binary file removed dist/02_angr_find_condition
Binary file not shown.
Binary file removed dist/03_angr_symbolic_registers
Binary file not shown.
Binary file removed dist/04_angr_symbolic_stack
Binary file not shown.
Binary file removed dist/05_angr_symbolic_memory
Binary file not shown.
Binary file removed dist/06_angr_symbolic_dynamic_memory
Binary file not shown.
Binary file removed dist/07_angr_symbolic_file
Binary file not shown.
Binary file removed dist/08_angr_constraints
Binary file not shown.
Binary file removed dist/09_angr_hooks
Binary file not shown.
Binary file removed dist/10_angr_simprocedures
Binary file not shown.
Binary file removed dist/11_angr_sim_scanf
Binary file not shown.
Binary file removed dist/12_angr_veritesting
Binary file not shown.
Binary file removed dist/13_angr_static_binary
Binary file not shown.
Binary file removed dist/14_angr_shared_library
Binary file not shown.
Binary file removed dist/15_angr_arbitrary_read
Binary file not shown.
Binary file removed dist/16_angr_arbitrary_write
Binary file not shown.
Binary file removed dist/17_angr_arbitrary_jump
Binary file not shown.
Binary file removed dist/lib14_angr_shared_library.so
Binary file not shown.
73 changes: 0 additions & 73 deletions dist/scaffold00.py

This file was deleted.

27 changes: 0 additions & 27 deletions dist/scaffold01.py

This file was deleted.

51 changes: 0 additions & 51 deletions dist/scaffold02.py

This file was deleted.

78 changes: 0 additions & 78 deletions dist/scaffold03.py

This file was deleted.

Loading