Hướng Dẫn Cách Quét Shell Trên Host

Thảo luận trong 'Bảo mật Joomla' bắt đầu bởi VJL, 25/8/12.

  1. happy_ghost

    happy_ghost Rất tích cực

    Bài viết:
    38
    Likes :
    3
    mình scan xong thì hiện mấy đường link nhưng font chữ bị lỗi
    khi copy past đường linh vào trình duyệt thì lỗi ko tìm thấy 404
    [​IMG]
     
  2. Nguyễn Đức Hạnh

    Nguyễn Đức Hạnh Mới tham gia

    Bài viết:
    1
    Likes :
    0
    Cho mình hỏi file mình muốn tải lên có kích thước 5.1M không tải lên được, vì file quá nặng bây giờ làm thế nào????????????
     
  3. duocphamnamgioi

    duocphamnamgioi Mới tham gia

    Bài viết:
    2
    Likes :
    0
    Bạn tải qua công cụ nào, Fizilla tải bình thường hàng trăm Mb được mà, nếu là file Database tải bằng PHPmyadmin cũng được vì các phiên bản mới đều để Max size = 128Mb hết rồi, không hiểu bạn lỗi gì?
     
  4. lanceblood

    lanceblood Mới tham gia

    Bài viết:
    2
    Likes :
    0
    Cho em hỏi sao em add lên được ok rồi nhưng lúc chạy nó lại ra màn hình trắng :(
     
  5. unlockcodeuc

    unlockcodeuc Mới tham gia

    Bài viết:
    4
    Likes :
    0
    Bay qua bay lại
     
  6. zobibobo

    zobibobo Rất nhiệt tình

    Bài viết:
    328
    Likes :
    75
    Phần font bị lỗi hay ko bị lỗi ko quan trọng với việc scan shell của bạn, vấn đề font do head utf hay gì đó thôi,
    Còn việc bạn copy link & paste lên trình duyệt ko chạy là ko đúng url rồi. Link hiển thị đó là link gốc của host bạn, bạn chỉ cần copy từ sau khúc public_html/ và dán nó vào sau domain bạn rồi enter là ok. Try and enjoy :)
     
  7. johnny1987

    johnny1987 Rất tích cực

    Bài viết:
    52
    Likes :
    2
    sao mình scan trên localhost ko được vậy chạy ra trang trắng phao à (mình dùng xamp), trên hosting thì chạy ok. Có ai giúp mình vấn đề này được ko vậy!
     
  8. gac.kiem78

    gac.kiem78 Mới tham gia

    Bài viết:
    15
    Likes :
    1
    OK !!!! Cảm ơn bạn rất nhiều ĐÃ TEST TRÊN LOCAL... nhưng trên 50 trang ( - PHÁT HIỆN ) nhưng chưa tìm được con sell nào đang mò từng trang 1
     
    Nguyen Che Linh thích bài này.
  9. kiemthu123

    kiemthu123 Mới tham gia

    Bài viết:
    9
    Likes :
    1
    Cho mình hỏi là mình mới học làm web, mình quét xong rồi thì nó ra 1 vài dòng màu đỏ, thì mình làm sao biết cái nào là shell và làm thế nào để xoá/khắc phục shell đó?

    Trang mình là http://gen-ygroup.com/

    Thanks
     
  10. hayboy

    hayboy Rất nhiệt tình

    Bài viết:
    325
    Likes :
    71
    Nếu không phải shell thì nó chỉ ra trang trắng hoặc vài dòng thông báo.nếu là shell thì nó hiện lên trang web giấu link.
     
    kiemthu123 thích bài này.
  11. kiemthu123

    kiemthu123 Mới tham gia

    Bài viết:
    9
    Likes :
    1
    Thanks, bạn có thể nói cụ thể hơn đc không.

    Mình mở link màu đỏ lên thì nó ra 1 đóng code hay j đó, nhìn vào choáng cả mặt. Có vài link thì khi mở lên page trắng bóc.
     
  12. hayboy

    hayboy Rất nhiệt tình

    Bài viết:
    325
    Likes :
    71
    code đấy là nó mã hóa trong code không sao.trang trắng cũng không phải.nếu mở nó ra trang web nào đó thì mới phải.
     
    kiemthu123 thích bài này.
  13. Nguyen Che Linh

    Nguyen Che Linh Rất nhiệt tình

    Bài viết:
    103
    Likes :
    45
  14. troichet

    troichet Rất tích cực

    Bài viết:
    55
    Likes :
    2
    Online tình cờ mình thấy file code giúp phát hiện shell này:
    https://github.com/emposha/PHP-Shell-Detector
    mình không biết nó có chất lượng không. Vì check trang of mình thì nó không hiện shell nào, còn bên mình lại có. Các bạn kiểm tra xem sao :D
     
  15. minhthaobc

    minhthaobc Rất tích cực

    Bài viết:
    105
    Likes :
    12
    Bác nào biết phpshellloader là gì không? Em có một source web chuẩn SEO nhưng host phải hỗ trợ cái này mới dùng được.
     
  16. chiplegends

    chiplegends Mới tham gia

    Bài viết:
    24
    Likes :
    3
    cũng bị lỗi 188, các bạn làm theo như bạn này nhé, thay tất cả <? bằng <?php nhé.

    hoặc copy đoạn code sau ghi đè rồi lưu lại:

    Mã:
    <?php
    
    /*********************************************************
    - Tool Scan shell vesion 1.0
    - Code by KID
    - Edit by : www.joomlaviet.vn
    **********************************************************/
    error_reporting (E_ALL);    // Mở báo lỗi
    ini_set("memory_limit","2000M");
    ini_set("safe_mode","off");
    $safe_mode = @ini_get('safe_mode');
    if (!$safe_mode)
    set_time_limit(0);
    if (@!isset($_POST['key']))
    {
    ?>
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Scan Shell v1.1</title>
    <style>
    body { 
    font-family:arial;
    }
    </style>
    </head>
    <body bgcolor=black text=blue size=2><center>
    <form method='post' action=''>
    <div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
    <h1>Scan Shell - v1.1</h1> 
                     <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Folder: <input type='text' size=70 name='folder' value='<?php echo $_SERVER['DOCUMENT_ROOT']?>/'/></div>                  
                      &nbsp;<div>&nbsp; KeyWord:&nbsp; <input type='text' size=70 name='key' value='base64_decode'/></div>  
                      <p><input type='submit' name='submit' value='Tìm kiếm' /></p>  </div>
                     <div align=left><br>Step 1: Nhập đường dẫn thư mục cần scan</div>
                     <div align=left>Step 2: Nhập từ khóa cần tìm</div>
                </form>
    
    <br><br>
    ---------------------------------------------------------------------------------
    <br><br><i>Power By <a href="http://joomlaviet.vn"><font color=red>Joomla Việt</font></a><br>Copyright 2012<a href="http://diendan.joomlaviet.vn"><font color=yellow>Diễn Đàn Joomla Việt</font></a><br/> 
    <br>---------------------------------------------------------------------------------
    </center>
    
    </body>
    </html>
      <?php 
    }
    else
    {
    if ($_POST['folder']) $folder = $_POST['folder']; else $folder = $_SERVER['DOCUMENT_ROOT'];
    define('Keyword',$_POST['key']);                                    // Tìm kiếm từ khóa
    define('TAB',"&nbsp;&nbsp;&nbsp;&nbsp;");                       
    define('IGNORE_EXTENSIONS',"jpg pdf zip psd doc gif swf xls gz txt");    // Không tìm những file
    define("MAX_SIZE",1024*1024*1024);                                    // Size tối đa
    define("IGNORE_BEFORE", strtotime('2009-08-01') );                // Tìm File trước ngày
    $shell = $_SERVER["PHP_SELF"];
    
    function findexts($filename)
    {
        $filename = strtolower($filename) ;
        $exts = split("[/\\.]", $filename) ;
        $n = count($exts)-1;
        $exts = $exts[$n];
        return strtolower($exts);
    } 
    
    function check_dir($directory,$level) {
        global $virus_detected, $all, $detect_errors_only, $detected_Keyword_in_test_script;
    
        $indent='';
        for ($count=0;$count<$level;$count++) {
            $indent.=TAB;
        }
        $level++;
        $read_dir=opendir($directory);    // Mở thư mục hiện tại
        while ($file=readdir($read_dir)) {
            $filepath=$directory.'/'.$file;
            if ($detect_errors_only && $virus_detected) {
                exit;
            }
            if (is_dir($filepath)) {
                // Thư mục
                if ( ($file<>'.') && ($file<>'..') ) {
                    check_dir($filepath,$level);
                }
            }
            else {
                if (is_file($filepath)) {
                    // Tập
                    if ( (is_readable($filepath) )  &&  (!stristr(IGNORE_EXTENSIONS, findexts($file)))  ) {
                        if ((filesize($filepath)< MAX_SIZE) && (filemtime($filepath)>IGNORE_BEFORE) ){
                            $fileentry=$directory.'/'.$file.' - '.date('j F Y H:i',filemtime($filepath));
                            $filestring=file_get_contents($filepath);
                            $found=stripos($filestring,Keyword); // PHP 5 ONLY
                            $found=stristr($filestring,Keyword);flush();
                            if ($found==false) {
                                if ( (!$detect_errors_only) && (!$all) ) {
                                echo($filepath.'  <font color=#FFFFFF>OK</font><br/>');
                                }
                            }
                            else {
                                if ($file=='scan_file.php'){
                                    $detected_Keyword_in_test_script=true;
                                }
                                else {
                                    $virus_detected=true;
                                    if ($detect_errors_only) {
                                        echo('<b style="color:#F00">Tập tin đề nghị phát hiện</b><br/>');
                                    }
                                    else {
                                        echo(TAB.'<b style="color:#F00">'.$fileentry.'</b> - <b style="color:#FFFFF0">Phát hiện</b><br/>');
                                    }
                                } 
                            }
                            $found='';
                        }
                        else {
                            if ( (!$detect_errors_only) && (!$all) ) {
                                echo($filepath.'  <b style="color:yellow">NOT CHECKED - File quá lớn</b><br/>');
                            }
                        }
                    }
                    else {
                        if ( (!$detect_errors_only) && (!$all) ) {
                            echo($filepath.'  <b style="color:yellow">NOT CHECKED - Không thuộc kiểu tìm kiếm</b><br/>');
                        }
                    }
                }
                else {
                }
            }
        }   
        closedir($read_dir);
    } 
    
    $virus_detected=false;
    $all=true;
    $detect_errors_only=false;
    $detected_Keyword_in_test_script=false;
    if (isset($_GET['all'])) {
        $all=false;
    }
    if (isset($_GET['detect_errors_only'])) {
        $detect_errors_only=true;
    }
    
    echo<<<END1
    <html>
    <head>
    <title>Scan Shell v1.1</title>
    <style>
    body { 
    font-family:arial;
    }
    </style>
    </head>
    <body bgcolor=black text=blue size=2>
    END1;
    ?>
    <div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
    <h1>Truy xuất từ khóa "<?php echo Keyword?>" trong hệ thống !</h1>
    Bỏ qua lỗi file : <font color=yellow><?php echo IGNORE_EXTENSIONS?>.</font><br/>
    Bỏ qua file vượt quá : <font color=yellow><?php echo MAX_SIZE?> bytes.</font><br/>
    Tìm kiếm file trước ngày :<font color=yellow> <?php echo date('j F Y',IGNORE_BEFORE)?>.</font><br/><br></div>
    <br/><br>[<a href="<?php echo $shell?>?all">Hiển thị tất cả?</a>]
    <br/><br/>&nbsp;<br/>
    <?php 
    
    if ($all) {
        echo('<font color=yellow>List File</font><br/>');
    }
    check_dir($folder,0);
    
    
    
    if ($virus_detected) {
        echo('<br/><b style="color:#f00">Tìm kiếm thành công!</b><br>&nbsp;<br/>');
    }
    else {
    echo('<br/><b style="color:#f00">Không có file chứa Key Word!</b><br>&nbsp;<br/>');
    }
    
    ?>
    </body>
    </html>
    <?php 
    }
    ?>
    
     
    Last edited: 12/6/14
  17. chiplegends

    chiplegends Mới tham gia

    Bài viết:
    24
    Likes :
    3
    mình chạy được rồi, nhưng đến lúc nhấn tìm file thì nó báo lỗi dòng 75, 76 và 133 , hiện ra như thế này là sao vậy các bạn

    [​IMG]

    đã fix xong, quên sửa chỗ <?echo thành <?php echo
     
    Last edited: 12/6/14
  18. Viet NguyenHoang

    Viet NguyenHoang Mới tham gia

    Bài viết:
    21
    Likes :
    3
    vấn đề rất hay! Thanks.
     
  19. ngochoang

    ngochoang Mới tham gia

    Bài viết:
    1
    Likes :
    0
    có phải sửa gì trong localhost ko bác, mà sao ko chạy được nhỉ
     
  20. dvchuyenphat

    dvchuyenphat Mới tham gia

    Bài viết:
    4
    Likes :
    0
    Cái này tuyệt vời đó nhé
     
comments powered by Disqus
: scan, shell, tut

Chia sẻ trang này