Skills Assessment Walkthrough
HTB Academy Skills Assessment - File Inclusion
Complete walkthrough of the capstone challenge that combines multiple LFI techniques for RCE and flag extraction.
Challenge: "Assess the web application and use a variety of techniques to gain remote code execution and find a flag in the / root directory of the file system."
Multi-Technique Exploitation Chain
Phase 1: Source Code Disclosure
# Step 1: Discover vulnerable parameter
http://TARGET_IP:PORT/index.php?page=about
# Step 2: PHP filter source disclosure
http://TARGET_IP:PORT/index.php?page=php://filter/convert.base64-encode/resource=index
# Step 3: Decode and analyze source
echo 'BASE64_OUTPUT' | base64 -d | grep -i admin
# Reveals: // echo '<li><a href="ilf_admin/index.php">Admin</a></li>';Phase 2: Admin Panel Discovery
Phase 3: LFI Exploitation
Phase 4: Log Poisoning & RCE
Techniques Demonstrated
PHP Filter Source Disclosure - Reading application source code
Hidden Functionality Discovery - Finding commented admin panels
Path Traversal & LFI - Basic file inclusion exploitation
Web Server Identification - Testing different log locations
Log Poisoning - User-Agent header injection
Remote Code Execution - Command execution via poisoned logs
Complete Attack Commands
Expected Flag Format
Flag: HTB{...} or similar format
Location: /flag_[random].txt in root directory
Alternative Approaches
If primary method fails, try:
SSH Log Poisoning - If SSH is available
PHP Session Poisoning - If sessions are accessible
Data Wrapper RCE - If
allow_url_include=OnDifferent Log Locations - Apache logs, mail logs, etc.
This walkthrough demonstrates the complete HTB Academy Skills Assessment solution, showcasing advanced file inclusion exploitation techniques.
Last updated