The London Bridge
A TryHackMe security assessment documenting reconnaissance, web application analysis, Server-Side Request Forgery (SSRF), internal service discovery, SSH-based initial access, Linux privilege escalation, and offline browser credential recovery.
Mission and Executive Summary
The London Bridge is a TryHackMe training environment in which progress depends on methodical enumeration, careful validation, and following evidence across multiple attack surfaces.
The documented investigation begins with network reconnaissance and identifies an SSH service on TCP port 22 and a Gunicorn-backed web application on TCP port 8080. Application analysis focuses on the Gallery workflow, where request manipulation and parameter discovery reveal a server-side request capability.
A controlled callback confirms Server-Side Request Forgery (SSRF). An alternate loopback representation then demonstrates how weak destination filtering can expose a local web service. Internal resource enumeration leads to SSH key material associated with the beth account.
After establishing SSH access, local host enumeration identifies a potential kernel-level privilege-escalation path associated with CVE-2018-18955. The documented lab chain reaches root, enabling inspection of a Firefox profile associated with charles and offline credential recovery.
All challenge flags, passwords, private-key contents, and other directly reusable secrets are intentionally redacted from this public portfolio edition.
Quick Overview
Navigation
- Mission and Executive Summary
- Quick Overview
- Scope and Responsible Use
- Attack Surface
- Assessment Methodology
- Reconnaissance and Service Discovery
- Web Application Enumeration
- Upload Handling and Burp Suite Interception
- Content Discovery
- Request Analysis and Fetch Primitive
- Parameter Discovery: The www Parameter
- SSRF Validation Using a Controlled Callback
- Loopback Filter Bypass
- Internal Web Service Enumeration
- Initial Access: SSH Key Recovery for beth
- Host Enumeration and Privilege Escalation Research
- Privilege Escalation to root
- charles Credential Recovery from Firefox
- Attack Chain Summary
- Key Security Findings
- Defensive Recommendations
- Evidence Handling
- Tools Used
- Lessons Learned
- Reference and Attribution
- Portfolio Skills Demonstrated
Scope and Responsible Use
This documentation describes activity performed in the TryHackMe training environment. SSRF testing, content discovery, SSH key handling, kernel exploitation, and browser credential analysis must only be performed on systems for which explicit authorization has been granted.
Attack Surface
The following table summarizes the services, application functionality, and host artifacts documented during the investigation.
| Surface | Observation | Security significance |
|---|---|---|
| TCP/22 | OpenSSH 7.6p1 Ubuntu | Candidate remote administration interface |
| TCP/8080 | Gunicorn-backed HTTP service | Primary web application attack surface |
| Gallery | Image viewing and upload workflow | Input handling and server-side resource retrieval |
| Local web service | Reachable through SSRF | Potential exposure of non-public resources |
| Linux host | SSH shell as beth |
Enables local host enumeration |
| Kernel | 4.15.0-112-generic |
Relevant to the documented privilege-escalation research path |
| Firefox profile | Located in charles’s home directory |
Potential source of stored application credentials |
Assessment Methodology
The investigation follows a structured offensive-security workflow:
- Reconnaissance: identify exposed services and service versions.
- Web enumeration: inspect application pages and identify interesting functionality.
- Request analysis: intercept application requests and investigate resource-handling parameters.
- Content discovery: enumerate application paths and identify additional resources.
- SSRF validation: use a controlled callback to verify server-side network requests.
- Internal enumeration: investigate the local web service through the SSRF primitive.
- Initial access: recover and securely use SSH key material associated with
beth. - Privilege escalation research: inspect host enumeration results and evaluate the documented kernel exploit path.
- Credential recovery: inspect
charles’s Firefox profile using an offline credential-recovery utility.
Reconnaissance and Service Discovery
Nmap service scan
The initial reconnaissance uses Nmap to scan all TCP ports, run default scripts, and identify service versions.
nmap -sC -sV -p- <TARGET>
The important results were:
22/tcp open ssh OpenSSH 7.6p1 Ubuntu
8080/tcp open http-proxy Gunicorn
Port 22 exposes SSH, while port 8080 hosts the Gunicorn-backed web application. The HTTP service becomes the primary investigation target because it exposes application functionality that can be examined through a browser and intercepted requests.
Investigation note: Service-version information helps prioritize further analysis but does not independently establish exploitability. Application behavior and target-specific evidence must be examined before selecting an exploitation path.
Web Application Enumeration
Application overview
Browsing the service on port 8080 reveals a small web application with multiple pages, including Gallery and Contact.
The Gallery workflow receives particular attention because it handles images and exposes image-viewing functionality. This provides a starting point for investigating how the server retrieves requested resources.
The Contact page is also reviewed, but the documented investigation identifies the Gallery workflow as the more promising lead for server-side resource handling.
Upload Handling and Burp Suite Interception
The Gallery workflow exposes an upload function. Burp Suite is used to intercept requests so that request parameters, headers, and server responses can be examined directly rather than relying solely on browser behavior.
Several upload-bypass ideas can be considered, but the documented investigation moves toward understanding the application’s resource handling and overall structure.
The important methodological decision is to follow the strongest observable lead rather than continue testing upload variations without sufficient evidence.
Content Discovery
A Feroxbuster scan identifies additional application paths, including Gallery, Contact, and upload-related resources.
feroxbuster -u http://<TARGET>:8080 \
-w /usr/share/seclists/Discovery/Web-Content/common.txt
The image-viewing behavior becomes the next focus. The application appears to accept a resource identifier and return the corresponding content, making the request parameters important candidates for further testing.
Request Analysis and Fetch Primitive
Burp Repeater
The intercepted request is sent to Burp Repeater, allowing the image_url parameter to be modified while the server’s response is observed.
The documented request is:
GET /view?image_url=/uploads/tower_bridge.php.png HTTP/1.1
Host: <TARGET>:8080
A direct request targeting localhost is rejected, suggesting that the application applies some form of destination filtering.
This observation changes the investigation. The next step is to determine whether another accepted parameter influences the server-side destination.
Security principle: A filter on one input path does not establish that the underlying server-side request capability is safe. All inputs that influence destination selection must be identified and validated.
Parameter Discovery: The www Parameter
A developer-facing hint in the application source suggests that another request parameter may be relevant. Parameter fuzzing is used to investigate alternate parameter names.
ffuf -u "http://<TARGET>:8080/view?FUZZ=http://127.0.0.1/" \
-w params.txt
The meaningful discovery is a parameter named www.
The discovery expands the test strategy beyond the original image_url handling path. The parameter’s behavior is then tested to determine whether it controls server-side requests.
SSRF Validation Using a Controlled Callback
A controlled callback is used to determine whether user-controlled input causes the target server to initiate an outbound request.
The testing machine starts a simple HTTP server:
python3 -m http.server 8000 --bind 0.0.0.0
The www parameter is directed to the testing server. The callback log records an inbound GET request generated by the target application.
Security impact
Depending on the target’s network position and destination filtering, SSRF can expose local administrative interfaces, internal APIs, cloud metadata services, or other resources that are not directly reachable from the external client.
In this lab, the documented next step is to investigate the local web service.
Loopback Filter Bypass
A direct localhost request is blocked. The next hypothesis is that the filter relies on a canonical hostname or address representation rather than securely constraining the final destination.
The following alternate loopback representation is tested in the lab:
http://127.1.:80/
The request reaches a local web server and returns its default page.
Why this matters
Destination filters based on string comparisons can be bypassed when equivalent addresses are represented differently.
A robust SSRF defense should parse and normalize destinations, validate resolved IP addresses, account for IPv4 and IPv6 representations, handle redirects safely, and enforce an explicit destination allowlist.
Internal Web Service Enumeration
Successful access to the loopback interface exposes another resource-discovery opportunity. The local web service is investigated as a newly discovered attack surface rather than treating its homepage as the only available resource.
The content-discovery approach is expanded to include hidden and dot-prefixed resource syntax.
The documented investigation identifies hidden resources that contain information leading to SSH access for beth. The public edition does not reproduce the underlying secret contents.
The key methodological lesson is that internal services exposed through SSRF should be assessed for their reachable resources and information exposure, within the authorized lab scope.
Initial Access: SSH Key Recovery for beth
Two hidden resources contain information that leads to SSH access for the beth account. The original challenge material includes sensitive key information, which is intentionally omitted from this public version.
The private-key material is saved locally with restrictive permissions and used only against the authorized TryHackMe target.
chmod 600 <beth-key-file>
ssh -i <beth-key-file> beth@<TARGET>
The first command restricts access to the key file. The second uses that key to authenticate to the target’s SSH service as beth.
Host Enumeration and Privilege Escalation Research
Initial shell as beth
The SSH connection succeeds and provides an interactive shell as beth.
At this point, the investigation transitions from web application testing to local host enumeration.
The documented host-enumeration priorities include:
- Current identity and group memberships.
- Kernel version.
- SUID/SGID binaries.
- Writable files and directories.
- Scheduled tasks.
- Services and listening sockets.
- Credential and configuration artifacts.
- Application source code in accessible home directories.
Kernel enumeration with linPEAS
linPEAS is used as a broad host-enumeration aid. The output highlights the following kernel version:
4.15.0-112-generic
The enumeration results point toward CVE-2018-18955 as a possible local privilege-escalation research path.
Kernel version information provides a research lead, not conclusive proof of exploitability. The applicable kernel build, configuration, prerequisites, mitigations, and runtime conditions must be considered before validating a candidate exploit.
Privilege Escalation to root
For the lab path described by the original documentation, the selected kernel exploit is compiled on the target and executed successfully.
The documented commands are:
gcc exploit.c -o exploit
./exploit
id
The commands compile the exploit source, execute the resulting binary, and inspect the current identity. The reported result confirms UID 0, corresponding to root.
Evidence handling
The original user and root flags are intentionally omitted. The documentation preserves the technical progression and reported outcome without publishing challenge answers.
charles Credential Recovery from Firefox
With root access, the filesystem can be inspected more broadly. The home directory associated with charles contains a Firefox profile, which is a high-value artifact because browsers can store authentication credentials.
The profile is copied for offline analysis and passed to a Firefox credential-recovery utility such as firefox_decrypt.
python3 firefox_decrypt.py <charles-firefox-profile>
The recovered password is intentionally excluded from the public repository.
This stage demonstrates the security importance of protecting browser profiles, stored credentials, and other authentication artifacts from unauthorized filesystem access.
Attack Chain Summary
The following sequence summarizes the documented progression from external reconnaissance to credential recovery.
The central progression is from a remotely accessible web application to a server-side request primitive, internal resource exposure, SSH access, local privilege escalation, and recovery of credentials from a browser profile.
Key Security Findings
1. Server-Side Request Forgery
Evidence: The www parameter triggers an outbound HTTP request observed by a controlled callback server.
Security significance: User-controlled destination selection can cause a server to access resources from its own network position, potentially exposing internal services.
2. Weak loopback destination filtering
Evidence: A direct localhost request is rejected, while an alternate loopback representation reaches the local web service.
Security significance: A destination filter based on superficial string matching may fail to recognize equivalent address representations.
3. Internal resource exposure
Evidence: SSRF access enables investigation of the local web service, and hidden resources provide information leading to SSH key material for beth.
Security significance: Internal resources that are not directly exposed to external clients may become reachable through a vulnerable server-side request feature.
4. Local privilege-escalation opportunity
Evidence: Host enumeration identifies kernel version 4.15.0-112-generic and points toward CVE-2018-18955. The documented lab path subsequently reaches root.
Security significance: An exposed local privilege-escalation path can turn limited shell access into full system compromise when its prerequisites are met.
5. Sensitive authentication material on disk
Evidence: SSH key material is recovered during internal enumeration, and a Firefox profile in charles’s home directory is used for offline credential recovery.
Security significance: Private keys and browser-stored credentials can extend the impact of an initial compromise when access controls do not adequately protect them.
Defensive Recommendations
| Finding | Risk | Recommended security control |
|---|---|---|
| SSRF-capable URL parameter | Server-side requests may reach unintended destinations | Replace unrestricted URL fetching with a strict allowlist of approved destinations |
| Loopback filter bypass | Equivalent address representations may evade simplistic filters | Parse and normalize destinations; validate resolved IP addresses; account for redirects and IPv4/IPv6 |
| Internal resource exposure | Non-public services and hidden resources may become reachable through the application | Segment internal services and prevent application-level fetch functionality from reaching administrative or unintended internal endpoints |
| Sensitive SSH key material | Exposed private keys can enable unauthorized authentication | Restrict key-file permissions, protect secret storage, and rotate credentials if exposure is suspected |
| Browser credential exposure | Compromised browser profiles may reveal stored authentication material | Use managed credential storage and protect browser profiles with appropriate account and filesystem controls |
| Kernel privilege-escalation path | A local user may obtain elevated privileges | Patch supported kernels, maintain vulnerability-management processes, and validate exploitability against the actual build |
| Excessive privileged access | Root compromise increases the potential impact of an intrusion | Apply least privilege, minimize administrative access, and reduce the blast radius of compromised accounts |
Recommendations above are tied to the documented attack path and evidence rather than unrelated security controls.
Evidence Handling
This repository follows a redacted public-copy policy.
- User and root flags are omitted or represented as
[REDACTED]. - Passwords and private-key contents are not published.
- Screenshot references retain their original relative paths.
- Screenshots are described as recreated portfolio illustrations rather than original target captures where stated in the source documentation.
- The third-party reference is credited in the attribution section.
- The public write-up emphasizes the investigation process, evidence, technical reasoning, and defensive lessons rather than publishing challenge secrets.
Tools Used
The following tools are documented in the original investigation.
| Tool | Documented purpose |
|---|---|
| Nmap | TCP port scanning, default scripts, and service-version detection |
| Burp Suite | HTTP request interception and request manipulation through Repeater |
| Feroxbuster | Application content and directory discovery |
| FFUF | Request-parameter name discovery |
| Python HTTP server | Controlled callback endpoint for SSRF validation |
| SSH | Remote shell access using the recovered beth key material |
| linPEAS | Linux host enumeration and identification of potential privilege-escalation paths |
| GCC | Compilation of the documented kernel exploit source on the target |
firefox_decrypt |
Offline analysis of Firefox-stored credentials |
Lessons Learned
Enumeration should follow evidence
The initial service scan did not directly reveal the credentials needed for host access. Progress came from expanding the observable attack surface in stages: application pages, request parameters, internal services, hidden resources, and host artifacts.
SSRF changes the network perspective
A server-side request originates from the target application rather than the external client. This can expose internal resources that would otherwise be inaccessible from the tester’s network position.
Input filtering must validate destinations
A blocked hostname does not guarantee that the underlying destination is unreachable. SSRF defenses must validate the destination after appropriate parsing and resolution, including alternate address representations and redirects.
Host enumeration supports informed validation
A kernel version can suggest a potential privilege-escalation research path, but the version alone is not sufficient to establish exploitability. Target-specific validation remains necessary.
Authentication artifacts require protection
Private keys, configuration files, browser profiles, and stored credentials can become alternate routes to authentication. Defensive controls should protect these artifacts and support credential rotation when exposure is suspected.
Evidence handling matters
A portfolio write-up should distinguish documented observations from assumptions, preserve reproducible commands and paths, and avoid exposing reusable secrets unnecessarily.
Reference and Attribution
Primary reference supplied for this reconstruction:
Tommaso Greco, “The London Bridge — TryHackMe,” Medium, December 16, 2024.
https://medium.com/@tommasogreco/the-london-bridge-tryhackme-2c8f2f0e5b5a
This repository does not reproduce the reference article verbatim. The documentation is independently structured for portfolio presentation, and sensitive challenge material is intentionally omitted.
Portfolio Skills Demonstrated
The documented investigation demonstrates the following security skills and workflows:
Responsible Use
This documentation was created for authorized cybersecurity training and CTF environments. The techniques described here should only be used against systems for which explicit permission has been granted.