Giter Site home page Giter Site logo

xss's Introduction

xss

Cross Site Scripting

反射型

发送请求时, xss代码会出现在url中,作为输入提交到服务器端。服务器端解析后响应,xss代码随内容一起穿回给浏览器,最后浏览器端执行xss代码。整个过程像一次反射,故叫反射型xss。

存储型

存储型xss和反射型的区别在于, 提交的代码会存储在服务器(数据库,内存,文件系统等),下次请求目标页面的时候不用再提交xss代码

xss防御措施

1.编码
	<  &lt;   > &gt;
2.过滤
	移除用户写的DOM属性  如onerror等
	移除用户上传的style script iframe节点
3.校正
	避免直接对html entity 解码
	使用DOM Parse准换,校正不配对的DOM标签

xss's People

Contributors

szy1000 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.