By the end of this chapter, you will be able to:
Mastering these skills helps you protect organizations by finding and addressing security weaknesses before attackers do.
Exploiting known vulnerabilities is a fundamental skill for cyber security professionals tasked with conducting security assessments and penetration testing. In Kenya, where organizations ranging from financial institutions to government agencies increasingly depend on digital infrastructure, identifying and exploiting vulnerabilities provides critical insight into system weaknesses before malicious actors do. This chapter focuses on practical methods using tools like the Metasploit Framework to exploit system vulnerabilities and techniques for escalating privileges on Windows and Linux systems, enabling security testers to simulate real-world attacks effectively.
The Metasploit Framework is a widely adopted open-source platform that enables security professionals to identify, validate, and exploit vulnerabilities within computer systems. In Kenya’s cyber security landscape, where organizations such as banks and county government offices face increasing cyber threats, Metasploit serves as a vital tool for penetration testers to demonstrate the impact of vulnerabilities and recommend mitigations. Mastery of this framework allows professionals to simulate attacks in a controlled environment, ensuring that defenses are robust against exploitation attempts.
The Metasploit Framework is a modular platform designed to facilitate vulnerability exploitation, payload delivery, and post-exploitation activities. It integrates a vast library of exploits, payloads, and auxiliary modules, enabling testers to customize their attack approaches depending on target systems.
Proper setup and configuration of Metasploit are essential to ensure effective exploitation and accurate vulnerability assessment. Kenyan cyber security professionals often deploy Metasploit on Kali Linux or other penetration testing distributions.
Exploitation involves selecting an appropriate exploit module, configuring target parameters, and delivering a payload to gain control over the system. In Kenyan financial institutions, for example, this process helps reveal how attackers might breach core banking systems.
Once access is gained, post-exploitation tasks assess the extent of control and potential damage an attacker could inflict. This phase is crucial for Kenyan organizations like county governments to understand the risks posed by compromised systems.
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter focused on exploiting known vulnerabilities through practical techniques and tools. It began with an in-depth exploration of the Metasploit Framework, demonstrating how it can be used to identify and exploit system weaknesses effectively. The discussion then moved to privilege escalation methods on both Windows and Linux platforms, highlighting how attackers can gain higher access rights within a compromised system. The chapter also covered buffer overflow attacks, explaining the mechanics behind them and how to analyse their impact on system stability and security. Web-based attacks were examined in detail, starting with SQL injection techniques that manipulate database queries to extract or alter data. Cross-site scripting (XSS) attacks were then explored, showing how malicious scripts can be injected into web pages to compromise users. Finally, the chapter addressed cross-site request forgery (CSRF), describing how unauthorized commands can be transmitted from a user that the web application trusts. Together, these topics provide a comprehensive understanding of exploiting vulnerabilities in various environments and platforms.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Laptop with Kali Linux installed | |
| Target Windows 10 virtual machine | |
| Metasploit Framework | |
| Network switch and cables |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Laptop with Kali Linux installed | 1 Pc per Candidate |
| 2 | Target Windows 10 virtual machine pre-configured with vulnerable services | 1 Pc per Candidate |
| 3 | Metasploit Framework installed on Kali Linux | 1 Pc per Candidate |
| 4 | Network switch and cables for connectivity | 1 set per 5 Candidates |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Setup and Reconnaissance | |||
| Powered on Kali Linux machine and target Windows 10 VM ensuring network connectivity (Award 3 marks for successful setup and network connection) | 3 | ||
| Used Nmap to scan the target system to identify open ports and services (Award 5 marks for correct use of Nmap and accurate port/service enumeration) | 5 | ||
| Analyzed scan results to identify potential vulnerabilities (Award 4 marks for correct vulnerability identification based on scan) | 4 | ||
| Sub-Total | 12 | ||
| TASK 2: Exploitation with Metasploit | |||
| Launched Metasploit Framework and searched for exploits matching identified vulnerabilities (Award 4 marks for proper use of search commands) | 4 | ||
| Configured exploit parameters correctly including target IP, payload, and options (Award 6 marks for accurate and complete exploit configuration) | 6 | ||
| Executed the exploit and successfully obtained a Meterpreter session (Award 8 marks for successful exploitation and session opening) | 8 | ||
| Demonstrated basic post-exploitation commands (e.g., sysinfo, getuid) (Award 5 marks for executing and interpreting post-exploitation commands) | 5 | ||
| Sub-Total | 23 | ||
| PRODUCT CHECKLIST | |||
| Obtained Meterpreter session with evidence (e.g., screenshot or session details) (Award 10 marks for documented proof of successful exploitation) | 10 | ||
| Correctly identified vulnerability and exploit used matching target system (Award 5 marks for correct vulnerability-exploit correlation) | 5 | ||
| Sub-Total | 15 | ||
| GRAND TOTAL | 50 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Windows 10 Pro virtual machine | Network connection between Kali Linux and Windows VM |
| Kali Linux penetration testing virtual machine | |
| Metasploit Framework | |
| Windows Credential Editor (WCE) | |
| Notepad++ or equivalent text editor |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Windows 10 Pro virtual machine (1 Pc per Candidate) | 1 Pc per Candidate |
| 2 | Kali Linux penetration testing virtual machine (1 Pc per Candidate) | 1 Pc per Candidate |
| 3 | Metasploit Framework installed on Kali Linux VM | 1 Setup per Candidate |
| 4 | Windows Credential Editor (WCE) tool | 1 Copy per Candidate |
| 5 | Notepad++ or equivalent text editor | 1 Pc per Candidate |
| 6 | Network connection between Kali Linux and Windows VM | 1 Network per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Preparation and Initial Access | |||
| Candidate boots both Windows 10 and Kali Linux virtual machines and verifies network connectivity between them (Award 3 marks for successful VM startup and network ping test) | 3 | ||
| Candidate performs basic reconnaissance on Windows system using Nmap or similar tools to identify open ports and services (Award 4 marks for scanning and correctly identifying open services) | 4 | ||
| Candidate uses Metasploit Framework to exploit a known Windows vulnerability to gain initial user-level access (Award 6 marks for selecting appropriate exploit and successful shell access) | 6 | ||
| Sub-Total | 13 | ||
| TASK 2: Privilege Escalation Process | |||
| Candidate enumerates the Windows system for privilege escalation vectors using built-in commands (e.g., whoami, systeminfo, tasklist) (Award 4 marks for thorough enumeration and correct command usage) | 4 | ||
| Candidate identifies and exploits a known local privilege escalation vulnerability (e.g., unquoted service path, weak permissions, or token impersonation) on Windows system (Award 8 marks for correctly identifying and exploiting privilege escalation) | 8 | ||
| Candidate uses Windows Credential Editor (WCE) or equivalent tool to dump credentials or escalate privileges (Award 5 marks for successful use of WCE or equivalent to elevate privileges) | 5 | ||
| Candidate documents each step with screenshots and saves them in a folder named 'CDACC' on the Windows desktop (Award 4 marks for clear documentation and correct folder naming and location) | 4 | ||
| Sub-Total | 21 | ||
| TASK 3: Post Escalation Verification and Reporting | |||
| Candidate verifies SYSTEM level access by running 'whoami /priv' or equivalent commands (Award 3 marks for successful verification of SYSTEM privileges) | 3 | ||
| Candidate compiles a brief report summarizing the vulnerability exploited, tools used, and remediation recommendations (Award 6 marks for clear and concise report with relevant technical details) | 6 | ||
| Sub-Total | 9 | ||
| PRODUCT CHECKLIST | |||
| Privilege escalation achieved to SYSTEM level on Windows 10 Pro system as verified by command output and screenshots (Award 10 marks for successful privilege escalation with supporting evidence) | 10 | ||
| Complete documentation folder 'CDACC' on Windows desktop containing step-by-step screenshots and narrative (Award 7 marks for well-organized and complete documentation) | 7 | ||
| Final report includes vulnerability details, exploitation method, and mitigation recommendations (Award 10 marks for comprehensive and professional report) | 10 | ||
| Sub-Total | 27 | ||
| GRAND TOTAL | 70 | ||
At the start of this chapter we promised you would be able to:
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.