1/39
Looks like no tags are added yet.
Secure Implementation
The process of building, testing, maintaining, and releasing software in a way that preserves its intended security protections.
Untrusted Input
Any data entering a software system that the application cannot safely assume is valid.
Six Sources of Untrusted Input
User input, network data, files, APIs and services, stored data, and internal sources.
Input Boundary
The point where incoming data enters a system and should be validated before reaching deeper components.
Input Validation
The process of checking incoming data against established rules to ensure it is acceptable for its intended purpose.
Three Steps of Early Input Validation
Define acceptable input, reject or safely transform invalid input, and pass only known-good data inward.
Five Input Validation Rules
Length, range, format, allowed values, and relationships between values.
Why should input validation occur early?
It prevents malformed or unexpected data from reaching deeper components and allows business logic to operate with safer assumptions.
Why should input from authenticated users and internal systems still be validated?
Authenticated users can submit malicious input, and internal systems or stored data may have been compromised or altered.
Injection
A vulnerability that occurs when untrusted data is interpreted as a command, query, script, or other instruction that changes software behavior.
SQL Injection
A vulnerability in which untrusted input changes the structure of a database command, potentially causing unauthorized database actions.
What amplifies the damage caused by SQL injection?
A broadly privileged application account that allows the application to perform more database actions than necessary.
How can SQL injection risk be reduced?
Keep input separate from instructions, validate incoming data, and give the application only the privileges it needs.
Path Traversal
A vulnerability in which manipulated input causes an application to access files or resources outside its intended directory or resource boundary.
How can path traversal risk be reduced?
Validate input and constrain file paths and resource selections to approved locations.
Six Components of Web Application Security Boundaries
Browser, web application, authentication, session, third-party content, and backend services.
Session
A mechanism that connects multiple requests to the same user and maintains authentication state.
Cross-Site Scripting (XSS)
A vulnerability in which attacker-controlled data is placed into a web page and interpreted by the browser as script or active content.
Three Types of Cross-Site Scripting (XSS)
Reflected XSS, stored XSS, and DOM-based XSS.
Reflected XSS
Malicious input arrives in a request and is immediately reflected into the web page returned to the user.
Stored XSS
Malicious content is saved by the application and later delivered to other users when they view the affected content.
DOM-Based XSS
A vulnerability in which the browser-side document structure allows untrusted content to alter page behavior.
Cross-Site Request Forgery (CSRF)
A vulnerability in which an authenticated user's browser sends a request to a trusted website that the user did not intend to make.
How does CSRF exploit authenticated sessions?
The browser automatically includes valid session information with certain requests, causing a forged request to appear legitimate.
XSS vs. CSRF
XSS causes a web page to execute unintended active content, while CSRF causes a browser to send an unintended authenticated request.
Five Layers of Web Application Protection
Validate and encode input, use secure frameworks, protect state-changing requests, secure sessions, and add browser controls.
Server-Side vs. Client-Side Security Protections
Server-side protections should provide the primary security enforcement, while client-side controls provide an additional defensive layer.
Error and Exception Handling
The deliberate management of software failures to prevent information exposure, skipped security checks, incomplete actions, and unsafe system states.
Software Dependencies
External components or third-party code that an application relies on to function.
Three Major Dependency Risks
Known vulnerabilities, supply chain risk, and an expanded attack surface.
Supply Chain Risk
The risk that a software dependency or one of its own dependencies is malicious, compromised, vulnerable, or mistakenly substituted.
Five Factors for Evaluating Software Dependencies
Security track record, response to vulnerabilities, update cost, available alternatives, and overall security impact.
Security Code Review
A peer review process that explicitly examines security concerns, including untrusted input, validation, authorization, and related tests.
Development and Production Environment Separation
Keeping development activities separate from live systems and production data to reduce the consequences of mistakes or compromise.
Formal Release Process
A controlled process that uses review, approval, and separation of duties to prevent unapproved changes from reaching production.
Functional Testing vs. Security Testing
Functional testing verifies that allowed actions work, while security testing verifies that forbidden, malformed, and malicious actions fail.
Six Areas of Security Testing
Invalid input, authentication, authorization, web attacks, error paths, and boundaries.
Security Regression Testing
The practice of retaining tests for previously fixed vulnerabilities to detect whether future software changes reintroduce them.
Four Steps of Security Regression Testing
Reproduce the flaw, apply the fix, keep the test in the normal test suite, and use it to protect future changes.
Five Security Questions to Ask About Any Application
What input can attackers control? Can data become instructions or privileged requests? What dependencies are trusted? Can release controls be bypassed? Have forbidden and malformed actions been tested?