Skip to content

Commit

Permalink
Add config directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Stephens committed Mar 3, 2015
1 parent ea73dff commit 758e37c
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Edurange Configuration files go here.


38 changes: 38 additions & 0 deletions config/bootstrap.sh
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
16 changes: 16 additions & 0 deletions config/cookbook.rb.erb
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
55 changes: 55 additions & 0 deletions config/rop.yml
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
13 changes: 13 additions & 0 deletions config/vuln.xinetd
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
}

0 comments on commit 758e37c

Please sign in to comment.