Herramientas de usuario

Herramientas del sitio


notas:seguridad

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Última revisiónAmbos lados, revisión siguiente
notas:seguridad [2014/06/03 14:05] – [Seguridad] cayunotas:seguridad [2015/01/21 20:25] – [Seguridad] cayu
Línea 1: Línea 1:
 ====== Seguridad ====== ====== Seguridad ======
- +  * [[notas:seguridad:Pequeña guía de seguridad informática]] 
-Notas cortas de seguridad e inseguridad informática que me sirvieron en mi trabajo +===== Notas ===== 
 +Notas cortas de seguridad e inseguridad informática que me sirvieron en mi trabajo y algunos aspectos legales. 
 +=== Linux Auditd ===
   * [[notas:seguridad:Auditd]]   * [[notas:seguridad:Auditd]]
   * [[notas:seguridad:Process Accounting (PSACCT)]]   * [[notas:seguridad:Process Accounting (PSACCT)]]
- +=== Legales === 
 +  * [[http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/64790/texact.htm|Ley 25.326 - PROTECCION DE LOS DATOS PERSONALES]] 
 +  * [[http://www.infoleg.gov.ar/infolegInternet/anexos/140000-144999/141790/norma.htm|Ley 26.388 - CODIGO PENAL Modificación]]
 === Exploits === === Exploits ===
- +Exploits útiles cuando vas a un lugar donde no saben el password de root
-Exploits útiles cuando vas a un lugar donde no se acuerdan el password de root+
  
 {{:notas:seguridad:jessica_biel_naked_in_my_bed.c.gz|}} Linux vmsplice Local Root Exploit - Linux 2.6.17 - 2.6.24.1 {{:notas:seguridad:jessica_biel_naked_in_my_bed.c.gz|}} Linux vmsplice Local Root Exploit - Linux 2.6.17 - 2.6.24.1
Línea 18: Línea 19:
  
 {{:notas:seguridad:pty.c.gz|}} CVE-2014-0196 DOS PoC [Written May 5th, 2014] {{:notas:seguridad:pty.c.gz|}} CVE-2014-0196 DOS PoC [Written May 5th, 2014]
 +
 +{{:notas:seguridad:58137_2.c.gz|}} [[http://www.securityfocus.com/bid/58137|Linux Kernel CVE-2013-1763 Local Privilege Escalation Vulnerability]]
  
 === Bombas lógicas === === Bombas lógicas ===
- 
   * [[notas:seguridad:Understanding Bash fork() bomb]]   * [[notas:seguridad:Understanding Bash fork() bomb]]
- +  [[notas:seguridad:How to: Prevent a fork bomb by limiting user process]] 
-===== How to: Prevent a fork bomb by limiting user process ===== +==== Prevenir fingerprints ====
- +
-Limiting user processes is important for running a stable system. To limit user process just add user name or group or all users to **/etc/security/limits.conf** file and impose process limitations. +
- +
- +
-==== Understanding /etc/security/limits.conf file ==== +
- +
- +
-Each line describes a limit for a user in the form: +
-<domain> <type> <item> <value> +
-Where: +
- +
- +
-  * **domain** can be: +
-    * an user name +
-    * a group name, with @group syntax +
-    * the wildcard *, for default entry +
-    * the wildcard %, can be also used with %group syntax, for maxlogin limit +
-  * **type** can have the two values: +
-    * "soft" for enforcing the soft limits +
-    * "hard" for enforcing hard limits +
-  * **item** can be one of the following: +
-    * core - limits the core file size (KB) +
-  * **value** can be one of the following: +
-    * core - limits the core file size (KB) +
-    * data - max data size (KB) +
-    * fsize - maximum filesize (KB) +
-    * memlock - max locked-in-memory address space (KB) +
-    * nofile - max number of open files +
-    * rss - max resident set size (KB) +
-    * stack - max stack size (KB) +
-    * cpu - max CPU time (MIN) +
-    * **nproc - max number of processes** +
-    * as - address space limit +
-    * maxlogins - max number of logins for this user +
-    * maxsyslogins - max number of logins on the system +
-    * priority - the priority to run user process with +
-    * locks - max number of file locks the user can hold +
-    * sigpending - max number of pending signals +
-    * msgqueue - max memory used by POSIX message queues (bytes) +
-    * nice - max nice priority allowed to raise to +
-    * rtprio - max realtime priority +
-    * chroot - change root to directory (Debian-specific) +
- +
-Login as the root and open configuration file: +
- +
-<code> +
-# vi /etc/security/limits.conf +
-</code> +
- +
-Following will prevent "fork bomb": +
- +
-<code> +
-vivek hard nproc 300 +
-@student hard nproc 50 +
-@faculty soft nproc 100 +
-@pusers hard nproc 200 +
-</code> +
- +
-Above will prevent anyone in the student group from having more than 50 processes, faculty and pusers group limit is set to 100 and 200. Vivek can create only 300 process. Please note that KDE and Gnome desktop system can launch many process. +
- +
-Save and close the file. Test your new system by dropping a form bomb: +
- +
-<code> +
-$ :(){ :|:& };: +
-</code> +
- +
-==== Fuente ==== +
- +
-http://www.cyberciti.biz/tips/linux-limiting-user-process.html +
- +
- +
-===== Prevenir fingerprints ====+
 Como ayudar a que los fingerprint que realizen nuestros atacantes sean un poco menos exactos, configurar las sysctl de nuestro sistema de la siguiente manera: Como ayudar a que los fingerprint que realizen nuestros atacantes sean un poco menos exactos, configurar las sysctl de nuestro sistema de la siguiente manera:
  
Línea 118: Línea 47:
 net.ipv4.conf.default.log_martians = 1 net.ipv4.conf.default.log_martians = 1
 </code> </code>
- +==== Conocer que procesos bloquean tal cosa ====
- +
-===== Conocer que procesos bloquean tal cosa ====+
 <code> <code>
 Uso: fuser [-fMuv] [-a|-s] [-4|-6] [-c|-m|-n ESPACIO] [-k [-i] [-SIGNAL]] NOMBRE... Uso: fuser [-fMuv] [-a|-s] [-4|-6] [-c|-m|-n ESPACIO] [-k [-i] [-SIGNAL]] NOMBRE...
Línea 167: Línea 93:
 80/tcp:              17233 17652 17870 18252 18779 19234 19484 19547 19621 19679 32454 80/tcp:              17233 17652 17870 18252 18779 19234 19484 19547 19621 19679 32454
 </code> </code>
- 
- 
  
 Referencia útil como ver procesos escondidos: http://www.cyberciti.biz/tips/linux-unix-windows-find-hidden-processes-tcp-udp-ports.html Referencia útil como ver procesos escondidos: http://www.cyberciti.biz/tips/linux-unix-windows-find-hidden-processes-tcp-udp-ports.html