매번 새로 설치하는것이 귀찮아서, DockerFile로 이미지를/컨테이너를 생성하도록 작성했습니다.
pwndbg 최신 버전을 설치하면 제대로 동작하지 않는 현상이 있어서, 2022.08.30
버전을 설치합니다.
# Use Ubuntu as base image
FROM ubuntu:latest
# Update and install required packages
RUN apt-get update && \
apt-get install -y --no-install-recommends file git curl gcc vim python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
# Clone the pwndbg repo and checkout to specified tag
RUN git clone https://github.com/pwndbg/pwndbg && \
cd pwndbg && \
git checkout tags/2022.08.30
# Install pwndbg
RUN cd pwndbg && ./setup.sh
# Update .gdbinit to source pwndbg
RUN echo 'source /pwndbg/gdbinit.py' >> /root/.gdbinit
# Install pwntools
RUN pip3 install pwntools ropgadget
# Set up environment for interactive bash shell
CMD ["/bin/bash"]
docker build -t ubuntu-pwndbg .
mkdir ubuntu-pwndbg
cd ubuntu-pwndbg
docker run -it --name ubuntu-pwndbg -u root -v "$(pwd)":/workspace ubuntu-pwndbg
root로 실행하면, tab 자동완성, ll alias 등이 지원됩니다.
docker ps
docker exec -i -t --user root e235a20ac238 bash
혹시 m1이나 m2로 하신 건가요?