Título: Ejemplo hacking metodo put http Publicado por: delorean en 11 Febrero 2011, 18:31 pm Hola, estoy realizando una auditoría de un servidor que tiene habilitado el metodo HTTP/1.1 PUT:
# nc -vv www.prueba.com 80 Warning: inverse host lookup failed for 192.168.0.1: Unknown server error : Connection timed out www.prueba.com [192.168.0.1] 80 (www) open OPTIONS / HTTP/1.1 Host: www.prueba.com HTTP/1.1 200 OK Date: Fri, 11 Feb 2011 13:09:11 GMT Server: DCache Set-Cookie: partnerId=0; path=/; domain=www.prueba.com X-Server: DCache X-Server: DCache Ruid: TVVt1UAAHRzxh0AAHBt Content-Length: 0 Accept-Ranges: none DAV: 1,2 Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK Cache-Control: max-age=1799 X-Cache: MISS from dc4408 X-Cache: MISS from dc3002 Content-Type: text/html Set-Cookie: partnerId=0; path=/; domain=www.prueba.com Vary: Accept-Encoding RequestUID: TVVtLAocQ1UAAHRzxh0 Connection: close sent 49, rcvd 632 Intentamos subir un fichero de prueba con curl -T curl -T prueba.html www.prueba.com/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 21 0 0 0 21 0 0 --:--:-- 0:01:10 --:--:-- 0<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>417 Expectation Failed</title> </head><body> <h1>Expectation Failed</h1> <p>The expectation given in the Expect request-header field could not be met by this server. The client sent<pre> Expect: 100-continue </pre> </p><p>Only the 100-continue expectation is supported.</p> <hr> <address>Apache Server at www.prueba.com Port 8000</address> </body></html> 100 458 100 437 0 21 6 0 0:01:12 0:01:10 0:00:02 103 Ejecutamos curl con -H Expect: para evitar el Expect header curl -H Expect: -T prueba.html www.prueba.com/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 21 0 0 0 21 0 67 --:--:-- --:--:-- --:--:-- 67<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <head> <title>Página no encontrada en www.prueba.com</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="verify-v1" content="FqcgjL5h8dgrbiiQ+/dpZwLmQCiiPDfE1GKu=" /> <meta name="keywords" content="prueba.com , Página no encontrada" /> <meta http-equiv="refresh" content="300; URL = http://www.prueba.com/" /> <meta http-equiv="content-language" content="es" /> <meta name="robots" content="noindex, follow" /> <link href="/vvc/www.prueba.com/img/400_style.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <script type="text/javascript"> s_account="prueba"; s_pageName="400 error"; s_channel="Error Page"; </script> <script type="text/javascript" src="/dch/www.prueba.com/s_code_remote.js"></script> </head> No hay manera de subir el fichero aun teniendo el método PUT activado, alguien sabe por que podría ser ?¿? Título: Re: Ejemplo hacking metodo put http Publicado por: ~ Yoya ~ en 14 Febrero 2011, 18:53 pm Error HTTP 417 Expectation failed (Falló expectativa) (http://www.checkupdown.com/status/E417_es.html)
Título: Re: Ejemplo hacking metodo put http Publicado por: delorean en 19 Febrero 2011, 19:01 pm Hola,
Gracias por la respuesta.Se supone que el 417 del Expectation no es el problema, si te fijas mas abajo en mi post, se soluciona con el curl pasandole el -H Expect: pero aún pasando del Expect sigue sin poder subirse el fichero y no acabo de entender el por que :( |