存储xss 反射xss_安全基础xss解释

本文深入解析了两种常见的XSS(跨站脚本)攻击类型:存储型XSS和反射型XSS。这两种攻击方式威胁着网络安全,通过注入恶意脚本到网页中,对用户数据和隐私造成潜在风险。了解其工作原理对于加强网站安全至关重要。
摘要由CSDN通过智能技术生成

存储xss 反射xss

I’m sure you’ve heard of XSS (Cross-Site Scripting) if you’ve ever been within earshot of a security engineer. As part of the OWASP Top 10, it tends to pop up a lot in security discussions. Unfortunately, the standard explanation (“code injected into a webpage to make it do stuff”) doesn’t really help red or blue teams execute or protect against it.

如果您曾经在安全工程师的视野范围内,我敢肯定您听说过XSS(跨站点脚本)。 作为OWASP Top 10的一部分,它经常在安全性讨论中弹出很多。 不幸的是,标准的解释(“将代码注入到网页中以使其完成工作”)并不能真正帮助红色或蓝色的团队执行或防御它。

更好的解释 (A Better Explanation)

Basically, XSS can occur when a user is allowed to provide input that will be used by the application in some way to alter a view in the interface, without properly sanitizing the user-supplied input. For instance, when you search for a product in an online store and see the search term appear at the top of the results, or in the page title. You provided the term that the application is now using, so what’s to stop you from providing something malicious?

基本上,当允许用户提供输入时,如果没有适当地清理用户提供的输入,则允许用户提供输入,这些输入将由应用程序以某种方式使用以更改界面中的视图。 例如,当您在在线商店中搜索产品并看到搜索词出现在结果的顶部或页面标题中。 您提供了应用程序现在正在使用的术语,那么阻止您提供恶意软件的原因是什么?

Image for post

This is the premise of XSS.

这是XSS的前提。

榜样学习 (Learning By Example)

We’re going to use a fake web application, UberImage, to illustrate how XSS can occur in the real world. UberImage is a place to upload, tag, and share images with other users. Users can ‘like’ images, and popular images (by likes and views) appear on the front page. I’m sure nothing bad can come from that.

我们将使用一个伪造的Web应用程序UberImage来说明XSS如何在现实世界中发生。 UberImage是一个与其他用户上传,标记和共享图像的地方。 用户可以“点赞”图像,流行的图像(按点赞和查看)显示在首页上。 我敢肯定,没有什么不好的。

Image for post

Surprise, there are multiple XSS vulnerabilities in our imaginary web app. We’ll be looking at both reflected and persistent XSS attacks. The difference is pretty simple. A reflected XSS attack commonly uses a malicious link to trick a user into accidentally supplying the XSS script (typically in the URL params) and executing it in their browser, while a stored/persistent attack uses the application itself to store the XSS script.

令人惊讶的是,我们虚构的Web应用程序中存在多个XSS漏洞。 我们将研究反射

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值