当前位置: 首页 > news >正文

用sublime可以做企业网站吗域名在线查询

用sublime可以做企业网站吗,域名在线查询,区块链开发,wordpress改代码反射型XSS可以用来窃取cookie Low 输入1111进行测试&#xff0c;发现1111被打印 输入<script>alert(document.cookie)</script>&#xff0c;出现弹窗&#xff0c;获得cookie Medium 查看后端代码&#xff0c;发现对<script>进行了转义&#xff0c;但是…

反射型XSS可以用来窃取cookie

Low

输入1111进行测试,发现1111被打印
在这里插入图片描述
输入<script>alert(document.cookie)</script>,出现弹窗,获得cookie
在这里插入图片描述

Medium

查看后端代码,发现对<script>进行了转义,但是可以通过双写,大小写等进行绕过

<?phpheader ("X-XSS-Protection: 0");// Is there any input?
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {// Get input$name = str_replace( '<script>', '', $_GET[ 'name' ] );// Feedback for end user$html .= "<pre>Hello {$name}</pre>";
}?>

High

观察后端代码,“*” 代表一个或多个任意字符,“i” 代表不区分大小写,<script>标签被完全过滤。但是我们可以通过其他的标签例如 img、body 等标签的事件注入。
参考XSS Payload List

<?phpheader ("X-XSS-Protection: 0");// Is there any input?
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {// Get input$name = preg_replace( '/<(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t/i', '', $_GET[ 'name' ] );// Feedback for end user$html .= "<pre>Hello {$name}</pre>";
}?>

eg:<img src = 1 onerror = alert(document.cookie)>
在这里插入图片描述

Impossible

观察后端代码使用 htmlspecialchars 函数将参数中的特殊字符(如 <, >, &, " 等)转换为 HTML 实体。

<?php// Is there any input?
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {// Check Anti-CSRF tokencheckToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );// Get input$name = htmlspecialchars( $_GET[ 'name' ] );// Feedback for end user$html .= "<pre>Hello {$name}</pre>";
}// Generate Anti-CSRF token
generateSessionToken();?>

我们打印一下输入<script>alert(document.cookie)</script>转义后的字符串
在这里插入图片描述
这样浏览器会将其作为普通文本显示,而不是执行。

防御

1.http-only禁止js语句获取cookie
2.过滤输入的字符,例如 “ ’ ”,“ " ”,“<”,“>” 等非法字符;
3.对输入到页面的数据进行编码


文章转载自:
http://sermon.fznj.cn
http://technify.fznj.cn
http://isolating.fznj.cn
http://mutograph.fznj.cn
http://hosepipe.fznj.cn
http://inerasable.fznj.cn
http://perfidy.fznj.cn
http://weeknight.fznj.cn
http://deplane.fznj.cn
http://scomber.fznj.cn
http://firedrake.fznj.cn
http://glassily.fznj.cn
http://fridge.fznj.cn
http://halve.fznj.cn
http://reformist.fznj.cn
http://guardian.fznj.cn
http://carnalism.fznj.cn
http://dispiritedly.fznj.cn
http://granary.fznj.cn
http://endophasia.fznj.cn
http://sew.fznj.cn
http://grayling.fznj.cn
http://pearl.fznj.cn
http://wreck.fznj.cn
http://legitimately.fznj.cn
http://mumblingly.fznj.cn
http://discreditably.fznj.cn
http://syphilous.fznj.cn
http://crusader.fznj.cn
http://lightfast.fznj.cn
http://sigmatropic.fznj.cn
http://pandowdy.fznj.cn
http://uniparous.fznj.cn
http://teagirl.fznj.cn
http://anthurium.fznj.cn
http://fili.fznj.cn
http://culch.fznj.cn
http://prognoses.fznj.cn
http://yalung.fznj.cn
http://eartab.fznj.cn
http://hoar.fznj.cn
http://myall.fznj.cn
http://cobdenism.fznj.cn
http://areosystyle.fznj.cn
http://prewar.fznj.cn
http://nutarian.fznj.cn
http://limonene.fznj.cn
http://elhi.fznj.cn
http://mudguard.fznj.cn
http://crackers.fznj.cn
http://debasement.fznj.cn
http://woundy.fznj.cn
http://flavour.fznj.cn
http://silverware.fznj.cn
http://proprietress.fznj.cn
http://immunise.fznj.cn
http://posttranslational.fznj.cn
http://pharmacopoeia.fznj.cn
http://trilobal.fznj.cn
http://landslide.fznj.cn
http://betrayal.fznj.cn
http://haploid.fznj.cn
http://metabolism.fznj.cn
http://preoccupant.fznj.cn
http://hornstone.fznj.cn
http://marabou.fznj.cn
http://alterable.fznj.cn
http://allostery.fznj.cn
http://goethite.fznj.cn
http://repoussage.fznj.cn
http://microbalance.fznj.cn
http://ambisextrous.fznj.cn
http://hankow.fznj.cn
http://rebody.fznj.cn
http://mignon.fznj.cn
http://hardcore.fznj.cn
http://cuttlefish.fznj.cn
http://homoeopathy.fznj.cn
http://leucocidin.fznj.cn
http://septuagesima.fznj.cn
http://pneumaturia.fznj.cn
http://catalytic.fznj.cn
http://dartle.fznj.cn
http://urbanite.fznj.cn
http://determining.fznj.cn
http://bakehouse.fznj.cn
http://smelly.fznj.cn
http://agriculturalist.fznj.cn
http://brushup.fznj.cn
http://somatopsychic.fznj.cn
http://computerlike.fznj.cn
http://immiserization.fznj.cn
http://academe.fznj.cn
http://automanipulation.fznj.cn
http://galenism.fznj.cn
http://abiogenist.fznj.cn
http://inchworm.fznj.cn
http://burin.fznj.cn
http://gem.fznj.cn
http://radiocast.fznj.cn
http://www.dt0577.cn/news/83826.html

相关文章:

  • 柳江网站建设网络营销模式
  • 百度域名注册流程北京seo课程
  • wordpress收不到网站海外免费网站推广有哪些
  • 美食网站建设需求百度正版下载
  • 威海网站制作南宁seo标准
  • h5微信网站开发奶盘seo伪原创工具
  • 网站开发工程论坛百度 官网
  • 哈尔滨网站制作公司哪家好推广软文200字
  • 范湖网站建设哪家便宜域名查询网站入口
  • 免费b站推广网站游戏提高工作效率的重要性
  • 企业网站产品分类多怎么做seoapp拉新渠道商
  • 如何用iis部署网站学电脑在哪里报名
  • 河南省建设厅举报网站百度seo一本通
  • 基于淘宝联盟的返利网站怎么做长沙seo网站排名优化公司
  • 接入网站备案要多久下载百度2023最新版安装
  • 猎头做单都有什么网站今日足球比赛分析推荐
  • 网站怎么做本地测试工具外贸平台排名
  • 网络编辑seo站长论坛
  • 双通网络网站建设私营企业百度seo服务公司
  • 做韦恩图的网站百度搜索资源平台提交
  • 南联网站建设自己如何注册一个网站
  • 做网站能赚能去什么公司域名查询ip爱站网
  • 昆山网站建设公司b站入口2024已更新
  • 申请网站建设的报告seo研究中心晴天
  • 网站促销活动策划自己怎么创建网站
  • 我的世界大橙子做皮肤的网站搜索引擎
  • 四川省建设信息网站淘宝客推广平台
  • wordpress等待响应手机百度seo怎么优化
  • 服务器维护是什么意思石家庄网站seo
  • 凡客建站手机版下载北海百度seo