Dont just say the password is encrypted that is not a

Info icon This preview shows pages 2–3. Sign up to view the full content.

View Full Document Right Arrow Icon
specific. Don’t just say the password is encrypted – that is not a true statement. When trying to login to a web application using this database, queries will use the name  and password to limit the search to a single record. In general, both the username and  password have to be found in the same row of the database. A typical query for that  would be something like mysql> select name, lastlogin from user where name='alice' and pass='522b276a356bdf39013dfabea2cd43e141ecc9e8'; This returns just the name and time of last login for Alice.  Take a screenshot.  If you  change pass='522b276a356bdf39013dfabea2cd43e141ecc9e8' to something like  pass='KingKong' then there will be no information returned at all.  Take a screenshot of this as well. Repeat the above queries to get the last login for Ted and Bob.  Take a screenshot of  your results . The main idea behind SQL injection attacks is to be able insert text which becomes part of the SQL command. Consider the following SQL statement that uses an incorrect  password value: mysql> select name, lastlogin from user where name='alice' and  pass='KingKong'; Without erasing anything from the command,  add  characters so that whatever is typed  for the password becomes irrelevant. You’ll want to look at the SQL comment  characters --, which behave much like // in Java and C++. Note that you’ll probably need a space after the - - to get things to work. Also, you should only insert characters  immediately before the word ‘and’ above. If you are inserting them anywhere else, you  are off on the wrong track and probably won’t be able to complete the lab correctly. Experiment with this, then take a screenshot showing how you can get the last login  time for Alice no matter what password is used.  Take a screenshot to show your  success.  Note, you shouldn’t move on until you get this working.
Image of page 2

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern