Bạn ghé thăm diễn đàn lần đầu? hãy đăng ký ngay bây giờ để tham gia.
  • Đăng nhập:

Chào mừng bạn đến với ITVNN FORUM - Diễn đàn công nghệ thông tin.

Nếu đây là lần đầu tiên bạn tham gia diễn đàn, xin mời bạn xem phần Hỏi/Ðáp để biết cách dùng diễn đàn. Để có thể tham gia thảo luận bạn phải đăng ký làm thành viên, click vào đây để đăng ký.


  • Partner Area
    • ITVNN HOSTING - Thiết kế website, Cung cấp Domain, Hosting, VPS Việt Nam Anh Hùng - Thông tin truyền thông
kết quả từ 1 tới 2 trên 2
Tăng kích thước phông chữ Giảm kích thước phông chữ
  1. #1
    linhbatinh's Avatar
    Banned

    Trạng thái
    Offline
    Tham gia ngày
    Sep 2009
    Thành viên thứ
    295
    Tuổi
    39
    Giới tính
    Bài gởi
    81
    Level: 32 [?]
    Experience: 430,342
    Next Level: 453,790
    Cảm ơn 0
    Cảm ơn 16 lần / 7 Bài viết

    Default Bảo mật mã nguồn vBulletin cho share Host Linux  

    Bài viết của sờ núp à quên SiêuNoopy VHC


    Hôm nay ngồi đúc kết ra cách bảo mật tốt cho share host ! (sv thì ko cần nói,1 Mình 1 sv thì ko cần nói làm gì

    1) Bảo mật cho admincp !

    Các bạn sử dụng share host (hầu hết là cpanel ... ),thì đặt pass cho folder admincp



    Nếu là cpanel -> chuột phải vào folder admincp rồi đặt password protect.Cái này thì quá dễ rồi ko cần hướng dẫn nữa !

    Nếu là plesk hay control panel nào mà ko có phần đặt pass thì bạn tự tạo file .htacess rồi có require đến file htpasswd .(cái này google ra là có hết ! ) !

    Thích thì bạn làm 1 cái nữa cho folder modcp của các điều hành viên !

    Nên thay đổi tên thư mục admincp và modcp rồi sửa lại path trong file config.php

    PHP Code: 
        //    ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
        //    This setting allows you to change the name of the folders that the admin and
        //    moderator control panels reside in. You may wish to do this for security purposes.
        //    Please note that if you change the name of the directory here, you will still need
        //    to manually change the name of the directory on the server.
    $config['Misc']['admincpdir'] = 'admincp';
    $config['Misc']['modcpdir'] = 'modcp'
    --------------------------------------------------------------------------

    Giả sử,thằng hacker nó loạn tử cung được pass vào folder admincp của bạn,bây h nó sẽ loạn tiếp cái pass của user admin trong forum bạn thì bạn làm sao để biết được nó đang thâm nhập !


    Bước 1: edit file login.php
    Bạn tìm:

    PHP Code: 
    $strikes verify_strike_status($vbulletin->GPC['vb_login_username']); 
    Và add sau nó:


    PHP Code: 
    $username $vbulletin->GPC['vb_login_username'];
        
    $fdate date('l, F jS, Y');
        
    $ftime date('g:i:s a');
        
    $fdatetime "Date/Time: $fdate at $ftime \r\n";
        
    $fscriptpath "Script: http://$_SERVER[HTTP_HOST]SCRIPTPATH "\r\n";
        
    $freferer 'Referrer: ' REFERRER "\r\n";
        
    $fusername "Username tried: $username \r\n";
        
    $fipaddress 'IP Address: ' IPADDRESS "\r\n";
        
    $iphostname "Host: " . @gethostbyaddr(IPADDRESS) . "\r\n";
        if (
    $vbulletin->userinfo['userid'] > 0)
        {
            
    $realname "\nUSER ATTEMPT: " $vbulletin->options['bbtitle'] . " has identified this registered user as: " $vbulletin->userinfo['username'] . "\r\n";
        } 
    Bước 2: vẫn ở file login.php
    Bạn tìm:



    PHP Code: 
    // log this error if attempting to access the control panel
                
    require_once(DIR '/includes/functions_log_error.php'); 
    Thêm sau nó:



    PHP Code: 
    $fstrk "Strikes: $GLOBALS[strikes] out of 5 \r\n";
                if (
    $vbulletin->GPC['logintype'] === 'cplogin')
                {
                    
    $subject'WARNING: Failed Admin CP logon in ' $vbulletin->db->appname ' ' $vbulletin->options['templateversion'] . "\r\n\r\n";
                    
    $message="Someone is trying to login to your " $vbulletin->options['bbtitle'] . " Admin CP!\n\n$fusername$fipaddress$iphostname$fstrk$freferer$fscriptpath$fdatetime$realname";
                }
                else
                {
                    
    $subject'WARNING: Failed Mod CP logon in ' $vbulletin->db->appname ' ' $vbulletin->options['templateversion'] . "\r\n\r\n";
                    
    $message="Someone is trying to login to your " $vbulletin->options['bbtitle'] . " Mod CP!\n\n$fusername$fipaddress$iphostname$fstrk$freferer$fscriptpath$fdatetime$realname";
                }
                
    vbmail($vbulletin->options['webmasteremail'], $subject$messagetrue); 
    webmasteremail các bạn chỉnh trongvb options nhé code sẽ tự động gởi mail thông báo quá trình xâm nhập cho bạn.
    Note: - test trên forum 3.7

    ( Cái này có sưu tầm của cha mafia_boy )

    2) Về file config.php

    File này thì riêng SN edit theo cách riêng của SN ! o=>

    SN sẽ move 4 file classcore.php ; config.php ; init.php ( trong thư mục includes ) và file diagnostic.php trong thư mục admin cp :

    Khi move xong SN bắt đầu làm việc cho vbb hoạt động trở lại :

    Đầu tiên là path của init.php

    Path của file này có ở những file global.php (nằm ngang admincp,modcp ... ) , global.php trong thư mục archive ,image.php (nằm ngang admincp,modcp ... ),và global.php nằm trong thư mục modcp

    Require trong file global.php (nằm ngang admincp,modcp ... )

    Search :

    PHP Code: 
    require_once(CWD '/includes/init.php'); 
    Thay bằng :

    PHP Code: 
    require_once(CWD 'đường dẫn đến file init.php'); 
    Sau đó là file global.php trong thư mục archive:

    Search :

    PHP Code: 
    require_once(CWD '/includes/init.php'); 
    Thay bằng :

    PHP Code: 
    require_once(CWD 'đường dẫn đến file init.php'); 
    Sau tiếp là file image.php (nằm ngang admincp,modcp ... )

    Search :
    PHP Code: 
        require_once(CWD '/includes/init.php'); 
    Thay bằng :

    PHP Code: 
     require_once(CWD 'đường dẫn đến file init.php'); 
    Sau cùng là file global.php (nằm trong thư mục modcp )

    Search :
    PHP Code: 
    require_once(CWD '/includes/init.php'); 
    Thay bằng :

    PHP Code: 
      require_once(CWD 'đường dẫn đến file init.php'); 
    Tiếp đến là path của class_core.php sau khi di chuyển :

    Require nằm trong file init.php :

    Search :

    PHP Code: 
    require_once(CWD '/includes/class_core.php'); 
    Thay bằng :

    PHP Code: 
    require_once(CWD 'đường dẫn đến file class_core.php); 
    Tiếp sau nữa là path của file config.php

    Path của file này nằm ở 2 file :

    class_core.php và diagnostic.php

    Ở file diagnostic.php,bạn search :

    PHP Code: 
    $ignored_files = array('/includes/config.php'
    Thay bằng :

    PHP Code: 
     $ignored_files = array('đường dẫn đến file config.php',; 
    Ở file class_core.php , bạn search :

    PHP Code: 
    include(CWD '\includes\config.php'); 
    Thay bằng :

    PHP Code: 
    include(CWD 'đường dẫn đến file config.php'); 
    Vẫn ở file class_core.php bạn search tiếp :

    PHP Code: 
    if (file_exists(CWD'\includes\config.php')) 
    Thay bằng :

    PHP Code: 
    if (file_exists(CWD'đường dẫn đến file config.php')) 
    Nếu có lỗi gì khi bạn move file config như hướng dẫn của mình thi bạn reply lại mình sẽ check !

    Sau đó các bạn dùng Zend Guard encode lại lần nữa,cho đẹp lòng nhau,rồi vẫn để các file class_core.php,init.php,diagnostic.php như bt coi như ko change gì cả .

    3) Secure IP

    Nếu bạn cẩn thận hơn nữa,ko muốn ai vào đc admincp của bạn thì bạn chỉ cho IP của mình truy cập vào admincp,khi nào cần thì connect FTP edit !

    4)CHMOD:

    CHMOD toàn bộ folder forum và public_html thành 101.!

    5)Bật Safe MODE và vô hiệu các hàm :

    Tạo file hoặc edit file php.ini thêm nội dung sau :

    disable_functions = lynx,proc_open,symlink,readlink,wget,system,exec,s hell_exec,passthru,pcntl_exec,proc_close,proc_get_ status,prus,proc_nice,proc_terminate,popen,pclose, ini_alter,virtual,openlog,escapeshellcmd,escapeshe llarg,show_source,dl,chgrp,chown,proc_exec,gzinfla te,set_time_limit
    safe-mode = on

    Nếu các hàm này làm cản trở việc thực thi code của bạn,thì bạn có thể bỏ bớt !

    6)Các điều chú ý nho nhỏ :

    Đặt file index.html ở toàn bộ các thư mục,tránh sự tò mò.
    Các script code backup,nên backup xong xóa đi,hoặc dùng ybackup tools của yuyu code có kết hợp cookies của folder admincp,nên phải vào admincp mới backup được!
    Không nên share pass host cho nhiều admin,chỉ những người lo kỹ thuật forum!
    Cắt quyền ,Styles,Product,Maintenance,vBulletin Options của các admin ko lo kỹ thuật !
    Edit toàn bộ các trang lỗi 401,404,503... = cách tạo các file 404.shtml,503.shtml....

    Đây là kinh nghiệm riêng,viết ra chia sẻ cho anh em ! Hy vọng anh em đóng góp ,ai có kinh nghiệm riêng thì chia sẻ !

  2. The Following 2 Thank You to linhbatinh For This Useful Post:

    atcgialai (27-11-2010),tanbinh (22-02-2010)

  3. #2
    so1.com.vn's Avatar
    Banned

    Trạng thái
    Offline
    Tham gia ngày
    Aug 2010
    Thành viên thứ
    27492
    Giới tính
    Bài gởi
    35
    Level: 28 [?]
    Experience: 174,556
    Next Level: 195,661
    Cảm ơn 4
    Cảm ơn 11 lần / 7 Bài viết

    Default

    CHMOD thư mục thành 0101 mấy file liên quan đến config CMHOD Thành 0400 Tạo file html có nội dung Ví dụ (<META HTTP-EQUIV="refresh" content="0; url =http://so1.com.vn/forum/forum.php">)sau bỏ vào các thư mục không có file index.htm hoặc index.php CMHOD tất cả các file thành 404.Cho thằng hack nó up 1000 con shell .Nếu chua thấy đủ đô thì mã hóa file Tại đây http://www.rightscripts.com/phpencode/index.php thằng nào mà hack được chắc râu nó bạc phơ lun haaaaaaaa


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trả lời: 0
    Bài mới gởi: 25-10-2018, 06:08 PM
  2. [HELP!] tai sao khi chuyen host tu linux sang host window thì go mod vbseo roi ma
    By naruto_kun_211 in forum Hỏi đáp & Thảo luận
    Trả lời: 1
    Bài mới gởi: 20-04-2012, 01:47 PM
  3. Chạy lệnh php trên host linux
    By nh0ckti in forum Domains & Hosting
    Trả lời: 4
    Bài mới gởi: 06-08-2011, 09:56 PM
  4. Trả lời: 12
    Bài mới gởi: 06-02-2011, 12:21 PM
  5. Trả lời: 0
    Bài mới gởi: 24-03-2010, 03:06 PM

Tags for this Thread

Bookmarks

Quuyền Hạn Của Bạn

  • Bạn không thể tạo chủ đề mới
  • Bạn không thể trả lời bài viết
  • Bạn không thể gửi file đính kèm
  • Bạn không thể chỉnh sửa bài viết
  •