Cybersecurity
Cybersecurity
Cybersecurity
Dr John T. H.Yuen
(Main Reference Chapter 10) CYC 306, thyuen@cs.hku.hk 1
OVERVIEW
Understand
E-Com Security Basics
Client-side Security
Communication Security
Server-side Security
Data Privacy
2
WHY DO WE NEED E-COM SECURITY?
*
-
Even if you invest a lot in security, the customer cannot see it
hence many companies put minimal effort to it
But if you do NOT have enough security and you site is hacked, your customer is
very unhappy!
4
FUNDAMENTAL SECURITY OBJECTIVES
5
WHAT IS E-COM SECURITY?
Security features of a system (e.g., ensuring Protection against attacks rather than
passwords that are at least 8 characters specific features of the system.
long, authentication of user, encryption of Privacy leakage Protect against attack
sensitive data)
eg password policy Financial fraud
security features of the system Identity stealing
6
ATTACK SCENARIO
Attack software
Trick shopper
Hack mobile
phone Attack server
Snoop network make sure of
listentotlletraffirblw
rings / loopholes
theshopoeuses
andqetthepadeetsfrom channel
wireless network
legifakewifironterih Starbucks )
7
8
EXAMPLE Puli
shiny
( Pretend to be someone )
9
SOCIAL ENGINEERING on the user himself ,
met on the
system
10
Hackers differentiate stupid targets who is more
the vulnerable
PHISHING
: .
Common passwords
on which
the that
system
have no
password policies
13
CLIENT AUTHENTICATION
Education
E.g., a shopper should be advised to choose a stronger password and keep his
password confidential.
lloopthno '
numbers )
& flick on the monitor
.
Dictionary Attack
15
16
TWO-FACTOR AUTHENTICATION (2FA)
17
CLIENT-SIDE SECURITY
Attracts trojan horse, virus, malicious cookie, zombie (a program secretly takes over the
computer)
Cross-Site Script Attack (XSS attack) 18
Hackers may capture the
tntotrojomhorseolsentbaek
"
Digital Signature
"
(
Trusted Third P are
.
automatically the
private key
[Math .pro-10611 3rd :Bobverifythemsg 19
Usihqtthicéspnbhzkey
SIGNED JAVA APPLETS
signed m
the server
Client gets a program (Java Applet) ←
Java Applet
from Server public key
Web server
Client (Browser) using servers
Client verifies the signature of the public key
Q: how to ensure the public key is legitimate?
20
ATTACK & DEFENCE
How to ensure the public key is legitimate? Answer: Use public key certificate
Public Key Certificate: issued by a
File
Java Applet
public key Certification Authority (CA): a Trusted
Third Party (TTP)
Root Certificate: A
Hacker B rowers would
Client (Browser)
browser
contain General
Certificate authorities 21
-
ROOT CERT & PUBLIC KEY CERTIFICATE
Server : the merchant that needs the certificate
CA_1 : certificate authority
gtmst+
-
Server certificate
- -1m€
Root Cert of Java Applet
CA_1 + (signature
+ issued by CA_1
by Server)
browser
wetmsttnis
Hongkong Post No: program is risky
CERTIFICATE CHAIN
possible tohavesenerals
certificate issued by another party (intermediate CA)
Intermediate CA has a certificate issued by CA_1
Cert of Intermediate
Root Cert of
CA phone
CA_1
+ issued by workload
CA_1
oftherootcrt
lcanberevoked )
+
Server cert
Mayhew busy Java Applet
+ (signature
issued by
Charles
+ by Server)
23
Yes: program is safe /
Public Key Certificate
No: program is risky
ROOT CERTIFICATES IN BROWSER (A LOT!)
24
XSS CROSS-SITE SCRIPTING
http://good.com/search.php?term </script>
Client user clicks the link
When the good site returns the search result to the client, the bad script at the client side will be
executed
The bad script is from good site, so it is allowed to send cookies and info from good site to bad site 27
REFLECTED XSS ATTACK
28
Source: https://excess-xss.com/
PREVENTING XSS
Encoding
escapes the user input so that the browser interprets it only as data, not as code.
Validation
filters the user input so that the browser interprets it as code without malicious commands
29
Communication Security
in E-commerce
30
POTENTIAL ATTACKS ON COMMUNICATION
Man-in-the-middle attack
E.g., An attacker pretends to be the server
towards the user, and pretends to be the user
towards the server.
31
http://www.g00d.com
NETWORK SECURITY
32
ENCRYPTION
Symmetric key encryption:
- the encryption and decryption key are
the same
33
Source: https://pixelprivacy.com/resources/what-is-encryption/
SYMMETRIC KEY ENCRYPTION
Julius Caesar
Alan Turing
34
https://crypto.interactive-maths.com/caesar-shift-cipher.html
CAESAR CIPHER
35
HOP BY HOP ENCRYPTION
Internet
Client 3:
Mobile phone Key: Sim card
Web Server
36
37
Source: https://pixelprivacy.com/resources/what-is-encryption/
END-TO-END ENCRYPTION
Internet
Client 3:
Mobile phone
Web Server
Client 2:
Client 1: PC iPad
38
39
SSL OVERVIEW
Rough Idea:
The root cert of CA_1 has one extra function:
From a public key certificate,
can only be opened by the owner of the certificate. This is
known as key exchange + encryption.
40
Public Key Certificate
KEY EXCHANGE
41
SIMPLIFIED SSL STEPS
43
Demo: https://badssl.com/
Server-side security in E-commerce
44
SOFTWARE SECURITY IN SERVER SIDE
In May 2017,WannaCry ransomware targeted computers running the Microsoft Windows operating
system by encrypting data and demanding ransom payments in the Bitcoin cryptocurrency.
Multiple causes:
Windows has a loophole
It is believed that the NSA discovered it and used it to hack others (instead of informing MS)
The hacking tool EternalBlue is circulated by hackers
Microsoft eventually discovered the vulnerability and patched it in March 2017
In May 2017, WannaCry used EternalBlue to find vulnerable computers, then encrypted the files in it and asked
for ransom
Ransom is paid by Bitcoin, which is very difficult to trace
50
51
DATA PRIVACY
Data privacy concerns exist wherever personally identifiable information (PII) or other sensitive
information is collected, stored, used, and finally destroyed or deleted.
If you do not use encrypted email, HTTPS, etc., your PII is very likely to be leaked to the hacker
Even if you use encryption during communication (communication security), does the e-com website
take good care of your data?
Did they store it securely? (server security)
Did they share it with other companies? Did they anonymize the data before sharing?
52
DATA ANONYMIZATION:
THE CASE OF NETFLIX
In 2006, Netflix published a large database as part of its $1 million Netflix Prize, a challenge to the
world's researchers to improve the rental firm's movie-recommendation engine.
The public dataset did not include names, instead using an anonymous identifier for each user, the
collection of movie ratings
123
236
753
546
423
53
674
DATA ANONYMIZATION:
THE CASE OF NETFLIX
54
Reference: How To Break Anonymity of the Netflix Prize Dataset. Arvind Narayanan, Vitaly Shmatikov. 2006
GENERAL DATA PROTECTION REGULATION (GDPR) IN 2018
A regulation in European Union (EU) law on data protection and privacy for all individuals within the EU
Business processes that handle personal data
must be designed and built with consideration of the principles and provide safeguards to protect data (e.g.,
using pseudonymization or full anonymization where appropriate)
use the highest-possible privacy settings by default
Businesses must report any data breaches within 72 hours
55
DATA SHARING WITH CARE
56
THE INFLUENCE OF DATA ANALYTIC
presidential election. 57
IDENTIFYING YOU IN CENSUS DATA
87% of the population in U.S. can be uniquely identified based on ZIP code, date of birth, and gender, according
to the Census summary data in 1991.
These attributes that can be potentially linked with external information to re-identify entities
58
Source: P. Samarati, L. Sweeney. "Protecting privacy when disclosing information: k-anonymity and its enforcement through generalization and
EXAMPLE
59
DIFFERENTIAL PRIVACY
Differential Privacy:
a person's privacy cannot be compromised by a statistical release if
their data are not in the database Usage:
2015: Google, for sharing
the goal is to give everyone roughly the same privacy that would historical traffic statistics.
result from having their data removed 2016:Apple announced its
intention to use differential
add noise to the query answer privacy in iOS 10 to improve
the noise should ensure that the probability we receive an answer when a its intelligent personal
user is in the data, and the probability we receive the same answer when assistant technology
the user is not in the data, is almost the same
the privacy level is a parameter that defines how close these two
probabilities should be
60
E-COMMERCE SECURITY: SUMMARY
Privacy
Attack software
61