Setup a fresh Ubuntu Linux environment for CTF
2020-10-04 阅读量:

Change apt source mirror

1
. /etc/os-release; sudo wget "https://mirrors.ustc.edu.cn/repogen/conf/ubuntu-https-4-${UBUNTU_CODENAME}" -O /etc/apt/sources.list

Update apt repo cache and Upgrade system

1
2
sudo su
apt update && apt upgrade -y && apt dist-upgrade -y && apt clean -y && apt autoclean -y && apt remove -y && apt autoremove -y

Change Timezone

1
timedatectl set-timezone Asia/Shanghai

Install basic tools

1
2
3
sudo apt install tmux zsh git lrzsz tig unar build-essential cmake nasm python3 python3-pip zip unzip gdb
sudo pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo pip3 install ipython requests bs4 pillow pwntools keystone-engine ropper

Qemu

1
2
3
4
5
6
7
8
9
10
11
12
sudo apt install -y binfmtc && \
sudo apt install -y binutils-mipsisa32r6el-linux-gnu-dbg && \
sudo apt install -y gcc-mipsel-linux-gnu && \
sudo apt install -y gdb-multiarch && \
sudo apt install -y libc6-armhf-armel-cross && \
sudo apt install -y libc6-mips32-mipsn32-cross && \
sudo apt install -y libc6-mipsel-cross && \
sudo apt install -y qemu && \
sudo apt install -y qemu-system-mips && \
sudo apt install -y qemu-user && \
sudo apt install -y qemu-user-static && \
sudo apt install -y spim

Install oh-my-zsh

1
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install golang

1
2
3
4
5
6
7
unar go???.tar.xz

mv ./go /opt
export PATH=$PATH:/opt/go/bin

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

Install SpaceVim

1
2
3
curl -sLf https://spacevim.org/install.sh | bash
sudo su
curl -sLf https://spacevim.org/install.sh | bash

Install powerline

1
sudo apt install powerline

Install NerdFonts

1
2
3
4
5
6
7
sudo su
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/DroidSansMono.zip

unzip DroidSansMono.zip -d ~/.fonts
fc-cache -fv

rm -rf ./DroidSansMono.zip

Install BurpSuite Pro

Install gef

1
sh -c "$(curl -fsSL http://gef.blah.cat/sh)"

Config tmux

1
2
3
4
5
sudo su
git clone --recursive https://github.com/tony/tmux-config.git /opt/tmux
ln -s /opt/tmux/.tmux.conf ~/.tmux.conf
su kali
ln -s /opt/tmux/.tmux.conf ~/.tmux.conf
1
2
3
4
change the 100th line of /opt/tmux/.tmux.conf from
if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"'
to
if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind \%; bind \% split-window -h -c "#{pane_current_path}"'

Execute sudo not prompting for password

Install Jupyter Notebook

jupyter notebook 可以做哪些事情? - 量子位的回答 - 知乎

1
pip3 install jupyterlab