我刚听说cakephp中的一个错误,它允许sql inyection;https://twitter.com/cakephp/status/328610604778651649
我试图使用sqlmap测试我的站点,但我找不到如何指定参数。
我测试的url是;
http://127.0.0.1/categories/index/page:1/sort:id/direction:asc我想要sqlmap inyect的参数在url中(page:,sort:,direction:)
我试着奔跑;
python sqlmap.py -u "http://127.0.0.1/categories/index/page:1/sort:id/direction:asc"但没什么..。有什么线索吗?谢谢!
发布于 2013-05-03 00:16:04
在CakePHP中有passed arguments、named parameters和querystring parameters。
传递的参数看起来像是使用$this->request->pass[0]访问.../index/arg,其中'0‘是数组索引。命名参数看起来像.../index/key:value,可以通过$this->request->named['key']访问。查询字符串参数看起来像̀.../index?key=valueand are accessed with$this->request->query'key'`.
您的URL使用命名参数,因此应如下所示(不带问号):
http://127.0.0.1/categories/index/page:1/sort:id/direction:asc编辑:
由于CakePHP使用mod_rewrite,因此您必须按照sqlmap wiki中的说明指定参数。
https://stackoverflow.com/questions/16342165
复制相似问题