Section 7: Lab 2 & Authentication
CSE 484 / CSE M 584
Section 7: Lab 2 & Authentication CSE 484 / CSE M 584 - - PowerPoint PPT Presentation
Section 7: Lab 2 & Authentication CSE 484 / CSE M 584 Administrivia May 15 th May 25 th Final Project Checkpoint 1 Due @ Memorial Day: No Lecture 11:59pm Lab 2 Due @ 11:59pm Homework 3 Due @ 11:59pm May 22 nd May 29 th More Lab 2 Hints
Section 7: Lab 2 & Authentication
CSE 484 / CSE M 584
Final Project Checkpoint 1 Due @ 11:59pm
May 15th
Lab 2 Due @ 11:59pm
May 22nd
Memorial Day: No Lecture
May 25th
Homework 3 Due @ 11:59pm
May 29th
There are usually multiple ways to do the XSS exploits!
blocking
request from a page?
Inline JS
(event handlers as strings inside HTML tags, <script> tags with embedded JS)
External JS files
(attached <script> with src in HTML <head> or <body>)
Extensions
(not in Lab 2, but becoming very popular for web users)
From the console
(mostly for testing, doesn’t save state on page refresh) You don’t need to know all of them for Lab 2, but you will need to use different approaches for different filters!
Mixing HTML, JavaScript and URLs… which syntax are you using?
<script> alert('hi'); </script> <body onload="alert('hi');"></body> <iframe src="example.com/?id=<script>alert('hi');</script>"/>
HTML JavaScript For event handler attributes, the value is interpreted as JavaScript code and inserted into a function:
> console.log(myImg.onload.toString()); "function onload(e) { alert('hi'); }"
This is a URL which means it must be URL encoded This is JS embedded in a URL Because the URL is loaded in an iframe, the code will be executed in the context of the page within the iframe (if it has an XSS vulnerability) Will this iframe execute the script? Which language’s escape characters do we need to use?
Text can be encoded in different forms on web pages. Why do you think this is useful? See XSS Intro resource for a great overview of different schemes
Recall that SQL is a language used to manage and query databases Each database contains tables of data. The SELECT keyword is used to query tables and retrieve data. What can possibly go wrong? CREATE TABLE students ( id int, name varchar(255) ); INSERT INTO students VALUES (1, 'Sam Wolfson'); SELECT * FROM students WHERE id = 1; DELETE FROM students WHERE id = 1; OR 1 = 1; -- ;
Improving (?) Passwords
Add biometrics
Graphical passwords
browsers)
Password managers
Two-factor authentication
Password Manager Vulnerabilities
Automatic autofill (a feature
managers) is convenient, but hard to make secure Subject to sweep attacks: stealing multiple passwords without user interaction
https://www.usenix.org/node/184476
https://www.youtube.com/watch?v=qiiSuIE79No
Manual autofill (as secure as manual entry)
password was saved Secure filling (more secure than manual entry)
To log in, you need to provide your credentials, and something else Examples of 2nd factors:
Poll: have you turned on 2-factor authentication for any of your accounts?
A: Yes, whenever the option is available. B: Yes, if the website directly asks me to do so. C: Yes, but only for important accounts. D: Yes, but only when I’m forced to. E: No. Vote at: https://pollev.com/wolfson
stored by the website
(a string), security key signs it with the private key, website verifies the signature with the public key
account, only signs the challenge if it’s on the correct domain (Codes can be phished!)
Security Keys Aren’t Perfect…
Hardware/firmware bugs can compromise its security In theory: supply chain attacks - introduce backdoor vulnerabilities in the factory/in transit
https://security.googleblog.com/2019/05/new-research-how-effective-is-basic.html
Passwords have many weaknesses
Do better systems exist? What other authentication heuristics do we have? Any replacement would ideally be better than passwords in the areas of:
Many variants… One example: Passfaces
Problem: to make passwords easy to remember, users choose predictable faces
Another variant: draw on the image (Windows 8) Problem: to make drawing easy to remember, users choose predictable points/lines
Problems:
gyroscope to extract pattern!
Authentication: What you are
Unique identifying characteristics to authenticate user or create credentials
performs actions): handwriting, typing, gait, etc.
Advantages of Biometrics
Nothing to remember Passive Can’t share (generally) With perfect accuracy, could be fairly unique
What are some disadvantages with biometrics?
Private, but not secret
Revocation is difficult (impossible?)
Physically identifying
Birthday paradox
Legal implications
An adversary might try to steal biometric info
Example: Apple’s Touch ID
[Starbug -- http://istouchidhackedyet.com/]
[Starbug -- http://istouchidhackedyet.com/]
Good luck with everything!