Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/09/2014, 07:52
Integer78
 
Fecha de Ingreso: mayo-2003
Mensajes: 523
Antigüedad: 21 años
Puntos: 6
Respuesta: Sitio Web Hackeado

Muchísimas gracias por las respuestas. El sitio tiene un front para los usuarios y un back para las personas que lo administran. Nos han reemplazado tanto del index.php como el admin/index.php. En el front NO hay ningún upload de archivos pero sí en el back, pego el código del mismo:

Código PHP:
if($_FILES['img']['name']!=''){
        if(
is_uploaded_file($_FILES['img']['tmp_name'])){
            include (
'includes/class_redim2.php');
            
$ext explode('.',$_FILES['img']['name']);
            
$p count($ext)-1;
            
$archivo 'IMG_'.sprintf('%08d',$_POST['id']).'_'.time();
            
//------- [IMAGEN GRANDE] -------
            
$thumb = new Redim;
            
$thumb->ancho 720;
            
$thumb->archivo $_FILES['img']['tmp_name'];
            
$thumb->target '../graf/locales/';
            
$thumb->nomFinal $archivo.'_GR';
            
$img_gr $thumb->Crear();
            if(!
$img_gr){
                echo 
'(1) '.$thumb->ErrorInfo;die;
            }
            
chmod('../graf/locales/'.$img_gr,0777); 
Código del login del módulo administrativo:

Código PHP:
$SQL "SELECT id, nombre, email, usuario, niveles_id 
            FROM "
.PREF_TBL_SEGURIDAD."usuarios 
            WHERE usuario = "
.$usr." AND clave = ".$pass." AND estado = 'Y' AND niveles_id!='C';";
    
//die($SQL);
    
$rs mysql_query($SQL);
    
$f mysql_fetch_assoc($rs);
    
//Guardo el tipo de usuario
    
$_SESSION['tipo_usu']=$f['niveles_id'];
    
$num mysql_num_rows($rs);
    if(!
$f){
        
header('Location: '.$_SERVER['PHP_SELF'].'?e=1');exit();
    }
    if(
$num>1){
        
header('Location: '.$_SERVER['PHP_SELF'].'?e=2');exit();
    } 
Por último un insert a la base de datos:

Código PHP:
if(!mysql_query("INSERT INTO barrios (nombre_barrio,ciudades_id_ciudad,comentarios,activo,mostrar_en_front,orden) VALUES ('$otro_barrio','$ciudades_id_ciudad','','S','S',0)",$link))
        {            
            
$error=10;
            
$msj_error_barrio=mysql_error($link);
        }