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 30 guests and 1 member online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Web Applicationsarrow How to find the various http methods supported by a web-server MANUALLY ?
EH-Net
May 26, 2013, 01:44: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: How to find the various http methods supported by a web-server MANUALLY ?  (Read 8567 times)
0 Members and 1 Guest are viewing this topic.
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« on: August 21, 2011, 11:41:34 PM »

I have been reading some Interesting articles regarding hacking the servers with HTTP methods..

I found it interesting,

As far as to my knowledge i had heard there were only 8 http methods ,

but after reading this page  (pardon me i am beginner to this web-sec Smiley )

Code:
https://www.owasp.org/index.php/Testing_for_HTTP_Methods_and_XST_%28OWASP-CM-008%29


I found it really interesting,they had mentioned about the usage of arbitrary http methods ,so it made interested ,

here are my questions:

1) how can i MANUALLY find , what are the http methods are being supported by a web-server?
I tried net catting to the ports on some sites,but i didnt got the list of methods being supported by the web-servers .

how can i find this manually? because i do know that tools like accunteix and some other tools can do it,but i do want to do it manually so that i can get some knowledge about how it is being done ?

2)can you guys please explain me from your experience about
Arbitrary HTTP Methods ,i tought there were only 8 methods in http.i never heard about these,so i tought it would be nice to ask you guys..

3)is it possible to compromise a web-server with a UNKNOWN HTTP method or using a HTTP method other than the 8 traditional methods ?

4)first how a web-server supports the usage of a http methods other than the specified 8 methods in the rfc ?can any 1 explain me ?

5)Also i would like to know,how a web-site is explicitly checking for GET or POST methods?

Also how can we identify this manually?


Sorry guys,i think i had asked too much of questions,but as i don't have deep knowledge about these things,i tought it would be better to ask here, hope my doubts will be get cleared...
Logged
lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #1 on: August 22, 2011, 01:21:57 AM »

#1 can be found in the black box testing and example section of the link you posted.  The OPTIONS method will need to be enabled on the server for it to reply back with the methods that are enabled.
« Last Edit: August 22, 2011, 01:24:34 AM by lorddicranius » Logged

GSEC, eCPPT, Sec+
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« Reply #2 on: August 22, 2011, 02:33:55 AM »

Code:
#1 can be found in the black box testing and example section of the link you posted.  The OPTIONS method will need to be enabled on the server for it to reply back with the methods that are enabled.

I tried net catting to the ports on some sites,but i didnt got the list of methods being supported by the web-servers ,
also it seems like you said it seems OPTIONS method are disabled on those servers,Also i had seen in some tools like accunteix are displaying what kind of methods are enabled/supported  on a web-server ,how can we find this manually sir ?

still looking for answers  Smiley
Logged
lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #3 on: August 22, 2011, 09:51:12 AM »

I've never used Accunetix before, but it may be the result of crawling the website and logging HTTP methods found in the headers.  I've never used Accunetix before, but with Burp Suite I can filter down my results to parameterised requests and it'll show me the various HTTP methods used while crawling a website.

**Sidenote: I'm still new to web app security, something I'm actively studying Smiley
Logged

GSEC, eCPPT, Sec+
mambru
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« Reply #4 on: August 22, 2011, 10:44:32 AM »

Code:
how can i find this manually? because i do know that tools like accunteix and some other tools can do it,but i do want to do it manually so that i can get some knowledge about how it is being done ?

If you know that Accunetix (or any other web vulnerability scanner) does it, why don't you capture the traffic or use a proxy to see all the request the tool is doing so you can learn how it works? This is a great way to learn.

Code:
is it possible to compromise a web-server with a UNKNOWN HTTP method or using a HTTP method other than the 8 traditional methods ?

Unless there is a backdoor that is activated through that unknown method, no. Pen Testing is not magic.

Code:
first how a web-server supports the usage of a http methods other than the specified 8 methods in the rfc ?can any 1 explain me ?

Vendors understand and implement RFCs in different ways.
Logged
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« Reply #5 on: August 22, 2011, 11:13:27 AM »



Code:
  I've never used Accunetix before, but with Burp Suite I can filter down my results to parameterised requests and it'll show me the various HTTP methods used while crawling a website.

may be this is the one i need to try,but i dont know it would be possible to do it on a larger sites ?


Code:
**Sidenote: I'm still new to web app security, something I'm actively studying Smiley

well cheers ,join me Smiley

Logged
lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #6 on: August 22, 2011, 11:45:16 AM »

may be this is the one i need to try,but i dont know it would be possible to do it on a larger sites ?

As far as I know, the spider portion of Burp works no matter how large the site.  It may take longer to crawl, but it'll still work.  Here's how the spider portion of Burp works: http://portswigger.net/burp/spider.html
Logged

GSEC, eCPPT, Sec+
j0rDy
Hero Member
*****
Offline Offline

Posts: 590


View Profile
« Reply #7 on: August 23, 2011, 07:50:20 AM »

a small tutorial because i have some (rare) spare time:

first we pick a target: 74.208.46.66 (resolve it for a small lol)

we telnet to the port that is used by the webserver (in this case 80):
Code:
Trying 74.208.46.66...
Connected to 74.208.46.66.
Escape character is '^]'.
We type the following:

Code:
HEAD / HTTP/1.0
After hitting enter two times we receive the reply:

Code:
HTTP/1.1 200 OK
Date: Tue, 23 Aug 2011 12:46:32 GMT
Server: Apache
Last-Modified: Sun, 06 May 2007 07:41:03 GMT
ETag: "300000c4-1909-463d868f"
Accept-Ranges: bytes
Content-Length: 6409
Connection: close
Content-Type: text/html

Connection closed by foreign host.

Now we know its a webserver that is active (doh) and we check what options are available by connecting again and executing the options method:

Code:
OPTIONS / HTTP/1.0

We receive the following output:

Code:
HTTP/1.1 200 OK
Date: Tue, 23 Aug 2011 12:48:40 GMT
Server: Apache
Content-Length: 0
Allow: GET, HEAD, OPTIONS
Connection: close

Now we see the allowed methods by the server. Some to look for are trace and put (which indicates that there might be a webdav service active, which can be...well...handy Wink

Goodluck!


Logged

ISC2 Associate, CEH, ECSA, OSCP, OSWP

earning my stripes appears to be a road i must travel alone...with a little help of EH.net
MaXe
Hero Member
*****
Offline Offline

Posts: 669


I've just upgraded myself to a cyborg muahahaa!!1


View Profile WWW
« Reply #8 on: August 23, 2011, 05:26:12 PM »

You can also use these tools to play with:
HTTP Options: http://attacks.intern0t.net/htopt/
TRACE: http://attacks.intern0t.net/xstrace/


In short, "htopt" simply sends the "OPTIONS" header for you, and keep in mind that not all servers includes this feature (request / function) for an unknown reason.

The "xstrace" program / tool, acts as a proxy between you and the target, so you can perform TRACE requests and see the result without an intercepting proxy or another tool.
Logged

I'm an InterN0T'er
Grendel
Full Member
***
Offline Offline

Posts: 242


View Profile WWW
« Reply #9 on: August 23, 2011, 07:20:37 PM »

Keep in mind, also, that the OPTION header can lie. I never trust its output and always verify things manually. I've been lied to too many times to count. Just wanted to add that tidbit.
Logged

- Thomas Wilhelm, MSCS MSM
ISSMP CISSP SCSECA SCNA IEM

Web Site:
Author:
  • Professional Penetration Testing
  • Ninja Hacking
  • Penetration Tester's Open Source Toolkit
  • Metasploit Toolkit for Penetration Testing
  • Netcat Power Tools
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« Reply #10 on: August 23, 2011, 07:48:07 PM »

Code:
You can also use these tools to play with:
HTTP Options: http://attacks.intern0t.net/htopt/
TRACE: http://attacks.intern0t.net/xstrace/


In short, "htopt" simply sends the "OPTIONS" header for you, and keep in mind that not all servers includes this feature (request / function) for an unknown reason.

The "xstrace" program / tool, acts as a proxy between you and the target, so you can perform TRACE requests and see the result without an intercepting proxy or another tool.

i have been actively following you maxe,i have been already trying those tools from intern0t,very simple to use....

and atlast i had find it maxe Smiley

but this is the only question for which i still couldn't find a firm answer for it

Code:
5)Also i would like to know,how a web-site is explicitly checking for GET or POST methods?


Also how can we identify this manually?

or in other words

 when we are sending a request with a "Y" HTTP method to the server  instead of "X" HTTP method expected by  the server,how a web-server will explicitly check for this ?

Also if the server allows a "Y" method instead of the "X" method(which is actually expected by the server) does it pose any serious threat to the web-server?






Code:
Keep in mind, also, that the OPTION header can lie. I never trust its output and always verify things manually. I've been lied to too many times to count. Just wanted to add that tidbit.

Thanks for the information "Grendel",ill keep this in mind....
« Last Edit: August 23, 2011, 08:04:03 PM by manoj9372 » Logged
j0rDy
Hero Member
*****
Offline Offline

Posts: 590


View Profile
« Reply #11 on: August 24, 2011, 01:48:27 AM »

Keep in mind, also, that the OPTION header can lie. I never trust its output and always verify things manually. I've been lied to too many times to count. Just wanted to add that tidbit.

very true, always check your results manually, if the checked method is not available you will probably receive a 501 not implemented message.
Logged

ISC2 Associate, CEH, ECSA, OSCP, OSWP

earning my stripes appears to be a road i must travel alone...with a little help of EH.net
hayabusa
Hero Member
*****
Offline Offline

Posts: 1633



View Profile
« Reply #12 on: August 24, 2011, 07:23:04 AM »

Keep in mind, also, that the OPTION header can lie. I never trust its output and always verify things manually. I've been lied to too many times to count. Just wanted to add that tidbit.

 Smiley <nods head in agreement>
Logged

~ hayabusa ~ 

"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'


OSCE, OSCP , GPEN, C|EH
mambru
Jr. Member
**
Offline Offline

Posts: 98


View Profile
« Reply #13 on: August 24, 2011, 10:21:54 AM »

Quote
when we are sending a request with a "Y" HTTP method to the server  instead of "X" HTTP method expected by  the server,how a web-server will explicitly check for this ?

Also if the server allows a "Y" method instead of the "X" method(which is actually expected by the server) does it pose any serious threat to the web-server?

you're talking about HTTP verb tampering

http://jeremiahgrossman.blogspot.com/2008/06/what-you-need-to-know-about-http-verb.html
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.098 seconds with 23 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
 
         
Advertisement

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