@@ -10,7 +10,9 @@ prepare the testing environment.
10
10
First, install vagrant and virtualbox. Vagrant can be downloaded from [ this
11
11
link] ( vagrantdl ) . Virtualbox can be downloaded from [ here] ( virtualboxdl ) .
12
12
13
- Next, clone the repository onto your host machine.
13
+ Next, clone the repository onto your host machine. If you have messed up
14
+ somewhere along the course and want to revert the state of the repository, just
15
+ delete the entire directory and perform this step again.
14
16
15
17
``` shell
16
18
amon@bethany:~ $ git clone https://github.com/nnamon/linux-exploitation-course.git
@@ -80,19 +82,57 @@ drwx------ 2 ubuntu ubuntu 4096 Jan 8 10:54 .ssh
80
82
ubuntu@ubuntu-xenial:~$
81
83
```
82
84
85
+ The course repository directory you clone previously will be mounted at
86
+ `/vagrant` so you can use your preferred text editor.
87
+
88
+ ## Windows Users
89
+
90
+ For Windows users there are two options:
91
+
92
+ 1. Start a virtual machine containing Ubuntu 16.04 and run the provisioning
93
+ script found below. Next, manually clone the course repository into the
94
+ machine. Note that directory locations may be different from the code
95
+ listings in the course if you go down this route. The choice of
96
+ virtualisation software you choose is up to you.
97
+ 2. Install Vagrant and Virtualbox for Windows. This allows you to follow the
98
+ instructions above almost identically.
99
+
100
+ One caveat with Option 2 is that your Windows Installation might not have SSH
101
+ installed previously. When you invoke `vagrant ssh`, you might receive a message
102
+ as follows:
103
+
104
+ ```shell
105
+ D:\linux-exploitation-course>vagrant ssh
106
+ `ssh` executable not found in any directories in the %PATH% variable. Is an
107
+ SSH client installed? Try installing Cygwin, MinGW or Git, all of which
108
+ contain an SSH client. Or use your favorite SSH client with the following
109
+ authentication information shown below:
110
+
111
+ Host: 127.0.0.1
112
+ Port: 2222
113
+ Username: ubuntu
114
+ Private key:
115
+ D:/linux-exploitation-course/.vagrant/machines/default/virtualbox/private_key
116
+ ```
117
+
118
+ In that case, simply follow the instructions to SSH into the newly provisioned
119
+ system with an SSH client of your choice such as Putty.
120
+
83
121
## What Was Installed?
84
122
85
123
This is the entire provisioning script:
86
124
87
- ```ruby
88
- config.vm.provision "shell", inline: <<-SHELL
89
- dpkg --add-architecture i386
90
- apt-get update
91
- apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 gdb python python-pip libssl-dev gcc
92
- pip install --upgrade pip
93
- pip install pwntools
94
- pip install ipython
95
- SHELL
125
+ ```bash
126
+ #!/bin/bash
127
+ dpkg --add-architecture i386
128
+ apt-get update
129
+ apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 gdb python python-pip libssl-dev gcc git binutils
130
+ pip install --upgrade pip
131
+ pip install pwntools
132
+ pip install ipython
133
+ pip install ropper
134
+ git clone https://github.com/longld/peda.git /home/ubuntu/peda
135
+ echo "source ~/peda/peda.py" >> /home/ubuntu/.gdbinit
96
136
```
97
137
98
138
[vagrantdl]: https://www.vagrantup.com/downloads.html
0 commit comments