레이블이 SoftwareEngineering&CyberSecurity인 게시물을 표시합니다. 모든 게시물 표시
레이블이 SoftwareEngineering&CyberSecurity인 게시물을 표시합니다. 모든 게시물 표시

2017년 1월 27일 금요일

Low-Level Software Vulnerabilities

1. Vulnerability
 - High-level Vulnerability: Security
  e.g. Authentication, Privilege Escalation, Inappropriate Authorisation, Access Control, Integrity etc
 - Low-level Vulnerability: Safety
  e.g. Buffer Overflow, Heap-based exploitation, Stack-based exploitation, Integer overflow, File / Memory management  etc

2. Buffer Overflow

 : a bug that affects low-level code, typically in C and C++, with significant security implications
 - an attacker can alter the situations that cause the program to do much worse than a simple crash
  e.g. Steal private information / Corrupt valuable information / Run code of the attacker's choice

 - Buffer: Contiguous memory associated with a variable or field

 - Overflow: Put more into the buffer that it can hold

 - Heap Overflow

 - Integer Overflow
 - Read Overflow / Format String Overflow
   e.g. Heartbleed

http://www.thegeekstuff.com/2013/06/buffer-overflow/?utm_source=feedly


3. Code Injection

 : the exploitation of a computer bug that is caused by processing invalid data
  1) Create the injection vector
   the vector = Shellcode address + Shellcode + NOP sled
  2) Get injected code to run

https://www.techopedia.com/definition/20022/code-injection


4. Defence Strategies

 - Avoid the buffer overflow entirely
  * Secure coding: use C functions that support bounds checking
   ! Automatic Techniques



 Stack Canaries
Non-Executable Stacks
ASLR
(Address Space Layout Randomisation)
 Goal  make sure we detect overflow of a return address  prevent an attacker to execute his code  prevent the attacker from guessing the memory address of his code
 Idea  - The functions' prologues insert a canary on the stack
 - The canary is a value inserted between the return address and local variables
 - Mark data memory as non-executable  - Randomise the address in memory of all code, heap, stack, global variables, etc
 - Buffer overflow: the attacker does not know the address of shellcode
 Advantages  - Useful to protect against buffer overflows that overwrite the return address  - Prevent only execution of malicious code on the stack
 Limitations  - Do not protect the program from exploits that modify variables, object pointers, or function pointers
 - Do not protect against heap buffer overflow
 - Do not prevent buffer overflow attacks that modify return address, variables, object pointers, or function pointers
 - Do not prevent buffer overflow in the heap or data segments of the memory of the program
 - May affect performance
 - Do not prevent the return address on the stack from being overwritten
 - Do not prevent attacks where the attacker overwrites data

http://security.stackexchange.com/questions/20497/stack-overflows-defeating-canaries-aslr-dep-nx


  * Code Review



 Static Analysis
 Dynamic Analysis
 Definition  all about what we can learn from the program without running it  all about what we can learn from the program while it is running
 What can you find?  - Checking against pre-defined rules
  e.g. Flow issues, Security issues, Memory issues, Input issues, Resources leaks
 - Runtime error detection
 - Memory issues/leaks
 - Input / output validation issues
 - Pointer arithmetic errors
 - Performance
 What cannot you find?  - non-trivial properties of programs are undecidable  - Anything off the runtime path
  e.g. input dependent
 Tools  - Source code analysers
 - Byte code analysers
 - Binary code analysers
  => Intermediate Representations
    * Abstract Syntax Trees (AST)
    * Control Flow Graphs (CFG)
 - Valgrind: a tool suite that provides a number of debugging and profiling tools
   esp. Memcheck
 - Pin: a dynamic binary instrumentation framework => Pintools
 Limitations  - False positives: the tool reports bugs that program does not contain
 - False negatives: the program contains vulnerabilities that the tool does not report
 - No false positives or negatives on a given run
 - Do not need source code
 - Clear which path was taken
 - Can be used on live code

 - Detect vulnerabilities only on execution path

 - Significant computational resources are required to perform the analysis
 - It is more difficult to track back a vulnerability to its exact location in the code

http://www.testingexcellence.com/static-analysis-vs-dynamic-analysis-software-testing/


  * Testing

 - Make the buffer overflow harder to exploit

5. Types of Malware

 - Target: Mass, Specific
 - Forms: Trojan Horse, Virus, Worm etc.

 - Characteristics

  * Information stealing: Keyloggers, sniffers, Password stealers, Intercepting etc
  * Remote access: Backdoor, Botnet etc
  * Ransomware: Once everything is encrypted, inform the user and demand money
  * Rootkit: Hooking into OS calls and changing their behaviours
  * Scareware: Generally, disable general computer operation
  * Downloader / Launcher: bundle other malware

 - Common techniques

  * Persistence: Malware generally needs to persist between system boots
  * stealth: camouflage against legitimate system files
  * Packing
  * Obfuscation
  * Rootkits
  * Anti-analysis

 - Basic Static Analysis: Examine the PE file itself

  * Signature: What was it compiled with?
   => Detect it Easy
  * Structure: Is it packed?
  * Sections: How is the file made up?
   => PEStudio
  * Metadata: what other information is there?
  * Certification: Has the file been digitally signed?
  * Imports: What does it use
   => Dependency Walker
  * Exports: What does it make available?
  * Strings: What text does it contain?
   => Strings
  * Resources: What icons, menus, dialogs does it have
   => Resource Hacker

 - Advanced Static Analysis: Taking the malware on the disk in binary form and disassembling it into assembly code

  => IDA

http://usa.kaspersky.com/internet-security-center/internet-safety/what-is-malware-and-how-to-protect-against-it#.WHuPIRvJxnI

Model Checking for Cyber Security

1. Why Model Checking?
 - to ensure a software is secure
  => think hard about possible attack scenarios
  => what if you missed a possible attack?
  => Did you implement the attacks correctly?
 - The general correctness problem: Does the system meet the specification?

2. Formal methods

 - A different approach to correctness
  => Correctness problem is same
  => determine whether system meets the specification
  => However, system, specification must be mathematically precise
     Establishing correctness = proof
                                "Mathematically complete argument that system meets specification"
  => Proofs are hard! They require deep expertise
     ...Maybe they can be automated? but, it is impossible to prove everything automatically
  => but maybe some can?

http://ecomputernotes.com/software-engineering/formal-methods-model


3. Model Checking

 : Automated proofs of correctness
 : An automatic verification technique for finite state concurrent systems
 - Systems: Finite-state Kripke structures
  e.g. Dining Philosophers
 - Specifications: Temporal logic
 * LTL: Linear Time Logic 

4.Model Checking and Security

 : Model checking detects (automatically) if given finite-state system satisfies TL formulas
 - How can this be used to check system security?
  1) Formulate desired security properties in TL
  2) Model system and possible intruders
  3) Check if system satisfies formulas

http://seclab.stanford.edu/pcl/mc/mc.html


5. Needham-Schroeder Protocol / Needham-Schroeder Protocol with Lowe's fix

 : establish authenticated connection between A (initiator) and B (responder)

http://www.slashroot.in/needham-schroeder-protocol-explained


http://proverif.rocq.inria.fr/index.php

Risk-Based Testing

1. Risk-based testing
 : uses risk to prioritise and emphasise the appropriate tests
 - Objective: to find the most important defects as early as possible at the lowest price
 - Business based decision: involves key business and technical project stakeholders to align the focus and sequence of testing


 Process
Basic concepts 

 Test Planning  - the activity of establishing or updating a test plan
 - the objectives, scope, approach, resources, exit criteria, and schedule of intended test activities 
 - Test objectives
 - Test prioritisation / selections
 - Risk metrics
 - Exit criteria 
 Test Design  - transforms the test plan into tangible test conditions and abstract test cases   - Coverage criteria
 - Test types 
 Test Execution  - comprises tasks to execute test cases
 - making the abstract test cases executable 
 - Logging support
 - Test automation
 http://melancholy8914.blogspot.co.uk/2017/01/model-checking-for-cyber-security.html 
 - Monitoring
 - Risk Metrics measurement
 Test Evaluation  - evaluates the exit criteria and logged test results   - Risk reporting
 - Test re-assessment
 - Test exit decision
 - Risk mitigation 

http://istqbexamcertification.com/what-is-risk-based-testing/

Designing Secure Architectures Using Security Patterns

1. Building Secure Architectures
 : Identify Threats -> Plan Mitigation Strategy -> Instantiate Strategy
  |<--------- STRIDE / LINDDUN -------->|<- Security Patterns ->|
 ( http://melancholy8914.blogspot.co.uk/2017/01/uncover-security-design-flaws-with.html / http://melancholy8914.blogspot.co.uk/2017/01/uncover-privacy-design-flaws-with.html )

2. Security Pattern

 : a well-understood solution to control, stop or mitigate a set of specific threats through some security mechanisms defined in a given context

 - Template: Standard way to describe a pattern



 Sections
Descriptions 
 Name  - Should capture the essence of the pattern in a concise and catchy manner 
 Intent  - Should summarise the pattern briefly in 2/3 sentences
 - Includes what the purpose or intent of the pattern
 Aliases  - Should enumerate other names for the patterns 
 Problem & Forces  - Outlines the context in which the patterns is applicable, as well as explaining the motivation for using patterns 
 Solution  - Should describe at a high level how the pattern solves the problem described in the problem statement 
 Static structure  - Presents the constituent elements involved in the usage of this pattern 
 Dynamic structure  - Describes interactions between the various components in the static structure 
 Implementation & Pitfalls  - Most common mistakes in the usage of this pattern and provide the reader with guidance for avoiding them 
 Consequences  - Describes the possible impact of using the pattern with respect to CIAA, performance, cost, manageability and usability 
 Example and Known Uses  - Explicit references to products or systems 

 - Instantiating a Security Pattern

  * New components need to be introduced
  * Wire the new components to the existing ones
  * Modify existing components

http://www.securitypatterns.org

Uncover Privacy Design Flaws with LINDDUN

1. Privacy Terminologies
 - Personal Identifiable Information (PII): Information which can be linked back to an individual
 - Data subject: Individual that is linked to the PII
 - Data Controller: To whom the PII is released
 - Item of Interest (IOI): Information related to an individual
 - Hard privacy (data minimisation): releasing less information
 - Soft privacy (data release): considers post-release scenarios


 Terminologies
Definitions 
Properties 
 Unlinkability  - Not being able to distinguish whether 2 IOIs are related  - Hiding the link between two or more actions, identities, and pieces of information 
 Anonymity  - Not being able to identify the subject within a set of subject  - Unlinkability and Anonymity are related: if an IOI and a subject are unlinkable, the subject is anonymous w.r.t. the IOI
 - Subject anonymity
 - Recipient anonymity 
 Pseudonymity  - Use of pseudonyms as identifiers, which is an identifier of a subject other than one of the subject's real names
 Plausible Deniability  - The ability to deny having performed an action that other parties can neither confirm nor contradict
 - Being able to repudiate having performed an action 
 - Complimentary to non-repudiation
 - Non-repudiation and plausible deniability are mutually exclusive
 Undetectability  - Not being able to sufficiently distinguish whether it exists or not 
 Unobservability  - Undetectability of the IOI against all subjectsuninvolved in it and anonymity of the subject(s)involved in the IOI even against the other subject(s) involved in that IOI   - Unobservability = undetectability + anonymity
 - Sender unobservability
 - Recipient unobservability
 - Relationship unobservability
 Confidentiality  - Authorised restrictions on information access and disclosure 
 Awareness  - Being conscious about consequences of sharing PII 
 Compliance  - Following regulations and internal business policies 

 - Solove's taxonomy

  * Information collection: surveillance and interrogation
  * Information processing: aggregation, identification, insecurity, secondary use and exclusion
  * Information dissemination: breach of confidentiality, disclosure, exposure, increased accessability, appropriation and distortion
  * Invasion: incation violations and decisional interference violations

 - FIPPs (For Information Practice Principles) taxonomy

  * Notice / Awareness: customers should be informed before collecting PII
  * Choice / Consent: customers must be able to choose how their PII will be used
  * Access / Participation: users should be able to access PII
  * Integrity / security: data should be accurate and secure

 - Privacy by Design

  * Proactive not reactive; Precentative not remedial
  * Privacy as default setting
  * Privacy embedded into design
  * Full functionality - positive sum, not zero-sum
  * End-to-end security - full lifecycle protection
  * Visibility and transparency - keep it open
  * Respect for user privacy - keep it user-centric

 https://www.techopedia.com/definition/24954/internet-privacy


2. LINDDUN 

(Linkability / Identifiability / Non-Repudiation / Detectability / Disclosure of information / Unawareness / Non-Compliance)
 : methodology to help software engineers with limited privacy expertise to introduce privacy early in the SDLC

 1) Define DFDs (Data Flow Diagrams)


 ​2) Map pricvacy threats to DFD elements


 Threat
Privacy Property 
Definition 
 Linkability  Unlinkability   Distinguish whether 2 IOIs are related 
 Identifiability  Anonymity
 Pseudonymity 
 Pinpoint the identify of a subject 
 Non-Repudiation  Plausible Deniability   Gather evidence so that a party cannot deny having performed an action 
 Detectability  Undetectability   Distinguish whether an item of interest exists 
 Disclosure of information  Confidentiality   Exposing information to someone not authorised to see it 
 Unawareness  Awareness   User unawareness of which information is providing to the system and the consequence of it 
 Non-Compliance  Compliance   System is not compliant with data protection legislation 


L
 External Entity




 Process

 Data Store
X

 Data Flow
X


  - Assumptions: When adding DFD elements, the number of threats grows exponentially

   => Assumptions are explicit or implicit choices to trust an element of the software to behave as expected

 3) Identify threat scenarios

  - For each potential threat denoted by an "X" placed in the mapping table identify a concrete threat
  - Use the LINDDUN Privacy Threat Tree Catalog

 4) Prioritise Privacy Threats

  - Risk level given by the combination of likelihood and impact

 5) Elicit mitigation strategies

  - Use the mapping table that links mitigation strategies and LINDDUN threat trees
   
 6) Select corresponding PETs (Privacy Enhancing Techniques)

https://sites.google.com/site/linddunstudy/

Uncover Security Design Flaws with STRIDE

1. Threat Modelling
 : to identify security design issues before code is committed
 1) Define use scenarios
  - Not the use case scenarios of the software
  - Determine which key threat scenarios are within scope
  - Don't forget the insider-threat scenarios

 2) Gather a list of external dependencies

  - Consider and document each external dependencies 
   e.g. OS, web-server, DB

 3) Define security assumptions
  - Inaccurate security assumptions might make an application utterly insecure

 4) Create external security notes
  - Notes regarding security for users and other application designers

 ----------------- STRIDE ------------------------------------

 5) Create one or more DFDs of the application being modelled
 6) Determine threat types
 7) Identify the threats to the system
 8) Determine risk
 9) Plan mitigations
 ----------------- STRIDE ------------------------------------

https://msdn.microsoft.com/en-us/library/ff648644.aspx


2. STRIDE (Spoofing / Tampering / Repudiation / Information Disclosure / Denial of Service / Elevation of Privilege)

 : Popular threat modelling technique by Microsoft
 : Focus on what an attacker is trying to achieve
 : Require little security expertise

 1) Create Data Flow Diagrams (DFDs)
  - Model how data enters, leaves and traverses software components
  - DFDs Decomposition: iterate over processes, data stores, and see where they need to be broken down

 2) Identify the Threats
 Threat
 Security Goal 
 Definition
 Spoofing  Authentication  Impersonating something or someone else
 Tampering  Integrity   Modifying data or code
 Repudiation  Non-repudiation   Claiming to have not performed an action
 Information Disclosure  Confidentiality   Exposing information to someone not authorised to see it
 Denial of Service  Availability   Deny or degrade services to users
 Elevation of Privilege  Authorisation   Gain capabilities without proper authorisation

  - Map STRIDE to DFD Elelment Types



 S
 External Entity
X

X



 Process
X
X
X
X
X
X
 Data Store
X
?
X
X

 Data Flow
X

X
X


  - Refine threats with threat tree patterns

   * Generic threat types are refined into concrete threats via trees

 3) Assess the Risks

  - Four Possible Risk Levels
   * 1 very high: must be fixed
   * 2 high
   * 3 medium
   * 4 low

 4) Plan for mitigations

  - Four ways to address threats
   * 1 Do Nothing
   * 2 Remove the feature
   * 3 Accept vulnerability in design
   * 4 Counter the threats with technology

https://msdn.microsoft.com/en-us/library/ee823878(v=cs.20).aspx

Eliciting Security Requirements

1. Security Requirements
 - What the system should NOT be able to do
 - Should be explicitly stated so that these requirements can be tested as often as possible
 - Constraints on the functions of the system, where the constraints operationalise one or more security goals (integrity, confidentiality etc)
  e.g. Transactions involving personal health information must be logged

http://www.opensecurityarchitecture.org/cms/definitions/it_security_requirements


2. Elicitation Methods and Techniques
 - Techniques: Misuse / Abuse Cases, Attack Trees
 - Processes: SQUARE, SREP etc

3. Misuse Cases

 : Tool for helping to think about software the same way attackers do
 - Building Misuse Cases
  1) Start from a normal use case model
  2) Identify actors (attackers / misusers)
  3) Identify the Misuse cases
  4) Identify threaten relationships between use cases and misuse cases
   * Threaten: The use case is exploited or hindered by the misuse case
   * Mitigate: The use case is a countermeasure against a misuse case
  5) Identify security use cases a.k.a security requirements

http://searchsoftwarequality.techtarget.com/tip/Threat-modeling-enhanced-with-misuse-cases


4. Attack Trees
 - Used for threat modelling, security requirements elicitation
 - Root of the tree represents the attack goal
 - Building Attack Trees
  1) Identify top level attacks against the system
  2) Brainstorm for different ways these attack can be achieved

https://www.isograph.com/software/attacktree/


!! Think about the strength of Misuse Case and Attack Tree, do we need both for eliciting security requirements?


 Misuse Cases  - drill down to the details of the interactions between system components in the event of attack
 Attack Trees  - enable the requirements team to have a complete set of misuse cases
 - provide a general picture of potential attacks on a system 
 As a result, mapping Attack trees to Misuse Cases provides a useful sanity check => Two independent teams work in parallel


5. SQUARE (Security QUAlity Requirements Engineering)

 : step-wise methodology for eliciting, categorising and prioritising security requirements


 Steps
Objective 
 1. Agree on Definitions  to agree on definitions between stakeholders and the requirements engineering team 
 2. Identify Security Goals  to identify, resolve and prioritise security goals
  - Generate security goals, not requirements nor recommendations
 3. Develop Artifacts  to collect a complete set of artefacts of the system
  - Desirable artefacts to collect: System architecture diagram, Use / Misuse cases, Attack Trees etc
 4. Perform Risk Assessment  to identify
  - Vulnerabilities and threats that face the system
  - Likelihood that threats will materialise as real attacks
  - Potential consequences of an attack
 5. Select Elicitation Technique  to select an elicitation technique and document the rationale for the choice 
 6. Elicit Security Requirements  to identify initial set of security requirements 
 7. Categorise Requirements  to allow requirements engineers and stakeholders to classify requirements 
 8. Prioritise Requirements  to choose which requirements to implement
  - Essential / Conditional / Optional 
 9. Requirements Inspection  to find defects in the requirements 

http://www.cert.org/cybersecurity-engineering/products-services/square.cfm?

Security Risk Analysis with CORAS

1. Risk Analysis
 - Risk Management: Activity of performing a number of discrete risk analysis exercises to identify, track and mitigate risk throughout the SDLC
 - Risk Analysis: Activity of identifying and ranking risks at some stages of the SDLC
 - Risk Assessment: Activity of identifying and evaluating risks

 - Elements of Risk Analysis

  1) Threat: Entity who causes the threat
  2) Threat Event: Event or circumstance with potential adversely impact to organisational assets
  3) Threat Scenario: Set of discrete threat events that cause harm
  4) Vulnerability: Weakness that could be exploited by a threat
  5) Likelihood: Probability that a threat event will occur
  6) Adverse Impact / Consequence: Magnitude of the harm caused by a threat event
  7) Risk: Function of Likelihood and Adverse Impact / Consequence
  8) Treatment: An appropriate measure to reduce risk level

 - Risk Analysis Process



 Phase
 Description
 Context Identification  - Characterise target of analysis
 - Specify risk evaluation criteria 
 Risk Identification  - Identify threats / vulnerabilities   Risk Assessment
 Risk Estimation  - Risk = Likelihood * Impact
 Risk Evaluation  - Determine which risks need treatment 
 Risk Treatment  - 4 options: Accept / Treat / Avoid or Terminate / Transfer 

https://www.mindtools.com/pages/article/newTMC_07.htm


2. CORAS
 - Language: A graphic language that supports the analysis process
 - Process: A process for security risk analysis based on internationally established standards (ISO 31000)
 - Tool: A graphical editor

3. CORAS Process



 Steps
Objective 
Tasks 
Artifacts 
 1. Preparation for the analysis  to do the necessary initial preparations prior to the actual startup of the analysis  - Setting the scope and focus
 - Informing the client of its responsibilities
 2. Customer presentation  to achieve an initial understanding of the target of risk analysis  - Client presents the goals and the target of the analysis
 3. Refining the target  to ensure a common understanding of the target analysis  - Identify the parties and assets  - Asset diagram 
 4. Approval of the target  to decide a ranking of the assets   - Define Likelihood / Consequence scales for each direct asset
 - Agree on Risk evaluation criteria
 - Likelihood / Consequence scales
 - Risk function and Risk evaluation criteria 
 5. Risk Identification  to identify unwanted incidents, threats, threat scenarios and vulnerabilities  - Identify Assets and Threats
 - Identify Unwanted incidents
 - Identify Threat Scenarios
 - Identify Vulnerabilities 
 - Threat diagrams 
 6. Risk estimation  to determine level of the identified risks   - Assign likelihood estimated for each Threat Scenario
 - Assign likelihood estimated for each Unwanted Incident
 - Assign consequence caused by each Unwanted Incident on each Asset 
 - Threat diagrams with likelihood and consequences assigned
 7. Risk evaluation  to identify acceptable risks and risks that have to be treated   - Map the risks into the Risk Function (from step 4)
 - Evaluate which risks are acceptable and which are not
 - Summarise the risk picture by Risk Diagram 
 - Completed Risk Function
 - Risk diagram with evaluation result 
 8. Risk treatment  to identify cost-effective treatments for the unacceptable risks   - Identify Treatment Scenario for unacceptable risks
 - Summarise by Treatment Overview diagram
 - Estimate the cost-benefit of each treatment 
 - Treatment diagram 

http://coras.sourceforge.net/

Security Usability


1. looking the barn door after the horse is gone!

 => don't understand the associated risks !!

2. Why security fails

 - Security is a secondary task to the user
 - Users have various backgrounds e.g. skill, language, culture
 - Users have little knowledge about security

3. Security usability

 - A set of guidelines focusing on the usability and security to ensure a system is secure and usable
 - For best usability, a system should be easy to learn / efficient to use / easy to remember / less error prone/likable
 - For security, a system should assure of integrity / availability / authentication / authorisation / confidentiality

https://gds.blog.gov.uk/2014/02/10/striking-a-balance-between-security-and-usability/


https://www.coursera.org/learn/usable-security

2017년 1월 20일 금요일

Secure Software Development Life Cycle

1. Three pillars of software security
 1) Risk Management framework ( http://melancholy8914.blogspot.co.uk/2017/01/security-risk-analysis-with-coras.html )
 2) Software security touchpoints
 3) Knowledge

 http://www.swsec.com/resources/pillars/


2. Software Security Touchpoints

 : Numbered according to effectiveness and importance of their "natural utility" per Gary McGraw in "Software Security"


Security Development Lifecycle (SDLC)
Touchpoints
 Requirement & Use Cases 2) Architectural risk analysis
 5) Abuse / Misuse Cases
 6) Security Requirements
 Architecture & Design 2) Architectural risk analysis
 Test Plans 4) Risk-based security testing
 Code 1) Code review with a tool
 Tests & Test Results 3) Penetration testing
 Feedback from the Field 3) Penetration testing
 7) Security operations

 1) Code review with a tool

  - Static analysis tools to identify common vulnerabilities
  ( http://melancholy8914.blogspot.co.uk/2017/01/low-level-software-vulnerabilities.html )
  e.g. buffer overflow

 2) Architectural risk analysis

  ( http://melancholy8914.blogspot.co.uk/2017/01/security-risk-analysis-with-coras.html )
  - Inspections and analysis approaches
  e.g. lack of authentication

 3) Penetration testing

  - Use application like an attacker
  e.g. Information leakage

 4) Risk-based security testing

 ( http://melancholy8914.blogspot.co.uk/2017/01/risk-based-testing.html )
  - Security features an attack patterns / misuse cases
  e.g. Elevation of privilege

 5) Abuse / Misuse Cases

  ( http://melancholy8914.blogspot.co.uk/2017/01/eliciting-security-requirements.html )
  - Think like an attacker
  e.g. Spoofing

 6) Security requirements

  ( http://melancholy8914.blogspot.co.uk/2017/01/eliciting-security-requirements.html )
  - Functional security requirements and emergent security requirements
  e.g. No explicit description of necessary data protection

 7) Security operations

  - Network security, firewalls
  e.g. Intrusion detection

http://www.swsec.com/resources/touchpoints/


3. Security Development Lifecycle (SDL)

 : A software development security assurance process consisting of security practices by Microsoft


 SDL
 Practices
 Descriptions
 Training  1) Core Security Training - Need to cover all the topics in the SDL
 Requirements  2) Security and Privacy Requirements  - These are process and team organisation requirements, not technical requirements for the product
 3) Create quality gates/bug bars  - Define and document a bug bar for security and privacy
 - Ensure that bug reporting tools can track security and privacy issues
 4) Security and Privacy Risk Assessment  - Start a security plan
 - Identify timing and resources for SDL steps
 - Security Risk Assessment: Identify specific functional areas
 - Privacy Risk Assessment: Initial Privacy Impacting Rating (PIR)
 Design  5) Establish Design Requirements  - Consider design principles
 6) Attack Surface Analysis / Reduction  - The best proactive strategy is to reduce a system's attack surface
 - A system's attack surface has three abstract dimensions
  : targets and enablers
  : channels and protocols
  : access rights
 7) Threat Modelling  - A process to understand (potential) security threats to a system, determine risks from those threats, and establish appropriate mitigations
( http://melancholy8914.blogspot.co.uk/2017/01/uncover-security-design-flaws-with.html )
( http://melancholy8914.blogspot.co.uk/2017/01/uncover-privacy-design-flaws-with.html )
 Implementation  8) Use Approved tools  - Security isn't static: Update your tools because they change with dynamic threat environment
 9) Deprecate Unsafe Functions  - Unsafe functions:
 http://msdn.microsoft.com/en-us/library/bb288454.aspx
 10) Perform Static Analysis  - Code review with a tool
 Verification  11) Perform Dynamic Analysis  - Run-time verification necessary to ensure a program's functionality works as designed
 - Black box testing: testing proceeds without knowledge of the code
 ( http://melancholy8914.blogspot.co.uk/2017/01/low-level-software-vulnerabilities.html )
 12) Fuzz Testing  - Deliberately send attack strings to the program to see how the program will react
 13) Attack Surface Review  - Inevitably, the code won't match the initial design
 - Use Attack Surface Analyzer (ASA) to analyse actual attack surface
 Release  14) Incident Response Plan  - Prepare Cyber Security Incident Response Plan (CSIRP)
 15) Final Security Review  - The Final Security Review (FSR) is an examination of all SDL activities performed prior to release
 - Used as a determining factor on whether or not to release
 16) Release / Archive  - Complete final signoffs
 Response  17) Execute Incident Response Plan  - Get ready to execute on response tasks outlined during Security Response Planning

https://www.microsoft.com/en-us/sdl/