By the end of this chapter, you will be able to:
Mastering these skills helps you build software that keeps users and data safe, making you a valuable professional in the tech industry.
Compiled by: Consolata Auma
Software hardening is a critical practice within cyber security, particularly for professionals tasked with protecting Kenya’s digital infrastructure. As cyber threats evolve rapidly, securing software applications against exploitation reduces vulnerabilities that attackers might exploit. This chapter equips cyber security experts with essential concepts and principles that underpin the hardening process, ensuring software deployed in banks, county governments, hospitals, and other institutions withstands attacks and maintains integrity.
Software hardening refers to the systematic process of strengthening an application by reducing its attack surface, eliminating vulnerabilities, and enforcing security controls. This process is especially vital in Kenya’s financial sector where SACCOs and commercial banks handle sensitive customer data, making hardened applications a frontline defense against cybercrime. By applying hardening techniques, cyber security professionals ensure that software is resilient to common threats such as injection attacks, buffer overflows, and unauthorized access.
Software hardening involves modifying software to improve its security posture by limiting potential vulnerabilities. It includes techniques such as disabling unnecessary features, applying patches, and configuring security settings to resist exploitation. In Kenya’s county government offices, for example, hardened software applications ensure that citizen data stored in local databases cannot be easily compromised by cyber attackers.
The increasing sophistication of cyber threats in Kenya necessitates robust software hardening to protect critical systems. For instance, hospitals managing patient records through electronic health systems must ensure these applications are hardened to prevent data breaches that could compromise patient privacy. Hardening also reduces the risk of ransomware attacks, which have targeted Kenyan institutions such as educational institutions and banks.
Cyber security professionals in Kenya apply various techniques to harden applications effectively, tailored to the specific environment and threat landscape. For example, a retail business using an e-commerce platform will focus on securing payment modules and customer data handling, while a county government office may prioritize access control and audit logging.
Despite its benefits, software hardening faces challenges such as balancing security with usability and managing resource constraints. For example, in small SACCOs with limited IT budgets, implementing comprehensive hardening may strain resources. Cyber security professionals must therefore prioritize critical areas and adopt cost-effective strategies.
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter introduced the concept of software hardening as a critical process for enhancing the security of software applications. It discussed basic security principles that guide the development and maintenance of secure software, emphasizing the importance of robust software configuration. Common threats to applications were explored, highlighting the various ways attackers exploit weaknesses. A detailed examination of software vulnerabilities followed, covering injection attacks such as SQL and command injection, broken authentication and session management, cross-site scripting, insecure deserialization, and misconfigured security headers. The chapter then outlined essential security measures that software applications must integrate to defend against these vulnerabilities. Finally, it described hardening techniques including secure coding practices, applying the principle of least privilege, secure configuration of software components, and secure deployment combined with continuous monitoring to maintain application resilience.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Laptop with pre-installed sample web application and IDE | |
| Internet access for downloading security patches and updates | |
| Access credentials for local test database |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Laptop with pre-installed sample web application and IDE | 1 Pc per Candidate |
| 2 | Internet access for downloading security patches and updates | 1 Connection per Candidate |
| 3 | Access credentials for local test database | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Apply Software Hardening Configurations | |||
| Candidate wears appropriate PPE (e.g. anti-static wrist strap, if required) (Award 1 mark for appropriate PPE use or zero) | 1 | ||
| Candidate updates the sample application dependencies and libraries to latest secure versions (Award 3 marks for correct update commands and verification) | 3 | ||
| Candidate disables unnecessary services and modules in the application configuration (Award 3 marks for disabling at least two unnecessary services correctly) | 3 | ||
| Candidate configures secure authentication settings including password policies (Award 3 marks for implementing password complexity and expiry settings) | 3 | ||
| Candidate applies input validation and sanitization in the application code (Award 4 marks for correct implementation of input validation on at least two input fields) | 4 | ||
| Candidate configures logging and error handling to avoid information leakage (Award 3 marks for proper logging level and generic error messages) | 3 | ||
| Sub-Total | 17 | ||
| PRODUCT CHECKLIST | |||
| Sample web application runs without errors and enforces the configured security settings (Award 5 marks if application behaves securely and as configured, otherwise zero) | 5 | ||
| Sub-Total | 5 | ||
| GRAND TOTAL | 22 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Laptop with Ubuntu 20.04 LTS installed | Sample web application files |
| Apache2 web server software installed | Access to sudo privileges |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Laptop with Ubuntu 20.04 LTS installed | 1 Pc per Candidate |
| 2 | Apache2 web server software installed | 1 Instance per Candidate |
| 3 | Sample web application files | 1 Set per Candidate |
| 4 | Access to sudo privileges | 1 per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Configure Apache2 Secure Settings | |||
| Candidate uses sudo to edit Apache2 configuration files (Award 2 marks for correct use of sudo and editing /etc/apache2/apache2.conf or relevant files) | 2 | ||
| Candidate disables directory listing in Apache configuration (Award 2 marks for setting 'Options -Indexes' or equivalent) | 2 | ||
| Candidate configures appropriate file permissions for /var/www/html (Award 2 marks if permissions set to 755 for directories and 644 for files) | 2 | ||
| Candidate disables unnecessary Apache modules (e.g., autoindex) (Award 2 marks for disabling unused modules with 'a2dismod') | 2 | ||
| Candidate enables and configures firewall to allow HTTP/HTTPS traffic only (Award 2 marks for correct UFW configuration to allow ports 80 and 443 only) | 2 | ||
| Candidate restarts Apache service to apply changes (Award 1 mark for correctly restarting Apache with 'sudo systemctl restart apache2') | 1 | ||
| Sub-Total | 11 | ||
| PRODUCT CHECKLIST | |||
| Apache2 web server serves the default website securely without directory listing and with correct permissions (Award 4 marks for verified secure serving of site, no directory listing, and correct file permissions) | 4 | ||
| Firewall rules allow only HTTP and HTTPS traffic (Award 3 marks for verified firewall configuration allowing only ports 80 and 443) | 3 | ||
| Sub-Total | 7 | ||
| GRAND TOTAL | 18 | ||
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.