-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsummary
190 lines (131 loc) · 6.93 KB
/
summary
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
**** PROYECTO AUROR ****
************************************************************************************************************************
Definiciones, acrónimos y Abreviaturas.
UC3M - Universidad Carlos III de Madrid
************************************************************************************************************************
El proyecto tiene como base la realización de un sistema de auditoría de seguridad para los clientes de aulas del
departamento de Ingeniería Telemática de la Universidad Carlos III de Madrid (UC3M), aunque el objetivo es que la
herramienta sea aplicable a diferentes sistemas Linux.
Servirá para pasar una serie de tests en bloque, de forma que sea posible conocer si el equipo al completo tiene un
funcionamiento correcto.
Entre otras cosas, se busca que verifique:
- que los dispositivos hardware (discos duros, tarjetas de prácticas...) estén en correcto estado
- que la clonación del equipo en cuestión es la correcta
- que la configuración de red es la correcta
************************************************************************************************************************
1. FUENTES
Como fuente principal he tomado la auditoría ya existente 'Lynis'. Este programa lleva a cabo una serie de tests
individuales, sirviendo cada uno de ellos para determinar el estado de seguridad del sistema.
Más o menos, los pasos que lleva a cabo son los siguientes:
1- Determinación del sistema operativo
2. Búsqueda de herramientas y utilidades disponibles
3. Verificación de si hay una actualización de Lynis disponible
4. Lanza los test de plugins
5. Lanza los distintos test de seguridad por categorías
6. Hace un reporte con los resultados del escáner de seguridad
7. Además de os datos mostrados en la pantalla, todos los detalles técnicos del escáner se guardan en un fichero.
Lynis está programado en Bash.
************************************************************************************************************************
2. NUESTRO PROYECTO
El objetivo es replicar el comportamiento de Lynis, pero orientado a un proceso de comprobación funcional del
sistema en general y no tanto desde el punto de vista de la seguridad en particular.
Desde el punto de vista de la implementación de la herramienta optamos por realizar el desarrollo en
Python. Utilizando Python pretendemos que el sistema sea más modular, portable, mantenible y versátil
respecto a Lynis.
************************************************************************************************************************
3. DESCRIPCIÓN DE LAS FUNCIONALIDADES DEL PROGRAMA ORIGEN
3.1 CONFIGURACIÓN
- No hay llamadas a funciones; sí hace llamadas a los distintos tests (son los INCLUDE)
- Lo primero que hace es la definición de una serie de variables; hay un INCLUDE para ello también (consts)
- Todo esto se llama dentro de un único fichero, un ejecutable: 'lynis'.
Este ejecutable contiene lo siguiente:
1.- CONFIGURATION OF INCLUDE PATHS AND FILES
- Test from which directoires we can use all functions and tests
- Test for database directory
- Import translations
- Auto detection of language based on locale. Set to English when nothing found
2.- Check user to determine file permissions later on. If we encounter Solaris, use related id binary instead
3.- BIN PATHS, TEXT STRING, COLORS
- Perform a basic check for permissions
-- Change ownership to root hear
4.- TRAPS
- Trap Cleanup ??
5.- PARAMETERS CHECKS
- Determinate if we are root
- Disble logging if no alternative was provided
6.- PROGRAM INFORMATION
- Current version
7.- INITIALIZE & DEFAULT SETTINGS
- Program name, program version
8.- PID : Check PID file, to avoid multiple instances running at the same time
- Decide where to write our PID file. For unprivileged users this will be in their home directory ,
or /tmp if their home direcotry is not set. For root it will be /var/run, or the current working directory
if /var/run does not exit.
- Quit directly for Cron Jobs : Quitting to prevent multiple cron jobs runnig at the same time
- Ensure symlinks attack is not possible, by confirming there is no symlink of the file already
- Create new PID file writable only by owner
9.- CHECK PROGRAM PARAMETERS
- Bail out if we did not get any parameter, or incorrect ones
------>>>> Menú
10.- OS DETECTION
- Check hostname
11.- CLEAR LOG & REPORT FILES
- Clear log file and test if it's writable
- Clear report file (to avoid appending an existing file
12.- READ PROFILE, SET CODE CHECKS, DEFINE LANGUAGE
- Define if we keep working in strict mode (development) ??
- Imported a different language when configured
- Pre-execution tests
13.- PLUGINS
- Plugin directory test
- DRop out if our pluging directory can not be found
14.- SHOW PROGRAM INFORMATION TO DISPLAY
------>>>> Menú
15.- CHECK FOR PROGRAM UPDATE (and friendly force to upgrade)
- Test for older releases , whithout testing via update mechanism
- Show on script message if released is very outdated
------>>>> Menú
16.- CHECK WHICH BINARIES ARE AVAILABLE TO THE SCANNING PROCESS
17.- HARDWARE DETECTIONS CAPABILITIES
- Is virtual Machine
- Is container
- Is notebook
18.- CHECK FOR systemd PRESENCE
19.- VERBOSE
20.- PLUGINGS
21.- GET HOST ID
22.- TESTs SECTION
23.- RUN HELPERS
24.- RUN PHASE 2 OF PLUGINGS
25.- SHOW TEST RESULTS OVERVIEW
- Store total performed tests
- Show report
- Show tool tips
- Upload data
- Clean exit
3.2 TESTS (INCLUDES)
* ACCOUNTING -> Check availability FreeBSD accounting data
* AUTHENTICATION -> User, Group and authentication tests. Check users with UID
* BANNERS -> Banners and identification. Check FreeBSD COPYRIGHT banner file
* BOOT & SERVICES -> Check for AIX boot device
* CONTATINERS -> Query running Solaris zones
* CRYPTOGRAPHY -> Check for expired SSL certificates
* CUSTOM.TEMPLATE -> Some linesare shown in the screen
3.3 BASE DE DATOS
PostgreSQL
3.4 TIPOS DE USUARIOS
Super Users
Normal Users
Functional Users
4. Descripción funcional de Auror.
4.1 Inicialización
4.1.1 Configuración
4.1.2 Base de datos
4.1.2 Comprobación
4.2 Identificar objetivo: sistema sobre el que se realizara comprobación
4.3 Cargar plugins y comprobación de los mismos
4.4 Aplicar pruebas
4.5 Redactar informe.
4.6 Presentar informe.
5. Referencias
[1] Lynis - https://cisofy.com/lynis/