Cybrary CSSLP Slides
Cybrary CSSLP Slides
Cybrary CSSLP Slides
2
CSSLP AGENDA CONTINUED
Part III Secure Software Design
Design Process
Design Considerations
Securing Commonly Used Architectures
Technologies
Part IV Secure Software Implementation/Coding
Common Software Vulnerabilities and Countermeasures
Defensive Coding
Secure Software Coding Operations
CSSLP AGENDA CONTINUED
Part V
Security Quality Assurance Testing
Security Testing
Part VI Secure Software Acceptance
Secure Software Acceptance
Part VII Secure Software Installation, Deployment, Operations,
Maintenance and Disposal
Secure Software Installation and Deployment
Secure Software Operations and Maintenance
Supply Chain and Software Acquisition
EXAM SPECIFICS
175 Questions
4 hours to complete the exam
You can mark questions for review
You will be provided with 1 laminated sheet 8x11 and a pen.
You will also have access to an on-screen calculator if
necessary
Many test centers provide earplugs or noise cancelling head
phones. Call your center ahead of time to verify
Questions are weighted (Remembersecurity transcends
technology)
5
THE CSSLP MINDSET
The Exam is not about the code. It is about the process of writing the
code.
The better the process, the better the product.
Do NOT fix Problems. Fix the process.
How much security is enough?
All decisions start with risk management. Risk management starts
with Identifying/Valuating your assets.
Security Transcends Technology
Incorporate security into the design, as opposed to adding it on later
Layered Defense!
6
TEST TAKING TIPS
If you havent already, SCHEDULE THE TEST!!!
Start with the question mark. Often the beginning of the
scenario is a distraction
Choose an answer for EVERY question. Even those you
mark for review, just in case you run out of time.
Be cautious about changing answers. Your first instinct is
often right. Trust yourself and your knowledge and what we
do in class. Dont second guess!
Take Breaks as needed. Plan on 50 questions per hour.
7
PART I
Secure Software Concepts
Part I General Security Concepts
SECURITY BASICS
SECURITY BASICS AGENDA
General Security Concepts
CIA Triad
IAAA of Access Control
Security Tenets
Security Models
Access Control Models
Adversaries
CONFIDENTIALITY
Prevent unauthorized disclosure
Threats against confidentiality:
Social Engineering
Training, Separation of Duties, Enforce Policies and Conduct
Vulnerability Assessments
Media Reuse
Proper Sanitization Strategies
Eavesdropping
Encrypt
Keep sensitive information off the network
Password Cracking
Strong Hashing Algorithms
Salting Passwords
11
INTEGRITY
Detect modification of information
Corruption
Intentional or Malicious Modification
Message Digest (Hash)
MAC
Digital Signatures
12
AVAILABILITY
Provide Timely and reliable access to resources
Redundancy, redundancy, redundancy
Prevent single point of failure
Comprehensive fault tolerance (Data, Hard Drives,
Servers, Network Links, etc)
13
AUDITING
Logging and reviewing accesses to objects.
What is the purpose of auditing?
Auditing is a detective control
14
TENETS OF SECURE
ARCHITECTURE AND DESIGN
How Much Security is Redundancy
enough? Psychological Acceptability
Defense in Depth
Separation of Duties (SOD)
Fail-safe
Mandatory Vacations
Economy of Mechanism (The
K.I.S.S principle) Job rotation
Completeness of Design Least privilege
Least Common Mechanism
Need to know
Open Design
Dual control
Consider the Weakest Link
REQUIREMENTS OF SYSTEM ARCHITECTURE:
An information systems architecture must satisfy
the defined business and security requirements.
Security should be built into an information system
by design.
When designing system architecture, security and
business requirements needs to be carefully
balanced.
Tradeoffs are involved in reaching a balance
between security and business requirements.
16
LAYERED DESIGN
17
SECURITY ARCHITECTURE VS.
SECURITY MODELS
The security requirements of an information system are
driven by the security policy of the organization that will
use the security model lays out the framework and
mathematical models that act as security-related
specifications for a system architecture.
The system architecture, in turn, is the overall design of
the components - such as hardware, operating systems,
applications, and networks of an information system.
This design should meet the specifications provided by
the security model.
18
ELEMENTS OF SYSTEM ARCHITECTURE
TCB (Trusted Computer Base)
Originated from the Orange Book and deals with the protection mechanisms within
a computer. It addresses hardware, software, and firmware.
Security Perimeter
It delineates the trusted and the untrusted components within a computer
system.
Reference Monitor
The reference monitor is an abstract machine concept that mediates all access
between subjects and objects.
Security Kernel
The Security kernel enforces the reference monitor concept.
Must facilitate isolation of processes
Must be invoked at every access attempt.
Must be small enough to be tested and verified in a comprehensive manner.
19
SECURITY MODELS
Bell-LaPadula
Biba
Clark-Wilson
Brewer-Nash
Take-Grant
BELL-LAPADULA
Has 3 rules:
Simple Security Property no read up
A subject cannot read data from a security level
higher than subjects security level.
*_Security Property no write down
A subject cannot write data to a security level lower than
the subjects security level.
Strong * Property no read/write up or down.
A subject with read/write privilege can perform read/write
functions only at the subjects security levels.
BIBA INTEGRITY MODEL
The Rules:
Simple integrity axiom no read down A
Subject cannot read data from an object of
lower integrity level.
* Integrity axiom no write up A Subject
cannot write data to an object at a higher
integrity level.
Invocation property A subject cannot invoke
(call upon) subjects at a higher integrity level.
CLARK-WILSON
Integrity models Clark-Wilson Model
Model Characteristics:
Clark Wilson enforces well-formed transactions
through the use of the access triple:
UserTransformation ProcedureCDI (Constrained
Data Item)
SEPARATION of DUTIES
Deals with all three integrity goals
Prevents unauthorized users from making modifications
Prevents authorized users from making improper modifications
Maintain internal and external consistency reinforces separation
of duties
BREWER-NASH
TAKE-GRANT
26
DAC
Discretionary Access Control
Security of an object is at the owners discretion
Access is granted through anACL (Access Control List)
Commonly implemented in commercial products and all
client based systems
Identity Based
27
MAC
Mandatory Access Control
Data owners cannot grant access!
OS makes the decision based on a security label system
Subjects label must dominate the objects label
Users and Data are given a clearance level (confidential,
secret, top secret etc)*
Rules for access are configured by the security officer and
enforced by the OS.
28
MAC
MAC is used where classification and confidentiality is of utmost
importance military.
Generally you have to buy a specific MAC system, DAC
systems dont do MAC
SELinux
Trusted Solaris (now called Solaris with Trusted
Extensions)
29
MAC SENSITIVITY LABELS
All objects in a MAC system have a security label*
Security labels can be defined the organization.
They also have categories to support need to know at a
certain level.
Categories can be defined by the organization
30
ROLE BASED ACCESS CONTROL
31
ROLE BASED ACCESS CONTROL
Uses a set of controls to determine how subjects and objects
interact.
Dont give rights to users directly. Instead create roles
which are given rights. Assign users to roles rather than
providing users directly with privileges.
Advantages:
This scales better than DAC methods
Fights authorization creep*
32
ROLE BASED ACCESS CONTROL
When to use*
If you need centralized access
If you DONT need MAC
If you have high turnover
33
ADVERSARIES
Script Kiddies
Hackers
Elite
Non-Structured
Structured
Highly Structured
Nation State
Whos the Target?
SECURITY BASICS REVIEW
General Security Concepts
CIA Triad
IAAA of Access Control
Security Tenets
Security Architecture
Security Models
Access Control Models
Adversaries
Part I General Security Concepts
RISK MANAGEMENT
RISK MANAGEMENT AGENDA
Definitions and Terms
Types of Risk
Governance and Compliance
Risk Management Models
Risk Options
RISK RELATED DEFINITIONS
Risk: Likelihood that a threat will exploit a vulnerability in an asset
Threat: Has the potential to harm an asset
Vulnerability: A weakness; a lack of a safeguard
Exploit: Instance of compromise
Controls: Protective mechanisms to secure vulnerabilities
Safeguards: Proactive
Countermeasures: Reactive mechanism
Secondary Risk: Risk event that comes as a result of another risk
response
Residual Risk: The amount of risk left over after a risk response
Fallback Plan: Plan B
Workaround: Unplanned Response (for unidentified risk or when other
responses dont work
38
RISK MANAGEMENT
Risk Assessment: Identify Assets, Threats, Vulnerabilities
Risk Analysis: Value of Potential Risks
Risk Mitigation: Responding to Risk
Risk Monitoring: Risk is FOREVER!
ASSESSMENT
Identify and Valuate Assets
Identify Threats and Vulnerabilities
Methodologies:
OCTAVE: an approach where analysts identify asses and their
criticality, identify vulnerabilities and threats and base the
protection strategy to reduce risk
FRAP: Facilitated Risk Analysis Process. Qualitative analysis
used to determine whether or not to proceed with a
quantitative analysis. If likelihood or impact is too low, the
quantiative analysis if foregone.
NIST 800-30: Risk management Guide for Information
Technology systems
40
NIST 800-30
9 Step Process:
System characterization
Threat identification
Vulnerability identification
Control analysis
Likelihood Determination
Impact Analysis
Risk Determination
Control Recommendations
Results Documentation
41
RISK ANALYSIS
Qualitative
Subjective analysis to help prioritize probability and impact of
risk events.
May use Delphi Technique
Quantitative:
Providing a dollar value to a particular risk event.
Much more sophisticated in nature, a quantitative analysis if
much more difficult and requires a special skill set
Business decisions are made on a quantitative analysis
Can't exist on its own. Quantitative analysis depends on
qualitative information
42
QUALITATIVE ANALYSIS
Subjective in Nature
Uses words like high medium
low to describe likelihood and
severity (or probability and
impact) of a threat exposing a
vulnerability
Delphi technique is often used to
solicit objective opinions
43
QUANTITATIVE ANALYSIS
More experience required than with Qualitative
Involves calculations to determine a dollar value associated
with each risk event
Business Decisions are made on this type of analysis
Goal is to the dollar value of a risk and use that amount to
determine what the best control is for a particular asset
Necessary for a cost/benefit analysis
44
QUANTITATIVE ANALYSIS FORMULAS AND
DEFINITIONS
(AV) Asset Value: Dollar figure that represents what the asset is worth to the
organization
(EF) Exposure Factor: The percentage of loss that is expected to result in the
manifestation of a particular risk event.
(SLE) Single Loss Expectancy: Dollar figure that represents the cost of a single
occurrence of a threat instance
(ARO) Annual Rate of Occurrence: How often the threat is expected to
materialize
(ALE) Annual Loss Expectancy: Cost per year as a result of the threat
(TCO) Total Cost of Ownership is the total cost of implementing a safeguard.
Often in addition to initial costs, there are ongoing maintenance fees as well.
(ROI) Return on Investment: Amount of money saved by implementation of a
safeguard. Sometimes referred to as the value of the safeguard/control.
45
QUANTITATIVE ANALYSIS FORMULAS AND
DEFINITIONS CONTINUED
SLE = AV * EF
ALE = SLE * ARO
TCO = Initial Cost of Control + Yearly fees
Return on Investment:
ALE (before implementing control)
ALE (after implementing control)
cost of control
= ROI (Value of Control)
46
RISK MITIGATION
Quantitative Analysis leads to the proper risk Mitigation
strategy.
Reduce
Accept
Transfer
Avoidance
Rejection
47
ADDITIONAL RISK TERMS
Total Risk: The risk that exists before any control is
implemented
Residual Risk: Leftover risk after applying a control
Secondary Risk: When one risk response triggers another
risk event
48
RISK MANAGEMENT PROCESS REVIEW
Risk Assessment
usually the most difficult to accomplish
Many unknowns
Necessary effort of gathering the right data
Risk Analysis:
can be done qualitatively and/or quantitatively
Risk Mitigation
Take steps to reduce risk to acceptable level
Maintain that risk level
***Remember - Risk must be managed, since it cannot be totally eliminated
49
RISK MANAGEMENT REVIEW
Definitions and Terms
Types of Risk
Governance and Compliance
Risk Management Models
Risk Options
Part I General Security Concepts
SECURITY POLICIES AND
REGULATIONS
SECURITY POLICIES AND
REGULATIONS AGENDA
Definitions
FISMA
Legislation
PCI-DSS
PII
Intellectual Property
Organizations That Promote Standards
Federal Computers
FIPS
NIST
Secure Architecture
ADMINISTRATIVE CONTROLS
Policies
High level statement from senior/executive management.
Usually driven by laws, industry standards, liability
considerations, or other business objectives
Standards
Define the specifics of policy
Procedures
Step-by-step instructionshow to
Guidelines
Suggested best practices
FISMA
Federal Information Security Management Act
Each federal agency must implement an agency-wide
information security management program.
NIST was designated as the agency to design guides for
implementation
NIST published RMF for the purpose of compliance
SARBANES-OXLEY
Designed as a response to the corporate misdeeds of the
Nineties (Enron, World Com, Arthur Anderson, etc)
Emphasis is on corporate accountability through internal
controls and audits
Stresses the need to control the integrity of final
information so that confidence can be maintained
GRAMM-LEACH-BLILEY
Governs the collection and disclosure of Personal Financial
Information (PFI)
Covers the design, implementation, and maintenance of the
safeguards to protect PFI
Prohibits the use of pretexting to gain PFI data
HIPAA AND HITECH
Healthcare Insurance Portability and Accountability Act
Emphasizes the need for privacy on Personal Healthcare
Information (PHI)
This information is frequently sought after by
cybercriminals as it contains insurance information
and payment information
Contains enough PII for identity theft
HITECH (Health Information Technology for Economic and
Clinical Health Act
PCI DSS (PAYMENT CARD INDUSTRY
DATA SECURITY STANDARD)
Not a legal mandate
Payment Card Industry self-regulates its own security
standards
Applies to any business worldwide that transmits, processes
or stores payment card transactions to conduct business
with customers
Compliance is enforced by the payment card vendor (Visa,
MasterCard, American Express, etc)
Compliance requirements are dictated by the number of
transactions, as well as any previous security issues
58
PCI DSS (PAYMENT CARD INDUSTRY DATA
SECURITY STANDARD) CONTINUED
59
SAFE HARBOR PRINCIPLES
Notice: Customers must be informed of what PII is collected and how it
will be used
Choice: Customers must be able to opt out
Onward Transfer: Transfer to 3 rd parties is permissible only when
sufficient controls are in place
Security: Reasonable efforts must be in place to prevent loss of
information
Integrity: Data must be reliable and relevant for the purpose for which
it was collected
Access: Customers have to be able to access information about them
and have a means of correcting or deleting if the info is inaccurate
Enforcement: There must be effective means of enforcing these ru
PERSONALLY IDENTIFIABLE INFORMATION
Any information that can lead to locating and contacting an
individual and identifying that individual uniquely
Full Name, Mothers Maiden Name
Social Security Number
Address, Phone number
Vehicle Registration Number
Biometrics
Other uniquely identifying characteristics
PERSONALLY IDENTIFIABLE INFORMATION
INTELLECTUAL PROPERTY
Intellectual Property Law
Protecting products of the mind
Company must take steps to protect resources
covered by these laws or these laws may not protect
them
Main international organization run by the UN is the World
Intellectual Property Organization (WIPO)
Licensing is the most prevalent violation, followed by
plagiarism, piracy and corporate espionage
63
ISO 27000 SERIES
Provides a common lexicon and approach to Information Security
27001: Specifies the requirements for all elements of an ISMS
including formulation of requirements in alignment with business
goals, selection of controls, ongoing monitoring and communications
27002: Provides best practices for the oversight of an ISMS
(Information Security Management System)
How to apply Demings PDCA (Plan-Do-Check-Act model)
27005: Addresses information security risk management
27006: Requirements for audit and certification of an ISMS
COMMON CRITERIA ISO 15408
Common Criteria (CC)
Protection Profile: Requirements from customer
Target of evaluation: System from vendor designed to
meet the requirements of the Protection Profile
Security target: Documentation from vendor describing
how the ToE meets the Protection Profile
Evaluation Assurance Level (EAL 1-7) Assigned by
auditor
Evaluation packages: Additional add-ons
65
COMMON CRITERIA EAL
RATINGS
EAL 1 Functionally tested
EAL 2 Structurally tested
EAL 3 Methodically tested and checked
EAL 4 Methodically designed, tested, and reviewed
EAL 5 Semi formally designed and tested
EAL 6 Semi-formally verified designed and tested
EAL 7 Formally verified designed and tested
66
SEI-CMMI (SOFTWARE ENGINEERING INSTITUTE
CAPABILITY MATURITY MODEL INTEGRATED)
70
NIST STANDARDS
800-12 An Introduction to Computer Security: Broad overview of
elements of secure computing (HW, SW, Information)
800-14 Generally Accepted Principles and Practices for Security
of IT Systems
800-27 Engineering Principles for Information Technology
Security
Let security be the foundation of the design
Reduce risk to an acceptable level
Strive for simplicity
Use open design and standards when possible
NIST STANDARDS CONTINUED
800-30 Risk Management Guide for IT
Critical success factors for risk management programs
Integrates risk management into development
process
Cost/benefit Analysis
Residual risk evaluation
Risk mitigation options
NIST STANDARDS CONTINUED
800-61 Computer Security Incident Handling Guide
800-64 Security Considerations in the Information Systems
Development Life Cycle
Maximize ROSI (Return on Security Investment)
ID security vulnerabilities early
Exam design issues if security requirements change
ID shared security services to reduce duplication of effort
Manage risk and mitigation strategies (Reduce, Accept,
Transfer
800-100 Information Security Handbook: A Guide for Managers
FISMA (FEDERAL INFORMATION
SECURITY MANAGEMENT ACT)
Federal law that requires every federal agency (and their contractors)
to implement an agency-wide Information Security program including
Inventory of systems
Categorize information and systems according to risk level
Security controls
Certification and accreditation of systems (including risk assessment
and system security plans)
Training
All accredited systems are supposed to have a set of monitored
security controls to provide a level of continuous monitoring
FIPS (FEDERAL INFORMATION PROCESSING
STANDARDS)
FIPS 199: Standards for Security Categorization of Federal
Information Systems
FIPS 200: Minimum Security Requirements for Federal
Information and Information Systems
FIPS 197: Advanced Encryption System
FIPS 186-3: Secure Hash Standard
FIPS 190-4: Security Requirements for Cryptographic Modules
FIPS 140 Series: A Profile for US Federal Cryptographic Key
Management Systems (CKMS)
SECURITY POLICIES AND
REGULATIONS: AGENDA
Definitions
FISMA
Legislation
PCI-DSS
PII
Intellectual Property
Organizations That Promote Standards
Federal Computers
FIPS
NIST
Secure Architecture
PART II
Secure Software Requirements
REQUIREMENT GATHERING REQUIREMENTS:
AGENDA
SMART Requirements
Types of Requirements
Core Security
General
Operational
Other
Information Gathering Techniques
Brainstorming, Facilitated Workshops, Surveys, Questionnaires
Policy Composition/Requirements Traceability
PNE (Protection Needs Elicitation)
Use and Misuse Modeling
Data Classification
SMART REQUIREMENTS
https://www.owasp.org/index.php/Application_Threat_Modeling
THREAT MODELING: STRIDE
Threat Mitigation
Spoofing Authentication
Tampering Integrity Verification (Message Digests/CRCs)
Repudiation Non-Repudiation (Digital Signatures, Keys)
Information Disclosure Confidentiality Through Encryption
Denial of Service High Availability/Redundancy/Fault Tolerance
Escalation of Privilege Authorization
RISKS IN DESIGN
Code Reuse
Flaws vs. Bugs
Flaw: Inherent fault with the design of code
Bug: Implementation fault
Open vs. Closed Design
CONTROLS EVALUATION
Efficacy of Controls
Economy of Mechanism
Cost/Benefit Analysis
Psychological Acceptability
CONSIDERATIONS FOR DESIGN
C-I-A
AAA
Secure Design Principles
SECURE DESIGN PRINCIPLES
Part III Secure Software Design
SECURITY AND COMMON
ARCHITECTURES
SOFTWARE DEVELOPMENT
METHODOLOGIES
Waterfall
Prototype
Spiral
Agile
WATERFALL
Pros
The software designer and implementer can obtain feedback from the users
early in the project
The client and the contractor can compare if the software made matches the
software specification, according to which the software program is built.
It also allows the software engineer some insight into the accuracy of initial
project estimates and whether the deadlines and milestones proposed can
be successfully met.
Cons
Clients rarely understand all the ramifications of proposed changes
Developers may use shortcuts to create the prototype and sometimes do
not formalize their processes for the actual product
SPIRAL
PROS AND CONS OF SPIRAL
Pros
High amount of risk analysis
Good for large and mission-critical projects.
Software is produced early in the software life cycle
Cons
Can be a costly model to use.
Risk analysis requires highly specific expertise.
Projects success is highly dependent on the risk analysis phase.
Doesnt work well for smaller projects.
AGILE
SECURITY AND COMMON ARCHITECTURES
Distributed Computing
Service Oriented Architecture
Rich Internet Application
Ubiquitous Computing
Cloud Architecture
DISTRIBUTED COMPUTING
Client-Server
Thin vs. Fat Clients
Scalability
Availability
Maintainability
Security
Peer-to-Peer (P2P)
Frequently used for file sharing
Channel Security transport protocols
Data Confidentiality and Integrityencryption and hashing
Securing the call Stack/FlowValidation and authorization checks at
various points of the call/flow
SERVICE ORIENTED ARCHITECTURE
SOA is an architecture and a vision on how heterogeneous
applications should be developed and integrated in the enterprise.
Share a formal contract
Loosely coupled
Abstraction
Composable
Reusable
Autonomous
Stateless
Discoverable
RICH INTERNET APPLICATIONS
Client Side Threats
XSS
CSRF
Server Side Threats
Code Injection
Validate Input
Aggregation and Inference
Masking
Polyinstatiation
UBIQUITOUS COMPUTING
Wireless Networking
RFID (Radio Frequency ID)
NFC (Near Field Communications)
LBS (Location Based Services)
CLOUD ARCHITECTURE
https://www.pinterest.com/backboneforbigd/sme/
Part III Secure Software Design
SECURE TECHNOLOGIES
AUTHENTICATION AND IDENTITY
MANAGEMENT
Authentication and Identity Management
Identification: Making a claim
Authentication allows users to support the claim of
their identity
Identity and Access Management
Services/policies/procedures for managing a digital
identity/provisioning
Security controls (Including Management) are audited
annually under Sarbanes-Oxley (SOX)
CREDENTIAL MANAGEMENT
Exploits
MITM and Traffic Hijacking
Unauthorized Access
Privilege Escalation
Solutions
Certificates
Single Sign on
TRAFFIC FLOW CONTROL
Proxies
Firewalls
Middleware
Logging
Data Loss Prevention
Exfiltration of Data
Virtualization
TRUSTED COMPUTING
Trusted Computing Base (TCB)
Reference Monitor
Security Kernel
Trusted Platform Module
Secure State Model
Root kits
Privilege Management
Database Integrity
PART IV
System Architecture
Common Software Vulnerabilities and
Countermeasures
Defensive Coding Practices/Secure Software Coding
COMPUTER ARCHITECTURE
Computer Architecture
Central Processing Unit
Arithmetic Logic Unit (ALU)
Control Unit (CU)
Memory
Primary storage
Secondary storage
Volatile storage
Nonvolatile storage
Cache storage
CPU CYCLES
Fetch
Decode
Execute
Store
FETCH
Fetching
The control unit gets the instruction from system memory.
The location of each instruction and data in system memory
is identified by a unique address and the control unit uses
the memory address to get the program instruction. The
instruction pointer is used by the processor to keep track of
which instruction codes have been processed and which
ones are to be processed subsequently. The data pointer
keeps track of where the data area in stored in the computer
memory, i.e., it points to the memory address.
DECODE
The control unit deciphers the instruction and directs the
needed data to be moved from system memory onto the
ALU.
EXECUTION
The ALU and the ALU performs the mathematical or logical
operation on the data
STORING
The ALU stores the result of the operation in memory or in a
register. The control unit finally directs the memory to
release the result to an output device or a secondary
storage device.
EXECUTION TYPES
Multiprogramming
Multitasking
Cooperative
Preemptive (true multitasking)
Multithreading
Multiprocessing
Asymmetric
Symmetric
Multi-core processors
CPU MODES
User (Problem State)
Privileged (Kernel Mode)
MEMORY
RandomAccess Memory (RAM)
Dynamic/Static
Cache
ReadOnly Memory (ROM)
Programmable ReadOnly Memory
(PROM)
Erasable Programmable ReadOnly Memory (EPROM)
Electronically Erasable Programmable Read Only Memory
(EEPROM)
WHY IS SOFTWARE UNSECURE?
Lack of training
Lack of funding
No prioritization of security
Security as an afterthought
VULNERABILITY DATABASES AND RESOURCES
https://www.owasp.org/index.php/About_OWASP
OWASP TOP TEN 2013
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project#tab=OWASP_Top_10_for_2013
1. CODE INJECTION
Injection flaws, such as SQL, OS, and LDAP injection occur
when untrusted data is sent to an interpreter as part of a
command or query. The attackers hostile data can trick the
interpreter into executing unintended commands or
accessing data without proper authorization
2. BROKEN AUTHENTICATION &
SESSION MANAGEMENT
Application functions related to authentication and
session management are often not implemented
correctly, allowing attackers to compromise passwords,
keys, or session tokens, or to exploit other
implementation flaws to assume other users identities
3. XSS (CROSS SITE SCRIPTING)
XSS flaws occur whenever an application takes
untrusted data and sends it to a web browser without
proper validation or escaping. XSS allows attackers to
execute scripts in the victims browser which can hijack
user sessions, deface web sites, or redirect the user to
malicious sites
4. INSECURE DIRECT OBJECT REFERENCES
Defined as an unauthorized user or process which can invoke
the internal functionality of the software by manipulating
parameters and other object values that directly reference this
functionality. Issues resulting include:
Data disclosure
Privilege escalation
Authentication and authorization checks bypass
Restricted resource access
5. SECURITY MISCONFIGURATIONS
Version Control
Code analysis
Code/Peer review
VERSION CONTROL
Provides that:
Correct version of code is used
Rollback capabilities are available
Track ownership of code
Track Changes to code
CODE ANALYSIS
Inspect code for quality and
weaknesses
2 types:
Static code analysis involves the inspection of the
code without executing the code (or software
program).
Dynamic code analysis is the inspection of the
code when it is being executed (run as a program).
CODE REVIEW
Code Reviews
It is a systematic evaluation of the source code with the
goal of finding out syntax issues and weaknesses in the
code that can impact the performance and security of the
software.
Inspect for:
Insecure code
Inefficient code
WHAT TO LOOK FOR IN CODE REVIEWS
Injection Flaws
NonRepudiation Mechanisms
Spoofing Attacks
Errors and Exception Handling
Cryptographic Strength
Unsafe & Unused Functions
Reversible Code
Privilege Code
Maintenance Hooks
Logic Bombs
Timing & Synchronization
Implementations
Cyclomatic Complexity
SECURE BUILDS
Physically securing access to the systems that build code.
Using access control lists (ACLs) that prevent access to
unauthorized users.
Using version control software to assure that the code built
is of the right version.
Build automation is the process of scripting or automating
the tasks that are involved in the build process.
Part V Secure Software Testing
SECURE SOFTWARE TESTING
Quality Assurance
Testing Artifacts
Types of Testing
Impact Assessment and Corrective Action
QUALITY ASSURANCE
QA of software tests:
Reliability: Does the software function as expected?
Recoverability: Can the software restore itself to a
functioning state after downtime (accidental or
intentional)
Resiliency: Can the software withstand attacks?
Interoperability: Can the software function in disparate
environments
Privacy: Are the various forms of PII, PHI, and PFI
protected appropriately?
TESTING ARTIFACTS
In software development life cycle (SDLC), artifacts refers to
elements that are produced by people involved in the process.
Test Strategy
Test Plan
Test Case
Test Script
Test Suite
Test Harness
TEST STRATEGY
Outlines the testing approach that will be undertaken
Main instrument that is used to communicate issues with testing
to the software development team and other members of the
project
Includes the testing goals, methods, time requirements,
environment configuration information and necessary resources
High level in nature
TEST PLAN
More granular than strategy
Documents the testing requirements
Details the testing approach systematically
Identifies the workflow a tester would perform
TEST CASE
Takes the test requirements from the test plan and defines
specific measurable conditions to validate that the requirements
are being met
Generally contains a unique identifier, reference to the
requirement being validated, any preconditions that need to be
met, actions, inputs and expected results
TEST SCRIPT
Details how the testing is to be performed
What the step-by-step actions of the tester will be
For each test case, one or more test scripts need to be
created
TEST HARNESS
All of the necessary tools required to complete the software
testing process.
Testing tool
Test data
Testing configurations
Test cases
Test Scripts
TYPES OF TESTING
Functional
Non-Functional
Other
Security
TYPES OF TESTING: FUNCTIONAL TESTING