Community Leader Devs+502 & JDuchess Chapter Guatemala Ex-JUG Member Guatemala Java Users Group (GuateJUG) Chief Technology Officer (CTO) at Produactivity Full Stack Developer
Mercedes Wyss @itrjwyss
Auth0 Ambassador & Oracle Developer Champion
Security is a Team Effort
Free Hamburgers
Once upon a time…
Once upon a time…
Free Hamburgers
What could go wrong?
What could go wrong? •
Layalty Programs are a Marketing Strategy
•
Don’t represent a loss for the company
BUT
•
They started to lose money for the Loyalty Program
What could go wrong? •
Layalty Programs are a Marketing Strategy
•
Don’t represent a loss for the company
BUT
•
They started to lose money for the Loyalty Program
What was wrong?
What was wrong? GET http://AmazingHamburguers.com/addPoints?user=qwer&code=7834
GET http://AmazingHamburguers.com/register? [email protected]&password=q1w2e3r4t5y6
GET http://AmazingHamburguers.com/login? user=qwer&password=q1w2e3r4t5y6
What was wrong? Exposed Params
GET http://AmazingHamburguers.com/addPoints?user=qwer&code=7834
HTTP Method
GET http://AmazingHamburguers.com/register? [email protected]&password=q1w2e3r4t5y6
SSL/TLS Absence
GET http://AmazingHamburguers.com/login? user=qwer&password=q1w2e3r4t5y6
What was wrong? •
Emails, Password and Codes were exposed
•
A company lost money
•
Someone lost his job
How to solve this issue?
How to solve this issue? •
Use an information exchange protocol, like JSON
•
Use a different HTTP Method than GET, like POST
•
Use SSL/TLS certificate
How to solve this issue? •
POST https://AmazingHamburguers.com/ addPoints? { “user”:”qwer”, “code”:7834 }
How to solve this issue? •
POST https://AmazingHamburguers.com/ addPoints? { “user”:”qwer”, “code”:7834 }
With SSL/TLS Will travel encrypted
Human Verification
reCAPTCHA
Create the Site
Create the Site
Adding Dependency
reCAPTCHA SafetyNet.getClient(this).verifyWithRecaptcha("6LdDHU8UAAAAAK6y7GYEPQH8_svKQfQmFvk_c6pA") .addOnSuccessListener(this) { response -> if (!response.tokenResult.isEmpty()) { Log.d(TAG, "TokenResult: " + response.tokenResult) } } .addOnFailureListener(this) { e -> if (e is ApiException) { Log.d(TAG, "Error message: " + CommonStatusCodes.getStatusCodeString(e.statusCode)) } else { Log.d(TAG, "Unknown type of error: " + e.message) } }
reCAPTCHA SafetyNet.getClient(this).verifyWithRecaptcha("6LdDHU8UAAAAAK6y7GYEPQH8_svKQfQmFvk_c6pA") .addOnSuccessListener(this) { response -> if (!response.tokenResult.isEmpty()) { Log.d(TAG, "TokenResult: " + response.tokenResult) Verify the result } } .addOnFailureListener(this) { e -> if (e is ApiException) { Log.d(TAG, "Error message: " + CommonStatusCodes.getStatusCodeString(e.statusCode)) } else { Log.d(TAG, "Unknown type of error: " + e.message) } }
reCAPTCHA
reCAPTCHA
reCAPTCHA
reCAPTCHA
“Convenience Over Security”
What was wrong?
•
Was storing data about users in plain text and locally on a device (public access)
•
Emails, Passwords and geolocation data
What was wrong?
• •
Public Access
Was storing data about users in plain text and locally on a device (public access)
Unencrypted Emails, Passwords and geolocation data
Data
How to solve this issue?
How to solve this issue? •
Save the information so that only our application has access to it.
What could go wrong? { "accountName":"Mercedes Wyss", “accountNumber":"1234567890" } { "accountName":"5cPRRpp/bUkcnNZ6CZ6efg==", “accountNumber":"yPGQm/a6y1My3IBHnpQEVA==" }
What could go wrong? { "accountName":"Mercedes Wyss", “accountNumber":"1234567890" } Unencrypted and Encripted values
Is it better for mobile apps to be easy-to-use, or secure? - GitHub
Page 1. A More Secure World for Apps. Page 2. Mercedes Wyss. @itrjwyss. Community Leader. Devs+502 & JDuchess Chapter Guatemala. Ex-JUG Member. Guatemala Java ..... Page 79. JSON Web Encryption. ⢠The JWE Protected Header. ⢠The JWE Encrypted Key. ⢠The JWE Initialization Vector. ⢠The JWE ...