Skip to content

Commit 8ee0f20

Browse files
committed
Add Vagrantfile
1 parent 3499e66 commit 8ee0f20

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

docker/Dockerfile renamed to containers/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ENV LC_ALL en_US.UTF-8
1515
ENV LANG en_US.UTF-8
1616
ENV LANGUAGE en_US:en
1717

18+
# Unicorn pypi package fails to setup on ARM, which we need to support for M1 Macs
19+
# Build from source instead and generate our own Python bindings
1820
RUN git clone https://github.com/unicorn-engine/unicorn.git /opt/unicorn
1921
WORKDIR /opt/unicorn/bindings/python
2022
RUN python3 setup.py install && rm -rf /opt/unicorn

containers/Vagrantfile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
config.vm.box = "debian/bullseye64"
6+
7+
config.vm.provider "virtualbox" do |v|
8+
v.memory = 4096
9+
v.cpus = 2
10+
v.name = "wolvsec"
11+
end
12+
13+
config.vm.hostname = "wolvsec"
14+
15+
config.ssh.forward_agent = true
16+
config.ssh.forward_x11 = true
17+
18+
config.vm.provision "shell", inline: <<-SHELL
19+
## Install base packages
20+
apt-get update
21+
apt-get -y upgrade
22+
23+
apt-get install -y apt-transport-https
24+
apt-get install -y \
25+
openjdk-11-jdk build-essential cmake pkg-config \
26+
unzip curl wget gcc zsh vim gdb git strace netcat \
27+
procps python3 python3-pip python3-dev file binutils sudo locales
28+
29+
apt-get install -y task-gnome-desktop
30+
31+
## Add wolvsec user and give sudo permission
32+
useradd --create-home --groups sudo --shell /bin/zsh wolvsec
33+
echo "wolvsec:wolvsec" | chpasswd
34+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
35+
36+
pip3 install pwntools numpy ipython
37+
38+
## Install GEF for better GDB experience
39+
wget -O /home/wolvsec/.gdbinit-gef.py -q https://gef.blah.cat/py
40+
echo source /home/wolvsec/.gdbinit-gef.py >> /home/wolvsec/.gdbinit
41+
42+
## Install Ghidra static reverse engineering tool
43+
wget "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.1.5_build/ghidra_10.1.5_PUBLIC_20220726.zip" -O /tmp/ghidra.zip
44+
unzip /tmp/ghidra.zip -d /opt/ghidra/
45+
rm -f /tmp/ghidra.zip
46+
chown -hR wolvsec:wolvsec /opt/ghidra/
47+
# Create launcher for desktop
48+
cat <<EOT >> /usr/share/applications/ghidra.desktop
49+
[Desktop Entry]
50+
Categories=Application;Development;
51+
Comment[en_US]=Ghidra Software Reverse Engineering Suite
52+
Comment=Ghidra Software Reverse Engineering Suite
53+
Exec=/opt/ghidra/ghidra_10.1.5_PUBLIC/ghidraRun
54+
GenericName[en_US]=Ghidra Software Reverse Engineering Suite
55+
GenericName=Ghidra Software Reverse Engineering Suite
56+
Icon=/opt/ghidra/ghidra_10.1.5_PUBLIC/support/ghidra.ico
57+
MimeType=
58+
Name[en_US]=Ghidra 10.1.5
59+
Name=Ghidra 10.1.5
60+
Path=/opt/ghidra/ghidra_10.1.5_PUBLIC/
61+
StartupNotify=false
62+
Terminal=false
63+
TerminalOptions=
64+
Type=Application
65+
Version=1.0
66+
X-DBUS-ServiceName=
67+
X-DBUS-StartupType=none
68+
X-KDE-SubstituteUID=false
69+
X-KDE-Username=
70+
EOT
71+
72+
# Install IDA
73+
sudo apt-get install -y libxcb-xinerama0
74+
wget "https://out7.hex-rays.com/files/idafree81_linux.run" -O /tmp/idafree_installer.run
75+
chmod +x /tmp/idafree_installer.run
76+
/tmp/idafree_installer.run --mode unattended --prefix /opt/idafree/idafree-8.1
77+
rm -f /tmp/idafree_installer.run
78+
chown -hR wolvsec:wolvsec /opt/idafree/
79+
cat <<EOT >> /usr/share/applications/idafree.desktop
80+
[Desktop Entry]
81+
Categories=Application;Development;
82+
Comment[en_US]=IDA Freeware
83+
Comment=IDA Freeware
84+
Exec=/opt/idafree/idafree-8.1/ida64
85+
GenericName[en_US]=IDA Freeware
86+
GenericName=IDA Freeware
87+
Icon=/opt/idafree/idafree-8.1/appico64.png
88+
MimeType=
89+
Name[en_US]=IDA Freeware 8.1
90+
Name=IDA Freeware 8.1
91+
Path=/opt/idafree/idafree-8.1/
92+
StartupNotify=false
93+
Terminal=false
94+
TerminalOptions=
95+
Type=Application
96+
Version=1.0
97+
X-DBUS-ServiceName=
98+
X-DBUS-StartupType=none
99+
X-KDE-SubstituteUID=false
100+
X-KDE-Username=
101+
EOT
102+
103+
## Install VSCode
104+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg
105+
install -D -o root -g root -m 644 /tmp/packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
106+
sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
107+
rm -f /tmp/packages.microsoft.gpg
108+
apt-get update
109+
apt-get install -y code
110+
111+
# Dark mode :)
112+
runuser -l wolvsec 'gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark'
113+
SHELL
114+
end

0 commit comments

Comments
 (0)