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 32 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Web Applicationsarrow exploiting vulnerable http methods and ./ directory traversal ?
EH-Net
May 23, 2013, 11:35:19 PM *
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: exploiting vulnerable http methods and ./ directory traversal ?  (Read 7702 times)
0 Members and 1 Guest are viewing this topic.
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« on: November 01, 2010, 12:26:56 AM »

I have been scanning a target  aka website with some pen-testing tools
and i have found that  web-site is  using or supporting many http methods other than HTTP get and post..


Is it really vulnerable to exploitation?

if yes how to exploit these methods "properly"?

Also I want to know how I can "manually" find a site is vulnerable to ./ directory traversal attacks,I know this can be easily done with "accuentix  v6 and 7 " and some other scanners,

but i just want to know how to find those vulnerabilities manually?

Because this is my personal belief Grin(I just don't want to be dependent or limited myself to using tools)

is it possible to do?

Looking for some guidance....



Logged
dante
Jr. Member
**
Offline Offline

Posts: 58



View Profile
« Reply #1 on: November 01, 2010, 09:44:36 AM »

If its TRACE enabled, then you might want to check on Cross site Tracing
http://www.cgisecurity.com/whitehat-mirror/WH-WhitePaper_XST_ebook.pdf

If its CONNECT enabled, then you might want to check on HTTP Connect tunneling.

You can manually find the vulnerability if you have the source or sometimes by guessing/experience. I can give you a quick look on how its done manually.

 If you have the source, lets take php, you look for include "<filename>" where filename is obtained as input from the client usually as a get/post parameter. This is almost always the condition for directory traversal. You then replace filename with "../../../../etc/passwd" and check if its vulnerable to directory traversal attacks.

The guessing knowledge is usually obtained from experience like you get to know that sometimes people dynamically include stylesheets based on user input. But it is not possible to check all possible scenarios manually. Hence the tools. In order to obtain that kind of knowledge check the heuristics used by the tool for detecting directory traversal vulnerabilities.
« Last Edit: November 01, 2010, 10:24:42 AM by dante » Logged
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #2 on: November 01, 2010, 11:54:19 AM »

dante is right, it is quite tedious to find directory traversing manually. You have to try many combinations, like this on a Linux/Unix machine:
../etc/passwd
../../etc/passwd
../../../etc/passwd
../../../../etc/passwd
../../../../../etc/passwd
../../../../../../etc/passwd

But it may not work (most probably it won't). You then search for /cgi-bin, /scripts, Front Page stuff, etc.

If I were you, I would use nikto and sniff all it's requests. You will have hours of pure pleasure learning about possible URI!  Wink



Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
MaXe
Hero Member
*****
Offline Offline

Posts: 669


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


View Profile WWW
« Reply #3 on: November 01, 2010, 03:31:10 PM »

Sometimes, .. or perhaps .. is filtered and therefore a custom "bypass" usually has to be made though if it's exploitable, then it's relatively simple. Just a heads up that not all directory traversal vulnerabilities are like ../../../etc/passwd  Smiley
Logged

I'm an InterN0T'er
manoj9372
Jr. Member
**
Offline Offline

Posts: 72


View Profile
« Reply #4 on: November 02, 2010, 03:00:49 AM »

Code:
If its TRACE enabled, then you might want to check on Cross site Tracing
http://www.cgisecurity.com/whitehat-mirror/WH-WhitePaper_XST_ebook.pdf

If its CONNECT enabled, then you might want to check on HTTP Connect tunneling.

You can manually find the vulnerability if you have the source or sometimes by guessing/experience. I can give you a quick look on how its done manually.

 If you have the source, lets take php, you look for include "<filename>" where filename is obtained as input from the client usually as a get/post parameter. This is almost always the condition for directory traversal. You then replace filename with "../../../../etc/passwd" and check if its vulnerable to directory traversal attacks.

The guessing knowledge is usually obtained from experience like you get to know that sometimes people dynamically include stylesheets based on user input. But it is not possible to check all possible scenarios manually. Hence the tools. In order to obtain that kind of knowledge check the heuristics used by the tool for detecting directory traversal vulnerabilities.


yes sir,but i don't have the source code of the web-page,but I know what kind of "language",it is coded in ..

I also believe they have security mechanism like "url filtering" or "query filtering technologies",to restrict those things ,Also i am not just looking to get the "password",because most sites protect their server's password file by using "shadow gaurd",Also sir do you got any suggestions for learning these specific attacks "manually"?


Code:
dante is right, it is quite tedious to find directory traversing manually. You have to try many combinations, like this on a Linux/Unix machine:
../etc/passwd
../../etc/passwd
../../../etc/passwd
../../../../etc/passwd
../../../../../etc/passwd
../../../../../../etc/passwd

But it may not work (most probably it won't). You then search for /cgi-bin, /scripts, Front Page stuff, etc.

If I were you, I would use nikto and sniff all it's requests. You will have hours of pure pleasure learning about possible URI!

Looks like a good suggestion,But before using those kind of tools,i am trying to understand their working logic,because i am looking forward to improve my knowledge,Also can you tell me other than "grabbing" passwords ,what else we can do with this directory traversal?

just viewing directories?


if possible tell me sir Smiley


Code:
Sometimes, .. or perhaps .. is filtered and therefore a custom "bypass" usually has to be made though if it's exploitable, then it's relatively simple. Just a heads up that not all directory traversal vulnerabilities are like ../../../etc/passwd

yes still there should be ways to bypass "query filtering",for ex if / is filtered by the target we can bypass it by including "/" like this .

Also i am looking forward to learn directory traversals other than "../../../etc/passwd " this Smiley


any-way thanks for answering my questions Smiley
Logged
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #5 on: November 02, 2010, 07:31:59 AM »

I think that what MaXe is refering to is URL encoding.

So:
../../../etc/passwd
     Might look like:
..%2F..%2F..%2Fetc%2Fpasswd

Plenty of resources on the web!!
 

Also,
/etc/passwd contains usernames and not passwords! /etc/shadow contains the hashed passwords on Linux/Unix systems.  Wink
Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
MaXe
Hero Member
*****
Offline Offline

Posts: 669


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


View Profile WWW
« Reply #6 on: November 02, 2010, 10:01:03 AM »

I think that what MaXe is refering to is URL encoding.

So:
../../../etc/passwd
     Might look like:
..%2F..%2F..%2Fetc%2Fpasswd

Plenty of resources on the web!!
 

Also,
/etc/passwd contains usernames and not passwords! /etc/shadow contains the hashed passwords on Linux/Unix systems.  Wink

Partly yes, but take a look at Exploit-DB and my youtube channel (maxel3g3nd) this or next week, there's going to be something about this  Smiley

But ontopic, URL encoding can be useful in some directory traversal scenarios but in some cases you need to bypass it, all depending on how the target application code is written  Wink

Thanks for clarifying most of what I meant and as you mentioned, there's plenty of resources :-)
Logged

I'm an InterN0T'er
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #7 on: November 02, 2010, 12:07:21 PM »

Thanks MaXe, I just subscribed to your YouTube Channel.

I am looking forward to your demo...
Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
MaXe
Hero Member
*****
Offline Offline

Posts: 669


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


View Profile WWW
« Reply #8 on: November 02, 2010, 02:28:21 PM »

Thanks MaXe, I just subscribed to your YouTube Channel.

I am looking forward to your demo...

Awesome!  Grin You'll like it, after all it's free and realistic  Smiley
Logged

I'm an InterN0T'er
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 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.