Nmap Development mailing list archives

Re: Error in http.lua's chunked encoding


From: Ron <ron () skullsecurity net>
Date: Thu, 20 Aug 2009 11:29:30 -0500

So, I tracked down another issue in http.lua that I'm pretty sure is related. The error lies in the splitResults() function, and is caused by servers (like the one I found) that don't put a newline after the body. The results I get back look like this:

--
HTTP/1.1 401 Authorization Required
Date: Thu, 20 Aug 2009 16:19:11 GMT
Server: Apache
WWW-Authenticate: Basic realm=""
Content-Length: 74
Keep-Alive: timeout=15, max=3
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

<h1>Authorization Required</h1>Please enter a valid username and
password.HTTP/1.1 401 Authorization Required
Date: Thu, 20 Aug 2009 16:19:11 GMT
Server: Apache
WWW-Authenticate: Basic realm=""
Content-Length: 74
Keep-Alive: timeout=15, max=2
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
--

Note how the body of the first request touches the status of the second. splitResults() relies on newlines to delimit everything, and it doesn't work in this case.

I believe this is related to the same bug we were talking about -- the fact that it's splitting on a pattern, not using the content-length. I expect this will fix itself when the other patch is applied, but I wanted to make sure.

Ron


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: