HackTheBox - Hacknet

HackTheBox - Hacknet

Source: YouTube · IppSec · published Jan 17, 2026 · 1:06:26

Penetration Testing
No ratings yet Log in to rate
Transcript Available
Description

Hacknet is a challenging Hack The Box medium box requiring careful reconnaissance to exploit a Django SSTI for SSH access, followed by a file-based cache exploitation to reach root.

Key Takeaways:
• The initial foothold relies on identifying a Server-Side Template Injection (SSTI) within the Django template engine, noting that unlike Jinja2, Django's engine is more secure and resistant to direct RCE payloads 0:06.
• Successful exploitation requires a slow, methodical approach to reconnaissance rather than brute-forcing payloads, as the Django engine limits direct code execution attempts 0:25.
• The attacker dumps a list of usernames and passwords, which allows for SSH login to a low-privilege user account 0:28.
• Privilege escalation to another user is achieved by exploiting Django's file-based caching mechanism to access sensitive data 0:32.
• Root access is ultimately gained through PGP keys found on the escalated user account, which lead to the root password 0:37.

This box emphasizes the importance of understanding the specific security properties of the target framework during the enumeration phase.

Sources:

  • 0:06 Introduction to the Hacknet box and the SSTI vulnerability.
  • 0:25 Advice on avoiding payload spam due to Django's security.
  • 0:28 Obtaining credentials for SSH access.
  • 0:32 Exploiting Django file-based caching.
  • 0:37 Using PGP keys to achieve root access.

Generate CPE Credits

Generate a professional CPE document from this video's transcript.

Estimated credit: 1 CPE hours

Estimate uses the video runtime (1 hour ≈ 1 CPE, rounded to the nearest 0.5, minimum 0.5, maximum 2.0). The final amount can be lower after review, never higher.

Topic: Penetration Testing. Commonly maps to: Security Assessment and Testing, Security Operations. Exact CISSP domains are assigned during generation.

CISSP Domain Mapping
Learning Objectives
Self-Assessment Questions
PDF Export Ready

Free account. One generation at a time, with a daily limit.

CPEBuddy is independent and not affiliated with or endorsed by ISC2, ISACA, or any certification body. Exports are formatted for common CPE submissions; acceptance is at your certification body's discretion.

Watch on YouTube

Transcript Preview

First 800 characters of the transcript

What's going on YouTube? This is IPSC and today we'll be doing Hacknet from Hack the Box which is a pretty tough medium box because the foothold involves a SSTI that serverside template injection vulnerability and it's using the Django template engine which is relatively secure when comparing to other template engines like Ginga 2. I can imagine people spending a lot of time just throwing every payload imaginable trying to get remote code execution which just isn't possible here. You need to take it slow and value the data gathered through recon. Eventually, we dump a list of users and passwords that lets us log in to SSH. And from here, we can exploit Django file-based caching to get access to another user that has some PGP keys that leads over to the root password. So, with that being sa…