ASSCP
ASSCP
1.1 Web Applica on Security, SQL Injec on, Forms and Scripts
o Defini on: Web Applica on Security encompasses all strategies, technologies, tools, and prac ces
designed to protect web applica ons, their data, and their users from malicious a acks and
uninten onal vulnerabili es. It's a con nuous process, not a one- me fix.
Confiden ality: Ensuring that sensi ve data (e.g., user creden als, personal iden fiable
informa on (PII), financial details, proprietary business logic) is accessible only to authorized
individuals and processes. Achieved through encryp on, access controls, and secure data
storage.
Integrity: Maintaining the accuracy, consistency, and trustworthiness of data and applica on
processes. This means preven ng unauthorized modifica on or dele on of data and
ensuring the applica on behaves as intended. Achieved through input valida on, output
encoding, hashing, digital signatures, and transac on controls.
Availability: Ensuring that the web applica on and its associated data are accessible to
authorized users when they need it. This involves protec ng against Denial of Service (DoS)
a acks, ensuring system up me, and having robust disaster recovery/backup plans.
Broken Authen ca on
Security Misconfigura on
Insecure Deserializa on
Input Valida on & Output Encoding: Crucial for preven ng injec on a acks.
Authen ca on & Session Management: Securely verifying users and managing their
sessions.
Access Control (Authoriza on): Ensuring users can only access what they are permi ed to.
Error Handling & Logging: Securely managing errors and logging relevant events.
Configura on Management: Securely configuring all components (web server, app server,
database, frameworks).
o Defini on: A severe code injec on vulnerability where an a acker inserts or "injects" malicious SQL
(Structured Query Language) code into an applica on's input fields. This malicious code is then
passed to the backend database and executed, poten ally allowing the a acker to control or
compromise the database.
Imagine a login form where the applica on constructs an SQL query like this:
String query = "SELECT * FROM users WHERE username = '" + userName_input + "' AND
password = '" + password_input + "';";
If an a acker enters ' OR '1'='1 into the userName_input field and anything (or nothing) in
the password field, the query becomes:
SELECT * FROM users WHERE username = '' OR '1'='1' AND password = '...';
Since '1'='1' is always true, the WHERE clause condi on becomes true for all users,
poten ally logging the a acker in as the first user in the database (o en an admin) or
returning all user data.
o Types of SQLi:
In-band (Classic) SQLi: A acker uses the same channel to launch a acks and gather results.
Error-based SQLi: Exploits verbose error messages from the database to reveal its
structure and data.
Union-based SQLi: Uses the UNION SQL operator to combine the results of a
legi mate query with results from a malicious query injected by the a acker,
exfiltra ng data.
Inferen al (Blind) SQLi: A acker sends payloads and observes the applica on's behavior
(e.g., response me, boolean differences in pages) to infer informa on about the database,
as no direct data is returned.
Boolean-based SQLi: Asks the database TRUE/FALSE ques ons and determines the
answer based on the applica on's response.
Out-of-band SQLi: Uses alterna ve channels (e.g., DNS or HTTP requests to an a acker-
controlled server) to exfiltrate data. Less common, used when direct responses are not
possible.
o Impacts (Elaborated):
Data The : Accessing and exfiltra ng en re databases (customer PII, credit card numbers,
trade secrets).
Data Modifica on/Dele on: Altering records, dele ng tables, corrup ng data.
Remote Code Execu on (RCE): On some database systems (e.g., xp_cmdshell in MS SQL
Server), SQLi can lead to execu ng OS commands on the database server, poten ally
compromising the en re server and internal network.
Parameterized Queries (Prepared Statements): This is the primary and most effec ve
defense. The SQL query structure is pre-compiled by the database. User input is then
supplied as parameters, treated strictly as data, not executable code. The database engine
handles the proper escaping automa cally.
Input Valida on (Whitelis ng): Before using any input in a query (even with parameterized
queries, as a defense-in-depth measure), validate it against a strict whitelist of expected
characters, formats, and lengths. For example, if an input should be a 5-digit number, reject
anything else.
Stored Procedures: Can prevent SQLi if implemented correctly (i.e., they don't dynamically
construct SQL from user input within the procedure itself). They can encapsulate database
logic and limit direct SQL exposure.
Object-Rela onal Mappers (ORMs): Libraries like Hibernate (Java), SQLAlchemy (Python),
En ty Framework (.NET) o en abstract away direct SQL query construc on, reducing the risk
if used according to their security guidelines. However, custom queries within ORMs can s ll
be vulnerable if not careful.
Principle of Least Privilege: The database account used by the web applica on should have
only the minimum necessary permissions on the database (e.g., SELECT, INSERT, UPDATE on
specific tables, but not DROP TABLE, CREATE USER, or admin rights).
Web Applica on Firewalls (WAFs): Can detect and block known SQLi pa erns in HTTP
requests. Useful as an addi onal layer but should not be the sole defense, as they can be
bypassed.
Output Encoding (for display): While not directly preven ng SQLi, if data retrieved via SQLi is
then displayed back to an a acker, proper output encoding can prevent secondary a acks
like XSS.
Regular Security Audits & Penetra on Tes ng: Proac vely find and fix SQLi vulnerabili es.
o Func on: HTML <form> elements are the primary interface for users to submit data to a web
applica on. This data can include login creden als, registra on details, search queries, comments,
file uploads, etc.
Injec on Vulnerabili es (SQLi, XSS): If data submi ed through forms is not properly
validated on the server-side and sani zed/encoded before being used in database queries or
displayed back in HTML, forms become a prime vector for these a acks.
Cross-Site Request Forgery (CSRF): A ackers can cra malicious web pages that cause a
logged-in user's browser to unknowingly submit a form to a vulnerable applica on,
performing ac ons on behalf of the user (e.g., changing email, transferring funds). Requires
an -CSRF tokens.
Data Tampering: A ackers can modify form data in transit (if not using HTTPS) or using
browser developer tools to submit unexpected values (e.g., changing the price of an item in
a hidden field). Server-side valida on is key.
Automated Submissions (Bots): Forms can be targeted by bots for spam, account crea on,
creden al stuffing, etc. CAPTCHAs or other bot detec on mechanisms are used for
mi ga on.
File Upload Vulnerabili es: Forms allowing file uploads can be risky if not properly restricted
(file type, size, content scanning) as a ackers might upload malware or web shells.
Server-Side Valida on: Absolutely cri cal. All data submi ed through forms must be
rigorously validated on the server for type, length, format, and business logic rules. Client-
side valida on is for user experience only and can be easily bypassed.
Output Encoding: When displaying data originally submi ed via forms, encode it
appropriately for the context (HTML encoding, JavaScript encoding) to prevent XSS.
Secure File Upload Handling: Validate file types, sizes, scan for malware, store uploads
outside the webroot if possible.
Purpose: Enhance user experience (interac ve elements, dynamic content updates without
page reload via AJAX), perform client-side valida on (for immediate feedback, not security),
manipulate the Document Object Model (DOM).
Cross-Site Scrip ng (XSS): The most significant risk. If an applica on embeds user-
supplied input into its HTML pages without proper output encoding, an a acker can
inject malicious JavaScript. This script then runs in the vic m's browser with the
permissions of the legi mate website, allowing the a acker to:
Log keystrokes.
Deface websites.
DOM-based XSS: A type of XSS where the vulnerability lies in the client-side code
itself. The malicious payload is executed as a result of modifying the DOM
environment in the vic m's browser.
Bypass of Client-Side Valida on: A ackers can easily disable or modify client-side
scripts, so server-side valida on is non-nego able.
Data Exfiltra on: Malicious scripts can send data from the user's browser to an
a acker-controlled server.
Security Measures: Strict output encoding (context-aware), Content Security Policy (CSP),
input valida on on the server.
o Server-Side Scripts (e.g., PHP, Python (Django/Flask), Ruby on Rails, Node.js, Java (Servlets/JSP),
ASP.NET):
Purpose: Process user input from forms/requests, interact with databases, implement
business logic, generate dynamic HTML content to be sent to the client, manage sessions and
authen ca on.
SQL Injec on: (As detailed above) if scripts construct SQL queries with unsani zed
input.
Command Injec on (OS Injec on): If scripts use user input to build and execute
opera ng system commands. (e.g., system("ping " + user_input);).
Path Traversal / Directory Traversal: If scripts use user input to construct file paths,
allowing access to files outside the intended web root directory.
Security Measures: Strong input valida on, parameterized queries, secure coding prac ces
for file handling and command execu on, proper error handling, keeping server-side
so ware patched.
1.2 Cookies and Session Management, General A acks, SQL Injec on A acks, Regular Applica on Security,
Running Privileges, Applica on Administra on, Integra on with OS Security
o Cookies:
Defini on: Small pieces of textual data that a web server sends to a user's web browser. The
browser stores these cookies and sends them back to the same server with subsequent HTTP
requests.
Purpose: Maintain state in HTTP (session tracking, personaliza on, shopping carts, tracking).
H pOnly: Prevents access by client-side scripts (mi gates XSS cookie the ).
SameSite (Strict, Lax, None): Controls cross-origin cookie sending (mi gates CSRF).
None requires Secure.
Expires / Max-Age: Defines cookie life me. Shorter for sensi ve cookies.
o Session Management:
Defini on: Mechanisms to track user interac ons across mul ple HTTP requests (logins,
mul -step processes).
Mechanism: Server generates unique Session ID -> sends to client (usually via cookie) ->
client sends Session ID with subsequent requests -> server uses ID to retrieve session data.
Session Fixa on: Forcing a user to use a Session ID known to the a acker.
o Denial of Service (DoS) / Distributed Denial of Service (DDoS): Overwhelm applica on/system with
traffic/requests to make it unavailable.
o Phishing: Deceiving users into revealing sensi ve info via fake communica ons.
o Malware: Viruses, worms, Trojans, ransomware, spyware. Delivered via various vectors.
o Cross-Site Scrip ng (XSS): Injec ng malicious client-side scripts into web pages viewed by others.
(Covered in 1.1)
o Cross-Site Request Forgery (CSRF): Tricking a logged-in user's browser into making unintended
requests to a site where they are authen cated. Prevented by an -CSRF tokens, SameSite cookies.
o Directory Traversal (Path Traversal): Accessing files outside web root using ../ sequences. Prevented
by input valida on.
o Key focus on types (In-band, Inferen al/Blind, Out-of-band) and preven on (Parameterized Queries
as primary defense).
o Secure So ware Development Lifecycle (SSDLC): Integra ng security into all SDLC phases
(requirements, design, implementa on, tes ng, deployment, maintenance).
o Threat Modeling: Proac vely iden fying threats, vulnerabili es, and a ack vectors during design
(e.g., STRIDE).
o Secure Coding Prac ces: Input valida on, output encoding, secure error handling, secure API use, no
hardcoded secrets.
o Regular Security Tes ng: SAST, DAST, IAST, penetra on tes ng.
o Patch Management: Promptly upda ng all components (OS, libraries, applica on code).
o Comprehensive Logging and Monitoring: Recording significant events and ac vely analyzing for
suspicious ac vity.
o Defini on: En es (users, processes, applica ons) should only be granted the minimum permissions
necessary to perform their intended func ons.
o Applica on Context:
Database accounts used by apps have restricted DB permissions (e.g., only DML on specific
tables, no DDL).
o Benefits: Reduces a ack surface, limits damage if compromised, improves stability, enhances
accountability.
o Defini on: Secure management of applica on's opera onal aspects (configura on, admin accounts,
access controls, monitoring).
o Security Aspects:
Strong, unique admin creden als; no shared admin accounts.
Restricted access to admin interfaces (IP whitelis ng, VPN, separate network).
o Defini on: How an applica on leverages and respects underlying OS security mechanisms.
o Leveraging OS Features:
File System Permissions: Operate within permissions set for the app's user.
OS-Level Logging: Integrate app logs with system logs (Windows Event Log, syslog).
o Resource Management: Proper management of OS resources (memory, CPU, file handles) to prevent
exhaus on.
o Defini on: The systema c process of iden fying, acquiring, tes ng, and deploying updates (patches)
to so ware, including opera ng systems, applica ons, and firmware. Patches fix security
vulnerabili es, bugs, and may introduce new features.
Addressing Known Vulnerabili es: This is the primary driver. A ackers ac vely scan for and
exploit known, unpatched vulnerabili es.
Preven ng Malware Exploita on: Many malware variants (worms, ransomware) rely on
exploi ng unpatched so ware.
Maintaining Compliance: Many regula ons (PCI DSS, HIPAA) mandate mely patching.
Ensuring System Stability & Performance: Patches o en include bug fixes that improve
reliability.
1. Inventory: Maintain an accurate list of all so ware and hardware assets and their current versions.
2. Monitor & Iden fy: Track vendor announcements, vulnerability databases (CVE), security feeds for new
patches.
3. Assess & Priori ze: Evaluate patch cri cality (e.g., CVSS score), applicability, and poten al impact of the
vulnerability. Priori ze based on risk.
4. Acquire & Test: Download the patch and test it thoroughly in a non-produc on environment (staging/QA) to
ensure it doesn't break func onality or cause instability.
5. Schedule & Deploy: Plan the rollout (o en during maintenance windows) and deploy the patch to
produc on systems using automated tools or manual processes. Consider phased rollouts.
6. Verify & Report: Confirm successful installa on on all target systems. Monitor for post-deployment issues.
Maintain deployment records for audi ng.
7. Rollback Plan: Have a procedure to revert a patch if it causes cri cal issues.
o Challenges: Poten al for down me, compa bility issues, resource constraints for tes ng, emergency
patching.
Spyware:
o Defini on: A type of malicious so ware (malware) that secretly installs itself on a user's device to
gather informa on about the user, their compu ng habits, and their data without their explicit
knowledge or consent. This informa on is then typically transmi ed to an a acker or third party.
Keyloggers: Record every keystroke made by the user (capturing passwords, credit card
numbers, private messages).
Password Stealers: Specifically search for and exfiltrate stored creden als.
Informa on Stealers (Infostealers): Scan for specific types of files or data (documents,
browsing history, financial informa on).
Tracking Cookies (Aggressive): While not always malicious, some tracking cookies used for
adver sing can be highly invasive and considered spyware if they collect extensive PII
without consent.
Banking Trojans: O en incorporate spyware features to steal online banking creden als.
o Infec on Vectors: Bundled with "free" so ware, malicious email a achments, drive-by downloads
from compromised websites, exploi ng so ware vulnerabili es.
o Impact:
System Performance Degrada on: Spyware processes can consume system resources.
Use a firewall.
o Defini on: So ware designed to automa cally display or download adver sements to a user's
computer, typically in the form of pop-up windows, banners within applica ons, or by redirec ng
browser searches to adver sing websites.
o Difference from Spyware: The primary intent of adware is to show ads, whereas spyware aims to
secretly collect informa on. However, the line can blur:
Some adware may track user browsing habits to serve targeted ads, which can be a privacy
concern.
Aggressive adware can be highly intrusive and difficult to remove, behaving like malware.
o Infec on Vectors: O en bundled with free so ware downloads (users may unknowingly agree to
install it during the setup process), or through browser toolbars/extensions.
o Impact:
Annoyance and User Frustra on: Due to intrusive pop-ups and ads.
System Performance Degrada on: Consumes CPU, memory, and network bandwidth.
Browser Hijacking: May change browser homepage, search engine, or redirect traffic.
Exposure to Malicious Content: Some adware can inadvertently (or inten onally) lead users
to malicious websites or download further malware.
Regularly check installed programs and browser extensions for unwanted items.
o Defini on: Refers to the controls and configura ons that dictate how an applica on is allowed to
communicate over a network, including what incoming connec ons it can accept and what outgoing
connec ons it can ini ate.
Applica ons should only expose necessary ports (e.g., a web server typically only
needs TCP ports 80 for HTTP and 443 for HTTPS open to the internet). All other ports
should be blocked by default.
Network Segmenta on: Isola ng applica ons in different network zones based on their
sensi vity or func on (e.g., DMZ for public-facing web servers, internal zones for databases).
Access Control Lists (ACLs): Rules on routers and firewalls that explicitly permit or deny
traffic based on defined criteria.
Binding to Specific Interfaces: Server applica ons can be configured to listen for connec ons
only on specific network interfaces, rather than all available interfaces.
Data Exfiltra on: If an applica on is compromised, egress filtering can block it from
sending sensi ve data to an a acker's server.
Command and Control (C2) Communica on: Malware o en tries to "call home" to
an a acker's C2 server; egress filtering can block this.
Implementa on: Configuring firewalls to allow outbound connec ons only to known,
legi mate des na ons and ports necessary for the applica on's func on. Deny all other
outbound traffic by default.
An applica on should only have the network connec vity absolutely required for its
intended opera on. If an applica on doesn't need internet access, it shouldn't have it. If it
only needs to talk to a specific database server, it should only be allowed to connect to that
server on the required database port.
Encryp on: All sensi ve data transmi ed over the network by the applica on should be
encrypted using strong protocols like TLS/SSL.
Authen ca on: Applica ons communica ng with each other over a network should
authen cate each other (e.g., using client cer ficates, API keys).
Secure Network Protocols: Use secure versions of protocols where available (e.g., SFTP
instead of FTP, SSH instead of Telnet).
o Defini on: The prac ce of managing and controlling computer systems, network devices, or
applica ons from a loca on physically separate from the target device. This is essen al for IT
opera ons but introduces significant security risks if not properly secured.
o Common Remote Administra on Methods/Protocols:
RDP (Remote Desktop Protocol): Microso 's proprietary protocol for graphical remote
access to Windows desktops and servers. Uses port 3389 by default.
VNC (Virtual Network Compu ng): A pla orm-independent graphical desktop sharing
system. Less inherently secure than RDP or SSH if not tunneled over SSH or VPN.
Proprietary Management Tools: Specific vendor tools for managing their hardware or
so ware (e.g., VMware vSphere Client, Cisco ASDM).
VPN (Virtual Private Network): Creates a secure, encrypted tunnel for remote access.
Exposure of Admin Interfaces to the Internet: Publicly accessible admin ports are prime
targets.
Use Secure Protocols: SSH instead of Telnet, RDP with Network Level Authen ca on (NLA)
and encryp on, HTTPS for web interfaces.
Change Default Ports (Security through Obscurity - limited effec veness but can reduce
automated scans).
Principle of Least Privilege: Remote admin accounts should have only necessary
permissions.
o These are the core principles and prac ces that underpin effec ve cybersecurity:
o CIA Triad (Confiden ality, Integrity, Availability):
Integrity: Ensuring informa on is accurate, complete, and has not been tampered with by
unauthorized par es. (Achieved via: Hashing, Digital Signatures, Version Control, Input
Valida on, Access Control).
Availability: Ensuring that informa on and systems are accessible to authorized users when
needed. (Achieved via: Redundancy (RAID, clustering), Backups, Disaster Recovery Plans,
DoS/DDoS Protec on, Patch Management).
Implemen ng mul ple, overlapping security controls so that if one control fails or is
bypassed, other controls are s ll in place to detect or prevent an a ack.
o Principle of Least Privilege (PoLP): (Already detailed in 1.2) Gran ng only the minimum necessary
permissions for any user, system, or applica on to perform its required tasks.
o Patch Management: (Already detailed in 1.3) Regularly iden fying, tes ng, and applying updates to
so ware and systems to fix vulnerabili es.
Authen ca on: Verifying the iden ty of a user or en ty (e.g., passwords, MFA, biometrics).
o Access Control Models: Frameworks for how access rights are managed (e.g., DAC, MAC, RBAC,
ABAC).
o Security Awareness & Training: Educa ng all users (employees, contractors) about cybersecurity
threats (phishing, social engineering, malware), safe online prac ces, and organiza onal security
policies. Human error is a major factor in breaches.
Logging: Systema cally recording events that occur in systems and applica ons.
Monitoring: Ac vely reviewing and analyzing logs and system behavior to detect anomalies,
security incidents, or policy viola ons. O en involves Security Informa on and Event
Management (SIEM) systems.
o Incident Response Plan (IRP): A documented, pre-defined plan outlining the procedures and
responsibili es for effec vely responding to and managing a cybersecurity incident (e.g., data
breach, malware outbreak, DoS a ack). Includes phases like prepara on, iden fica on, containment,
eradica on, recovery, and lessons learned.
o Data Backup & Recovery: Regularly backing up cri cal data and systems, and having tested
procedures to restore them in the event of data loss, corrup on, or system failure (e.g., due to
ransomware, hardware failure, natural disaster).
o Risk Management: The ongoing process of iden fying cybersecurity risks, assessing their poten al
impact and likelihood, and implemen ng measures to mi gate, transfer, accept, or avoid those risks.
o Secure Configura ons (Hardening): Configuring systems and applica ons to be as secure as possible
by default. This includes changing default creden als, disabling unnecessary services and protocols,
applying security templates, and removing unused so ware.
o Zero Trust Architecture (Conceptual): A security model based on the principle of "never trust, always
verify." It assumes that no user or device, whether inside or outside the network perimeter, should
be trusted by default. Access is granted on a per-session, least-privilege basis a er strict verifica on.
o Defini on: Email security encompasses the technologies, policies, and best prac ces used to protect
email accounts, content, and communica on systems from unauthorized access, loss, compromise,
or disrup on.
o Goal: To ensure the Confiden ality, Integrity, and Availability (CIA) of email communica ons and to
protect users and organiza ons from email-borne threats.
Phishing: Decep ve emails trying to trick recipients into revealing sensi ve informa on.
Business Email Compromise (BEC) / CEO Fraud: Impersona ng execu ves to authorize
fraudulent transac ons.
SMTP (Simple Mail Transfer Protocol): Standard for sending emails. Unencrypted by default.
TLS (Transport Layer Security) / SSL: Cryptographic protocols for secure communica on.
SPF (Sender Policy Framework): DNS record specifying authorized mail servers for a domain
to prevent spoofing.
DKIM (DomainKeys Iden fied Mail): Adds a digital signature to outgoing emails to verify
origin and integrity. Public key in DNS.
DMARC (Domain-based Message Authen ca on, Repor ng & Conformance): Policy built
on SPF/DKIM, tells receivers how to handle unauthen cated mail (none, quaran ne, reject)
and provides repor ng.
Data Loss Preven on (DLP) Systems: Scan outgoing emails for sensi ve data.
o For End-Users:
Report Phishing/Spam.
Regular User Training and Awareness Programs & Phishing Simula ons.
Data Leakage: Through insecure apps, misconfigured cloud sync, user error.
Install Reputable Mobile Security So ware (Op onal but Recommended for Android).
2.3 Understanding How to Secure iPhone, iPad, Android, and Windows Devices
o Pla orm Strengths: Tight hardware-so ware integra on, strong default encryp on, robust
sandboxing, secure boot, strict App Store review, mely OS updates.
Limit Ad Tracking.
o Pla orm Considera ons: Open source, device encryp on, sandboxing, Google Play Protect, secure
boot. OS update fragmenta on is a challenge.
Download apps primarily from Google Play Store; be cau ous with sideloading.
o Pla orm Features: Windows Security (Microso Defender An virus, Firewall), BitLocker, UAC, Secure
Boot, Windows Hello.
o Defini on: Checking any data received by an applica on to ensure it is well-formed, correct, and safe
before processing.
o Importance: Primary defense against injec on a acks (SQLi, XSS, etc.), buffer overflows, DoS.
o Types/Techniques:
Seman c Valida on: Checks meaning/context (e.g., start date < end date).
Blacklis ng (Denylis ng): Less effec ve. Defines what IS NOT allowed.
o Where to Perform:
Client-Side: For usability, immediate feedback (can be bypassed).
o Best Prac ces: Validate all input sources, assume input is malicious, validate early, use centralized
rou nes.
Authen ca on:
o Defini on: Verifying the iden ty of a user, process, or device ("Are you who you claim to be?").
o Authen ca on Factors:
o Types: Single-Factor (SFA), Two-Factor (2FA), Mul -Factor (MFA - uses two or more different factors).
Secure password storage (hashing with strong, slow, salted algorithms like Argon2, scrypt,
bcrypt).
o Defini on: Determining if an authen cated en ty has permission to access a resource or perform an
ac on ("What are you allowed to do?"). Follows authen ca on.
Role-Based (RBAC): Permissions assigned to roles, users assigned to roles (common in apps).
o Implementa on: Enforce server-side, deny by default, granular permissions, regular review.
Cryptography:
o Core Goals (CIA-N): Confiden ality (encryp on), Integrity (hashing, digital signatures),
Authen ca on (digital signatures, MACs), Non-repudia on (digital signatures).
o Key Concepts/Techniques:
Hashing: One-way func on, fixed-size output (hash/digest) (e.g., SHA-256, SHA-3). Used for
integrity, password storage.
Digital Signatures: Asymmetric crypto to provide authen city, integrity, non-repudia on.
Sender hashes message, encrypts hash with private key.
Message Authen ca on Codes (MACs): Uses a shared secret key and a message to produce
a MAC tag (e.g., HMAC-SHA256). Provides integrity and authen city.
Key Management: Secure genera on, storage, distribu on, rota on, revoca on of crypto
keys. Cri cal.
Digital Cer ficates (X.509): Bind public key to an iden ty, issued by a Cer ficate Authority
(CA). Used in TLS/SSL, S/MIME.
Public Key Infrastructure (PKI): Framework for managing digital cer ficates.
Session Management:
o Security Goals: Protect session IDs, ensure session integrity/confiden ality, proper termina on.
Protec on in Transit: Use TLS/HTTPS (encrypts session ID in cookie). Secure cookie flag.
Token Integrity (e.g., JWTs): Tokens are cryptographically signed (HMAC or RSA) to ensure
integrity and authen city.
Session ID Regenera on: Invalidate old, generate new session ID upon login/privilege
change.
2.6 Error Handling, Mobile Security Essen als (Combined part of previous syllabus item 1.10, re-labeled "Mobile
Security Essen als" from "How to Secure... Error Handling, Mobile Security Essen als")
Informa on Leakage: Verbose error messages revealing system details (paths, DB structure,
versions, code snippets) to a ackers.
o Data Protec on: Encryp on (at rest and in transit), secure backups.
3.1 Security Recommenda ons for Windows Opera ng Systems, Mac OS, Studying Web Browser Concepts
o Defini on: Best prac ces and configura ons to enhance Windows OS security.
2. U lize Windows Security (Microso Defender An virus, Firewall, App & browser control,
Device security).
o Defini on: Best prac ces and configura ons for macOS security.
10. Review Privacy Se ngs (app access to camera, mic, loca on, etc.).
o Core Func on: Renders web content, manages HTTP, cookies, cache.
Content Security Policy (CSP): HTTP header from server specifying allowed sources for
scripts, styles, etc., to mi gate XSS.
HTTPS/TLS Support & Visual Indicators: Encrypted connec ons, padlock icon.
Private Browsing Mode (Incognito): Doesn't save local history/cookies for that session.
Regular Updates.
o Defini on: Protec ng real- me communica on pla orms (text, voice, video, files).
o Threats: Eavesdropping (if not E2EE), account takeover, malware/spam, data leakage, phishing, app
vulnerabili es, metadata collec on.
Use apps with strong End-to-End Encryp on (E2EE) (e.g., Signal, WhatsApp). Verify security
codes.
o Defini on: Protec ng children from online risks and promo ng safe, responsible internet use.
o Key Risks: Inappropriate content, cyberbullying, online predators/grooming, privacy viola ons
(oversharing PII), malware/scams, sex ng, excessive screen me, misinforma on.
Use Parental Control So ware/Tools: Content filters, me limits, ac vity monitoring (use
ethically).
3.3 Introduc on Applica on Security Tes ng, Different Applica on Security Tes ng – SAST, DAST, IAST, MAST,
Cross-Site Scrip ng Issues
o Why AST? So ware flaws are a leading cause of breaches; early detec on is cheaper. Part of SSDLC.
Analyzes source code/binaries without execu on. Finds insecure coding pa erns.
Pros: Early in SDLC, pinpoints code loca on, full code coverage.
Tests running applica on by sending inputs and observing responses. Simulates a acker.
Pros: Finds run me/environment issues, lower false posi ves, language-agnos c.
Uses instrumenta on (agents) in running app to monitor during dynamic tests. Combines
SAST & DAST aspects.
Specific to mobile apps (iOS, Android). Combines sta c, dynamic, forensic analysis.
Tests: Insecure data storage/communica on, code quality, pla orm vulnerabili es.
o Other AST: Manual Penetra on Tes ng, SCA (So ware Composi on Analysis), RASP (Run me
Applica on Self-Protec on - a control, not just test).
o Defini on: Injec ng malicious client-side scripts (usually JavaScript) into web pages viewed by other
users. Browser executes script because it trusts the source.
o Types:
1. Stored XSS (Persistent): Malicious script stored on server (e.g., comment), affects many users.
2. Reflected XSS (Non-Persistent): Script embedded in URL/input, reflected back immediately. User must click
malicious link.
Output Encoding (Contextual): Primary defense. Encode data before rendering based on
HTML context (body, a ribute, JS, CSS, URL).
Using Safe JavaScript APIs: Avoid innerHTML with user data; use textContent.
o Defini on: Measures to protect the OS from threats, ensuring CIA of OS, data, and apps.
o Key OS Security Func ons: Authen ca on, Authoriza on (Access Control), Memory Protec on,
Process Isola on, File System Security, Logging/Audi ng, Crypto Services, Secure Boot, Kernel
Protec on.
o Common OS Threats: Malware, vulnerability exploita on, privilege escala on, DoS, weak creden als,
misconfigura ons, lack of patching.
o OS Hardening Best Prac ces: Patching, strong auth, PoLP, disable unnecessary services/ports,
firewalls, IDS/IPS, logging, AV, full-disk encryp on, secure boot, secure baselines (CIS).
o 1. Vulnerability Scanning: Automated tools check for known vulnerabili es, missing patches,
common misconfigs (e.g., Nessus, QualysGuard).
o 2. Penetra on Tes ng (OS Level): Ethical hackers simulate a acks to ac vely exploit vulnerabili es.
o 3. Configura on Audi ng/Review (Hardening Review): Compare OS config against security baselines
(e.g., CIS Benchmarks).
o 4. Security Patch Management Audi ng: Verify OS/so ware have latest patches.
o 5. Log Review and Analysis: Examine OS logs for suspicious ac vity (manual or SIEM).
o 6. Compliance Audi ng: Assess OS security against regulatory requirements (PCI DSS, HIPAA).
o 7. Kernel and Driver Security Tes ng (Advanced): In-depth analysis of kernel/drivers (fuzzing, sta c
analysis).
o 8. Host-Based IDS (HIDS) / Endpoint Detec on and Response (EDR) Tes ng: Test effec veness of
endpoint security tools.
Module 4: Embedded Applica on and Cloud Security
4.1 Embedded Applica ons Security, Security of Embedded Applica ons Security Conclusions
o Embedded Systems: Specialized compu ng systems for dedicated func ons, o en resource-
constrained (IoT, ICS, medical, automo ve).
o Key Security Measures: Secure Boot, firmware signing/verifica on, secure update mechanism (OTA),
PoLP, input valida on, secure communica on (TLS/DTLS), secure storage (encryp on, TPM/SE),
disable unnecessary services, strong auth, hardware-based security, tamper resistance, SSDLC for
embedded, tes ng.
o Managing systems from a separate loca on. Crucial for IT, but high risk if insecure.
o Risks: Weak creden als, brute-force, no MFA, protocol vulnerabili es, unencrypted channels, MitM,
public exposure of ports.
o Best Prac ces: Strong auth (MFA cri cal), secure protocols, PoLP, network segmenta on, VPNs,
firewalls/ACLs, bas on hosts, change defaults (creds & ports), patching, disable unused services,
session management, logging/monitoring, account lockout.
Reasons for Remote Administra on:
o Cost Savings.
o Disaster Recovery.
4.3 Remote Administra on Using a Web Interface, Authen ca ng Web Based Remote Administra on
o Defini on: Managing devices/apps via a GUI in a web browser. Device hosts a web server.
o Prevalence: Network devices, consumer electronics (IoT), server management interfaces, web app
admin panels, cloud consoles.
o Security Risks: Suscep ble to web app vulnerabili es (XSS, CSRF, SQLi, auth bypass, session flaws),
HTTP instead of HTTPS, weak defaults, web server vulnerabili es.
o Defini on: Verifying admin iden ty for web admin interface. Cri cal due to privileged access.
2. Mul -Factor Authen ca on (MFA): Highly recommended. OTPs (TOTP from app preferred
over SMS), hardware keys (FIDO U2F/WebAuthn), push no fica ons.
3. Client Cer ficate Authen ca on: Browser presents cert to server. Strong, but complex to
manage.
4. Single Sign-On (SSO) Integra on: (SAML, OIDC) via centralized IdP (Azure AD, Okta).
6. Secure Session Management: Strong random session IDs, HTTPS (Secure flag), H pOnly flag,
meouts, proper logout.
7. Avoid insecure "Remember Me" func onality.
o Embedded Device Considera ons: Resource constraints may limit complex auth; default creds are a
major issue.
o Defini on: Proprietary or specially developed protocols/tools for remote management, not standard
(SSH, RDP, web).
o Why: Specialized needs, resource constraints (embedded), legacy, vendor lock-in, perceived (flawed)
security by obscurity.
o Examples: Proprietary binary protocol for ICS, custom mobile app for IoT, vendor desktop tool for
equipment.
o Security Challenges: Lack of scru ny, security as a erthought, no standard test tools, poor/no
encryp on, weak auth, reverse engineering risk, hard to patch.
o Securing Custom Admin: Strong crypto (TLS/DTLS, standard libraries), robust auth (MFA if possible),
message integrity (MACs), input valida on, secure protocol design, specialized tes ng (fuzzing,
manual pen-test), secure coding, PoLP, logging.
o Defini on (Cloud Compu ng): On-demand network access to shared pool of configurable compu ng
resources (servers, storage, apps, services).
1. On-demand Self-service.
1. IaaS (Infrastructure as a Service): You manage OS, apps, data. Provider: infra. (e.g., AWS EC2,
Azure VMs).
2. PaaS (Pla orm as a Service): You manage apps, data. Provider: pla orm (OS, run me), infra.
(e.g., Heroku, AWS Beanstalk).
3. SaaS (So ware as a Service): You use app. Provider: app, pla orm, infra. (e.g., Salesforce,
Microso 365).
4. FaaS (Func on as a Service) / Serverless: You provide func ons. Provider: everything else.
(e.g., AWS Lambda).
4.5 Securing Against Cloud Security Threats, Addressing Cloud Privacy Issues
o Shared Responsibility Model: CSP secures "OF the cloud" (infra); Customer secures "IN the cloud"
(data, apps, configs, access). Varies by IaaS/PaaS/SaaS.
o Common Cloud Threats: Data breaches, misconfigura ons, weak iden ty/creden al/key
management, account hijacking, insider threats, insecure APIs, APTs, DoS/DDoS, shared tenancy
vulnerabili es, data loss.
o Defini on: Protec ng personal/sensi ve info in the cloud according to laws, expecta ons, policies.
o Key Privacy Concerns: Data loca on/sovereignty (GDPR, CCPA), unauthorized access (by CSP/gov),
mul -tenancy/data segrega on, data control/ownership, compliance with diverse privacy laws, lack
of transparency, vendor lock-in/data portability, data dele on/remanence, third-party sub-
processing.
2. Choose Reputable CSPs (strong privacy commitment, cer fica ons like ISO 27018).
4.6 Understanding Various Networking Concepts & Se ng Up a Wireless Network in Windows and Mac
o IP Addressing: IPv4 (32-bit, e.g., 192.168.1.100), IPv6 (128-bit). Public vs. Private IPs. Subnet Mask,
Default Gateway.
o DHCP (Dynamic Host Configura on Protocol): Automa cally assigns IP addresses & network configs.
o MAC Address: Unique hardware iden fier for NIC (Layer 2).
o Wireless Networking (Wi-Fi): Radio waves (IEEE 802.11). SSID (network name), WPA2/WPA3
(security), WEP (insecure).
o OSI Model (7 layers): Physical, Data Link, Network, Transport, Session, Presenta on, Applica on.
o Connec ng to Exis ng Wi-Fi: Network icon in tray -> select SSID -> Connect -> enter password.
Choose network profile (Public/Private).
o Se ng up Mobile Hotspot: Se ngs > Network & Internet > Mobile hotspot -> Turn on. Edit Network
name (SSID) & password. PC needs ac ve internet to share.
o Connec ng to Exis ng Wi-Fi: Wi-Fi icon in menu bar -> select SSID -> enter password -> Join.
o Se ng up Internet Sharing: System Se ngs/Preferences > Sharing -> Internet Sharing. Select source
connec on & share via Wi-Fi. Configure Wi-Fi Op ons (Network Name, Security - WPA2/WPA3,
Password). Start sharing. Mac needs ac ve internet to share.
4.7 Understanding Wireless Network Security Countermeasures, Cloud Compu ng and it’s security
o Defini on: Measures to protect Wi-Fi networks from unauthorized access, eavesdropping, a acks.
o Common Threats: Unauthorized access, eavesdropping, MitM, rogue APs, evil twins, DoS,
WPA/WPA2 cracking, MAC spoofing, war driving.
o Key Countermeasures:
o Cloud Compu ng Recap: On-demand self-service, broad network access, resource pooling, rapid
elas city, measured service. Service Models (IaaS, PaaS, SaaS, FaaS). Deployment Models (Public,
Private, Hybrid, Community).
3. Data Security is Core (Encryp on at rest & in transit, key management, DLP).
o Conclusion on Cloud Security: Cloud offers benefits but needs proac ve, well-architected security.
It's an ongoing journey.