카카오로 미러 서버 변경
sed -i 's/kr.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
sed -i 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
sed -i 's/ports.ubuntu.com/ftp.harukasan.org/g' /etc/apt/sources.list
GEF 로케일 이슈 해결
locale -a | grep "UTF-8"
export LC_ALL=$(locale -a | grep UTF-8)
export LC_CTYPE=C.UTF-8
GDB 필수 파일 설치
apt update
apt install -y curl binutils gdb python3 file gdbserver pip python-pip
pip install pwn
Docker 실행 명령어
docker run --rm -it --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/share:/sharing -u 0 --name oper ?:? /bin/bash
GEF 설치
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
SymLink 생성
ln -s /sharing/ex.py ./ex.py
TMUX 스크롤 활성화
cat > ~/.tmux.conf
set -g mouse on
# sane scrolling:
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
UBUNTU 18.04 경우
apt-get update && apt-get install -y netcat
apt update
apt install curl git wget file zsh sudo vim libssl-dev libffi-dev build-essential libssl-dev libc6-i386 libc6-dbg gcc-multilib make gcc gdb -y
apt install python python-pip git curl wget vim zsh gdb python3 python3-pip -y
dpkg --add-architecture i386 &&\
apt-get update
apt-get install python3-dev ruby binutils-multiarch -y
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 ruby-full python-dev python-setuptools python-capstone socat -y
python3 -m pip install --upgrade pip
pip3 install unicorn
pip3 install keystone-engine
pip3 install pwntools
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py
echo source ~/.gdbinit-gef.py >> ~/.gdbinit
정말 가끔 Alpine인 경우..
apk add --update py-pip \
python3 \
socat \
git \
build-base \
alpine-sdk \
strace \
ltrace \
perl \
ruby \
zsh \
fish \
bash \
htop \
tmux \
vim \
libffi-dev \
linux-headers \
openssl \
openssl-dev \
apache2 \
xz-libs \
xz-dev \
gcc \
python3-dev \
musl-dev \
linux-headers