Follow us on Twitter!
Society leans ever heavily on computers, if you have the power to take out computers you can take out society. - cubeman372
Monday, April 21, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 26
Guests Online: 25
Members Online: 1

Registered Members: 82854
Newest Member: Dyno890
Latest Articles

Basic 13

Arrow Image A (pretty) detailed tutorial of the newly added Basic 13.



Modifying the values of a form can be done in multiple ways. One way is saving the docu<i></i>ment to a local hard disk drive, and modifying the value locally. This is called an XSS attack, and can be dealt with by checking the HTTP Refferer.

An even easier way, however, is modifying the value via javascript. First and foremostly, however, using javascript can be complicated if you\'ve never seen it before. I\'ll skip the very, very basics and jump right into the mix. (Remember kids, Google \"javascript tutorial\" before asking \"how do i do this???\")

First off, because we are modifying a piece of the data, we need to use the docu<i></i>ment string. (Please forgive me, as I don\'t know the \"official\" term for it.)

javascript:void(docu<i></i>ment

Secondly, we have to find out which form we are modifying. You can commonly use the \"name=\"Blah\"\" part of a form to find this out. But wait, what if it doesn\'t have one?

A part of javascript called \"layers\" was introduced by Netscape 6 several years ago, which allows us to choose from an array of different HTML elements. The format for this is \"forms[number].\" The \"number\" part of this represents the number in which the HTML element is loaded into the page. For example, suppose you had two forms on a page, and you wanted to choose the second one. You would use

javascript:void(docu<i></i>ment.forms[1]


to access it. The reason you would use the 1st element is because javascript arrays begin with the 0th element.

Now you repeat the process with elements[], and options[]. They\'re both essentially replacements for using the actual name of a form. (I find this more useful than using the name, simply because of my own preferences.)

So if you had a form like:
Form1

Form2 (This is the form[])
|-Radio (This would be the element[])
|--Option1
|--Option2
|-Select (We want this element[], so we use element[1])
|--Option1 (We want this options[], so we use options[0])
|--options2

javascript:void(docu<i></i>ment.forms[1].elements[1].options[0]

If we want to change the value, we would use the \'value\' layer of the javascript.

javascript:void(docu<i></i>ment.forms[1].elements[1].options[0].value=\"New Value\");

And thus concludes my tutorial on editing SELECT variables from forms directly. If you use the article, please take five seconds and rate or comment on the article.

Comments

wolfmankurdon April 18 2006 - 01:51:10
long article for a short challenge, but I like it Grin
Zeyphieron April 18 2006 - 02:24:01
good description on the type of injection, nice
SeventhSageon April 18 2006 - 02:25:22
Sure the article was long for the challenge, but it gives a really good description of how to do this sort of thing in more contexts. Great job!
Zekasuon April 18 2006 - 02:47:14
Thanks for all the positive feedback, and I choose a short mission to best elaborate on this subject, as it's really just scattered about the internet.
godon April 18 2006 - 08:47:07
yea i liked it... very informative..
dantronixon April 18 2006 - 09:24:35
V.good, but the easiest method must be saving it to your hard drve and editing it there. Thanks.
Zekasuon April 25 2006 - 03:43:55
Actually, I found using javascript was easier than XSS (Cross-Site Scripting) attack, mainly because I'm a command-line kind of guy.
crazy_sniperon June 05 2006 - 09:45:25
Thanks man, this got me that challenge!! i really dont get it though, why change the names to something like forms, why not form? odd. Thanks!!!
sittingbullon June 27 2006 - 21:09:54
great article! good detail, and explained everything clearly! Thank you!
intersliceon July 15 2006 - 10:14:52
nice article dude. but i have to agree with dantronix. saving it to your hdd takes less than a minute.
Zekasuon August 11 2006 - 13:40:17
As to everyone talking about saving it to your HDD, what about when you can't, or more importantly shouldn't? Javascript, in this situation, is a swiss army knife.
Belly_Buttonon August 22 2006 - 01:56:19
Yea, injections are definetly the way to go... After using them enough I'd have to say it's a ton easier than saving it to the hard drive and editing it... And this way you don't have to worry about editing other stuff in the forms (ie. the redirect url)... And finding and executing the injection definetly takes less than a minute as well, and its not as messy...
wilz182on September 01 2006 - 10:04:42
hey man great article but how do u countthe forms e.g when does one form start and how do u no?
dinosauron September 19 2006 - 05:04:40
very helpful article and insanely easy to understand.
NFon November 18 2006 - 07:44:58
Really good article, thx.
Nabsteron November 26 2006 - 18:50:33
really great article!!! that will solve some problems but i still can't do the challengeFrown
BoeGe-FaeTTeRon February 12 2007 - 21:24:27
Very good article, it teached me a lot about a short challenge, but it was very useful :happy::ninja:
0paqueon February 25 2007 - 20:11:44
great article - really explained this well for me :happy:
bluntrllnpandaon April 13 2011 - 15:48:33
very good article, nice work Grin
bluntrllnpandaon April 13 2011 - 15:51:15
very good article, nice work Grin
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.