注:要在火狐瀏覽器下面才能進行,其他的瀏覽器可能不行
1.http://58.154.33.13:8081/xss2.php
807_213603.png
輸入d123456,然后burp攔截,查看響應(yīng)
Paste_Image.png
看到插入在<div>標簽上,并且過濾了<,>,因此構(gòu)造下面的
payload=" style="width:200px;height:200px;background:#666;" onclick=alert(1) onerror="
最后顯示如圖:
Paste_Image.png
在灰色區(qū)域點擊,就會彈出窗口,設(shè)置background就是為了方便定位區(qū)域,最后返回的html代碼:
Paste_Image.png
2.http://58.154.33.13:8081/xss3.php
Paste_Image.png
查看源碼,定位到下面的代碼:
Paste_Image.png
這里其實比較簡單,在if條件和后面的代碼都插入代碼,這樣只要保證語法正確就可以進行XSS了
payload1=1" && alert(1) && "
這條語句會彈窗一次,因為短路原因,if條件為flalse
payload2="== alert(1) =="
這個會彈兩次窗口,if條件為true
Paste_Image.png