[emc] source code protection

35
1 Source Code Protection: Evaluating Source Code Security Stephanie Woiciechowski, GSEC Principal Software Engineer Product Security Office EMC Corporation

Upload: perforce

Post on 05-Jul-2015

231 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: [EMC] Source Code Protection

1  

Source Code Protection: Evaluating Source Code Security

Stephanie Woiciechowski, GSEC Principal Software Engineer Product Security Office EMC Corporation

Page 2: [EMC] Source Code Protection

2  

Goals

•  Understand application of basic security concepts

•  Collaborative security •  Iterative security

improvements around source code

If  you  have  built  castles  in  the  air,  your  work  need  not  be  lost;  that  is  where  they  should  be.  

Now  put  the  founda;ons  under  them.          -­‐-­‐  Thoreau  

Page 3: [EMC] Source Code Protection

3  

Why should we care? Threats to source code

Page 4: [EMC] Source Code Protection

4  

Source Code Threats

“Consider that no organization is

impenetrable. Assume that your organization might

already be compromised and go from there.”

Security for Business Innovation Council

(2011)

Security  takes  a  new  role  in  working  with  source  code.  

Page 5: [EMC] Source Code Protection

5  

Claims  by  Anonymous  about  Symantec  

-­‐-­‐Symantec  

•  Theft of product-related intellectual property to undermine the security of our customers.

•  Or to seek competitive advantage

•  Exposure of vulnerabilities •  Exposure of trade/government

secrets

Source Code Threats

Security  takes  a  new  role  in  working  with  source  code.  

AMSC  Taking  Sinovel  Infringement  Suit  to  China’s  Supreme  Court  

   -­‐-­‐  Bloomberg  

Ex-­‐NASA  contractor  arrested  on  plane  to  China  

-­‐-­‐Associated  Press  

Page 6: [EMC] Source Code Protection

6  

Claims  by  Anonymous  about  Symantec  -­‐-­‐Symantec  

•  Theft of product-related intellectual property to undermine the security of our customers.

•  Or to seek competitive advantage

•  Exposure of vulnerabilities •  Exposure of trade/government

secrets

Source Code Threats

Security  takes  a  new  role  in  working  with  source  code.  

AMSC  Taking  Sinovel  Infringement  Suit  to  China’s  Supreme  Court  

   -­‐-­‐  Bloomberg  

Ex-­‐NASA  contractor  arrested  on  plane  to  China  

-­‐-­‐Associated  Press  

Page 7: [EMC] Source Code Protection

7  

Source Code Threats

•  Insertion of malicious code into products during development cycle that can undermine product integrity and operations in customer environments.

Security  takes  a  new  role  in  working  with  source  code.  

phpMyAdmin

Page 8: [EMC] Source Code Protection

8  

What can we do? Define objective

Page 9: [EMC] Source Code Protection

9  

What can we do?

•  Prerequisites & Assumptions •  IT is doing their part for corporate

security •  Security is not #1 for SCM, Build,

Release, QE, and Dev •  Security goals often support SCM

goals of traceability, reproducibility, and auditability

•  Approach: Collaboration •  Define security criteria •  Understand current environment

•  Review tools in use against criteria •  Include input from SCM and security

experts •  Manage change

•  Provide recommendations for preferred solutions

•  Provide a framework to assess implementations & evaluate new solutions

Improve  security  in  the  source  code  environment  to  defend  against  threats.  

Page 10: [EMC] Source Code Protection

10  

•  Policy: What needs to be done to protect source code.

•  Strong passwords to access source code

•  Transactions will be logged and protected

•  Standards: How to implement policy. •  Source code systems are integrated

with organization’s identity management system and use network password.

•  Transactions are logged to syslog and exported every 20 minutes to a log aggregation system.

•  Achievable & Maintainable: Consistent approach to implementation

•  Measureable: Evaluation if a control is in place and how it is functioning

•  Threat model: How might your environment be attacked?

•  Business case •  What could happen if your

source code is modified? •  What could happen if your

source code is stolen? •  How would you recover and at

what cost? •  Actionable intelligence

Establish Goals & Team

•  Initial Goals: Call to action

•  Who should be involved?

•  Policies & Standards

•  Procedures & Assessments

RISK  REDUCTION  

Task  Force  

IT  

Security  

Source  Code  Admin  

Legal  

Development  

RISK  REDUCTION  

Page 11: [EMC] Source Code Protection

11  

•  Threat model: How might your environment be attacked?

•  Business case •  What could happen if your

source code is modified? •  What could happen if your

source code is stolen? •  How would you recover and at

what cost? •  Actionable intelligence

Establish Goals & Team

•  Initial Goals: Call to action

RISK  REDUCTION  

Page 12: [EMC] Source Code Protection

12  

Establish Goals & Team

•  Initial Goals: Call to action

•  Who should be involved? Task  Force  

IT  

Security  

Source  Code  Admin  

Legal  

Development  

Page 13: [EMC] Source Code Protection

13  

•  Policy: What needs to be done to protect source code.

•  Strong passwords to access source code

•  Transactions will be logged and protected

•  Standards: How to implement policy. •  Source code systems are integrated

with organization’s identity management system and use network password.

•  Transactions are logged to syslog and exported every 20 minutes to a log aggregation system.

Establish Goals & Team

•  Initial Goals: Call to action

•  Who should be involved?

•  Policies & Standards

Page 14: [EMC] Source Code Protection

14  

•  Achievable & Maintainable: Consistent approach to implementation

•  Measureable: Evaluation if a control is in place and how it is functioning

Establish Goals & Team

•  Initial Goals: Call to action

•  Who should be involved?

•  Policies & Standards

•  Procedures & Assessments

RISK  REDUCTION  

Page 15: [EMC] Source Code Protection

15  

Source  Code  

Backups  

Hardware  

Storage  EncrypMon  

DLP  

Network  IsolaMon  

Physical  IsolaMon  

Virtual  IsolaMon  

Virtual  Containment  

Preven;ve  

Detec;ve  

Correc;ve  

•  Authentication is a way to prove your identity such that no one can later say it wasn’t you

Identity + Secret = Authentication

•  Centralized authentication mechanisms

•  Why local accounts cause problems

Value of and risk to the data informs appropriate security solutions

Defining Security Criteria

•  Defense-in-depth •  Data Classification •  Identity/Authentication •  Access Controls •  Isolation •  Data Protection •  Hardening •  Avoiding Malicious Code •  Logging Layers of Protection

Services  Ports  

Security  Patches  ConfiguraMon  

Code  Changes  

•  Chain  of  Custody  

•  Code  reviews  •  Reputable  sourcing  

•  Integrity  checks  

Environment  

•  Servers  • WorkstaMons  •  Malware  •  Rootkits  

Principle of Least Privilege

•  The Apache Way …

Reduce vulnerable surface area of a server

eGRC Compliance monitoring

Forensics  

Log  protecMon  

Regular  reviews  

AcMve  monitoring  

• Restricted  access  • Storage  monitors  • Log  aggregaMon  

• One  of  the  most  common  ways  insiders  detect  breaches  

Page 16: [EMC] Source Code Protection

16  

Define Security Criteria

•  We have a team •  We have basic Defense-in-Depth security

solutions •  Now … draft Source Code Security Policies and

Standards to document expectations

Page 17: [EMC] Source Code Protection

17  

What can we do? Understand the current environment

Page 18: [EMC] Source Code Protection

18  

Establish a baseline

Where are we?

•  Scope your environment •  Environment diagrams

Page 19: [EMC] Source Code Protection

19  

Establish a baseline

Where are we?

•  Scope your environment •  Environment diagrams •  Engineering practices

Page 20: [EMC] Source Code Protection

20  

Establish a baseline

Where are we?

•  Scope your environment •  Environment diagrams •  Engineering practices •  Data classification:

where is the important “stuff”?

•  Threat Modeling

Page 21: [EMC] Source Code Protection

21  

Establish a baseline

Where are we?

•  Scope your environment •  Environment diagrams •  Engineering practices •  Data classification:

where is the important “stuff”?

•  Threat Modeling •  Tools

•  Are they working securely? •  Simple solutions?

•  Turn on functionality •  Add-ons

•  Cost/benefit •  Change tools •  Reinforce environment

Don’t throw the baby out with the

bathwater!

Page 22: [EMC] Source Code Protection

22  

Where are we?

•  Scope your environment •  Environment diagrams •  Engineering practices •  Data classification: where

is the important “stuff”? •  Threat Modeling •  Tools •  Usability!!!

Page 23: [EMC] Source Code Protection

23  

What did EMC find?

Page 24: [EMC] Source Code Protection

24  

2011 EMC Summary of 5 Common Brands

Analysis of product features, not existing implementations

Repository 1 Repository 2 Repository 3 Repository 4 Repository 5

Out of

Box

Add On

Out of

Box

Add On

Out of

Box

Add On

Out of

Box

Add On

Out of

Box

Add On

Corporate  authenMcaMon   ü ü ü ü ü

Logs  of  transacMons  against  access  controls  can  be  exported  to  a  monitoring  tool.   ü PARTIAL ü PARTIAL ü ü PARTIAL ü

Granular  access  controls   PARTIAL x PARTIAL x PARTIAL ü x ü

Support  for  code  review  workflow   PARTIAL ü x ü x ü ü x ü

11 High level policy criteria and 31 controls (not weighted)

Page 25: [EMC] Source Code Protection

25  

2011 EMC Summary of 5 Common Brands 11 High level policy criteria and 31 controls (not weighted)

0%  10%  20%  30%  40%  50%  60%  70%  80%  90%  100%  

Overall  Risk  Assessment  Percentages  

Add-­‐On  

Out  of  Box  

  Repository  1   Repository  2   Repository  3   Repository  4   Repository  5  

Out-­‐of-­‐Box   Add-­‐On    

Out-­‐of-­‐Box   Add-­‐On    

Out-­‐of-­‐Box   Add-­‐On    

Out-­‐of-­‐Box   Add-­‐On    

Out-­‐of-­‐Box   Add-­‐On    

TOTAL 200 210 160 210 160 210 220 220 170 220 (out  of  220)

Percentage 91% 95% 73% 95% 73% 95% 100% 100% 77% 100% Difference:   5%   23%   23%   0%   23%

Analysis of product features, not existing implementations

Page 26: [EMC] Source Code Protection

26  

EMC’s Observations

•  Most major Source Code Repository systems can be made acceptable

•  All existing solutions can be made better •  Newer SCMs have more security built–in or added as features •  Source code is highly visible to many people regardless of

whether the SCM is distributed (like Git) or not •  A poorly configured underlying platform or poor practices can

undermine strength of any application controls that may exist

Page 27: [EMC] Source Code Protection

27  

Managing change … … to steady state

Page 28: [EMC] Source Code Protection

28  

Action

Like most organizational projects … •  Team •  Policies & Standards •  Evaluate •  Plan •  Implement

… except this must be a continuous process.

Page 29: [EMC] Source Code Protection

29  

Continuous Monitoring and Improvement

Observe  &  Orient  

•  Minimize new options •  Until you get a handle on your

environment •  Don’t chase a moving target

•  Assessments •  Security awareness training

needs to emphasize secure source code

Page 30: [EMC] Source Code Protection

30  

Continuous Monitoring and Improvement

Observe  &  Orient  

Decide  

•  Minimize new options •  Until you get a handle on your

environment •  Don’t chase a moving target

•  Assessments •  Security awareness training

needs to emphasize secure source code

•  How will you evaluate new solutions?

•  Expand scope: other build-related tools and infrastructure

Page 31: [EMC] Source Code Protection

31  

Triage  

eGRC  

Threat  Model  

Assessment  

Continuous Monitoring and Improvement

Observe  &  Orient  

Decide  

Page 32: [EMC] Source Code Protection

32  

Continuous Monitoring and Improvement

Observe  &  Orient  

Decide  

AcMon  

•  Test •  Deploy •  Implementation guidance

Page 33: [EMC] Source Code Protection

33  

Summary

Page 34: [EMC] Source Code Protection

34  

Summary

•  Evolving threats change how we need to think about source code security •  Collaboration: Expanding security awareness involves more stakeholders •  Policies & Standards: define security goals based on common security

strategies •  Measure: Baseline environment •  Implement & manage change •  Expand frameworks

Improve  security  in  the  source  code  environment  to  defend  against  threats  

Page 35: [EMC] Source Code Protection

35  

Thank you Stephanie Woiciechowski, GSEC EMC Product Security Office [email protected]