# Reflected XSS into a JavaScript string with angle brackets and double quotes HTML-encoded and single quotes escaped * Bài lab XSS này yêu cầu chúng ta tiếp tục tấn công ở tính năng tìm kiếm. Chúng ta sẽ thử tìm kiếm từ khóa bất kỳ. Như hình dưới ta thấy một đoạn script sau khi Inspect. ![Capture01](https://hackmd.io/_uploads/ryzUp1ru6.png) * Chúng ta sẽ dùng payload `';alert(1)//` để thử break ra khỏi đoạn script. ![Capture02](https://hackmd.io/_uploads/SkoFakrO6.png) * Như ta thấy tấn công thất bại do dấu `'` đã bị encoding. ![Capture03](https://hackmd.io/_uploads/SyfIpySOa.png) * Chúng ta sử thêm một dấu '\' để bypass encoding. Payload lúc này là `\';alert(1)//`. ![Capture04](https://hackmd.io/_uploads/Hyst6yBdT.png) * Alert box xuất hiện. Hoàn thành bài lab. ![Capture05](https://hackmd.io/_uploads/rJMI6yrdT.png) ![Capture06](https://hackmd.io/_uploads/By_BRJHOT.png)