-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
50 lines (37 loc) · 1.61 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.define :ee do |t|
end
config.vm.synced_folder ".", "/home/vagrant/exercises"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.name = "ee"
end
$script = <<-'SCRIPT'
add-apt-repository ppa:longsleep/golang-backports
apt-get update
apt-get install make golang-go gdb gcc \
gcc-multilib git python2 python3 python3-pip \
python3-dev libssl-dev libffi-dev build-essential -y
python3 -m pip install -q --upgrade pip
python3 -m pip install -q --upgrade pwntools
git clone -q https://github.com/slimm609/checksec.sh.git /opt/checksec.sh
ln -s /opt/checksec.sh/checksec /usr/bin/checksec
git clone -q https://github.com/longld/peda.git /opt/peda
git clone -q https://github.com/hugsy/gef.git /opt/gef
git clone -q https://github.com/pwndbg/pwndbg.git /opt/pwndbg
echo "# gdb extensions:" >> /home/vagrant/.bashrc
echo "alias peda=\"gdb -iex 'source /opt/peda/peda.py' --nh -q\"" >> /home/vagrant/.bashrc
echo "alias gef=\"gdb -iex 'source /opt/gef/gef.py' --nh -q\"" >> /home/vagrant/.bashrc
echo "alias pwndbg=\"gdb -iex 'source /opt/pwndbg/gdbinit.py' --nh -q\"" >> /home/vagrant/.bashrc
sh /home/vagrant/exercises/build_protostar.sh
echo "export PATH=\$PATH:/opt/protostar/bin" >> /home/vagrant/.bashrc
echo "Disable ASLR"
sysctl -w kernel.randomize_va_space=0
#echo "Enable core dump"
#sysctl -w kernel.core_pattern=core.%u.%p.%t
SCRIPT
config.vm.provision "shell", inline: $script
end