1 / 10

CS144: Security

This text discusses various security vulnerabilities and attacks on smart card OTP cards, including buffer overflow attacks, client state manipulation, SQL/command injection, SQL prepared statement, cross-site scripting (XSS), and cross-site request forgery (XSRF).

cliffordb
Télécharger la présentation

CS144: Security

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS144: Security

  2. Smart Card

  3. OTP card

  4. Buffer Overflow Attack main() { if (login()) start_session(); return 0; } login() { char passwd[10]; gets(passwd); return (strcmp(passwd, "mypasswd") == 0); } start_session() { ... }

  5. Client State Manipulation <form> <input type=“hidden” name=“item” value=“book”> <input type=“hidden” name=“price” value=“$5”> … </form>

  6. SQL/Command Injection • “SELECT name, price FROM productWHERE id =“ + user_input + “;” • system(“cp file1.dat” + user_input);

  7. SQL Prepared Statement PreparedStatement s = db.prepareStatement("SELECT * from Product WHERE id = ?"); s.setInt(1, Integer.parseInt(user_input)); ResultSet rs = s.executeQuery(); 

  8. Cross Site Scripting (XSS) <html> <body> Welcome to $user_name$’s profile … </body> </html>

  9. Cross Site Request Forgery (XSRF) • The user visited http://victim.com before • The user is at http://evilsite.com now <form name=“hack” action=“http://victim.com”> <input type=“hidden” name=“newpassword” value=“hacked”> </form> <script>document.hack.submit()</script>

More Related