Publicado el 14 de Enero del 2017
976 visualizaciones desde el 14 de Enero del 2017
2,6 MB
498 paginas
Creado hace 22a (29/05/2002)
SEGURIDAD EN UNIX Y REDES
Versión 2.0
Antonio Villalón Huerta
Mayo, 2002
ii
i
Copyright c 2000,2002 by Antonio Villalón Huerta. This material
may be distributed only subject to the terms and conditions set forth
in the Open Publication License, v1.0 or later (the latest version is
presently available at http://www.opencontent.org/openpub/). Dis-
tribution of substantively modified versions of this document is pro-
hibited without the explicit permission of the copyright holder. Dis-
tribution of the work or derivative of the work in any standard
(paper) book form is prohibited unless prior permission is obtained
from the copyright holder.
ii
Índice General
Notas del autor
1 Introducción y conceptos previos
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1
1.2 Justificación y objetivos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
¿Qué es seguridad? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3
¿Qué queremos proteger? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4
1.5
¿De qué nos queremos proteger?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.1 Personas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.2 Amenazas lógicas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.3 Catástrofes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
¿Cómo nos podemos proteger? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.7.1 Redes de I+D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.7.2 Empresas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.7.3
ISPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
¿Seguridad en Unix? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.6
1.7 Redes ‘normales’
1.8
I Seguridad del entorno de operaciones
2 Seguridad física de los sistemas
2.1
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Protección del hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Acceso físico . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 Desastres naturales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3 Desastres del entorno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Protección de los datos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1 Eavesdropping
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.2 Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.3 Otros elementos
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Radiaciones electromagnéticas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Administradores, usuarios y personal
3.1
3.2 Ataques potenciales
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ingeniería social
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1
3.2.2
Shoulder Surfing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.3 Masquerading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.4 Basureo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.5 Actos delictivos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3
¿Qué hacer ante estos problemas? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 El atacante interno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
1
1
1
2
2
3
4
5
7
9
10
12
13
14
15
16
19
21
21
22
22
24
26
29
29
30
31
32
35
35
35
35
36
37
38
38
40
41
iv
II Seguridad del sistema
4 El sistema de ficheros
ÍNDICE GENERAL
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1
4.2 Sistemas de ficheros
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Permisos de un archivo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4 Los bits suid, sgid y sticky . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5 Atributos de un archivo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 Listas de control de acceso: ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.7 Recuperación de datos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8 Almacenamiento seguro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8.1 La orden crypt(1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8.2 PGP: Pretty Good Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8.3 TCFS: Transparent Cryptographic File System . . . . . . . . . . . . . . . . .
4.8.4 Otros métodos de almacenamiento seguro . . . . . . . . . . . . . . . . . . . .
5 Programas seguros, inseguros y nocivos
5.1
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 La base fiable de cómputo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Errores en los programas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3.1 Buffer overflows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3.2 Condiciones de carrera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4 Fauna y otras amenazas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.1 Virus
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.2 Gusanos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.3 Conejos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.4 Caballos de Troya . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.5 Applets hostiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.6 Bombas lógicas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.7 Canales ocultos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.8 Puertas traseras
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Superzapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.9
5.4.10 Programas salami
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 Programación segura . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Auditoría del sistema
6.1
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 El sistema de log en Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3 El demonio syslogd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Algunos archivos de log
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.1
syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.2
messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.3
wtmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.4
utmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.5
lastlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.6
faillog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.7
loginlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.8
btmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.9
sulog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.10 debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.5 Logs remotos
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.6 Registros físicos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
47
47
48
50
53
56
58
61
62
62
62
64
64
67
67
68
68
69
70
71
72
73
74
74
76
77
77
78
79
79
80
87
87
87
88
91
92
92
93
94
94
94
95
95
95
96
96
98
ÍNDICE GENERAL
v
7 Copias de seguridad
101
7.1
Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
7.2 Dispositivos de almacenamiento . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.3 Algunas órdenes para realizar copias de seguridad . . . . . . . . . . . . . . . . . . . . 105
7.3.1
dump/restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
7.3.2 La orden tar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.3.3 La orden cpio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.3.4 Backups sobre CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
7.4 Políticas de copias de seguridad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8 Autenticación de usuarios
117
8.1
Introducción y conceptos básicos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.2 Sistemas basados en algo conocido: contraseñas . . . . . . . . . . . . . . . . . . . . . 118
8.3 Sistemas basados en algo poseído: tarjetas inteligentes . . . . . . . . . . . . . . . . . 118
8.4 Sistemas de autenticación biométrica . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.4.1 Verificación de voz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8.4.2 Verificación de escritura . . . . . . . .
Comentarios de: Seguridad en Unix y Redes - Versión 2.0 (0)
No hay comentarios