CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. •...

17
Alex Zhang CS702 - iOS Security

Transcript of CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. •...

Page 1: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Alex Zhang

CS702 - iOS Security

Page 2: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

How to contact me?

• 1. Ask the question on Piazza.

• 2. Send an email to [email protected].

• 3. Discussion on Thursday.

• 1. I will upload lectures to our course website as soon as possible.

• 2. I will upload recordings via mediapublish and make an announcement on Canvas.

Page 3: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Teaching philosophy

• 1. When introducing a kind of technology, I’d like to introduce a panorama of the knowledge. This is good for you to learn when and why the technology is a good choice to solve some specific problem.

• 2. When introducing a kind of technology, I’d like to take concrete examples. This is good for you to learn how to correctly apply the technology.

• 3. Any comments and suggestions from you will be highly appreciated.

• 4. Help you to think as deeply as possible. It may be not easy but it must improve your ability.

Page 4: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Man in the middle attackhttps://www.zdnet.com/article/dozens-of-popular-iphone-apps-vulnerable-to-man-in-the-middle-attacks/

• In 2017, A flaw in certificate pinning – which normally improves security – meant that standard tests missed a serious vulnerability that would allow hackers to carry out a man-in-the-middle attack and take full control of a victim’s online banking.

• Among the 33 named apps, Uconnect Access can leak usernames and passwords, allowing an attacker to interfere with a user's vehicle, while Huawei HiLink can leak device data, and geolocation data and even keystrokes can be intercepted from users of Cheetah Browser.

• Over 40 apps were confirmed as medium or high risk of man-in-the-middle attacks, allowing an attacker to intercept financial or medical service credentials.

Page 5: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Man in the middle attack

• Certificate Pinning

• Public Key Pinning

• SSL/TLS Pinning

• Public Key Infrastructure

• X.509 certificate

Page 6: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Why weak passwords are dangerous?

• 1. Password dictionary

• 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc.

• 2. Offline dictionary attack VS Online dictionary attack

• Reduce the attempt times (Continuously fail 5 times-lock to delay; 10 times-delete personal data)

• 3. Hash function

• Save password as a plaintext in the database is not a good choice, also for Hash(password)

• When designing Apps, you’d better save (r, Hash(r||password)) unless the law is not allowed.

Page 7: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Why do we need strong passcodes?

• 4. Pseudorandom Number Generator

• In the stream cipher, the PRNG has to use a random number r to concatenate with the password.

• Using PRNG(password) as the private key are not good idea for Apps.

• At least add another random number, often called “Initial Vector, (IV)”.

• Another way is to save a mapping for (password, random number), and use random number with sufficient length as the key.

Page 8: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

The usage of pseudorandom generatorWired Equivalence Privacy, Wi-Fi Protected Access

Page 9: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Wi-Fi Protected Access 2 and 3 802.11i

Page 10: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Schedule

• Week 7

• Tuesday-Thursday, May 5-7

• Code Signing, PKI

• Week 8

• Tuesday-Thursday, May 12-14

• DEP and ASLR, Sandboxing

• Week 9

• Tuesday-Thursday, May 19-21

• Encryption, Privacy

Page 11: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

iOS SecurityAuthentication and Access Control

• Hardware security, System security

• Hard root of trust (Secure Enclave) + Chain of trust, iOS update strategy

• Data security

• File encryption

• App security

• Digital signature, App store, Sandboxing

• Services security

Page 12: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Digital signature scheme

• Key generation algorithm

• Security Parameter: n, Public Key: pk, Private Key: sk.

• , this algorithm must be a probabilistic algorithm.

• Signature algorithm

• Message: m, Private Key: sk, Signature: s.

• , this algorithm can be a probabilistic/deterministic algorithm.

• Verification algorithm

• Message m, Public Key: pk, Signature s.

• , this algorithm is a deterministic algorithm.

Gen(1n) → (pk, sk)

Sign(m, sk) → s

Vrfy(m, s, pk) → T/F

Page 13: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Developer

Page 14: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Developer

Page 15: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Developer

Page 16: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Root of Trust Chain

Page 17: CS702 - iOS Security · • 123456, qwerty, 123456789, password, q1w2e3r4, admin, 111111, etc. • 2. Offline dictionary attack VS Online dictionary attack • Reduce the attempt

Root of Trust Chain