Cyber Security  ·  Level 6
Conduct Security Assessment And Testing
Chapter 4: Exploit Known Vulnerabilities
📚 4 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • Review and prioritize vulnerabilities based on how severe and exploitable they are, and understand their impact on the business.
  • Plan your exploitation activities carefully, following all organizational policies, rules of engagement, and legal requirements.
  • Choose and use approved penetration testing tools like Metasploit, Burp Suite, and SQLmap to carry out exploitation.
  • Execute exploits safely and accurately to confirm vulnerabilities without causing disruptions to business operations.
  • Monitor and document all exploitation attempts, including any successful access, privilege escalations, or data exposures.
  • Collect and secure evidence of your exploitation activities, such as screenshots, logs, and payload results, for clear reporting.
  • Analyze the results of your exploitation to identify risks and weaknesses in the system.
  • Report your findings clearly to stakeholders, providing practical recommendations for fixing the vulnerabilities.

Mastering these skills helps you protect organizations by finding and fixing security weaknesses before attackers can exploit them.

Exploiting known vulnerabilities is a critical phase in conducting security assessments and penetration testing within Kenyan organizations. Cybersecurity professionals use this phase to simulate real-world attacks by leveraging existing weaknesses in systems, thereby identifying security gaps before malicious actors do. Mastery of tools like the Metasploit Framework and understanding privilege escalation techniques in Windows and Linux environments empower security teams to rigorously test defenses at institutions such as national hospitals, county government offices, and commercial banks. This chapter focuses on practical exploitation methods essential for enhancing cybersecurity posture in Kenya’s digital landscape.

4.1 Use Metasploit Framework to exploit system vulnerabilities

The Metasploit Framework remains one of the most widely used penetration testing tools globally, including in Kenya’s cybersecurity sector. It enables security professionals to automate the process of discovering, validating, and exploiting vulnerabilities in networks and systems. In environments ranging from university IT labs to financial institutions like Equity Bank, Metasploit expedites vulnerability exploitation with a vast repository of payloads and modules. Understanding how to effectively use Metasploit allows Kenyan cybersecurity experts to simulate attacks realistically and advise on appropriate mitigation strategies.

4.1.1 Overview of Metasploit Framework Architecture

The Metasploit Framework consists of several components that work together to facilitate exploitation tasks. Central to the framework is the Metasploit Console (msfconsole), which provides an interactive command-line interface for managing exploits and payloads. The exploit modules target specific vulnerabilities, while payloads define the actions performed after exploitation, such as opening a remote shell. Additionally, auxiliary modules support scanning and enumeration without exploiting vulnerabilities. Understanding this architecture is fundamental for tailoring attacks to the target environment and formulating effective penetration tests.

4.1.2 Selecting and Configuring Exploit Modules

Choosing the right exploit module involves identifying the target system’s vulnerabilities through prior scanning and reconnaissance. Metasploit categorizes exploits by platform, service, and vulnerability type, allowing testers to filter modules efficiently. After selecting an exploit, configuration steps include setting target IP addresses, ports, and payload options such as reverse shells or meterpreter sessions. Kenyan cybersecurity professionals working with SACCO IT systems often configure exploits to bypass firewalls and intrusion detection systems by customizing payload encoders and obfuscation techniques.

4.1.3 Executing Exploits and Handling Sessions

Once configured, executing the exploit initiates an attack that attempts to breach the target system. Successful exploitation results in an active session, allowing testers to interact with the compromised system. Managing these sessions requires familiarity with Metasploit commands to maintain persistence, escalate privileges, or extract data. For example, penetration testers in Nairobi’s county government offices use meterpreter sessions to demonstrate the impact of vulnerabilities on sensitive citizen data. Proper session management is critical to avoid detection and to gather actionable intelligence for remediation.

4.1.4 Post-Exploitation Activities Using Metasploit

After gaining access, post-exploitation activities focus on exploring the compromised environment and escalating privileges to simulate advanced threats. Metasploit provides modules for password dumping, keylogging, and network pivoting to extend access within an organization’s infrastructure. Security teams in Kenyan hospitals leverage these capabilities to assess risks associated with lateral movement and data exfiltration. Post-exploitation also includes cleaning up traces to maintain operational security during assessments and preparing detailed reports for stakeholders.

Practice Questions

  1. Describe the main components of the Metasploit Framework and their roles in exploitation. (10 marks)
  2. Explain the process of selecting an appropriate exploit module for a target system. (8 marks)
  3. Outline the steps involved in executing an exploit and managing sessions in Metasploit. (12 marks)
  4. Discuss common post-exploitation techniques available in Metasploit and their significance in penetration testing. (10 marks)
The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒4.2 Demonstrate privilege escalation techniques on Windows and Linux based systems

Privilege escalation is a pivotal skill for cybersecurity professionals conducting security assessments in Kenyan organizations. It involves exploiting system vulnerabilities or misconfigurations to gain elevated access rights beyond those initially obtained.…

🔒4.3 Perform buffer overflow attacks and analyse the results

Buffer overflow attacks remain critical in cyber security assessments, especially in contexts where legacy systems or poorly coded applications are deployed. In Kenya, many public institutions and private enterprises still operate software vulnerable to buffer…

🔒4.4 Execute web-based attacks

Web-based attacks represent a significant threat vector for Kenyan organizations, considering the increasing reliance on web applications for service delivery in sectors such as banking, education, and government. Executing these attacks during security assess…

Chapter Summary

This chapter focused on exploiting known vulnerabilities within computer systems and applications using practical tools and techniques. It began by demonstrating how to use the Metasploit Framework to identify and exploit weaknesses in system security effectively. The discussion then moved to privilege escalation methods on both Windows and Linux platforms, highlighting how attackers can gain higher access levels after initial entry. Following this, the chapter explored buffer overflow attacks, explaining how they manipulate memory to execute arbitrary code and how to analyse the outcomes of such exploits. The final section covered web-based attacks, detailing common vulnerabilities such as SQL injections, cross-site scripting (XSS), and cross-site request forgery (CSRF), and how these attacks compromise web applications. Each topic was presented with a focus on understanding the mechanics of the vulnerabilities and the practical steps attackers use to exploit them. This comprehensive approach equips learners with the skills to assess, test, and ultimately strengthen system and application security.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. What is the primary purpose of the Metasploit Framework in cybersecurity assessments? (2 marks)
  2. Identify two privilege escalation techniques commonly used on Linux systems. (3 marks)
🔒20 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. Explain how the Metasploit Framework can be used to exploit a known vulnerability in a Windows server running outdated software at a county government office in Kenya. (4 marks)
  2. Describe two privilege escalation techniques that can be applied on Linux systems during a penetration test. (4 marks)
🔒18 more in this section.

Chapter Practical Activities

Practical 1: Exploit system vulnerabilities using Metasploit Framework

Cyber Security · Level 6
Conduct Security Assessment And Testing
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Use Metasploit Framework to identify and exploit a known vulnerability on a Windows 10 system with IP 192.168.56.102, then obtain a Meterpreter session.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Laptop with Kali Linux installed
Target Windows 10 virtual machine
Metasploit Framework installed
Network switch or virtual network setup
Ethernet cables
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Laptop with Kali Linux installed1 Pc per Candidate
2Target Windows 10 virtual machine1 Pc per Candidate
3Metasploit Framework installed1 Instance per Candidate
4Network switch or virtual network setup1 Pc per 5 Candidates
5Ethernet cables2 Pcs per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Setup and Reconnaissance
Candidate puts on appropriate PPE (e.g., anti-static wristband if applicable)
(Award 1 mark for correct PPE use or zero)
1
Candidate correctly configures IP settings and network interface
(Award 2 marks for correct IP config or zero)
2
Candidate performs network scanning (e.g., Nmap) to identify live hosts and open ports
(Award up to 3 marks for scanning procedure and results)
3
Candidate uses Metasploit auxiliary modules to enumerate services and detect vulnerabilities
(Award up to 3 marks for correct usage and interpretation)
3
Sub-Total9
TASK 2: Exploitation
Candidate selects an appropriate exploit module matching the discovered vulnerability
(Award 3 marks for correct exploit selection or zero)
3
Candidate configures exploit parameters correctly (RHOST, payload, LHOST, etc.)
(Award 3 marks for correct configuration or zero)
3
Candidate successfully launches the exploit
(Award 2 marks for launching exploit properly or zero)
2
Candidate obtains a Meterpreter session on the target system
(Award 3 marks for successful session or zero)
3
Sub-Total11
TASK 3: Post-Exploitation and Reporting
Candidate demonstrates basic Meterpreter commands (e.g., sysinfo, screenshot)
(Award 3 marks for correct commands or zero)
3
Candidate documents the vulnerability exploited, method used, and session obtained
(Award 3 marks for clear and accurate documentation or zero)
3
Sub-Total6
PRODUCT CHECKLIST
Successfully exploited vulnerability with Meterpreter session established on Windows 10 IP 192.168.56.102
(Award 10 marks for fully successful exploitation or zero)
10
Sub-Total10
GRAND TOTAL36
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Privilege Escalation on Windows System to Obtain Administrator Access

Cyber Security · Level 6
Conduct Security Assessment And Testing
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Perform privilege escalation on a Windows 10 Pro virtual machine to obtain administrator privileges, demonstrating at least two escalation techniques and documenting the process.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Windows 10 Pro virtual machine with standard user accountNetwork cable Cat 6
USB flash drive with privilege escalation tools (e.g., PowerUp, WinPEAS)
Kali Linux USB bootable media
Laptop with virtualization software
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1Windows 10 Pro virtual machine with standard user account1 Pc per Candidate
2USB flash drive with privilege escalation tools (e.g., PowerUp, WinPEAS)1 Pc per Candidate
3Kali Linux USB bootable media1 Pc per Candidate
4Laptop with at least 8GB RAM and virtualization software installed1 Pc per Candidate
5Network cable Cat 61 Pc per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Preparation and Environment Setup
Candidate verifies PPE compliance before starting (e.g., anti-static wrist strap if applicable)
(Award 1 mark for correct PPE use or zero)
1
Candidate boots the Windows 10 Pro VM with standard user account correctly
(Award 2 marks for successful VM boot or zero)
2
Candidate mounts or inserts USB flash drive containing privilege escalation tools
(Award 2 marks for correct mounting or zero)
2
Candidate ensures network connectivity using the provided Cat 6 cable
(Award 1 mark for verified network connectivity or zero)
1
Sub-Total6
TASK 2: Execution of Privilege Escalation Techniques
Candidate performs reconnaissance to identify potential privilege escalation vectors (e.g., running PowerUp or WinPEAS)
(Award 3 marks for thorough reconnaissance or zero)
3
Candidate applies first privilege escalation technique successfully (e.g., exploiting unquoted service paths or weak service permissions)
(Award 4 marks for successful exploitation or zero)
4
Candidate applies second privilege escalation technique successfully (e.g., DLL hijacking or scheduled task manipulation)
(Award 4 marks for successful exploitation or zero)
4
Candidate documents commands and steps taken during privilege escalation
(Award 2 marks for clear and complete documentation or zero)
2
Sub-Total13
PRODUCT CHECKLIST
Candidate obtains administrator privileges on Windows 10 Pro VM (verified by access to administrative command prompt or control panel)
(Award 5 marks for verified admin access or zero)
5
Candidate submits a clear report detailing at least two privilege escalation techniques used, tools applied, and commands executed
(Award 6 marks for comprehensive, accurate report or zero)
6
Sub-Total11
GRAND TOTAL30
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)
🔒

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒Privilege escalation on Linux system using known vulnerabilitiesPractical 3
🔒Buffer Overflow Attack and Analysis on Vulnerable ApplicationPractical 4
🔒Perform SQL Injection Attack on a Web ApplicationPractical 5
🔒Execute Cross-Site Scripting (XSS) Attack on Web ApplicationPractical 6
🔒Conduct Cross-Site Request Forgery (CSRF) AttackPractical 7
🔒Web-based attacks combined practicalPractical 8
🔒Metasploit Exploitation and Privilege Escalation on Windows and Linux SystemsPractical 9
🔒Integrated exploitation and buffer overflow using MetasploitPractical 10
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 16 questions Start quiz ▾
0%
0 / 2
🔒

14 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • Review and prioritize vulnerabilities based on how severe and exploitable they are, and understand their impact on the business.
  • Plan your exploitation activities carefully, following all organizational policies, rules of engagement, and legal requirements.
  • Choose and use approved penetration testing tools like Metasploit, Burp Suite, and SQLmap to carry out exploitation.
  • Execute exploits safely and accurately to confirm vulnerabilities without causing disruptions to business operations.
  • Monitor and document all exploitation attempts, including any successful access, privilege escalations, or data exposures.
  • Collect and secure evidence of your exploitation activities, such as screenshots, logs, and payload results, for clear reporting.
  • Analyze the results of your exploitation to identify risks and weaknesses in the system.
  • Report your findings clearly to stakeholders, providing practical recommendations for fixing the vulnerabilities.

Tick each one you can genuinely do.

So, are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.