Skip to content

Commit

Permalink
add ssh service and remove pwndbg
Browse files Browse the repository at this point in the history
  • Loading branch information
shenyuan committed Nov 11, 2018
1 parent 39c32d2 commit f1a2cd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/baseimage:latest
FROM ubuntu:18.04
MAINTAINER skysider <[email protected]>

RUN apt-get -y update && \
Expand All @@ -21,12 +21,11 @@ RUN apt-get -y update && \
libc6-dbg-armhf-cross \
libc6-arm64-cross \
libc6-dbg-arm64-cross \
python3-dev \
python3-pip \
cmake \
socat \
git \
file
file \
ssh \
python && \
rm -rf /var/lib/apt/list/*

RUN mkdir /etc/qemu-binfmt && \
ln -s /usr/mipsel-linux-gnu /etc/qemu-binfmt/mipsel && \
Expand All @@ -36,13 +35,10 @@ RUN mkdir /etc/qemu-binfmt && \
ln -s /usr/arm-linux-gnueabi /etc/qemu-binfmt/arm && \
ln -s /usr/aarch64-linux-gnu /etc/qemu-binfmt/aarch64


RUN git clone https://github.com/pwndbg/pwndbg && \
cd pwndbg && sed -i 's/sudo//g' setup.sh && \
./setup.sh && rm -rf /var/lib/apt/list/*
RUN useradd -m -s /bin/bash user && \
echo "user:user" | chpasswd && \
mkdir -p /var/run/sshd

WORKDIR /work/

COPY listen_program.sh /work/

CMD ["/bin/bash"]
CMD ["/usr/sbin/sshd", "-D"]
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ run docker:

docker run -it \
--rm \
--name ctf \
-v $(pwd):/work/ctf/ \
-p 1234:1234 -p 2333:2333 \
--name multiarch \
--cap-add=SYS_PTRACE \
skysider/multiarch-docker

Expand All @@ -20,9 +18,9 @@ debug mips program in docker:
socat TCP-LISTEN:2333,reuseaddr,fork EXEC:"qemu-mips -g 1234 ./demo"
qemu-mips -strace ./demo
gdb-multiarch ./demo
pwndbg>set arch mips
pwndbg>set endian big
pwndbg>target remote localhost:1234
(gdb)set arch mips
(gdb)set endian big
(gdb)target remote localhost:1234
```

If you need cross compile environment, please specify tag: `skysider/multiarch-docker:compile`
Expand Down

0 comments on commit f1a2cd1

Please sign in to comment.