# Methodologies

# Stages

Penetration tests can have a wide variety of objectives and targets within scope. Because of this, no penetration test is the same, and there are no one-case fits all as to how a penetration tester should approach it.

The steps a penetration tester takes during an engagement is known as the methodology. A practical methodology is a smart one, where the steps taken are relevant to the situation at hand. For example, having a methodology that you would use to test the security of a web application is not practical when you have to test the security of a network.

Before discussing some different industry-standard methodologies, we should note that all of them have a general theme of the following stages:

<table border="1" id="bkmrk-stage-description-in" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 22.99%;"></col><col style="width: 77.008%;"></col></colgroup><tbody><tr><td>Stage</td><td>Description</td></tr><tr><td>Information Gathering</td><td>This stage involves collecting as much publically accessible information about a target/organisation as possible, for example, OSINT and research.

**Note**: This does not involve scanning any systems.

</td></tr><tr><td>Enumeration/Scanning</td><td>This stage involves discovering applications and services running on the systems. For example, finding a web server that may be potentially vulnerable.</td></tr><tr><td>Exploitation</td><td> This stage involves leveraging vulnerabilities discovered on a system or application. This stage can involve the use of public exploits or exploiting application logic.</td></tr><tr><td>Privilege Escalation</td><td>Once you have successfully exploited a system or application (known as a foothold), this stage is the attempt to expand your access to a system. You can escalate horizontally and vertically, where horizontally is accessing another account of the same permission group (i.e. another user), whereas vertically is that of another permission group (i.e. an administrator).</td></tr><tr><td>Post-exploitation</td><td>This stage involves a few sub-stages:

1. What other hosts can be targeted (pivoting)
2. What additional information can we gather from the host now that we are a privileged user
3. Covering your tracks
4. Reporting

</td></tr></tbody></table>

# OSSTMM

[The Open Source Security Testing Methodology Manual](https://www.isecom.org/OSSTMM.3.pdf) provides a detailed framework of testing strategies for systems, software, applications, communications and the human aspect of cybersecurity.

The methodology focuses primarily on how these systems, applications communicate, so it includes a methodology for:

1. **Telecommunications (phones, VoIP, etc.)**
2. Wired Networks
3. Wireless communications

<table class="table table-bordered" id="bkmrk-advantages-disadvant"><tbody><tr><td style="background: #efefef;">**Advantages**</td><td style="background: #efefef;">**Disadvantages**</td></tr><tr><td>Covers various testing strategies in-depth.  
</td><td>The framework is difficult to understand, very detailed, and tends to use unique definitions.  
</td></tr><tr><td>Includes testing strategies for specific targets (I.e. telecommunications and networking)   
</td><td>*Intentionally left blank.*</td></tr><tr><td>The framework is flexible depending upon the organisation's needs.  
</td><td>*Intentionally left blank.*</td></tr><tr><td>The framework is meant to set a standard for systems and applications, meaning that a universal methodology can be used in a penetration testing scenario.  
</td><td>*Intentionally left blank.*</td></tr></tbody></table>

# OWASP

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The "[Open Web Application Security Project](https://owasp.org/)" framework is a community-driven and frequently updated framework used solely to test the security of web applications and services.</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The foundation regularly </span>[writes reports](https://owasp.org/www-project-top-ten/2017/)<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;"> stating the top ten security vulnerabilities a web application may have, the testing approach, and remediation.</span>

<table class="table table-bordered" id="bkmrk-advantages-disadvant"><tbody><tr><td style="background: #efefef;">**Advantages**</td><td style="background: #efefef;">**Disadvantages**</td></tr><tr><td>Easy to pick up and understand.</td><td>It may not be clear what type of vulnerability a web application has (they can often overlap).  
</td></tr><tr><td>Actively maintained and is frequently updated.  
</td><td>OWASP does not make suggestions to any specific software development life cycles.  
</td></tr><tr><td>It covers all stages of an engagement: from testing to reporting and remediation.  
</td><td>The framework doesn't hold any accreditation such as CHECK.  
</td></tr><tr><td>Specialises in web applications and services.  
</td><td>*Intentionally left blank.*</td></tr></tbody></table>

# NIST Cybersecurity Framework 1.1

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The[ NIST Cybersecurity Framework ](https://www.nist.gov/cyberframework)is a popular framework used to improve an organisations cybersecurity standards and manage the risk of cyber threats. This framework is a bit of an honourable mention because of its popularity and detail.</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">  
</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The framework provides guidelines on security controls &amp; benchmarks for success for organisations from critical infrastructure (power plants, etc.) all through to commercial. There is a limited section on a standard guideline for the methodology a penetration tester should take.</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">  
</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">  
</span>

<table class="table table-bordered" id="bkmrk-advantages-disadvant"><tbody><tr><td style="background: #efefef;">**Advantages**</td><td style="background: #efefef;">**Disadvantages**</td></tr><tr><td>The NIST Framework is estimated to be used by 50% of American organisations by 2020.  
</td><td>NIST has many iterations of frameworks, so it may be difficult to decide which one applies to your organisation.  
</td></tr><tr><td>The framework is extremely detailed in setting standards to help organisations mitigate the threat posed by cyber threats.  
</td><td>The NIST framework has weak auditing policies, making it difficult to determine how a breach occurred.  
</td></tr><tr><td>The framework is very frequently updated.<span style="white-space: pre;"> </span>  
</td><td>The framework does not consider cloud computing, which is quickly becoming increasingly popular for organisations.  
</td></tr><tr><td>NIST provides accreditation for organisations that use this framework.<span style="white-space: pre;"> </span>  
</td><td>*Intentionally left blank.* </td></tr><tr><td>The NIST framework is designed to be implemented alongside other frameworks.  
</td><td>*Intentionally left blank.*</td></tr></tbody></table>

# NCSC CAF

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The [Cyber Assessment Framework](https://www.ncsc.gov.uk/collection/caf/caf-principles-and-guidance) (CAF) is an extensive framework of fourteen principles used to assess the risk of various cyber threats and an organisation's defences against these.</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">  
</span>

<span style="background: transparent; margin-top: 0pt; margin-bottom: 0pt;">The framework applies to organisations considered to perform "vitally important services and activities" such as critical infrastructure, banking, and the likes. The framework mainly focuses on and assesses the following topics:</span>

- Data security
- System security
- Identity and access control
- Resiliency
- Monitoring
- Response and recovery planning

<table class="table table-bordered" id="bkmrk-advantages-disadvant"><tbody><tr><td style="background: #efefef;">Advantages</td><td style="background: #efefef;">Disadvantages</td></tr><tr><td>This framework is backed by a government cybersecurity agency.<span style="white-space: pre;"> </span>  
</td><td>The framework is still new in the industry, meaning that organisations haven't had much time to make the necessary changes to be suitable for it.  
</td></tr><tr><td>This framework provides accreditation.  
</td><td>The framework is based on principles and ideas and isn't as direct as having rules like some other frameworks.  
</td></tr><tr><td>This framework covers fourteen principles which range from security to response.  
</td><td>Intentionally left blank.</td></tr></tbody></table>