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

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Web Applicationsarrow brute forcing a simple CGI web form log in with expect...
EH-Net
May 20, 2013, 07:32:16 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: brute forcing a simple CGI web form log in with expect...  (Read 6056 times)
0 Members and 2 Guests are viewing this topic.
BASHful
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: March 31, 2011, 03:38:30 PM »

hey. im in a hacking class and i feel pretty pathetic right now.

i have a simple page made that has a user name and password field... I am trying to construct a script to brute force it until it gets the right password.

The only thing I am having trouble with getting started is how can I engage the web form with a script in order to input the values for the password? At first I thought about making a Perl script that puts in a password and cycles through the possibilities... but I would have to click 'Submit' each time...

I figure I could just throw the correct http POST headers to the recieving cgi script on the server but I'm not exactly sure how I could do that.

Is there way to Telnet to a webpage that has a form on it? Or could I do this with expect some how? I just need to figure out the easiest way to interface with the form input fields through a script.
Logged
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #1 on: March 31, 2011, 09:01:39 PM »

Post example on the very bottom: http://docs.python.org/library/httplib.html

You can then parse the results and evaluate success based on responses (i.e. finding the string "incorrect" would indicated that the attempted failed, so when you get a response that doesn't contain it, you can assume it succeeded). The number of bytes received could also be reviewed because they may be significantly different between successful and failed login responses.
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
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.085 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
 
         
Advertisement

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