Pentest
Pentest
Executive Summary
This project delves into penetration testing exercises conducted on HackThisSite as part of the Com
monwealth Bank Intro to Cybersecurity Program. The main objective was to identify, exploit, and d
ocument vulnerabilities across different web application levels, offering practical experience in ethi
cal hacking.
The project uncovers vulnerabilities such as weak input validation, insecure encryption, and flawed
authentication mechanisms. It leverages techniques like JavaScript tampering, SSI injection, and dir
ectory traversal. Each level sheds light on common web security issues, emphasizing the importanc
e of secure application development practices.
Objective:
• Identify web application vulnerabilities, including weak input validation and improper
authentication mechanisms.
• Learn and apply penetration testing techniques, such as command injection and directory
traversal.
• Understand and exploit encryption vulnerabilities to assess the strength of cryptographic
methods.
• Enhance knowledge of securing server-side logic, including SSI injection and Apache
configuration files.
• Document all vulnerabilities, exploits, and provide security recommendations to improve the
application’s security posture.
Methodology:
• Used tools such as Web Developer Tools and HTML, JavaScript, and server configurations.
• Exploited vulnerabilities using techniques such as cookie tampering, directory traversal, and
SSI injection to gain unauthorized access to sensitive files and data.
• Used the Additional resources are provided in the Resources for help, which will be
especially useful if you have no prior experience with Pentesting.
Key Findings:
• Input Validation: Inadequate validation of user input exposed the application to various
attacks, including command injection and email modification.
• Encryption: Weak encryption schemes were reverse-engineered, highlighting the risks of
predictable encryption algorithms.
• Authentication: Client-side authentication mechanisms, such as cookie manipulation, were
easily bypassed without server-side validation.
• Directory Traversal: Improper directory permissions allowed unauthorized access to
sensitive files through directory traversal and SSI injection.
• Description: Locate a hidden password in the HTML source code and not found
and he neglected to upload the password file.
• Severity: high.
• Evidence: NO PASSWORD and Enter Submit
• Exploit Details: Missing password file allowed blank input to be accepted .
• Remediation: The password validation script relied on an external file that was
missing. Never fail to upload validation script.
• Level 3:Some intuition is needed to find the location of the hidden password file.
Requirements: Basic HTML knowledge
• Description: Password stored in directory file (password.php) .
• Severity: high.
• Evidence: The hidden field’s value is password.php
• Description: Password is send email address and email modification can be done.
• Severity: Medium
• Evidence:
• Exploit Details: By using the browser’s developer tools, I modified the email field in
the password recovery form. I replaced the hardcoded email address with my own,
intercepting the password reset information intended for another user.
• Remediation: Ensure that all input fields, especially those handling sensitive data
like email addresses, are validated server-side. Use secure methods for handling
password recovery processes.
• Level 5:Similar to the previous challenge, but with some extra security measures in
place. Requirements: HTML knowledge, JS or FF, an email address.
• Exploit Details: The calendar input field on the page was vulnerable to command
injection. By appending commands to the input (e.g., ; ls -l), I was able to execute
shell commands on the server. This provided a list of the directory contents,
revealing the password file. This type of vulnerability is particularly dangerous as it
allows an attacker to run arbitrary commands on the server, potentially
compromising the entire system.
• Remediation: Offer detailed recommendations on how to fix or mitigate the vulnera
bility.
• Level 8:The password is yet again hidden in an unknown file. Sam's daughter has
begun learning PHP, and has a small script to demonstrate her knowledge.
Requirements: Knowledge of SSI (dynamic html executed by the server, rather than
the browser)
au12ha39vc.php
Password: 25b8a97a
• Exploit Details: By injecting an SSI command into the input field, I could traverse
the file system and access files outside the intended directories. By injecting the
right commands, I navigated through the file system to locate and retrieve the
password file.
This type of attack exploits the server’s ability to process SSI commands embedded
in user input, which can lead to unauthorized access to sensitive files and directories.
• Remediation: Disable SSI in web applications and ensure input fields are properly
sanitized.
• Level 9:The password is again hidden in an unknown file. However, the script that was
previously used to find it has some limitations. Requirements: Knowledge of SSI, unix
directory structure.
It says that the answer is close. There's one more link I should have visited earlier which is
https://www.hackthissite.org/missions/basic/11/index.php
• BY ENTERING /11/index.php
Recommendations