Unit 4 - Vulnerability Assessment and Penetration Testing
Unit 4 - Vulnerability Assessment and Penetration Testing
Step 1: Assess
The most straightforward way to find a vulnerability is to scan your network and to conduct
a vulnerability assessment.
These will help to discover misconfigurations or coding flaws that can be used to
compromise or exploit an application or system.
With these vulnerabilities now known, you can move on to the next step.
Step 2: Prioritize
Not every vulnerability is the same, meaning not every vulnerability requires the same
treatment.
The most critical vulnerabilities could include ones that are backlogged, not just newly
discovered ones.
To map out the severity levels facing your organization you can assign a risk scoring card or
matrix to prioritize which vulnerabilities to remediate.
Step 3: Action
Once you have prioritized your vulnerabilities you can begin addressing the ones at the top of
your list.
By implementing a patch management procedure, your security infrastructure or engineering
team will repair and test each vulnerability at a time.
These could be short-term or long-term fixes.
Step 4: Reassess
To ensure the reliability of patches and to keep updated on any irregularities or changes to the
vulnerability, it’s important to maintain continuous monitoring.
This monitoring phase of the vulnerability management lifecycle can be done either manually
with the aid of a security analyst, or more commonly now with the use of automated tools.
Once a reassessment has been made, teams can capture this information into a vulnerability
management report to document and leverage for continued use, as Step 5 explains.
Step 5: Improve
After all assessments and actions have been taken to eliminate a vulnerability, one of the most
important steps to impact the effectiveness of a vulnerability management program is to
perform a lookback or “lessons learned” exercise.
This approach helps management define what worked, and what did not, during the lifecycle
process.
Evaluating these results can determine long-term improvements and can be leveraged for
budgetary needs.
Frameworks For Vulnerability Management
Selecting a framework for your vulnerability management plan can provide a reference for
designing and implementing security mechanisms to help ensure vulnerabilities to your
organization are eliminated properly.
This assurance allows managers and leadership to intelligently manage their
organization’s security posture using risk-based vulnerability management.
Abiding by a vulnerability management framework also instills confidence in the
organization’s industry and establishes a strong reputation of proactive compliance, which
can lead to increased business.
NIST Vulnerability Management Framework
The National Institute of Standards and Technology (NIST) is within the U.S. Department of
Commerce is the gold standard when developing a vulnerability management program.
Related Article: Patch Management VS Vulnerability Management
As one of the key features of any vulnerability management lifecycle, patch management
supports a security team’s ability to effectively eliminate the vulnerabilities identified in their
systems.
With this detailed framework in hand, an organization can quickly and professionally take
action on remediation to continue the vulnerability management life cycle process.
Top Challenges With The Vulnerability Management Lifecycle
There are several challenges to implementing a vulnerability management lifecycle.
Many organizations simply don’t know where to start, let alone how to include the right
features to make a program operational and to ultimately bring value to the organization.
Understanding these challenges will help you to avoid them.
Resource Intensive
Traditional vulnerability management is accomplished by throwing bodies at the problem, but
quantity doesn’t mean quality.
It is far better that you have fewer employees that can perform at a higher capacity. To offset
the number of employees, organizations will typically attempt to supplement labor by
purchasing software and tools to take on more of the manual tasks.
While full-time employees (FTE) are usually the main cost to an organization, purchasing
unnecessary and difficult-to-use tools can also be very expensive.
This is not a sustainable or cost-effective solution.
Managed Security Service Providers (MSSPs) can help alleviate the challenge of Labor and
associated costs by outsourcing for precision and expert solutions.
Inefficient
Many IT and security teams are not always in sync.
Whether due to underfunding of budget, overstretched team capacity, or general lack of
vision, a vulnerability management program can suffer exponentially.
When processes and ownership of responsibilities are not always clear and become neglected,
a vulnerability can slip through the cracks and open an organization to exposure.
Likewise, a poorly run vulnerability management program can show stakeholders a failed
return on investment and may cause a further decrease in staff and budget.
Another critical challenge facing organizations today includes Managed Service Providers
(MSPs) who own an organization’s vulnerability management.
Many of these providers are not experts and will often leave companies more vulnerable
and for longer periods.
Time Consuming
One of the most stressful aspects of an ineffective vulnerability management program is the
amount of time it takes to remediate a vulnerability and to carry out other vulnerability
management processes.
From identification to prioritization, and then remediation, the mean time to patch high
or critical vulnerabilities is estimated to be 60 days on average.
This of course not only takes away from other work but adds to an increase in labor,
additional tooling, and an overall increase in costs.
With so much time spent focused on manual tasks this also leads to greater chances of human
error and potential points of exposure that can result in damage to the organization.
1.External Testing
An external penetration test is a type of security assessment that can evaluate the
resiliency of your organization's network perimeter. It's widely considered to be one of the
first types of assessments that most organizations will go through, as most are concerned with
tackling their Internet-facing weaknesses first.
Open Source Reconnaissance – We’ll use publicly available resources to try and
uncover sensitive information, such as types of technology used by the organization
or potential usernames, that can be used in the later phases of testing.
Full Port Scan – In order to footprint an organization’s external perimeter, a port scan
is used to understand which services are exposed and accepting inbound connections.
These scans will take a look at all 65,535 TCP ports and the top 1000 most popular
UDP ports.
Vulnerability Scan – Where some assessments would center around a vulnerability
scan, this is really just the beginning of an external penetration test. We use a
vulnerability scan to speed up the identification process for some “low-hanging fruit”
types of issues and exploitable weaknesses that could lead to a more significant
compromise.
Unauthenticated Web Application Penetration Testing – We’ve explained before
that an external penetration test includes some aspects of web application penetration
testing. That portion is whatever an attacker can see and do from a blackbox
perspective, meaning we won’t be provided with valid credentials to log into
discovered applications (unless we can find them ourselves).
Manual and Automated Exploit Attempts – This is really the bread and butter of an
external penetration test, and the most important part of the assessment. It’s hard to
completely cover everything that can happen during this portion of the attack, but it
includes looking for vulnerabilities that automated scans can’t find, exploiting issues
scans did find, understanding the risks associated with identified vulnerabilities, and
noting any mitigating controls.
Password Attacks – Another important portion of external penetration testing are the
opportunities for password attacks. These styles of attacks aim to use open source
intelligence gathered and noted vulnerabilities, combining them in a way that makes
password attacks more likely to succeed while avoiding protections in place. These
attacks can help you understand shortcomings in password policies, account lockouts,
and multi-factor authentication schemes.
While vulnerability scanners provide a great starting point for penetration testing, manual
exploitation is crucial to identifying more complex vulnerabilities and misconfigurations.
This is an essential part of the penetration testing process, where our pentesters manually
exploit the target system to find business logic vulnerabilities, look for unique attack vectors
of vulnerabilities that could be very harmful when combined, and identify each
vulnerability’s critical rating.
Exploitation aims not to cause damage but to understand the potential consequences of a
successful real-world attack. This allows the organization to prioritize remediation efforts
accordingly.
Exploitation involves using various tools and techniques to gain unauthorized access to the
system, steal data, or disrupt operations.
Examples:
The information gathered during recon and scanning helps us plan and execute exploitation
attempts. For example, an identified SQL injection vulnerability in a search form might be
exploited using a tool like SQLmap to extract sensitive data from the database.
We then attempt to chain vulnerabilities together to achieve a more significant impact. For
instance, a directory traversal vulnerability could be combined with a code injection flaw to
upload a malicious web shell and gain remote access to the server.
Key Tools Used During Exploitation:
Exploit Frameworks: Frameworks like Metasploit provide pre-built modules that can
be used to exploit specific vulnerabilities. However, these tools require a deep
understanding of the vulnerability and customization for the target application.
Custom Scripts: For zero-day vulnerabilities or those not covered by existing tools,
pentesters may develop custom scripts to exploit the vulnerability. Reputable pentest
service providers constantly update their tests to account for this.
Password Cracking Tools: Tools like JohnTheRipper can be used to crack hashed
passwords obtained during the test if password spraying or other techniques fail to
gain access.
5. Reporting and Remediation
Once the exploitation phase is complete, our team will provide a detailed report illustrating
all the findings. This report should include:
A description of each vulnerability identified.
The severity of the vulnerability (based on CVSS scoring or other metrics).
The potential impact of exploiting the vulnerability.
Step-by-step instructions on reproducing the vulnerability (for internal remediation
teams).
Tools are Used for Web Application Pen Testing
Astra Pentest
Acunetix
HackerOne
Burp Suite
Browser’s Developer Tools
NMap
Zenmap
ReconDog
Nikto
4 Wireless Testing