Showing posts with label Penetration Testing. Show all posts
Showing posts with label Penetration Testing. Show all posts

Build a Lab using De-ICE Pen Test LiveCD's

I have been looking for a way to create a training type program for a small corporate penetration testing team. The problem is that the people that conduct internal penetration tests within small and large corporations are usually part of a larger Information Security department. These are the people that usually have to wear many hats in Info Sec, not to mention that they have to do other things as well. This all leads to a decrease in time and hence, skill set! Since the corporate guys (and gals) don't conduct pen tests everyday or every week (like our consulting brethren) there needs to be some sort of training program that corporate pen tester's can use to keep their skills up-to-date.

The training program needs to consist of the following:

- Easy to setup in a lab or virtual environment.
- Scenario based challenges that replicate real world situations.
- A "level" type of achievement system. Levels should build upon one another.
- Real hacking tools need to be pre-installed and ready to use, no time to mess with configurations.
- Scenario's that make you actually learn the tools and to think "outside the box".
- Scenario's need to be challenging and fun!

These are some of the high level requirements that I was looking for when it came to developing this training program.

I was lucky enough to grab the video copy of the Defcon conference held in Vegas and manage to saw an webcast of a presentation entitled "Turn-Key Pen Test Labs" by Thomas Wilhelm. Thomas described these LiveCD's (bootable on any kind of "intel" hardware) in which you can create your own pen test lab with some great real world scenarios. Thomas basically took scenarios that he did in real life pen testing assignments, recreated and re-engineered these on the LiveCD's. What a fantastic idea! The LiveCD's are based off of Slax. They contain real, live running services like telnet, ssh, ftp, etc..and even include a web server. So what do you do with the LiveCD once you pop it into a machine? You use Backtrack 3! Backtrack 3 is a LiveCD which contains over 300 tools pre-installed and ready to use. No need to configure anything. So..setup a small lan with two computers and a dhcp server and you are all set.

One thing I wanted to do was take the LiveCD's that Thomas put together and create the lab environment in VMware. That way you can have the Backtrack 2 LiveCD and the De-ICE Pen Test LiveCD's all on a virtual network contained on one laptop or desktop. Perfect for the corporate pen tester! I found (through the forums on Thomas' website) that there were lots of questions and/or problems with setting up a virtual network to run the testing environment so I put together a document which guides you through the setup of the network and the LiveCD's. This is the setup that I have used for the LiveCD's and it has been working out great! One thing to note about my setup. I am running VMware Workstation 5.5 on Suse 10.2. These instructions should work with VMware Workstation 6 and server as well. I note that the Windows version is similar. I will need to update the document with the Windows instructions as well. This is version 1.0 so I plan on releasing updates to this in the future.

So where do you find all of this stuff?
You can download the De-ICE LiveCD's from the De-ICE website here. There are also some really good "spoiler" and help forums if you get stuck. Thomas has done a great job on these LiveCD's so please support his website and the forum community that is growing around these CD's. I encourage you to learn more about these LiveCD's and get involved with helping create scenarios for future LiveCD's.

VMware Documentation for De-ICE Pen Test LiveCD's
The VMware Configuration Document I created is available for download in of here.

Network Based Attacks

Hi friends, you know that there're lots of attacking methods in network security . Here's a collection of links for different kind of attacks :

SYN packet manipulation
-- SYN packet manipulation
http://www.iss.net/security_center/advice/...ood/default.htm
-- Syn Flood experiment
http://www.niksula.cs.hut.fi/~dforsber/synflood/result.html
-- SYN Cookie
http://cr.yp.to/syncookies.html

Smurf DOS

-- ISS.com: Description
http://www.iss.net/security_center/advice/...urf/default.htm
-- GRC.com: DDOS Anatomy
http://grc.com/dos/grcdos.htm

IRC (Internet Relay Chat) Client attacks

-- IIS.com: Description
http://www.iss.net/security_center/advice/...IRC/default.htm

Service attacks

-- Buffer Overflow attacks
http://www.iss.net/security_center/advice/...low/default.htm
-- Buffer overflow vulnerabilities explained
http://www.hacker.pl/gminick/pliki/notmine/bof-eng.txt

-- Wireless Attacks Threaten Wired Networks
http://www.infosecuritymag.com/2001/oct/digest18.shtml#news1

I hope these links will draw out some important info abt types of attacks used by blackhats and may be able to answer atleast 1% of your queries .

Using Google to Find Security Bugs

Reviewing software for security bugs is a highly recommended best practice. There are various techniques for doing source code reviews, one of them being "static code analysis" which (in most cases) involves the use of a 'grepping' (pattern matching) tool along with a database of patterns that indicate potential security flaws. There are disadvantages to static code analysis: high rate of false positives and the inability to detect logic errors that may lead to security bugs. That said, static code analysis tools can be used to perform a quick first pass on the source code to detect bugs that can be easily identified by a grepping technique ("low hanging fruit"). Some of the free static code analyzers (security) are: Flawfinder, RATS, and SWAAT.

The idea is query Google Code Search using techniques previously reserved for local static code analysis. Here are a few interesting queries:

- SQL Injection in Java caused by executing a dynamic SQL query with user supplied input: http://www.google.com/codesearch?hl=en&lr=&q=.*executeQuery.*getParameter.*

- SQL Injection in PHP caused by executing a dynamic SQL query with user supplied input: http://google.com/codesearch?hl=en&lr=&q=.*mysql_query%5C%28.*%5C%24_%28GET%7CPOST%29.*

- Cross-Site Scripting (XSS) in Java caused by echoing user supplied input without HTML encoding: http://www.google.com/codesearch?hl=en&lr=&q=%3C%25%3D.*getParameter*

- Cross-Site Scripting (XSS) in PHP caused by echoing user supplied input without HTML encoding it: http://google.com/codesearch?hl=en&lr=&q=echo.*%5C%24_%28GET%7CPOST%29.*

See the resources below for more details and queries:

http://asert.arbornetworks.com/2006/10/static-code-analysis-using-google-code-search/

http://blogs.securiteam.com/index.php/archives/663

Google in my opinion is the most handy & the most powerfull hacking tool.Use it smartly