WSL Ubuntu 装 CTF 工具

Windows 桌面路径:/mnt/c/users/XXX/desktop

最重要的首先是换源

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

PS:如果 git clone https://github.com/xx/xx.git 很卡,试试 git clone git://github.com/xx/xx.git

接下来安装 python2

sudo apt update
sudo apt install python2

其次是安装 python2 的 pip

一般情况下 WSL 默认优先使用 python2,但是却只有 python3 有 pip,因此要安装 python2 的 pip

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python2 get-pip.py

PS:使用 python 时也要注意版本,比如下载时最好表明版本,比如 python2 -m pip install xxxpip2 list

【Misc】接下来下载 CTF 所需要的库:

① binwalk

git clone https://github.com/ReFirmLabs/binwalk.git
cd binwalk
sudo python3 setup.py install

② foremost

PS:有 MingGW 软件的基础下,方可执行下面指令,否则要先下载 MingGW

git clone https://github.com/raddyfiy/foremost.git
cd foremost
make
make install

③ cv2(opencv-python)

python3 -m pip install opencv-python

④ PIL(Pillow)

python3 -m pip install Pillow

⑤ montage

PS:注意它不是 python 的库,是软件

sudo apt-get update
apt-get install graphicsmagick-imagemagick-compat

⑥ gaps

PS:注意它不是 python 的库,是软件
PS:set.py 中包含 opencv-python 和 pillow,若之前已经下载了,可能会有冲突
PS:我的 python 版本为 3.8.10

git clone https://github.com/nemanja-m/gaps.git
cd gaps
sudo apt-get install libfreetype6-dev

# 将 requirements.txt 改成如下
numpy==1.22.1
opencv-python==4.2.0.32
matplotlib==2.2.3
pytest==4.6.11
pillow==9.0.0

python3 -m pip install -r requirements.txt
sudo apt-get install python-tk
pip install -e .

⑦ volatility(python2)

PS:推荐两种方法都安装

第一种方法:文件形式下载(好处:可安装插件)

git clone https://github.com/volatilityfoundation/volatility.git
cd volatility
sudo python2 setup.py install
sudo apt-get install pcregrep libpcre++-dev python2-dev -y
python2 -m pip install pycryptodome
python2 -m pip install distorm3

# 在 https://github.com/virustotal/yara/releases 下载 YARA 压缩包
tar -zxf yara-4.1.3.tar.gz
cd yara-4.1.3
sudo apt-get install automake libtool make gcc pkg-config
sudo apt-get install flex bison libssl-dev
./bootstrap.sh
./configure
make
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf'
sudo ldconfig
# 测试 YARA
echo "rule dummy { condition: true }" > my_first_rule
yara my_first_rule my_first_rule
# 输出 dummy my_first_rule 代表安装成功

python2 -m pip install Pillow
python2 -m pip install openpyxl
python2 -m pip install ujson

# 测试安装是否成功
cd /mnt/d/Cyber_security/ctf/misc/tool/volatility
python2 vol.py --info
# 要是显示如下信息说明安装成功
# Volatility Foundation Volatility Framework 2.6
# 
# Address Spaces
# --------------
# VistaSP0x64           - A Profile for Windows Vista SP0 x64
# ......

安装插件(mimikatz、lastpass、usbstor)

# 下载地址:https://github.com/ruokeqx/tool-for-CTF/tree/master/volatility_plugins;https://github.com/superponible/volatility-plugins
# 首先将各个 .py 插件放进 volatility 的 plugins 文件夹目录下
# mimikatz.py 获取密码
# lastpass.py Chrome 记录的登录密码
# usbstor.py 扫描注册表查找插入系统的 USB 设备
# chromehistory.py 谷歌浏览器历史记录
# firefoxhistory.py 火狐浏览器历史记录
# sqlite_help.py 上面两个插件的必须文件
python2 -m pip install construct

第二种方法:exe 形式下载(好处:简洁)

# http://downloads.volatilityfoundation.org/releases/2.6/volatility_2.6_lin64_standalone.zip
# 解压后,将 volatility_2.6_lin64_standalone 重命名为 volatility
sudo cp volatility /usr/sbin

⑧ zsteg

下载地址:https://github.com/zed-0xff/zsteg
PS:如果没有 gem 就有点麻烦,不过也不难

⑨ TestDisk

# https://www.cgsecurity.org/testdisk-7.2-WIP.tar.bz2
# 解压后进入
sudo apt-get update
sudo apt-get upgrade
sudo apt install build-essential e2fslibs-dev libncurses5-dev libncursesw5-dev ntfs-3g-dev libjpeg-dev uuid-dev zlib1g-dev qtbase5-dev qttools5-dev-tools pkg-config dh-autoreconf
sudo apt install autoconf automake git-core
sudo apt install testdisk

⑩ tcpxtract 和 tcpick

 sudo apt-get install tcpxtract
 sudo apt-get install tcpick

⑩① Nmap

参考官网:https://nmap.org/book/inst-source.html

⑩② zbarimg

apt-get -y install zbar-tools
posted @ 2022-01-23 15:48  筱团  阅读(445)  评论(0编辑  收藏  举报