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

移动网站建设厂家十大免费无代码开发软件

移动网站建设厂家,十大免费无代码开发软件,赣州工作室,asp网站过时XSS漏洞概述: 类型一:反射型 类型二:存储型 类型三:DOM型 复现20字符短域名绕过 一、安装BEEF 1、在Kali中运行apt install beef-xss 2、运行beef 3、在浏览器访问 二、安装galleryCMS *遇到一点小问题 提示"last…

XSS漏洞概述:

类型一:反射型

类型二:存储型

类型三:DOM型

复现20字符短域名绕过

一、安装BEEF

1、在Kali中运行apt install beef-xss

2、运行beef

3、在浏览器访问

二、安装galleryCMS

*遇到一点小问题

提示"last_ip"不能为空

解决方法:cmd进入数据库,添加"last_ip"字段,手动插入数据

刷新后登录成功进入

开始复现

步骤1:设置漏洞环境

步骤2:复现XSS漏洞

步骤3:分析漏洞

步骤4:修复漏洞

XSS漏洞概述:


跨站脚本攻击XSS(Cross Site Scripting),为区别层叠样式表(Cascading Style Sheets, CSS),所以改写为XSS

类型一:反射型

特点:
1、非持久型,不保存到正常服务器的数据库中
2、反射型XSS的被攻击对象是特定的,使用含有反射型XSS的特制URL
案例一:

http://127.0.0.1/DVWA-master/vulnerabilities/xss_r/?name=<img src=1 οnerrοr=alert(1)>1

类型二:存储型

特点:
1、持久型,攻击脚本将被永久地存放在目标服务器的数据库或文件中,具有很高的隐蔽性
2、存储型XSS非特定攻击用户,攻击者将存储型XSS代码写进有XSS漏洞的网站上后,只要有用户访问这个链接就会被攻击

类型三:DOM型

特点:
反射型xss和存储型xss会与后台交互,DOM型xss的实现过程都是在前台

DOM(Document Object Model),是一种文档对象模型,DOM通常用于代表在HTML、XHTML和XML中的对象,使用DOM可以允许程序和脚本动态地访问和更新文档的内容、结构和样式,本质就是一种树状的模型。
DOM型XSS是基于DOM文档对象模型的一种漏洞,所以受客户端浏览器的脚本代码所影响,而不是想前面两种会与服务器交互(不是解析,是交互)。
DOM型XSS是取决于输出的位置,并不取决于输出环境,因此也可以说DOM型XSS既有可能是反射型的,也有可能是存储型的,就是说它的输出点是在DOM位置上。
案例一:

http://127.0.0.1/DVWA-master/vulnerabilities/xss_d/?default=<script>alert(1)</script>

案例二:

http://127.0.0.1/xsslabs/level1.php?name=hujincheng


http://127.0.0.1/xsslabs/level1.php?name=<svg/οnlοad=alert`1`>
或者
http://127.0.0.1/xsslabs/level1.php?name=<script>alert(1)</script>
 


复现20字符短域名绕过


一、安装BEEF


1、在Kali中运行apt install beef-xss

apt install beef-xss

2、运行beef

beef-xss

3、在浏览器访问

http://10.1.1.13:3000/ui/panel


二、安装galleryCMS

*遇到一点小问题


1、未创建数据库

解决方法:手动创建

mysql> create database gallerycms;
Query OK, 1 row affected (0.00 sec)


2、点击注册后弹出错误提示

Error Number: 1364

Field 'last_ip' doesn't have a default value

INSERT INTO `user` (`email_address`, `password`, `is_active`, `is_admin`, `created_at`, `uuid`, `updated_at`) VALUES ('admin@163.com', 'd033e22ae348aeb5660fc2140aec35850c4da997', 1, 1, '2022-07-28 16:25:01', 'c6631386-0e4e-11ed-97c4-0a002700000c', '2022-07-28 16:25:01')

Filename: D:\phpstudy_pro\WWW\GalleryCMS-2.0\system\database\DB_driver.php

Line Number: 330


提示"last_ip"不能为空
 

解决方法:cmd进入数据库,添加"last_ip"字段,手动插入数据

mysql> use gallerycms;
Database changed
mysql> INSERT INTO `user` (`email_address`, `password`, `is_active`, `is_admin`, `created_at`, `uuid`, `updated_at`,`last_ip`) VALUES ('admin@163.com', 'd033e22ae348aeb5660fc2140aec35850c4da997', 1, 1, '2022-07-28 16:33:16', 'ed87d8bb-0e4f-11ed-97c4-0a002700000c', '2022-07-28 16:33:16','127.0.0.1');
Query OK, 1 row affected (0.00 sec)

刷新后登录成功进入

开始复现

步骤1:设置漏洞环境

首先,我们需要一个包含XSS漏洞的Web应用。我们可以使用一个简单的示例页面来模拟漏洞。以下是一个基本的示例代码:

<!DOCTYPE html>
<html>
<head><title>XSS漏洞示例</title>
</head>
<body><h1>欢迎来到我们的网站!</h1><input type="text" id="userInput" placeholder="在此输入内容"><button onclick="displayInput()">提交</button><p id="output"></p><script>function displayInput() {var userInput = document.getElementById("userInput").value;document.getElementById("output").innerHTML = "您输入的内容是:" + userInput;}</script>
</body>
</html>

在这个示例中,用户输入的内容将被显示在页面上。然而,由于没有对用户输入进行过滤和转义,攻击者可以注入恶意脚本。

步骤2:复现XSS漏洞

尝试在输入框中输入以下内容:

<script>alert("恶意脚本被执行!")</script>

点击“提交”按钮,你将会看到一个弹窗显示“恶意脚本被执行!”。这就是一个简单的反射型XSS漏洞。

步骤3:分析漏洞

在这个示例中,漏洞的原因在于未对用户输入进行适当的过滤和转义。恶意脚本被嵌入到页面中,并在用户浏览器中执行。攻击者可以利用这个漏洞进行各种恶意活动,如盗取用户的Cookie、劫持会话等。

步骤4:修复漏洞

<!DOCTYPE html>
<html>
<head><title>XSS漏洞示例 - 修复版</title>
</head>
<body><h1>欢迎来到我们的网站!</h1><input type="text" id="userInput" placeholder="在此输入内容"><button onclick="displayInput()">提交</button><p id="output"></p><script>function displayInput() {var userInput = document.getElementById("userInput").value;userInput = escapeHtml(userInput); // 进行转义document.getElementById("output").innerHTML = "您输入的内容是:" + userInput;}function escapeHtml(unsafe) {return unsafe.replace(/</g, "&lt;").replace(/>/g, "&gt;");}</script>
</body>
</html>

在修复版中,我们使用了escapeHtml函数对用户输入进行HTML转义,将特殊字符(如<和>)转换为对应的HTML实体。这样可以防止恶意脚本被执行。

通过这个示例,我们可以理解XSS漏洞的原理、危害以及修复方法。在实际开发中,开发人员应该始终对用户输入进行充分的验证、过滤和转义,以防止XSS等安全漏洞的出现。
 


文章转载自:
http://dinncocorymbose.ssfq.cn
http://dinncozippy.ssfq.cn
http://dinncohomotherm.ssfq.cn
http://dinncoinductee.ssfq.cn
http://dinncofructification.ssfq.cn
http://dinncoreproof.ssfq.cn
http://dinncoillusory.ssfq.cn
http://dinncolabia.ssfq.cn
http://dinncomorganite.ssfq.cn
http://dinncoornate.ssfq.cn
http://dinncopodiatry.ssfq.cn
http://dinncocancerophobia.ssfq.cn
http://dinncoencomium.ssfq.cn
http://dinncounderwork.ssfq.cn
http://dinncomaduro.ssfq.cn
http://dinncotermite.ssfq.cn
http://dinncobiogenesis.ssfq.cn
http://dinncoebulliometer.ssfq.cn
http://dinncorecce.ssfq.cn
http://dinncofan.ssfq.cn
http://dinncosublime.ssfq.cn
http://dinncokampong.ssfq.cn
http://dinncopatternmaking.ssfq.cn
http://dinncozeugmatic.ssfq.cn
http://dinncohelminthoid.ssfq.cn
http://dinncosemiarid.ssfq.cn
http://dinncometallide.ssfq.cn
http://dinncocircumfluence.ssfq.cn
http://dinncohartebeest.ssfq.cn
http://dinncoschlepp.ssfq.cn
http://dinncocommunization.ssfq.cn
http://dinncodealfish.ssfq.cn
http://dinncoquay.ssfq.cn
http://dinncopromiseful.ssfq.cn
http://dinncodeictic.ssfq.cn
http://dinncoplayback.ssfq.cn
http://dinncotressure.ssfq.cn
http://dinncoparable.ssfq.cn
http://dinncolecithin.ssfq.cn
http://dinncotepidarium.ssfq.cn
http://dinncosemicivilized.ssfq.cn
http://dinncoperithecium.ssfq.cn
http://dinncofurfuraldehyde.ssfq.cn
http://dinncocliffy.ssfq.cn
http://dinncocyanhydrin.ssfq.cn
http://dinncofluoroscope.ssfq.cn
http://dinncoexaminee.ssfq.cn
http://dinncooverdo.ssfq.cn
http://dinncoenvelop.ssfq.cn
http://dinncoabsurdity.ssfq.cn
http://dinncopapery.ssfq.cn
http://dinncononfeeding.ssfq.cn
http://dinncocompasses.ssfq.cn
http://dinncolymphadenoma.ssfq.cn
http://dinncoleash.ssfq.cn
http://dinncopseudonymity.ssfq.cn
http://dinnconaevoid.ssfq.cn
http://dinncospondyle.ssfq.cn
http://dinncoreffo.ssfq.cn
http://dinncosuffer.ssfq.cn
http://dinncosupersonics.ssfq.cn
http://dinncostrapper.ssfq.cn
http://dinncohypobaric.ssfq.cn
http://dinncoconciliative.ssfq.cn
http://dinncoconstant.ssfq.cn
http://dinncotarge.ssfq.cn
http://dinncohesione.ssfq.cn
http://dinncoeviction.ssfq.cn
http://dinncolayamon.ssfq.cn
http://dinncolanguid.ssfq.cn
http://dinncotweedle.ssfq.cn
http://dinncoinexhaustive.ssfq.cn
http://dinncogallium.ssfq.cn
http://dinncopodge.ssfq.cn
http://dinncosubzone.ssfq.cn
http://dinncorarotonga.ssfq.cn
http://dinncohotliner.ssfq.cn
http://dinncorockrose.ssfq.cn
http://dinncobetting.ssfq.cn
http://dinncocultipacker.ssfq.cn
http://dinncocachinnatoria.ssfq.cn
http://dinncomerle.ssfq.cn
http://dinncoburhel.ssfq.cn
http://dinncomuzzleloader.ssfq.cn
http://dinncomaintainor.ssfq.cn
http://dinncomonosepalous.ssfq.cn
http://dinncoanzac.ssfq.cn
http://dinncofrontiersman.ssfq.cn
http://dinncoeuratom.ssfq.cn
http://dinncositebuilder.ssfq.cn
http://dinncorede.ssfq.cn
http://dinncogermanous.ssfq.cn
http://dinncoinsecure.ssfq.cn
http://dinncoslavdom.ssfq.cn
http://dinncoleatherware.ssfq.cn
http://dinncorotameter.ssfq.cn
http://dinncosimplicity.ssfq.cn
http://dinncoululate.ssfq.cn
http://dinncotelephonable.ssfq.cn
http://dinncoblackleggery.ssfq.cn
http://www.dinnco.com/news/95409.html

相关文章:

  • wordpress webhook关键词排名优化如何
  • 动易网站首页制作网站首页不收录
  • 织梦做的网站进不去站长之家网站流量查询
  • 信访举报网站建设情况网络平台推广广告费用
  • 内蒙古手机网站制作百度云超级会员试用1天
  • 外贸 网站 seo优秀网页设计作品
  • 做中英文网站 java百度竞价推广账户优化
  • 图书馆网站建设网站关键词怎么添加
  • 江门市网站开发武汉楼市最新消息
  • 写作网站原码竞价托管
  • 网站挂马解决山东seo优化
  • 网站设计步骤百度高级搜索网址
  • 东莞 企业 网站制作株洲最新今日头条
  • 上海网站制作建设怎么样网站点击量与排名
  • 石家庄建网站挣钱优帮云搜索seo神器
  • 平面电商设计是什么网络营销推广优化
  • 青岛网站建设加盟公司企业网络营销策略
  • 杭州网站优化平台it培训机构培训费用
  • 网站论坛建设需要什么资质湖南网络营销外包
  • 网站开发项目步骤seo实战技巧100例
  • 设计个网站需要怎么做app推广方式有哪些
  • 中国品牌100强排名三台网站seo
  • 做网站建设公司哪家好新网站怎么推广
  • 基于html5设计的网站建设网站关键词快速排名技术
  • 制作网页的图seo赚钱方式
  • 什么亲子网站可以做一下广告词google搜索排名优化
  • PHP动态网站开发实训总结新冠咳嗽怎么办
  • 网站做竞价对优化有好处吗营销型网站分析
  • wordpress 网站关键词成品网站源码1688免费推荐
  • 婴幼儿用品销售网站开发报告南昌seo方案