Penetration Testing

What is a Penetration Testing

Penetration testing, also called pentesting or ethical hacking, is the practice of testing a computer system, network or web application to find security vulnerabilities that an attacker could exploit. Penetration testing can be automated with software applications or performed manually. Either way, the process involves gathering information about the target before the test, identifying possible entry points, attempting to break in -- either virtually or for real -- and reporting back the findings.

The main objective of penetration testing is to

identify security weaknesses. Penetration testing

can also be used to test an organization's security

policy, its adherence to compliance requirements,

its employees' security awareness and the

organization's ability to identify and respond to

security incidents.

Typically, the information about security

weaknesses that are identified or exploited

through pentesting is aggregated and provided to

the organization's IT and network system

managers, enabling them to make strategic

decisions and prioritize remediation efforts.

Penetration tests are also sometimes called white

hat attacks because, in a pen test, the good guys

are attempting to break-in.

Purpose of Penetration Testing

The primary goal of a pen test is to identify weak spots in an organization's security posture, as well as to measure the compliance of its security policy, test the staff's awareness of security issues and determine whether -- and how -- the organization would be subject to security disasters.

A penetration test can also highlight weaknesses in a company's security policies. For instance, although a security policy focuses on preventing and detecting an attack on an enterprise's systems, that policy may not include a process to expel a hacker.

How Often You Should Perform Penetration Testing

Organizations should perform pen-testing regularly -- ideally, once a year -- to ensure more consistent network security and IT management. In addition to conducting regulatory-mandated analysis and assessments, penetration tests may also be run whenever an organization:

  • adds new network infrastructure or applications;

  • makes significant upgrades or modifications to its applications or infrastructure;

  • establishes offices in new locations;

  • applies security patches; or

  • modifies end-user policies.

However, because penetration testing is not one-size-fits-all, when a company should engage in pen testing also depends on several other factors, including:

  • The size of the company. Companies with a larger presence online have more attack vectors and, therefore, are more-attractive targets for hackers.

  • Penetration tests can be costly, so a company with a smaller budget might not be able to conduct them annually. An organization with a smaller budget might only be able to conduct a penetration test once every two years while a company with a larger budget can do penetration testing once a year.

  • Regulations and compliance. Organizations in certain industries are required by law to perform certain security tasks, including pen-testing.

  • A company whose infrastructure is in the cloud might not be allowed to test the cloud provider's infrastructure. However, the provider may be conducting pen tests.

Penetration testing efforts should be tailored to the individual organization as well as the industry it operates in and should include follow-up and evaluation tasks so that the vulnerabilities found in the latest pen test are note reported in the following tests.

Penetration Testing Tools

Pen testers often use automated tools to uncover standard application vulnerabilities. Penetration tools scan code in order to identify malicious code in applications that could result in a security breach. Pen testing tools examine data encryption techniques and can identify hard-coded values, such as usernames and passwords, to verify security vulnerabilities in the system.

Penetration Testing Tools Should:

  • be easy to deploy, configure and use;

  • scan a system easily;

  • categorize vulnerabilities based on severity, i.e., those that need to be fixed immediately;

  • be capable of automating the verification of vulnerabilities;

  • re-verify previous exploits; and

  • generate detailed vulnerability reports and logs.

Many of the most popular penetration testing tools are free or open-source software; this gives pen-testers the ability to modify or otherwise adapt the code for their own needs. Some of the most widely used free or open-source pen-testing tools include:

  • The Metasploit Project is an open-source project owned by the security company Rapid7, which licenses full-featured versions of the Metasploit software. It collects popular penetration testing tools that can be used on servers, online-based applications, and networks. Metasploit can be used to uncover security issues, to verify vulnerability mitigations and to manage security processes.

  • Nmap, short for "network mapper," is a port scanner that scans systems and networks for vulnerabilities linked to open ports. Nmap is directed to the IP address or addresses on which the system or network to be scanned is located and then tests those systems for open ports; in addition, Nmap can be used to monitor host or service uptime and map network attack surfaces.

  • Wireshark is a tool for profiling network traffic and for analyzing network packets. Wireshark enables organizations to see the smaller details of the network activities taking place in their networks. This penetration tool is a network analyzer/network sniffer/network protocol analyzer that assesses vulnerabilities in network traffic in real-time. Wireshark is often used to scrutinize the details of network traffic at various levels.

  • John the Ripper incorporates different password crackers into one package, automatically identifies different types of password hashes and determines a customizable cracker. Pen testers typically use the tool to launch attacks to find password weaknesses in systems or databases.

Penetration testers use many of the same tools that black hat hackers use, in part because those tools are well-documented and widely available, but also because it helps the pen testers to better understand how those tools can be wielded against their organizations.

Penetration Test Strategies

One important aspect of any penetration testing program is defining the scope within which the pen testers must operate. Usually, the scope defines what systems, locations, techniques, and tools that can be used in a penetration test. Limiting the scope of the penetration test helps focus team members -- and defenders -- on the systems over which the organization has control over. 

A flow chart and process list are defined to prepare a guideline for the attack process as an outline for the penetration test. As the test progresses it is common for additional processes to be added and that outline expanded. This is caused by the discovery of vulnerabilities discovered during the penetration test. These items can be documented as follow-up tasks for "out-of-scope" work or pursued upon agreement.