Penetration Testing Report
Penetration Testing Report
Introduction
This report document hereby describes the proceedings and results of a Black Box security
assessment conducted against the Week {3} Labs. The report hereby lists the findings and
corresponding best practice mitigation actions and recommendations.
1. Objective
The objective of the assessment was to uncover vulnerabilities in the Week {3} Labs and
provide a final security assessment report comprising vulnerabilities, remediation strategy
and recommendation guidelines to help mitigate the identified vulnerabilities and risks during
the activity.
2. Scope
This section defines the scope and boundaries of the project.
3. Summary
Outlined is a Black Box Application Security assessment for the Week 3 Labs.
6 6 6
1. SQL Injection
Suggested Countermeasures
Parameterized Queries: Use parameterized queries (also known as prepared statements) to
ensure that SQL code is distinguished from data input. This prevents attackers from injecting
malicious SQL code.
Stored Procedures: Utilize stored procedures to execute SQL code. This encapsulates the SQL
code within the database, reducing the risk of injection through application inputs.
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
1.2. Strings &Errors Part 2!
Reference Risk Rating
Strings &Errors Part 2! Low
Tools Used
SQL payload with parameter
Vulnerability Description
Same as lab 1.1
How It Was Discovered
By adding the parameter with the sql payload in a url.
Vulnerable URLs
https://labs.hacktify.in/HTML/sqli_lab/lab_2/lab_2.php
Consequences of not Fixing the Issue
Unauthorized Access: Attackers can gain unauthorized access to the system, impersonating
users, including administrators.
Data Breach: Sensitive information, such as user credentials, personal data, and financial details,
can be stolen.
Suggested Countermeasures
Same as lab 1.1
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/sqli_lab/lab_3/lab_3.php
Consequences of not Fixing the Issue
Unauthorized Access: Attackers can gain unauthorized access to the system, impersonating
users, including administrators.
Data Breach: Sensitive information, such as user credentials, personal data, and financial details,
can be stolen.
Suggested Countermeasures
Same as lab 1.1
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/sqli_lab/lab_4/lab_4.php
Consequences of not Fixing the Issue
Unauthorized Access: Attackers can gain unauthorized access to the system, impersonating
users, including administrators.
Data Breach: Sensitive information, such as user credentials, personal data, and financial details,
can be stolen.
Suggested Countermeasures
Same as lab 1.1
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/sqli_lab/lab_5/lab_5.php
Consequences of not Fixing the Issue
Unauthorized Access: Attackers can gain unauthorized access to the system, impersonating
users, including administrators.
Data Breach: Sensitive information, such as user credentials, personal data, and financial details,
can be stolen.
Suggested Countermeasures
Same as lab 1.1
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/sqli_lab/lab_7/lab_7.php
Consequences of not Fixing the Issue
Unauthorized Access: Attackers can gain unauthorized access to the system, impersonating
users, including administrators.
Data Breach: Sensitive information, such as user credentials, personal data, and financial details,
can be stolen.
Suggested Countermeasures
Same as lab 1.1
References
https://portswigger.net/web-security/sql-injection
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/csrf_lab/lab_1/index.php
Consequences of not Fixing the Issue
Some potential hazards of CSRF vulnerability:
Unauthorized actions: The attacker can make the user perform actions they didn't intend to, such as
changing their email address or password.
Data loss: The attacker can delete data on behalf of the user.
Account theft: If the attacker makes the user perform actions on their own account, they can
effectively steal the user's account.
Suggested Countermeasures
To prevent CSRF vulnerabilities, it's recommended to:
Use anti-forgery tokens, also known as CSRF tokens. This involves server-side generation of a random,
unique value associated with the user's current session which must be included with every
state-changing request.
Use the SameSite cookie attribute, which allows you to declare if your cookie should be restricted to a
first-party or same-site context, effectively preventing cross-origin requests.
Incorporate re-authentication, CAPTCHAs, or multi-factor authentication for sensitive actions.
Regularly update and patch all systems, libraries, and frameworks used by your web application to
minimize the risk of known CSRF vulnerabilities.
References
https://owasp.org/www-project-cheatsheet-series/cheatsheets/Cross-Site_Request_Forgery_
Prevention_Cheat_Sheet.html
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/csrf_lab/lab_2/index.php
Consequences of not Fixing the Issue
Some potential hazards of CSRF vulnerability:
Unauthorized actions: The attacker can make the user perform actions they didn't intend to, such as
changing their email address or password.
Data loss: The attacker can delete data on behalf of the user.
Account theft: If the attacker makes the user perform actions on their own account, they can
effectively steal the user's account.
Suggested Countermeasures
To prevent CSRF vulnerabilities, it's recommended to:
Use anti-forgery tokens, also known as CSRF tokens. This involves server-side generation of a random,
unique value associated with the user's current session which must be included with every
state-changing request.
Use the SameSite cookie attribute, which allows you to declare if your cookie should be restricted to a
first-party or same-site context, effectively preventing cross-origin requests.
Incorporate re-authentication, CAPTCHAs, or multi-factor authentication for sensitive actions.
Regularly update and patch all systems, libraries, and frameworks used by your web application to
minimize the risk of known CSRF vulnerabilities.
References
https://owasp.org/www-project-cheatsheet-series/cheatsheets/Cross-Site_Request_Forgery_
Prevention_Cheat_Sheet.html
Proof of Concept
Vulnerable URLs
https://labs.hacktify.in/HTML/csrf_lab/lab_4/index.php
Consequences of not Fixing the Issue
Some potential hazards of CSRF vulnerability:
Unauthorized actions: The attacker can make the user perform actions they didn't intend to, such as
changing their email address or password.
Data loss: The attacker can delete data on behalf of the user.
Account theft: If the attacker makes the user perform actions on their own account, they can
effectively steal the user's account.
Suggested Countermeasures
To prevent CSRF vulnerabilities, it's recommended to:
Use anti-forgery tokens, also known as CSRF tokens. This involves server-side generation of a random,
unique value associated with the user's current session which must be included with every
state-changing request.
Use the SameSite cookie attribute, which allows you to declare if your cookie should be restricted to a
first-party or same-site context, effectively preventing cross-origin requests.
Incorporate re-authentication, CAPTCHAs, or multi-factor authentication for sensitive actions.
Regularly update and patch all systems, libraries, and frameworks used by your web application to
minimize the risk of known CSRF vulnerabilities.
References
https://owasp.org/www-project-cheatsheet-series/cheatsheets/Cross-Site_Request_Forgery_
Prevention_Cheat_Sheet.html
Proof of Concept