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

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
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 ... 31
101  Programación / Desarrollo Web / Re: wenas tengo un hosting y estoy intentando protegerlo con .htaccess en: 8 Enero 2014, 20:07 pm
que os parece ahora, decirme algo xk no se programar un .htaccess algun manual completisimo y que te explique las lineas:

Código:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^https://tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^https://www.tecasoft.com [NC]
RewriteRule .*\.(gif|jpg|png|js)$ - [NC,F]


# Evitar escaneos y cualquier intento de manipulación malintencionada
# de la URL. Con esta regla es casi imposible lanzar ataques de inyección (SQL, XSS, etc)
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC,OR]

## Denegar el acceso a robots dañinos, browsers offline, etc
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule .* - [F]

##redireccionar a los robots a otra web
#RewriteRule ^.*$ http://www.google.es [R,L]
102  Programación / Desarrollo Web / las siguientes lineas me las podeis explicar >protegerlo con .htaccess en: 6 Enero 2014, 23:52 pm
alguien que sepa sobre ataques ddos o xss, etc. Ya se que para que no te hagan ningun ataque es programarlo todo perfecto pero de hay a llegar a proteger ataques ddos a mi hosting profesional va un trecho si me hace un poco raro todo este codigo hay cosas que entiendo pero otras no le veo la pizca de sentido como hacer mi propio .htaccess, quiero sobre todo sobre ATAQUES DDOS si teneis los conocimientos suficientes tengo algo como esto:

.htaccess

Código:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^https://tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^http://www.tecasoft.com [NC]
RewriteCond %{HTTP_REFERER} !^https://www.tecasoft.com [NC]
RewriteRule .*\.(gif|jpg|png|js)$ - [NC,F]


# Evitar escaneos y cualquier intento de manipulación malintencionada
# de la URL. Con esta regla es casi imposible lanzar ataques de inyección (SQL, XSS, etc)
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC,OR]

## Denegar el acceso a robots dañinos, browsers offline, etc
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR]
RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR]
RewriteCond %{HTTP_USER_AGENT} ^attach [OR]
RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
##redireccionar a los robots a otra web
RewriteRule ^.*$ http://www.google.es [R,L]
103  Sistemas Operativos / GNU/Linux / Re: como instalar la interfaz grafica en mysql en es debian 7 whezzy en: 20 Septiembre 2013, 17:54 pm
la estoy observando mysql-workbench y parece un poco chunga la interfaz y mas sino esta en español, se puede conseguir en español de algun modo o no esta disponible aun¿?


a la larga es bueno para administrar el mysql server, etc, rendimiento y eso tambien¿?
104  Sistemas Operativos / GNU/Linux / Re: como instalar la interfaz grafica en mysql en es debian 7 whezzy en: 20 Septiembre 2013, 00:47 am
y que no sea phpmyadmin, que sea como antes:

con el mysql-administrator y mysql-query-browser alguno parecido¿?

y porque no las han agregado a whezzy¿?

Gracias
105  Sistemas Operativos / GNU/Linux / como instalar la interfaz grafica en mysql en es debian 7 whezzy en: 19 Septiembre 2013, 18:25 pm
puedo instalar el mysql-server y el mysql-client pero no en los repositorios de 32 bits no me sale la interfaz grafica, por ejemplo:

apt-get install mysql-query-browser

dice que no lo encuentra y los repositorios estan bien, puede ser xk es la plataforma de 32bits, os lo agradezco de antemano.
106  Programación / PHP / Re: komo se hacen tokens por sesion para hacer mas dificil el falsificar peticiones en: 14 Mayo 2013, 22:27 pm
http://www.php.net/manual/es/function.session-set-cookie-params.php en el php.ini me marca 1440 es decir 24 minutos pero lo he probado y tarda unos 30 o 40 minutos eso xk es?



ha quedado asi y funciona a la perfeccion el ejemplo,gracias x la colaboracion:

Código
  1. <?php
  2. // Generar un sha1 aleatorio.
  3. $token = sha1(rand(0,999).rand(999,9999).rand(1,300));
  4. $_SESSION['token'] = $token;
  5.  
  6. ?>
  7. <!doctype html>
  8. <html>
  9. <head>
  10. <meta charset="utf-8">
  11. <title>PoC</title>
  12. </head>
  13. <body>
  14.    <form action="post.php" method="POST">
  15.        <input type="text" name="usuario" />
  16.        <input type="password" name="password" />
  17.        <input type="hidden" name="token" value="<?php echo $token; ?>" />
  18.        <input type="submit" value="Enviar" />
  19.    </form>
  20. </body>
  21. </html>
  22.  

Código
  1. <?php
  2.  
  3.  
  4. if(empty($_SESSION['token']) || empty($_POST['token']) || !preg_match('/[0-9a-f]/',substr($_POST['token'],0,40)) || $_SESSION['token']!==$_POST['token'] || $_SERVER['HTTP_REFERER'] !== "http://192.168.1.2/prueba/tokens_referer/enviar.php")
  5. {
  6.   echo 'Los tokens o el referer no son correctos.';
  7. }
  8. else
  9. {
  10. echo 'Tu consulta ha sido realizada';
  11. echo "<br>";
  12. echo $_SERVER['HTTP_REFERER'];
  13. }
  14. ?>
  15.  

Mod: No hacer doble post.
107  Programación / PHP / Re: komo se hacen tokens por sesion para hacer mas dificil el falsificar peticiones en: 14 Mayo 2013, 20:05 pm
pues hay un pequeño problema en el campo del formulario al crear el $_SESSION caduca la session al cabo de 30 o 40 min y me da error,envede consulta con exito,me caduca la session entonces tendre que hacerlo con un $_SERVER['HTTP_REFERER'], x lo visto se me soluciona con el referer,veis algun inconveniente que utilice el referer solo?


Edito: donde supuestamente esta el formulario, es donde va un editor web(para que los usuarios metan javascript,html,pero lo k yo kiera,es decir un wysiwyg) pasaria algo con un XSS que me puedan secuestrar cookies propias o de algun user,estando desde el editor web,repito hago yo lo k kiera cuando lo introduzcan* en formato web* NO en html puro codigo*, perdonar si me explicado mal
108  Programación / PHP / Re: komo se hacen tokens por sesion para hacer mas dificil el falsificar peticiones en: 12 Mayo 2013, 00:24 am
os mereceis un  ;-)
ahora por cierto el $_POST['token'] no seria mejor antes pasarle un antiddos(la longitud del campo con un length) o tambien pasarle un anti code injection(filtrar lista blanca con numeros y letras)

es que podria ser que puedan cambiar algo en el codigo y ejecutarlo de forma malintencionada no? vosotros veis esas posibilidades?
109  Programación / PHP / Re: komo se hacen tokens por sesion para hacer mas dificil el falsificar peticiones en: 6 Mayo 2013, 23:24 pm
a vale ya voy entendiendo algo, dices,que la cookie la guardara y es la misma que en el otro caso, es decir podria navegar no? y que se podria hacer con esa cookie? con ejemplo me entiendo mejor, ya sabes cosas de la informatica



me podriais responder,eske ando atascado en esto de los tokens, me podeis poner algun ejemplo,os lo agradeceria bastante,gracias.

Mod: No hacer doble post.
110  Programación / PHP / Re: komo se hacen tokens por sesion para hacer mas dificil el falsificar peticiones en: 6 Mayo 2013, 22:38 pm
pero si yo mando 123 x $_SESSION y en la otra web esta apuntado 123 y compara si es verdad o no, debe ser imposible hacer peticiones desde el exterior con un formulario no?yo lo entiendo asi
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 ... 31
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines