-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nick Stephens
committed
Mar 3, 2015
1 parent
ea73dff
commit 758e37c
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Edurange Configuration files go here. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
apt-get update | ||
apt-get install -y xinetd | ||
|
||
mkdir /tmp/rop | ||
cp -r /vagrant/* /tmp/rop | ||
|
||
# make vulnuser | ||
mkdir /home/vulnuser | ||
useradd -d /home/vulnuser vulnuser | ||
chown -R vulnuser:vulnuser /home/vulnuser | ||
chmod 700 /home/vulnuser | ||
|
||
# configure vulnuser and flag | ||
/tmp/rop/generate/generate.py easy | ||
cp vuln /home/vulnuser/ | ||
echo "flag{congrats, this should be randomly generated in the future}" > /home/vulnuser/flag | ||
chown root:vulnuser /home/vulnuser/flag | ||
chmod 640 /home/vulnuser/flag | ||
|
||
# remove the C file | ||
rm out.c | ||
|
||
# place xinetd config files | ||
cp /tmp/rop/config/vuln.xinetd /etc/xinetd.d/vuln | ||
|
||
# drop the exploit skeleton into the home directory | ||
cp /tmp/rop/skeletons/pwn-easy.py /home/vagrant/ | ||
|
||
# copy libc into the directory for beginners | ||
cp /lib/i386-linux-gnu/libc.so.6 . | ||
|
||
# remove the build scripts | ||
rm -rf /tmp/rop | ||
|
||
# restart xinetd to get the service running | ||
service xinetd restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
script "install_elf" do | ||
interpreter "bash" | ||
user "root" | ||
cwd "/tmp" | ||
|
||
code <<-EOH | ||
cd /tmp | ||
git clone https://github.com/kahea/elf | ||
cd elf | ||
./install | ||
cd /tmp | ||
touch test-file | ||
EOH | ||
|
||
not_if "test -e /tmp/test-file" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Roles: | ||
- Name: NAT | ||
Packages: | ||
- gdb | ||
- nasm | ||
- git | ||
- emacs | ||
Recipes: | ||
- sshd_password_login | ||
- elf | ||
|
||
Groups: | ||
- Name: Instructor | ||
Access: | ||
Administrator: | ||
- NAT_Instance | ||
User: | ||
- NAT_Instance | ||
Users: | ||
- Login: instructor | ||
Password: vLCu3Crf | ||
|
||
- Name: Students | ||
Access: | ||
User: | ||
- NAT_Instance | ||
Users: | ||
- Login: student | ||
Password: sWfwkNGblfv | ||
Description: Describe this Player | ||
|
||
Scenarios: | ||
- Name: ROP | ||
Description: "This game teaches the basics of binary analysis and advanced exploitation techniques. It provides the player with a slightly different vulnerable binary on each play. Additionally the player is provided with a skeleton exploit for the binary. This exploit will lay out the steps necessary for successful exploitation, but comes incomplete. It is up to the student to analyze the vulnerable binary and fill in the missing pieces." | ||
Instructions: None yet | ||
|
||
Clouds: | ||
- Name: Cloud_1 | ||
CIDR_Block: 10.0.0.0/16 | ||
Scenario: ROP | ||
|
||
Subnets: | ||
- Name: NAT_Subnet | ||
Cloud: Cloud_1 | ||
CIDR_Block: 10.0.129.0/24 | ||
Internet_Accessible: true | ||
|
||
Instances: | ||
- Name: NAT_Instance | ||
Subnet: NAT_Subnet | ||
OS: ubuntu | ||
IP_Address: 10.0.129.5 | ||
Internet_Accessible: true | ||
Roles: | ||
- NAT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
service vuln | ||
{ | ||
disable = no | ||
socket_type = stream | ||
protocol = tcp | ||
wait = no | ||
user = vulnuser | ||
bind = 0.0.0.0 | ||
server = /home/vulnuser/vuln | ||
type = UNLISTED | ||
port = 3000 | ||
} | ||
|