Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 40 guests and 2 members online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow Creating target servers in a lab
EH-Net
May 24, 2013, 03:35:52 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Creating target servers in a lab  (Read 3303 times)
0 Members and 1 Guest are viewing this topic.
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« on: August 26, 2010, 08:07:32 AM »

I am finaly starting my "Hacker Club" in an high school close to where I live. I met with the director and a teacher and everything as been approved!  Smiley

I would like to create a few targets for the students to practice. I will be using De-Ice Live CDs, OWASP broken web apps, etc for the "teaching" part, but I would really much create my own targets for when it will come to CTF and other challenges and competitions among them.

This is all volunteer work and I do this for the kids and for me to learn how to set up labs and stuff like that.

We have access to a computer room. Each student will have his own PC. They will also be able to bring a laptop if they want. VMPlayer is already installed and we will add Backtrack. In addition, because it is a "Cisco" class, they have 2 networks and many routers, switches, etc.

I would like to create VM images for them to bring home and practice against (instead of live targets...). BTW, this post isn't about ethics or things like that. Don't worry, they will sign a waver and I will put A LOT on emphasis on what they should and shouldn't do...

I want to create easy targets, but not too easy at the same time...  Tongue

So what would you recommend?

1) Which Linux distro to start with?

Probably a mix of different ones, including one or two windows box in the class.


2) How should I approach it?

I thought of having targets:

a) Built for specific purposes, like a DNS server, a web server, a mail server, etc.
b) But I could also create only one target with many services installed...
c) Or having a little DMZ (in the class only, hard to replicate for them at home)


3) How can I juge the target complexity?

I don't want them to be to easy or to hard... Maybe mutiple ways of getting in?


It is fairly easy to set up a server. But I think it is difficult to set a whole lab with just the appropriate level of complexity...

So any thoughts?


Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
sil
Hero Member
*****
Offline Offline

Posts: 549



View Profile WWW
« Reply #1 on: August 26, 2010, 08:44:44 AM »

I think the good folk @ Heorot would be able to get you going on a framework. But I'll chime in on how I would set it up on a different scale/methodology

Divide and Conquer
3 Windows guests (2003, XP, 2007)
3 Nix guests (CentOS, FreeBSD, OpenSolaris)

The three Windows hosts would represent a semi real world environment in the sense that many businesses have 2003 Server for servers (duh!/doh!), XP as a typical desktop and some with 07 as a desktop.

The desktops can be used with non-admin accounts whereas the students could study client side attacks to escalate. The servers would run IIS with a "known to be exploitable" CMS system on them.

On the Nix side of things, the harsh reality of going with CentOS is that RHEL is used heavily on corporate environments. If you can get your hands on older versions of RHEL say RHEL9, then you'd be good to go. Same rules apply. Configure a couple of applications that are vulnerable. Say a Linux server running a vulnerable version of Hylafax locally, an exploitable version of Nagios or Cacti. Maybe even Joomla or Wordpress. For the kernel, I'd head over to exploit-db and look up "local escalation" +kernel +Linux and place a vulnerable kernel on. Users would have low privileges and need to work their way up the food chain. Same goes for Solaris.

On the FreeBSD side of things, I'd block all but ONE machine from connecting to it and have FreeBSD doing something (say NFS, etc.) where a machine needed to connect to the FreeBSD machine. The only way in would be to compromise either a Linux or Windows box and work your way in to a non-privileged account on FreeBSD and work your way up as well.

This is the compromise phase right... Twist... I'd have them document what steps and procedures as well as tools they used and pair them up... Once someone passes their goals. They'd now have to mop up the vulnerabilities, defend the box and either swap off with another student to see if they've locked down the box good enough or if they've failed and not understood the attacks.

Analogy
If you've ever watched a cooking show, you'd see that chefs are mess makers. Sure they cook great meals, but the goal of a chef is to create a tasty masterpiece. He doesn't care to clean up his mess. After all that's what he has assistants for.

On the flip side of this, rarely does one become a chef without going through the assistant phase of mopping the floor, gathering all the ingredients, etc., it's a learning process.

My distorted thought process
By making them not only compromise but yet lock down the machines, they'd need to familiarize themselves with "events" and "logging." I'd have them watch in parallel events in Windows and logs in Nix. This will allow them to understand what is going on when they attack. It can enable to see what a vigilant admin/engineer would see as an attacker was trying to work their way in. In doing so, they learn what to look for as well as gain an understanding of how to try to be more covert in their actions. At the same time they learn "the art of the compromise", they'd learn a little about incident response and forensics (to a minute degree).

After all is said and done, they should be able to effectively get an account, document and explain HOW they got the account. Document and explain what they tried (if they did) to make themselves more covert. Document and explain steps THEY would take to defend the castle.

However, this approach is sort of like I guess the OSCP on steroids maybe. Think about it. Compromise + Defend are like oil and water. Likely to overwhelm your students.

Extra points
Compromise a machine with NO DOWNLOADED TOOLS. Use whatever you make available to them on a separate clean Nix machine. No NMAP, no use of metasploit, no automated Wikto/Nikto/etc scanner. Just hardcore terminal action Wink
Logged

ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1060


aka dynamik


View Profile WWW
« Reply #2 on: August 26, 2010, 08:51:06 AM »

Setup something that mimics an enterprise network and use multiple targets (absolutely - make them pivot). Use both Windows and *nix and have infrastructure services (DNS/DHCP), SNMP, database, mail, web,  and FTP servers, etc.

CentOS is essentially non-branded RHEL, so that will probably be closest to what you'll see in most corporate environments. I think it's a waste of time to obsess over things like that. Linux distros are far more similar than they are different. You can get Apache or whatever else running on anything from CentOS to Ubuntu. Just pick something and go with it. Use a mix; make them work.

You should make the "flags" be pieces of information. Don't give them points simply for compromising a machine. What did they do with it once owned it? Did they go through a user's home directory and see that there's a text file with appears to be a password in the same directory as a Truecrypt file?

Don't make everything easily accessible. Connect the database server directly, and only, to the web server. Make them retrieve database information via the vulnerable web app or by compromising the web server in some other way.

It's your project, be creative! I'd say the closer you can design a real (small-scale) enterprise network, the more beneficial and interesting it'll be. If you don't have a lot of experience doing something like that, it'll be a good experience for you too.

Edit: Bah, beat by sil! Oh well, I think I had a unique idea or two in there. No regrets! Cheesy

Edit 2: That's a good idea to make them lock it down as well. You could do a red-team/blue-team exercise and have one team be on offense and another be on defense.
« Last Edit: August 26, 2010, 08:55:00 AM by dynamik » Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
sil
Hero Member
*****
Offline Offline

Posts: 549



View Profile WWW
« Reply #3 on: August 26, 2010, 08:58:33 AM »

Edit: Bah, beat by sil! Oh well, I think I had a unique idea or two in there. No regrets! Cheesy

pfft... I have a curl script posting for me!!! Wink

@dynamik... Just ordered a few days back:

Information Security Governance (Brotby)
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470131187,descCd-tableOfContents.html

Balanced Scorecard Step-by-Step: Maximizing Performance and Maintaining
Results by Paul R. Niven
http://search.barnesandnoble.com/Balanced-Scorecard-Step-by-Step/Paul-R-Niven/e/9780471780496

Going to give that a break though for now and get back to it in June 2011. Going to focus on malware studies for GREM and maybe to a dual GREM / CREA (IACRB).
Logged

H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #4 on: August 26, 2010, 09:34:09 AM »

Many great ideas!!

I particularly liked:

Quote
The desktops can be used with non-admin accounts whereas the students could study client side attacks to escalate. The servers would run IIS with a "known to be exploitable" CMS system on them.

Quote
I'd have them document what steps and procedures as well as tools they used and pair them up... Once someone passes their goals. They'd now have to mop up the vulnerabilities, defend the box and either swap off with another student to see if they've locked down the box good enough or if they've failed and not understood the attacks.

Quote
By making them not only compromise but yet lock down the machines, they'd need to familiarize themselves with "events" and "logging." I'd have them watch in parallel events in Windows and logs in Nix. This will allow them to understand what is going on when they attack.

Quote
document and explain HOW they got the account

Quote
You should make the "flags" be pieces of information. Don't give them points simply for compromising a machine. What did they do with it once owned it? Did they go through a user's home directory and see that there's a text file with appears to be a password in the same directory as a Truecrypt file?

Quote
Don't make everything easily accessible. Connect the database server directly, and only, to the web server. Make them retrieve database information via the vulnerable web app or by compromising the web server in some other way.


I will implement these ideas!!

As dynamik mentioned:
Quote
If you don't have a lot of experience doing something like that, it'll be a good experience for you too.

This will indeed be a very good experience for me. This is the #2 reason why I am doing this (after helping teens learning how to do this properly: in a lab!!!).

I intent in learning a lot from this experience. As you know from other posts, I may not be the most experienced at this, but I love it and I am very motivated!!!  Wink
Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #5 on: August 26, 2010, 09:40:26 AM »

In addition, half of the students won't know what UDP is...

So I will start slowly and I will make sure I can keep them interested by having them have "little successes" early on. But I want them to UNDERSTAND what they are doing. Not just type "exploit"...

What would be easy and fun things to do first? Sniffing passwords with ettercap? Crack a WEP key (we have a few wireless routers)? Use Metasploit?

I think I should alternate between 1) easy and cool and 2) harder and useful things...
« Last Edit: August 26, 2010, 09:55:50 AM by H1t M0nk3y » Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.077 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.