Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 25 guests and 1 member online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Web Applicationsarrow Web Server allowing the HTTP PUT Method
EH-Net
May 25, 2013, 01:42:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Web Server allowing the HTTP PUT Method  (Read 4434 times)
0 Members and 1 Guest are viewing this topic.
tyr3ll
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: July 03, 2012, 10:30:34 AM »

Hello!
As everyone knows the PUT Method can be a concern when allowed on webservers.
I've been through some tests which raise questions i'd like to submit here:

Using the OPTIONS method, we ask the server what methods are allowed
for the root path '/' :
hey@nix:~/# echo -e "OPTIONS / HTTP/1.0\n" | nc -v server 80

HTTP/1.0 200 OK
Date: Tue, 03 Jul 2012 13:06:15 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.9
Content-Length: 0
Allow: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, TRACE

Great, the apache server says PUT is allowed for '/'.
Now, we know there are the following directories on the server:
/c/
/manual/
/icons/

Issuing the OPTIONS method again on the '/c/' directory give us:
hey@nix:~/# echo -e "OPTIONS /c/ HTTP/1.0\n" | nc -v server 80

HTTP/1.0 200 OK
Date: Tue, 03 Jul 2012 13:16:55 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.9
Content-Length: 0
Allow: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, TRACE

The very same results as for the '/' root directoy: PUT is ALLOWED.
Now, the '/manual/ directory says the same.
However for the '/icons/' dir, the server answers that only GET, HEAD, OPTIONS, TRACE
are allowed.

Well, trying to use the PUT Method to upload a .txt file to the root folder or to '/manual/'
get a negative response:
"405 Method Not Allowed
The requested method PUT is not allowed for the URL /manual/test.txt."

Of Course the directory i'm trying to upload something to should also be writable
for the PUT to succeed, but why then the HTTP response is telling us that PUT is not allowed?

More important, why some directories replies that PUT is allowed and some dont?



Logged
zeroflaw
Full Member
***
Offline Offline

Posts: 208



View Profile
« Reply #1 on: July 04, 2012, 01:29:18 PM »

Hmm not sure. Well, I guess the permissions are set differently for those directories. To be honest I don't know why the PUT command isn't working, but I'm guessing it has something to do with the server configuration. Maybe the PUT method is allowed, but not implemented or mapped to the correct handler.

You could just search on google about the 405 error code in relation to the PUT method. Also look for some info about WebDav. Someone else might have a better answer Tongue
Logged

ZF
tyr3ll
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: July 05, 2012, 04:31:21 AM »

Thanks for your reply ZF.
your guessing sounds logical (something wrong on server side config or implementation),
cause if the PUT method is correctly handled by the server, i should get a "403 Forbidden" or "401 Unauthorized" which would indicate a write permissions issue on the remote folder.

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.06 seconds with 22 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Free Business and Tech Magazines and eBooks

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.