Controlled penetration testing and Linux host-hardening lab demonstrating Shellshock (CVE-2014-6271), privilege escalation, vulnerability assessment and defensive security controls.
Controlled university cybersecurity lab | Kali Linux, Ubuntu Server, Apache, UFW and Nmap
A two-VM security assessment demonstrating the Shellshock vulnerability (CVE-2014-6271) in a deliberately vulnerable Apache CGI/Bash environment, followed by an examination of Linux host-hardening controls and defensive mitigations. The project documents reconnaissance, vulnerability validation, low-privilege command execution, a separate privilege-escalation scenario, and system hardening.
Scope: Authorised testing in an isolated VirtualBox lab with deliberately vulnerable software. This is documentation of an educational group project, not a production security assessment or a ready-to-run exploit framework.
| Area | Implementation / evidence |
|---|---|
| Virtual lab | Two VMs on a VirtualBox NAT Network: Kali attacker and Ubuntu 20.04 web server |
| Target | Apache HTTP server with CGI invoking an intentionally vulnerable Bash 4.3 environment |
| Primary vulnerability | Shellshock, CVE-2014-6271 |
| Investigation tools | Nmap, http-shellshock NSE script, curl, Linux system administration tools |
| Attack demonstration | CGI/HTTP-header injection, remote command execution, low-privilege shell |
| Privilege escalation | Deliberately misconfigured SUID binary; a separate PwnKit attempt was unsuccessful |
| Applied hardening | UFW policies, service review, unnecessary package removal, login-shell restrictions, account/password controls, /etc/shadow access controls, Apache PrivateTmp |
| Additional proposals | Patch vulnerable Bash, remove/rework Bash-backed CGI, WAF, input validation, service isolation and security monitoring |
Two Linux virtual machines were configured on the same VirtualBox NAT Network:
flowchart LR
K["Kali Linux attacker VM<br/>10.0.2.8<br/>5 CPUs, 5,590 MB RAM"]
N["VirtualBox NAT Network"]
U["Ubuntu 20.04 web server<br/>10.0.2.9<br/>4 CPUs, 4,636 MB RAM"]
A["Apache HTTP :80<br/>CGI invokes vulnerable Bash"]
K <-->|"Lab traffic / testing"| N
N <-->|"Lab traffic"| U
U --> A
| Attacker VM | Web-server VM |
|---|---|
![]() | ![]() |
Read the full lab architecture.
Network connectivity was established before using Nmap and HTTP inspection to identify the web service available on port 80.

The team deployed a test CGI script invoking vulnerable Bash, inspected the handling of HTTP request headers and used Nmap's http-shellshock script to verify the vulnerable endpoint.

The controlled demonstration showed remote command execution via the vulnerable CGI path and a reverse-shell connection to the attacker VM. Initial shell access was associated with the low-privilege www-data web-service account.

The group attempted PwnKit (CVE-2021-4034), but encountered incompatible library versions between the build and target environments. That attempted exploit did not provide the demonstrated elevation. The successful root-level demonstration used a separately configured, deliberately misconfigured SUID binary.

The distinction matters: Shellshock provided the initial command-execution path; the separate SUID misconfiguration provided the observed elevation to root.

Read the evidence-based attack walkthrough.
The lab applied a series of defensive measures while also reviewing residual risks.

sync account to disallow an interactive login shell; locked password-based access to root./etc/shadow as an unprivileged user.PrivateTmp to isolate its temporary-file namespace.Important: These are defence-in-depth controls. Removing compilers or restricting services does not itself patch Shellshock or guarantee prevention of command execution. Updating vulnerable Bash and eliminating exposure through Bash-backed CGI are direct remediation priorities.

Read the implemented controls versus recommendations.

Open-Source-XDR- und SIEM-Plattform für Bedrohungserkennung, Protokollanalyse, Dateiintegritätsüberwachung, Schwachstellenbewertung und Compliance-Management für Endpunkte und Cloud-Workloads.

Open-Source-Netzwerk-IDS/IPS/NSM-Engine für Echtzeit-Datenverkehrsinspektion, Eindringungserkennung und -verhinderung, Protokollanalyse und regelbasiertes Threat Hunting.

Zeek ist ein leistungsstarkes Netzwerkanalyse-Framework, das sich stark von den typischen IDS unterscheidet, die Sie vielleicht kennen.