Penetration Testing
Penetration Testing
12/7/2010
Penetration Testing
12/7/2010
Penetration Testing
12/7/2010
Penetration Testing
Authorization Letter
Detailed agreements/scope
Anything off limits? Hours of testing? Social Engineering allowed? War Dialing? War Driving? Denials of Service? Define the end point
12/7/2010
Penetration Testing
Black Box
It treats the system as a "black-box", so it doesn't explicitly use knowledge of the internal structure.
vs.
White Box
It allows one to peek inside the "box", and it focuses specifically on using internal knowledge of the software to guide the selection of test data
12/7/2010
Penetration Testing
OSSTMM
OSSTMM Open-Source Security Testing Methodology Manual Version 3.0 RC 26 at www.osstmm.org http://www.isecom.org/projects/osstmm.htm
It defines how to go about performing a pen test, but does not go into the actual tools.
12/7/2010
Penetration Testing
12/7/2010
Penetration Testing
Gathering Information
Goal Given a companys name, determine information like:
what IP address ranges they have
WHOIS (arin.net ) Nslookup
personal information
Social engineering Google we.register.it
12/7/2010 Penetration Testing 9
Scan IP Addresses
Goal Given a set of IP addresses, determine what services and Operating Systems each is running. Nmap www.nmap.org Gfi languard
12/7/2010
Penetration Testing
10
Fingerprinting
What web server is running? What accounts have I found? What services are running? What OSes are running? Who is logged in? Is there available information on the web site?
12/7/2010
Penetration Testing
11
12/7/2010
Penetration Testing
12
12/7/2010
Penetration Testing
13
12/7/2010
Penetration Testing
14
Exploit vulnerability
Try to exploit detected vulnerabilities, for example:
Buffer overflow Heap overflow SQL injection Code injection Cross-site scripting
12/7/2010
Penetration Testing
16
Alternatives
Tools Core Impact Features License
25.000$ Open-source (but some libraries are only in binaries) Frequently (weekly) 1.450$ Open source 3 months of updates and support more of 150 Free and Open-source Free and Open-source
Immunity Canvas
SecurityForest
Metasploit
~2500 (at February 2005) Frequently (average 4 Occasionally (last exploit every month) updates in 2005) Independent Python Only Windows Perl for framework, many others languages for exploits (C,Perl,Python,Ruby,Sh ell,...) Number of precompiled exploits (see ExploitationTree)
191 (at October 2007) Occasionally (last updates on October 2007) Independent Ruby, C, Assembler
Program Language
Advantages
0-day payload
Free / IDS-IPS evasion / support to write exploits and large used in security community
12/7/2010
Penetration Testing
18
port scanning useful to identify active ports (services or daemons) that are running on the targets Ex:
nmap -v -sT 192.168.100.x
-sT normal scan -sS stealth scan
12/7/2010
Penetration Testing
20
openbsd
windows 2000 windows xp 128 128 48 48 16384 16384 1460 1460 increment increment MNNT MNW unsupported unsupported OK OK 3 3
21
Vulnerability scanning
Nessus is a leader tool in vulnerability
scanning There are two components :
nessusd server with plugins list of known vulnerabilities (there are different kinds of subscription depending on how old are plugins) nessus is a front end of the tool there are several version for windows and linux systems
12/7/2010
Penetration Testing
22
Introduction to Nessus
Created by Renaud Deraison Currently Maintained by Tenable Network Security Uses the NASL Scripting language for its plugins (currently over 13,000 plugins!) Price is still Free! But no more open source Register to obtain many NASL plugins (7 day delay). Or Purchase a Direct Feed for the Latest!
12/7/2010
Penetration Testing
23
Nessus Features
Client/Server Architecture SSL/PKI supported Smart Service Recognition
(i.e. FTP on 31337)
Non-Destructive or Thorough Tests Vulnerability Mapping to CVE, Bugtraq, and others Vulnerability Scoring using CVSS from NIST.
12/7/2010
Penetration Testing
24
OpenVAS
OpenSource Vulnerability Assessment Scanner Previously GNessUs (a GPL fork of the Nessus) OpenVAS is a security scanner to allow future free development of the now-proprietary NESSUS tool OpenVAS now offers 15000 Network Vulnerability Tests (NVTs) more all NASL plugins.
12/7/2010 Penetration Testing 25
12/7/2010
Penetration Testing
26
Exploit vulnerabilities
metasploit is a framework that allows to perform real attacks You need to start metasploit from the start menu (Penetration Test->Framework 3)
msfconsole
12/7/2010
Penetration Testing
27
12/7/2010
Penetration Testing
28
Vulnerabilities disclosure
If we find a new vulnerability (Zero Day Vulnerability) What we have to do?
Do not say anything and maintain the secret perhaps in the future the producer will fix it Spread the information:
to all or just to the producer
Sell it
12/7/2010 Penetration Testing 30