Skip to content

fix bugs in order to use easily #23

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Ancypwn is now plugin based, choose your own plugin or write a new plugin if you

You will need at least 4 parts to have a working environment (apart from docker).

0. A ancypwn docker image, and is properly tagged as ancypwn:VERSION, VERSION is one of "16.04", "18.04" or "18.10", each represent a corresponding ubuntu version.
1. ancypwn launcher (`pip install ancypwn`)
0. A ancypwn docker image, and is properly tagged as ancypwn:VERSION, VERSION is one of "16.04", "18.04", "20.04" or "18.10", each represent a corresponding ubuntu version.
1. ancypwn launcher (`pip3 install ancypwn`)
2. a backend: backend provides ability to listen incoming request to pop up a terminal window, then asks terminal plugin to do it and does different docker container launching strategy (like remote support).
3. a terminal plugin: this one handles terminal poping up

Expand All @@ -36,13 +36,11 @@ Backends have the name pattern: `ancypwn-backend-*`, while terminal plugin has t
So you need:

```
# download images, and tag them properly
docker pull auxy233/ancypwn:16.04
docker pull auxy233/ancypwn:18.04
docker pull auxy233/ancypwn:18.10
docker image tag auxy233/ancypwn:16.04 ancypwn:16.04
docker image tag auxy233/ancypwn:18.04 ancypwn:18.04
docker image tag auxy233/ancypwn:18.10 ancypwn:18.10
# build images
docker build -t ancypwn:20.04 .
docker build -t ancypwn:18.04 .
docker build -t ancypwn:18.10 .
docker build -t ancypwn:16.04 .

pip3 install ancypwn
# pip3 install ancypwn-backend-* (choose your backend, and install it)
Expand Down Expand Up @@ -156,3 +154,4 @@ Current supported ubuntu version:
* 18.10
* 18.04
* 16.04
* 20.04
1 change: 1 addition & 0 deletions ancypwn-backend-unix
Submodule ancypwn-backend-unix added at f0a7ad
116 changes: 67 additions & 49 deletions ancypwn-docker/16.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,67 @@
FROM ubuntu:16.04

MAINTAINER Anciety <[email protected]>

# Apt packages
RUN dpkg --add-architecture i386 && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python \
build-essential \
python-dev python-pip python-setuptools \
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
gcc \
wget \
curl \
glibc-source \
cmake \
python-capstone \
socat \
netcat \
ruby \
ruby-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glibc-2.23.tar.xz

# python/ruby packages & gdb-plugin
RUN pip install --no-cache-dir pwntools ropper ancypatch && \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV LANG C.UTF-8

COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm

VOLUME ["/pwn"]
WORKDIR /pwn

CMD ["/bin/bash"]
FROM ubuntu:16.04

MAINTAINER Anciety <[email protected]>

# Apt packages
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install python-software-properties \
software-properties-common && \
add-apt-repository ppa:brightbox/ruby-ng && \
apt-get update && \
apt-get purge --auto-remove ruby && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python3 \
build-essential \
python3-dev python3-pip python3-setuptools\
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
gcc \
sudo \
wget \
curl \
glibc-source \
cmake \
socat \
netcat \
ruby2.6 \
ruby2.6-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glibc-2.23.tar.xz

# python/ruby packages & gdb-plugin
#RUN wget https://files.pythonhosted.org/packages/cd/82/04e9aaf603fdbaecb4323b9e723f13c92c245f6ab2902195c53987848c78/pip-21.1.2-py3-none-any.whl && \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line of comment useful or we can just remove it away?

#RUN pip3 install pip-21.1.2-py3-none-any.whl && \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If those comments are not needed, please remove them to keep the codebase clean.

RUN wget https://bootstrap.pypa.io/pip/3.5/get-pip.py && \
python3 get-pip.py && \
# pip3 install --upgrade pip && \
pip3 install --no-cache-dir pwntools ropper ancypatch LibcSearcher&& \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN cd ~/ && \
git clone https://github.com/scwuaptx/Pwngdb.git && \
cp ~/Pwngdb/.gdbinit ~/ && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
sed -i '1d' ~/.gdbinit && \
sed -i '1c source ~/pwndbg/gdbinit.py' ~/.gdbinit

ENV LANG C.UTF-8

COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm

VOLUME ["/pwn"]
WORKDIR /pwn

CMD ["/bin/bash"]
111 changes: 61 additions & 50 deletions ancypwn-docker/18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,61 @@
FROM ubuntu:18.04

MAINTAINER Anciety <[email protected]>


# Apt packages
RUN dpkg --add-architecture i386 && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python \
build-essential \
python-dev python-pip python-setuptools \
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
gcc \
wget \
curl \
glibc-source \
cmake \
python-capstone \
socat \
netcat \
ruby \
ruby-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glib*.tar.xz

# python/ruby packages & gdb-plugin
RUN pip install --no-cache-dir pwntools ropper ancypatch && \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV LANG C.UTF-8

COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm

VOLUME ["/pwn"]
WORKDIR /pwn

CMD ["/bin/bash"]
FROM ubuntu:18.04

MAINTAINER Anciety <[email protected]>


# Apt packages
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install sudo wget cmake curl gcc socat\
software-properties-common && \
wget http://archive.ubuntu.com/ubuntu/pool/main/k/keyutils/libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb && \
dpkg -i libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb && \
add-apt-repository ppa:brightbox/ruby-ng && \
apt-get update && \
apt-get purge --auto-remove ruby && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python3 \
build-essential \
python3-dev python3-pip python3-setuptools \
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
glibc-source \
netcat \
ruby2.6 \
ruby2.6-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glib*.tar.xz

# python/ruby packages & gdb-plugin
RUN wget https://bootstrap.pypa.io/pip/3.5/get-pip.py && \
python3 get-pip.py && \
pip install --no-cache-dir LibcSearcher pwntools ropper ancypatch && \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN cd ~/ && \
git clone https://github.com/scwuaptx/Pwngdb.git && \
cp ~/Pwngdb/.gdbinit ~/ && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
sed -i '1d' ~/.gdbinit && \
sed -i '1c source ~/pwndbg/gdbinit.py' ~/.gdbinit*

ENV LANG C.UTF-8

COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm

VOLUME ["/pwn"]
WORKDIR /pwn

CMD ["/bin/bash"]
98 changes: 49 additions & 49 deletions ancypwn-docker/18.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
FROM ubuntu:18.10

MAINTAINER Anciety <[email protected]>

# Apt packages
RUN dpkg --add-architecture i386 && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python \
build-essential \
python-dev python-pip python-setuptools \
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
gcc \
wget \
curl \
glibc-source \
cmake \
python-capstone \
socat \
netcat \
ruby \
ruby-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glibc-*.tar.xz

# python/ruby packages & gdb-plugin
RUN pip install --no-cache-dir pwntools ropper ancypatch && \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV LANG C.UTF-8

COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm

VOLUME ["/pwn"]
WORKDIR /pwn

CMD ["/bin/bash"]
FROM ubuntu:18.10
MAINTAINER Anciety <[email protected]>
# Apt packages
RUN dpkg --add-architecture i386 && apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
git nasm python \
build-essential \
python-dev python-pip python-setuptools \
libc6-dbg \
libc6-dbg:i386 \
gcc-multilib \
gdb-multiarch \
gcc \
wget \
curl \
glibc-source \
cmake \
python-capstone \
socat \
netcat \
ruby \
ruby-dev \
lxterminal && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cd ~ && tar -xvf /usr/src/glibc/glibc-*.tar.xz
# python/ruby packages & gdb-plugin
RUN pip install --no-cache-dir pwntools ropper ancypatch && \
gem install one_gadget seccomp-tools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# git installaing package
RUN cd ~/ && \
git clone https://github.com/pwndbg/pwndbg.git && \
cd ~/pwndbg/ && ./setup.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG C.UTF-8
COPY ./ancyterm.py /usr/local/bin/ancyterm
RUN chmod +x /usr/local/bin/ancyterm
VOLUME ["/pwn"]
WORKDIR /pwn
CMD ["/bin/bash"]
Loading