SlideShare a Scribd company logo
1 of 36
Download to read offline
Este documento é propriedade intelectual da PT e fica proibida a sua utilização ou propagação sem expressa autorização escrita
Building a Secure Startup
Nuno Loureiro
SAPO Security Team
07.10.2015
C-Days 2015
nuno@co.sapo.pt
2
Who am I? Timeline
•Dez 2009: Got a dual Masters degree: MSIT-IS from CMU and MSI
from FCUL
• Jan 2010-now(): Founded and lead SAPO’s Security Team
•2012-now(): Head of Security and Fraud at PT Pay (Meo Wallet)
•1997-2002: System and Network administrator,
Programmer, a little of Security, Student, Entrepreneur …
•2002-2008: Web Programmer at SAPO,Technical Lead
of SAPO’s Email Platform
3
Summary
• Security	
  Awareness	
  
• Steps	
  to	
  improve	
  Security	
  within	
  your	
  organization	
  
• Security	
  Culture	
  
• Risk	
  Analysis	
  
• Secure	
  Infrastructure	
  
• Application	
  Security	
  
4
Context
Let’s	
  imagine	
  John	
  co-­‐founded	
  a	
  small	
  Startup.	
  	
  
Between	
  founders	
  and	
  employees	
  there’re	
  10	
  people.	
  
They’re	
  focused	
  on	
  a	
  single	
  product:
A	
  collaborative	
  and	
  integrated	
  project	
  management	
  platform
Their	
  Business	
  Model	
  is	
  SaaS.
They’re	
  on	
  a	
  tight	
  budget.
5
Invest in Security?
We’re	
  too	
  small	
  to	
  be	
  an	
  attractive	
  target…	
  
Why	
  should	
  I	
  care?	
  
Should	
  I	
  invest	
  in	
  Security	
  from	
  the	
  beginning?	
  
6
Invest in Security?
The	
  problem	
  is…	
  
7
Invest in Security?
8
Invest in Security?
9
Invest in Security?
10
Invest in Security?
11
Invest in Security?
12
Invest in Security?
13
Invest in Security?
IPO?
Fraud
Suicides
Divorces
14
Invest in Security?
You	
  can	
  argue	
  about	
  the	
  probability	
  of	
  a	
  successful	
  	
  
attack	
  but	
  the	
  impact	
  of	
  just	
  one	
  attack	
  can	
  put	
  you	
  
out	
  of	
  business…
Conclusion
15
Invest in Security?
Are	
  you	
  willing	
  to	
  take	
  that	
  risk?
16
Steps to improve Security
Tips	
  to	
  embrace	
  Security	
  in	
  your	
  startup
17
Steps to improve Security
18
Security	
  should	
  be	
  part	
  of	
  your	
  culture
• Starts	
  at	
  the	
  C-­‐level	
  
• 2nd-­‐factor	
  for	
  VPN,	
  email	
  (from	
  new	
  devices)	
  and	
  critical	
  operations/
accounts
Steps to improve Security
19
Security	
  should	
  be	
  part	
  of	
  your	
  culture
• Setup	
  VPN	
  (e.g.	
  OpenVPN)	
  for	
  remote	
  accessing	
  your	
  infrastructure	
  
• Adopt	
  “corporate	
  network	
  =	
  home	
  network”	
  model,	
  no	
  privileged	
  access	
  
from	
  corporate	
  network	
  to	
  your	
  infrastructure
Steps to improve Security
20
Security	
  should	
  be	
  part	
  of	
  your	
  culture
• Use	
  Full	
  Disk	
  Encryption	
  on	
  your	
  laptops	
  
• Use	
  password	
  managers
Steps to improve Security
FileVault
21
Security	
  should	
  be	
  part	
  of	
  your	
  culture
• Give	
  periodic	
  security-­‐awareness	
  sessions	
  (phishing,	
  do’s	
  and	
  don’ts,	
  …)	
  
• Invest	
  on	
  E-­‐mail	
  security	
  (to	
  prevent	
  malware,	
  phishing,	
  etc)	
  
• Don’t	
  forget	
  Periodic	
  updates,	
  AV,	
  Firewall,	
  Screensaver	
  with	
  password	
  
• Use	
  strong	
  cryptography	
  on	
  your	
  wifi,	
  VPN,	
  HTTPS	
  sites	
  
Steps to improve Security
22
Access your risk
Risk	
  Analysis
• There	
  are	
  many	
  frameworks	
  to	
  perform	
  Risk	
  Management:	
  
• ISO27005	
  	
  
• OCTAVE	
  	
  
• NIST	
  SP	
  800-­‐37	
  
• There	
  are	
  many	
  frameworks	
  to	
  perform	
  Threat	
  Modeling:	
  
• Stride	
  
• Dread
• For	
  the	
  purpose	
  of	
  this	
  talk	
  we’ll	
  do	
  a	
  very	
  basic	
  approach
23
Risk	
  Analysis
• What	
  are	
  your	
  main	
  assets?	
  
• Customer’s	
  data:	
  code,	
  project	
  ideas,	
  status	
  of	
  development,	
  business	
  plan,	
  
employee’s	
  information,	
  confidential	
  information	
  	
  
• Business	
  Information:	
  Sales,	
  business	
  plan,	
  list	
  of	
  customers,	
  etc	
  
• Availability	
  of	
  the	
  service	
  
• What	
  are	
  the	
  main	
  threats	
  you	
  want	
  to	
  prevent?	
  
• (account,	
  customer,	
  business)	
  Data	
  breach:	
  could	
  lead	
  to	
  bankruptcy	
  
• DDoS	
  attacks:	
  Availability	
  is	
  core	
  to	
  our	
  business;	
  customer	
  churn	
  
• What	
  vehicles	
  (vulnerabilities)	
  could	
  be	
  used	
  to	
  turn	
  threats	
  into	
  successful	
  attacks?	
  
• Vulnerabilities	
  in	
  the	
  Web	
  Application	
  
• Vulnerabilities	
  in	
  the	
  systems	
  
• Public	
  IP	
  addresses	
  
• Employee	
  PC	
  
• Employee	
  
• Email	
  
• Physical	
  access	
  to	
  systems	
  
•	
  (…)
Access your risk
24
Secure your Infrastructure
Infrastructure	
  Security
Vs
On-­‐Premises
In	
  the	
  Cloud
25
Infrastructure	
  Security:	
  On-­‐Premises	
  or	
  In	
  the	
  cloud
• Setup	
  different	
  subnets	
  for	
  each	
  one	
  of	
  the	
  layers	
  of	
  your	
  infrastructure	
  (at	
  least	
  one	
  for	
  
Web	
  frontend	
  servers	
  and	
  one	
  for	
  backend	
  servers)	
  
• Control	
  all	
  traffic	
  between	
  the	
  subnets	
  with	
  firewall	
  ACLs	
  (also	
  inbound/outbound)	
  
• If	
  there’s	
  traffic	
  that’s	
  not	
  allowed	
  between	
  a	
  frontend	
  and	
  a	
  backend	
  server	
  then	
  have	
  
your	
  Intrusion	
  Detection	
  System	
  raise	
  an	
  alarm	
  
• Use	
  GRSecurity	
  if	
  you	
  run	
  Linux,	
  use	
  EMET	
  if	
  you	
  run	
  Windows	
  
• Update	
  all	
  your	
  systems	
  periodically	
  
• Install	
  a	
  Host	
  Intrusion	
  Detection	
  (HIDS),	
  e.g.	
  OSSEC
Secure your Infrastructure
26
Infrastructure	
  Security:	
  On-­‐Premises	
  or	
  In	
  the	
  cloud
• If	
  you	
  decide	
  to	
  go	
  to	
  the	
  cloud:	
  
• Be	
  careful	
  with	
  the	
  account	
  with	
  admin	
  privileges,	
  choose	
  a	
  strong	
  and	
  unique	
  
password	
  plus	
  2-­‐FA	
  or	
  if	
  possible	
  require	
  VPN	
  to	
  access	
  the	
  management	
  console.	
  
• Choose	
  one	
  of	
  the	
  top	
  cloud	
  providers,	
  where	
  security	
  has	
  been	
  scrutinized	
  	
  
• Cloud	
  providers	
  offer	
  some	
  sort	
  of	
  network	
  DDoS	
  protection	
  
• Can	
  offer	
  email	
  protection	
  (malware,	
  spam,	
  phishing)	
  too	
  	
  
• You	
  can	
  have	
  a	
  mixed	
  solution	
  (cloud	
  and	
  on-­‐premises)	
  
• Weigh	
  the	
  Pros	
  and	
  Cons	
  of	
  each
Secure your Infrastructure
2
Build Secure Software
Adopt	
  SSDLC
My	
  advice	
  from	
  almost	
  6	
  years	
  of	
  experience	
  in	
  this	
  area:	
  
• If	
  you	
  have	
  a	
  security	
  team,	
  they	
  should	
  be	
  close	
  to	
  developers.	
  When	
  developers	
  
go	
  to	
  the	
  security	
  team	
  ask	
  for	
  advice	
  on	
  a	
  regular	
  basis	
  you	
  know	
  you	
  got	
  it	
  right.	
  
• Training	
  developers	
  on	
  Secure	
  Programming	
  really	
  works	
  
• Introducing	
  security	
  early	
  in	
  the	
  project	
  saves	
  everyone	
  time	
  at	
  the	
  end	
  
• Do	
  Pentesting	
  before	
  going	
  live	
  and	
  periodically	
  (at	
  least	
  1x	
  year)	
  
28
Build Secure Software
Take	
  into	
  consideration	
  OWASP	
  TOP10
29
Build Secure Software
30
Build Secure Software
• A	
  significant	
  part	
  of	
  Data	
  Leaks	
  today	
  are	
  due	
  to	
  SQLi	
  vulnerabilities	
  
• If	
  you	
  use	
  Prepared	
  Statements	
  when	
  writing	
  your	
  SQL	
  queries,	
  say	
  
bye-­‐bye	
  to	
  SQLi	
  
• Encrypt	
  your	
  sensitive	
  data	
  before	
  storing	
  it	
  in	
  the	
  database	
  (do	
  not	
  
store	
  the	
  encryption	
  key	
  there!)	
  
• There’s	
  no	
  excuse	
  these	
  days	
  for	
  introducing	
  new	
  SQLi	
  vulnerabilities	
  
in	
  code
31
Build Secure Software
32
Build Secure Software
Some	
  advice:
• Use	
  HTTPS	
  
• Hash	
  the	
  password	
  before	
  storage	
  (hint:	
  HMAC)	
  
• If	
  authentication	
  fails	
  don’t	
  say	
  that	
  it’s	
  the	
  username	
  that	
  does	
  not	
  
exist	
  or	
  that	
  it’s	
  the	
  password	
  that	
  is	
  wrong,	
  give	
  a	
  generic	
  message	
  
instead	
  
• Re-­‐authentication	
  should	
  be	
  required	
  before	
  any	
  application-­‐
specific	
  sensitive	
  operations	
  are	
  permitted,	
  such	
  as	
  for	
  changing	
  the	
  
password
Authentication	
  et	
  al.
33
Build Secure Software
Some	
  advice:
• Do	
  you	
  allow	
  “a	
  single	
  account	
  tested	
  against	
  all	
  possible	
  passwords”?	
  (vertical	
  
bruteforcing)	
  
• What	
  about	
  “all	
  accounts	
  tested	
  with	
  the	
  same	
  password	
  e.g.	
  123456”?	
  
(horizontal	
  bruteforcing)	
  
• Use	
  an	
  outbound	
  channel	
  for	
  account	
  recovery	
  and	
  apply	
  the	
  same	
  security	
  
controls	
  as	
  for	
  authentication	
  (like	
  when	
  storing	
  the	
  recovery	
  token,	
  throttling,	
  
re-­‐authentication	
  for	
  changing	
  the	
  recovery	
  elements,	
  etc)	
  
• Avoid	
  using	
  security	
  questions	
  for	
  account	
  recovery	
  
Authentication	
  et	
  al.
34
Build Secure Software
Always	
  check	
  if	
  the	
  user	
  is	
  authorized	
  to	
  access	
  the	
  required	
  object!
35
Este documento é propriedade intelectual da PT e fica proibida
a sua utilização ou propagação sem expressa autorização escrita.
SAPO Security Team
The	
  END
Nuno	
  Loureiro
nuno@co.sapo.pt

More Related Content

What's hot

SQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterSQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterMichael Coates
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationRapid Purple
 
Sql Injection and XSS
Sql Injection and XSSSql Injection and XSS
Sql Injection and XSSMike Crabb
 
SQL injection prevention techniques
SQL injection prevention techniquesSQL injection prevention techniques
SQL injection prevention techniquesSongchaiDuangpan
 
seminar report on Sql injection
seminar report on Sql injectionseminar report on Sql injection
seminar report on Sql injectionJawhar Ali
 
Havij help english
Havij help englishHavij help english
Havij help englishmoguinos
 
Understanding and preventing sql injection attacks
Understanding and preventing sql injection attacksUnderstanding and preventing sql injection attacks
Understanding and preventing sql injection attacksKevin Kline
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Siteijtsrd
 
Sql injection attack
Sql injection attackSql injection attack
Sql injection attackRaghav Bisht
 
Sql injection - security testing
Sql injection - security testingSql injection - security testing
Sql injection - security testingNapendra Singh
 
Types of sql injection attacks
Types of sql injection attacksTypes of sql injection attacks
Types of sql injection attacksRespa Peter
 
XSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesXSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesMindfire Solutions
 
Web Application Security II - SQL Injection
Web Application Security II - SQL InjectionWeb Application Security II - SQL Injection
Web Application Security II - SQL InjectionMd Syed Ahamad
 

What's hot (20)

SQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterSQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning Center
 
Sql injection
Sql injectionSql injection
Sql injection
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint Presentation
 
Sql Injection and XSS
Sql Injection and XSSSql Injection and XSS
Sql Injection and XSS
 
SQL injection prevention techniques
SQL injection prevention techniquesSQL injection prevention techniques
SQL injection prevention techniques
 
SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
seminar report on Sql injection
seminar report on Sql injectionseminar report on Sql injection
seminar report on Sql injection
 
Havij help english
Havij help englishHavij help english
Havij help english
 
SQL Injection
SQL Injection SQL Injection
SQL Injection
 
Understanding and preventing sql injection attacks
Understanding and preventing sql injection attacksUnderstanding and preventing sql injection attacks
Understanding and preventing sql injection attacks
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
 
Sql injection
Sql injectionSql injection
Sql injection
 
Sql injection attack
Sql injection attackSql injection attack
Sql injection attack
 
Sql injection - security testing
Sql injection - security testingSql injection - security testing
Sql injection - security testing
 
Full MSSQL Injection PWNage
Full MSSQL Injection PWNageFull MSSQL Injection PWNage
Full MSSQL Injection PWNage
 
Types of sql injection attacks
Types of sql injection attacksTypes of sql injection attacks
Types of sql injection attacks
 
XSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesXSS And SQL Injection Vulnerabilities
XSS And SQL Injection Vulnerabilities
 
Web Application Security II - SQL Injection
Web Application Security II - SQL InjectionWeb Application Security II - SQL Injection
Web Application Security II - SQL Injection
 
Sql injection attack
Sql injection attackSql injection attack
Sql injection attack
 
SQL Injections (Part 1)
SQL Injections (Part 1)SQL Injections (Part 1)
SQL Injections (Part 1)
 

Similar to C days2015

Design Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesDesign Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesInductive Automation
 
Design Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesDesign Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesInductive Automation
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins
 
Fundamental Best Practices in Secure IoT Product Development
Fundamental Best Practices in Secure IoT Product DevelopmentFundamental Best Practices in Secure IoT Product Development
Fundamental Best Practices in Secure IoT Product DevelopmentMark Szewczul, CISSP
 
Practical Defense
Practical DefensePractical Defense
Practical DefenseSean Whalen
 
The New Security Practitioner
The New Security PractitionerThe New Security Practitioner
The New Security PractitionerAdrian Sanabria
 
Security On The Cloud
Security On The CloudSecurity On The Cloud
Security On The CloudTu Pham
 
Keynote Information Security days Luxembourg 2015
Keynote Information Security days Luxembourg 2015Keynote Information Security days Luxembourg 2015
Keynote Information Security days Luxembourg 2015Claus Cramon Houmann
 
Web-of-Things and Services Security
Web-of-Things and Services SecurityWeb-of-Things and Services Security
Web-of-Things and Services SecurityOliver Pfaff
 
Threat_Modelling.pdf
Threat_Modelling.pdfThreat_Modelling.pdf
Threat_Modelling.pdfMarlboroAbyad
 
Mailjet Security Presentation 2017
Mailjet Security Presentation 2017Mailjet Security Presentation 2017
Mailjet Security Presentation 2017Mailjet
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecLalit Kale
 
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...IBM Security
 
Enumerating software security design flaws throughout the ssdlc cosac - 201...
Enumerating software security design flaws throughout the ssdlc   cosac - 201...Enumerating software security design flaws throughout the ssdlc   cosac - 201...
Enumerating software security design flaws throughout the ssdlc cosac - 201...John M. Willis
 
Enumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCEnumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCJohn M. Willis
 
Cyber security event
Cyber security eventCyber security event
Cyber security eventTryzens
 
Secure by Design - Security Design Principles for the Working Architect
Secure by Design - Security Design Principles for the Working ArchitectSecure by Design - Security Design Principles for the Working Architect
Secure by Design - Security Design Principles for the Working ArchitectEoin Woods
 
Challenges with Cloud Security by Ken Y Chan
Challenges with Cloud Security by Ken Y ChanChallenges with Cloud Security by Ken Y Chan
Challenges with Cloud Security by Ken Y ChanKen Chan
 
System Security on Cloud
System Security on CloudSystem Security on Cloud
System Security on CloudTu Pham
 

Similar to C days2015 (20)

Design Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesDesign Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security Guidelines
 
Design Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security GuidelinesDesign Like a Pro: SCADA Security Guidelines
Design Like a Pro: SCADA Security Guidelines
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
 
Fundamental Best Practices in Secure IoT Product Development
Fundamental Best Practices in Secure IoT Product DevelopmentFundamental Best Practices in Secure IoT Product Development
Fundamental Best Practices in Secure IoT Product Development
 
Practical Defense
Practical DefensePractical Defense
Practical Defense
 
The New Security Practitioner
The New Security PractitionerThe New Security Practitioner
The New Security Practitioner
 
Security On The Cloud
Security On The CloudSecurity On The Cloud
Security On The Cloud
 
Keynote Information Security days Luxembourg 2015
Keynote Information Security days Luxembourg 2015Keynote Information Security days Luxembourg 2015
Keynote Information Security days Luxembourg 2015
 
Web-of-Things and Services Security
Web-of-Things and Services SecurityWeb-of-Things and Services Security
Web-of-Things and Services Security
 
Threat_Modelling.pdf
Threat_Modelling.pdfThreat_Modelling.pdf
Threat_Modelling.pdf
 
Mailjet Security Presentation 2017
Mailjet Security Presentation 2017Mailjet Security Presentation 2017
Mailjet Security Presentation 2017
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSec
 
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...
Re-defining Endpoint Protection: Preventing Compromise in the Face of Advance...
 
Enumerating software security design flaws throughout the ssdlc cosac - 201...
Enumerating software security design flaws throughout the ssdlc   cosac - 201...Enumerating software security design flaws throughout the ssdlc   cosac - 201...
Enumerating software security design flaws throughout the ssdlc cosac - 201...
 
Enumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCEnumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLC
 
Código Seguro
Código SeguroCódigo Seguro
Código Seguro
 
Cyber security event
Cyber security eventCyber security event
Cyber security event
 
Secure by Design - Security Design Principles for the Working Architect
Secure by Design - Security Design Principles for the Working ArchitectSecure by Design - Security Design Principles for the Working Architect
Secure by Design - Security Design Principles for the Working Architect
 
Challenges with Cloud Security by Ken Y Chan
Challenges with Cloud Security by Ken Y ChanChallenges with Cloud Security by Ken Y Chan
Challenges with Cloud Security by Ken Y Chan
 
System Security on Cloud
System Security on CloudSystem Security on Cloud
System Security on Cloud
 

More from Nuno Loureiro

The Yin-Yang of Web Authentication
The Yin-Yang of Web AuthenticationThe Yin-Yang of Web Authentication
The Yin-Yang of Web AuthenticationNuno Loureiro
 
Living With Passwords: Personal Password Management
Living With Passwords: Personal Password ManagementLiving With Passwords: Personal Password Management
Living With Passwords: Personal Password ManagementNuno Loureiro
 
DumpFS - A Distributed Storage Solution
DumpFS - A Distributed Storage SolutionDumpFS - A Distributed Storage Solution
DumpFS - A Distributed Storage SolutionNuno Loureiro
 
Vanishing Point - Resilient DNSSEC Key Repository
Vanishing Point - Resilient DNSSEC Key RepositoryVanishing Point - Resilient DNSSEC Key Repository
Vanishing Point - Resilient DNSSEC Key RepositoryNuno Loureiro
 
Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks Nuno Loureiro
 
Performance (Web&PHP)
Performance (Web&PHP)Performance (Web&PHP)
Performance (Web&PHP)Nuno Loureiro
 

More from Nuno Loureiro (9)

The Yin-Yang of Web Authentication
The Yin-Yang of Web AuthenticationThe Yin-Yang of Web Authentication
The Yin-Yang of Web Authentication
 
Living With Passwords: Personal Password Management
Living With Passwords: Personal Password ManagementLiving With Passwords: Personal Password Management
Living With Passwords: Personal Password Management
 
It's no Secret
It's no SecretIt's no Secret
It's no Secret
 
DumpFS - A Distributed Storage Solution
DumpFS - A Distributed Storage SolutionDumpFS - A Distributed Storage Solution
DumpFS - A Distributed Storage Solution
 
Vanishing Point - Resilient DNSSEC Key Repository
Vanishing Point - Resilient DNSSEC Key RepositoryVanishing Point - Resilient DNSSEC Key Repository
Vanishing Point - Resilient DNSSEC Key Repository
 
Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks Advanced SQL Injection: Attacks
Advanced SQL Injection: Attacks
 
IPv6
IPv6IPv6
IPv6
 
Security & PHP
Security & PHPSecurity & PHP
Security & PHP
 
Performance (Web&PHP)
Performance (Web&PHP)Performance (Web&PHP)
Performance (Web&PHP)
 

Recently uploaded

Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...akbard9823
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdf
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdfThe Intriguing World of CDR Analysis by Police: What You Need to Know.pdf
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdfMilind Agarwal
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdf
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdfThe Intriguing World of CDR Analysis by Police: What You Need to Know.pdf
The Intriguing World of CDR Analysis by Police: What You Need to Know.pdf
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 

C days2015

  • 1. Este documento é propriedade intelectual da PT e fica proibida a sua utilização ou propagação sem expressa autorização escrita Building a Secure Startup Nuno Loureiro SAPO Security Team 07.10.2015 C-Days 2015 nuno@co.sapo.pt
  • 2. 2 Who am I? Timeline •Dez 2009: Got a dual Masters degree: MSIT-IS from CMU and MSI from FCUL • Jan 2010-now(): Founded and lead SAPO’s Security Team •2012-now(): Head of Security and Fraud at PT Pay (Meo Wallet) •1997-2002: System and Network administrator, Programmer, a little of Security, Student, Entrepreneur … •2002-2008: Web Programmer at SAPO,Technical Lead of SAPO’s Email Platform
  • 3. 3 Summary • Security  Awareness   • Steps  to  improve  Security  within  your  organization   • Security  Culture   • Risk  Analysis   • Secure  Infrastructure   • Application  Security  
  • 4. 4 Context Let’s  imagine  John  co-­‐founded  a  small  Startup.     Between  founders  and  employees  there’re  10  people.   They’re  focused  on  a  single  product: A  collaborative  and  integrated  project  management  platform Their  Business  Model  is  SaaS. They’re  on  a  tight  budget.
  • 5. 5 Invest in Security? We’re  too  small  to  be  an  attractive  target…   Why  should  I  care?   Should  I  invest  in  Security  from  the  beginning?  
  • 6. 6 Invest in Security? The  problem  is…  
  • 14. 14 Invest in Security? You  can  argue  about  the  probability  of  a  successful     attack  but  the  impact  of  just  one  attack  can  put  you   out  of  business… Conclusion
  • 15. 15 Invest in Security? Are  you  willing  to  take  that  risk?
  • 16. 16 Steps to improve Security Tips  to  embrace  Security  in  your  startup
  • 18. 18 Security  should  be  part  of  your  culture • Starts  at  the  C-­‐level   • 2nd-­‐factor  for  VPN,  email  (from  new  devices)  and  critical  operations/ accounts Steps to improve Security
  • 19. 19 Security  should  be  part  of  your  culture • Setup  VPN  (e.g.  OpenVPN)  for  remote  accessing  your  infrastructure   • Adopt  “corporate  network  =  home  network”  model,  no  privileged  access   from  corporate  network  to  your  infrastructure Steps to improve Security
  • 20. 20 Security  should  be  part  of  your  culture • Use  Full  Disk  Encryption  on  your  laptops   • Use  password  managers Steps to improve Security FileVault
  • 21. 21 Security  should  be  part  of  your  culture • Give  periodic  security-­‐awareness  sessions  (phishing,  do’s  and  don’ts,  …)   • Invest  on  E-­‐mail  security  (to  prevent  malware,  phishing,  etc)   • Don’t  forget  Periodic  updates,  AV,  Firewall,  Screensaver  with  password   • Use  strong  cryptography  on  your  wifi,  VPN,  HTTPS  sites   Steps to improve Security
  • 22. 22 Access your risk Risk  Analysis • There  are  many  frameworks  to  perform  Risk  Management:   • ISO27005     • OCTAVE     • NIST  SP  800-­‐37   • There  are  many  frameworks  to  perform  Threat  Modeling:   • Stride   • Dread • For  the  purpose  of  this  talk  we’ll  do  a  very  basic  approach
  • 23. 23 Risk  Analysis • What  are  your  main  assets?   • Customer’s  data:  code,  project  ideas,  status  of  development,  business  plan,   employee’s  information,  confidential  information     • Business  Information:  Sales,  business  plan,  list  of  customers,  etc   • Availability  of  the  service   • What  are  the  main  threats  you  want  to  prevent?   • (account,  customer,  business)  Data  breach:  could  lead  to  bankruptcy   • DDoS  attacks:  Availability  is  core  to  our  business;  customer  churn   • What  vehicles  (vulnerabilities)  could  be  used  to  turn  threats  into  successful  attacks?   • Vulnerabilities  in  the  Web  Application   • Vulnerabilities  in  the  systems   • Public  IP  addresses   • Employee  PC   • Employee   • Email   • Physical  access  to  systems   •  (…) Access your risk
  • 24. 24 Secure your Infrastructure Infrastructure  Security Vs On-­‐Premises In  the  Cloud
  • 25. 25 Infrastructure  Security:  On-­‐Premises  or  In  the  cloud • Setup  different  subnets  for  each  one  of  the  layers  of  your  infrastructure  (at  least  one  for   Web  frontend  servers  and  one  for  backend  servers)   • Control  all  traffic  between  the  subnets  with  firewall  ACLs  (also  inbound/outbound)   • If  there’s  traffic  that’s  not  allowed  between  a  frontend  and  a  backend  server  then  have   your  Intrusion  Detection  System  raise  an  alarm   • Use  GRSecurity  if  you  run  Linux,  use  EMET  if  you  run  Windows   • Update  all  your  systems  periodically   • Install  a  Host  Intrusion  Detection  (HIDS),  e.g.  OSSEC Secure your Infrastructure
  • 26. 26 Infrastructure  Security:  On-­‐Premises  or  In  the  cloud • If  you  decide  to  go  to  the  cloud:   • Be  careful  with  the  account  with  admin  privileges,  choose  a  strong  and  unique   password  plus  2-­‐FA  or  if  possible  require  VPN  to  access  the  management  console.   • Choose  one  of  the  top  cloud  providers,  where  security  has  been  scrutinized     • Cloud  providers  offer  some  sort  of  network  DDoS  protection   • Can  offer  email  protection  (malware,  spam,  phishing)  too     • You  can  have  a  mixed  solution  (cloud  and  on-­‐premises)   • Weigh  the  Pros  and  Cons  of  each Secure your Infrastructure
  • 27. 2 Build Secure Software Adopt  SSDLC My  advice  from  almost  6  years  of  experience  in  this  area:   • If  you  have  a  security  team,  they  should  be  close  to  developers.  When  developers   go  to  the  security  team  ask  for  advice  on  a  regular  basis  you  know  you  got  it  right.   • Training  developers  on  Secure  Programming  really  works   • Introducing  security  early  in  the  project  saves  everyone  time  at  the  end   • Do  Pentesting  before  going  live  and  periodically  (at  least  1x  year)  
  • 28. 28 Build Secure Software Take  into  consideration  OWASP  TOP10
  • 30. 30 Build Secure Software • A  significant  part  of  Data  Leaks  today  are  due  to  SQLi  vulnerabilities   • If  you  use  Prepared  Statements  when  writing  your  SQL  queries,  say   bye-­‐bye  to  SQLi   • Encrypt  your  sensitive  data  before  storing  it  in  the  database  (do  not   store  the  encryption  key  there!)   • There’s  no  excuse  these  days  for  introducing  new  SQLi  vulnerabilities   in  code
  • 32. 32 Build Secure Software Some  advice: • Use  HTTPS   • Hash  the  password  before  storage  (hint:  HMAC)   • If  authentication  fails  don’t  say  that  it’s  the  username  that  does  not   exist  or  that  it’s  the  password  that  is  wrong,  give  a  generic  message   instead   • Re-­‐authentication  should  be  required  before  any  application-­‐ specific  sensitive  operations  are  permitted,  such  as  for  changing  the   password Authentication  et  al.
  • 33. 33 Build Secure Software Some  advice: • Do  you  allow  “a  single  account  tested  against  all  possible  passwords”?  (vertical   bruteforcing)   • What  about  “all  accounts  tested  with  the  same  password  e.g.  123456”?   (horizontal  bruteforcing)   • Use  an  outbound  channel  for  account  recovery  and  apply  the  same  security   controls  as  for  authentication  (like  when  storing  the  recovery  token,  throttling,   re-­‐authentication  for  changing  the  recovery  elements,  etc)   • Avoid  using  security  questions  for  account  recovery   Authentication  et  al.
  • 34. 34 Build Secure Software Always  check  if  the  user  is  authorized  to  access  the  required  object!
  • 35. 35
  • 36. Este documento é propriedade intelectual da PT e fica proibida a sua utilização ou propagação sem expressa autorização escrita. SAPO Security Team The  END Nuno  Loureiro nuno@co.sapo.pt