Back to exam

CY0-001 Cheatsheet

CompTIA SecAI+

Download free PDF

AI and machine learning foundations

Learning tasks and data types

  • **Supervised learning** learns from labeled examples: classification predicts categories; regression predicts numeric values. Log and alert classification can support SOC triage.
  • **Unsupervised learning** finds structure in unlabeled data; clustering groups similar observations. **Semi-supervised learning** combines labeled and unlabeled examples.
  • **Reinforcement learning** learns a policy from actions and rewards. It differs from retraining a classifier or adding examples to a prompt.
  • **Structured data** has defined fields; unstructured data includes free text, images and audio. Choose preprocessing and model architecture for the task and data, rather than assuming one learning method fits all unstructured inputs.

Model families and explainability

  • **Decision trees** expose understandable decision paths. **Random forests** combine trees for stronger predictions but are harder to interpret as a whole. **Logistic regression** estimates class probabilities.
  • **Neural networks** learn nonlinear representations. **CNNs** commonly extract spatial patterns from images; **LSTMs** model sequential dependencies. Transformers use attention and underpin many language models.
  • **Generative AI** creates content; a classifier assigns labels. **GANs** use generator and discriminator networks; **diffusion models** generate content by learned denoising. Deepfakes can use multiple generative techniques.
  • **Facial recognition** compares learned facial representations for identification or verification. Protect biometric templates and use presentation-attack defenses; a face match alone does not establish liveness.

Training, validation and imbalance

  • **Data validation** checks schema, completeness, ranges, labels and fitness for purpose. **Cleansing** fixes missing, malformed, duplicate or inconsistent records. Normalization and feature scaling prepare values for suitable algorithms.
  • **Class imbalance** can hide poor detection behind high overall accuracy. Use representative sampling, class weights or appropriate augmentation, and evaluate minority-class precision and recall.
  • **Overfitting** means strong training performance but weak generalization. An **epoch** is one pass through the training set; excessive training can worsen overfitting. Use validation, regularization and early stopping.
  • **Train, validation and test sets** serve different purposes. Keep test data independent and prevent leakage across splits. Model validation measures predefined outcomes, robustness and subgroup performance on representative data.

Detection quality and model change

  • **False positives** flag legitimate activity; **false negatives** miss malicious activity. **Precision** measures how many positive predictions are correct; **recall** measures how many actual positives are found.
  • **Threshold tuning** changes the tradeoff between missed attacks and analyst workload. Investigate incorrect fraud blocks using validated labels and current transaction patterns before retraining.
  • **Data drift** changes input distributions; **concept drift** changes the relationship between inputs and outcomes. Track production quality against a baseline and evaluate controlled updates.
  • **Bias** can arise from unrepresentative samples, labels, historical decisions or proxy variables. Test outcomes by relevant population segment; aggregate accuracy can conceal serious disparities.

Language models, prompts and retrieval

  • **Tokens** are model processing units, not necessarily whole words. The **context window** limits available input and generated context. **Temperature** affects output sampling, not factual reliability.
  • **System instructions** define application behavior; user prompts express requests. **Zero-shot** prompting supplies no examples, **one-shot** supplies one, and **few-shot or multi-shot** supplies several. Templates standardize recurring tasks.
  • **Fine-tuning** updates model parameters using additional training. **Transfer learning** reuses learned representations. **Distillation** trains a smaller model from a teacher; **quantization** reduces numeric precision.
  • **Retrieval-augmented generation (RAG)** retrieves relevant material and adds it to model context without necessarily changing weights. Grounding can improve relevance, but retrieved content can be wrong, malicious or unauthorized.

Agents, tools and model selection

  • **Agentic AI** plans steps and invokes tools to pursue a goal. A chatbot may only answer; RAG supplies context. Tool access turns an incorrect response into a possible real-world action.
  • **Model Context Protocol (MCP)** connects AI clients with tools and contextual resources through servers. Authenticate peers, authorize each operation, validate arguments and protect credentials at this boundary.
  • **Small language models (SLMs)** can reduce inference resources for narrow tasks; LLMs offer broader capabilities at greater resource cost. Benchmark accuracy, latency and privacy requirements on the actual workload.
  • **Public, private, hosted and local models** have different data flows and operational responsibilities. Check retention, training use, isolation and deployment controls; private hosting alone does not guarantee security.

Securing AI systems and data

Threat modeling and security frameworks

  • **Threat modeling** starts with assets, data flows, identities, components and trust boundaries. Identify abuse paths, estimate likelihood and impact, choose mitigations and validate residual risk when the design changes.
  • **MITRE ATLAS** catalogs adversary tactics and techniques involving AI-enabled systems. **OWASP LLM Top 10** organizes common application risks, including injection, disclosure, poisoning, excessive agency and unbounded consumption.
  • **STRIDE** means spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. Apply its categories to components and boundary crossings.
  • **MAESTRO** supports layered threat modeling for agentic systems. The **MIT AI Risk Repository** helps classify broader risks, including intentional and unintentional causes. Risk taxonomies complement concrete system analysis.

Prompt injection and jailbreaks

  • **Direct prompt injection** places hostile instructions in a user request. **Indirect injection** embeds them in retrieved documents, files, websites or tool results. Treat external content as untrusted data.
  • **Jailbreaking** attempts to bypass behavioral restrictions. Role impersonation, emotional appeals and requests to reveal earlier instructions can target guardrails or expose system prompts.
  • **Obfuscation** can use homoglyphs, odd spacing, encoding, translation or fragmented text to evade filters. Test supported languages and modalities; inspect normalized content and resource size as well as visible characters.
  • **Defense in depth** combines input checks, clear instruction boundaries, guardrails, output validation and least privilege. System prompts and keyword filters cannot serve as authorization boundaries or guarantee injection prevention.

Guardrails, files and output safety

  • **LLM or prompt firewalls** can inspect requests and responses for malicious instructions, harmful content and sensitive information. Rule engines and guardrail libraries enforce application policies; test both bypasses and false blocks.
  • **Modality controls** allow only needed input types. Validate file type, size and extracted content, scan uploads, and isolate parsing. Apply equivalent controls to image, audio and document inputs when supported.
  • **Output validation** checks allowed fields, schema, length, policy and sensitive data before release. Filter PII and secrets, and return only the authorized information needed for the task.
  • **Improper output handling** occurs when downstream systems trust model output. Encode browser content, parameterize database queries, and validate tool arguments; never directly execute generated shell commands or code.

Identity, authorization and tool limits

  • **Authentication** establishes the caller at the endpoint. **Authorization** governs model invocation, data retrieval and tool actions. Use IAM roles, least privilege and separate service identities for distinct workloads.
  • **RAG authorization** must filter documents and chunks before they enter model context. Map sensitivity labels and permissions to user identity; preserve tenant boundaries in search, vector stores and caches.
  • **File-search tools** need scoped service accounts, allowed paths and object-level access checks. A model promise to avoid restricted files cannot compensate for a service account that can read them.
  • **Agent tools** should expose narrow operations with validated arguments and restricted egress. Sandbox execution, set step and time limits, and require human approval for high-impact actions such as patching or account containment.

Data confidentiality and session isolation

  • **Data minimization** removes unnecessary sensitive fields before training, retrieval or third-party sharing. **Classification** identifies sensitivity; **masking** obscures values; **tokenization** replaces them with controlled substitutes.
  • **Encryption at rest** protects stored datasets, logs, indexes and model artifacts. **TLS** protects data in transit. Encryption in use addresses computation in supported protected environments; key management remains essential.
  • **Passwords** need salted, slow password hashing rather than recoverable storage. Manage API keys and other secrets in a secret store, rotate them and prevent their inclusion in prompts, repositories and logs.
  • **Session isolation** separates conversation memory, tenant data and caches. Expire sessions and tokens, revoke compromised credentials and enforce reauthentication where needed. Short lifetimes limit exposure but do not alone eliminate replay.

Poisoning, provenance and model protection

  • **Data poisoning** corrupts training data or labels; **RAG poisoning** corrupts retrieved knowledge. Restrict write access, approve source changes and quarantine unverified user feedback before it enters any learning pipeline.
  • **Provenance** records origins and custody; **lineage** tracks transformations and use. Version datasets, prompts and models together so investigators can reproduce behavior and identify an affected release.
  • **Hashes and checksums** detect changes relative to a trusted baseline. Signatures can establish artifact authenticity. Integrity checks do not prove that the original data is accurate, lawful or free from poisoning.
  • **Model theft** includes stealing artifacts or extracting behavior through queries. Restrict artifact access, encrypt storage and transfers, protect deployment credentials, and monitor unusual query volume or extraction patterns.
  • **Model inversion** attempts to reconstruct sensitive features or data from model behavior. **Membership inference** estimates whether a record appeared in training. Minimize sensitive training data and evaluate privacy leakage.
  • **Adversarial evasion** manipulates inference inputs to induce an incorrect prediction; poisoning targets learning data or model updates. Test adversarial inputs, monitor suspicious patterns and evaluate robustness controls on the actual task.

Infrastructure, availability and cost abuse

  • **Harden the whole stack**: hosts, containers, APIs, gateways, MCP servers, storage and model-serving components. Patch vulnerabilities, segment networks, limit exposed services and use secure configuration baselines.
  • **Denial of service** targets availability; **denial of wallet** drives paid resource consumption. Context flooding, long outputs, repeated calls and tool loops can exhaust compute, memory or budgets.
  • **Usage controls** combine authenticated endpoint access, request rates, input and output token limits, concurrency caps and per-user quotas. Limit payload size, execution time and agent steps; apply session expiration and cleanup.
  • **Encryption and authenticated connections** reduce on-path tampering and session interception. Monitor endpoint, DNS and session anomalies; investigate changed responses using evidence rather than assuming the underlying model was modified.

AI-assisted security operations

SOC triage, enrichment and response

  • **Pattern recognition** identifies recurring behaviors and structures across logs. ML classifiers can categorize alerts, phishing URLs or malware; anomaly detection finds deviations that require investigation.
  • **Generative AI** can summarize findings, extract key facts and tailor reports for analysts or executives. RAG can supply current threat intelligence, but analysts must verify consequential claims against trusted evidence.
  • **UEBA** compares activity with user or entity baselines over time. Correlate anomalies with context; an unusual login sequence or statistical deviation is a signal, not proof of compromise.
  • **SOAR integration** can enrich cases and propose playbook actions. Use human approval and controlled rollback for disruptive responses; research and alert summarization usually need less autonomy than containment or patch deployment.

AI in secure software development

  • **IDE assistants** can explain code, add documentation and suggest security fixes before commit. Review generated code for unsafe behavior, hard-coded secrets and unsupported assumptions.
  • **SAST** examines code; **DAST** exercises a running application; **SCA** identifies risks in dependencies. AI can help triage findings and generate test payloads within an authorized test scope.
  • **CI/CD security gates** can combine scanners, tests and AI review. Establish measurable pass criteria and human escalation; model output alone should not authorize a production release or replace deterministic checks.
  • **Regression tests** protect previously corrected behavior, including authentication. Use reviewed changes, staged deployment and rollback plans so automation does not reintroduce a vulnerability or merge unsafe fixes unchecked.

MLOps, monitoring and audit evidence

  • **MLOps and the model development life cycle (MDLC)** control data preparation, training, evaluation, deployment and monitoring. Apply secure SDLC practices to surrounding code and infrastructure as well.
  • **Release controls** version model weights, datasets, prompts, retrieval settings and dependencies. Require review and approval for retraining or pipeline changes, verify artifacts and retain known-good releases.
  • **Observability** combines metrics, logs and traces. Function-level traces expose internal calls and tool execution; SIEM correlation links events across systems. WAF logs alone do not reveal all model behavior.
  • **Audit trails** identify who changed, validated and approved each release. Log identities, versions, policy decisions, retrieval and tool events with correlation IDs; restrict access, sanitize sensitive content and protect log integrity.

Usage, cost and response quality

  • **Investigate cost spikes** by model, account, request rate and input/output token usage. Correlate with long contexts, retries, agent loops, new features and possible abuse before choosing a control.
  • **Total AI cost** includes model inference, training, storage, retrieval and supporting compute. Set budgets and alerts alongside enforceable quotas; a notification alone does not stop spending.
  • **Performance tuning** can use an adequate smaller model, bounded outputs, prompt templates and authorized caching. Batch or parallelize independent tasks within rate limits; verify freshness and tenant isolation.
  • **Quality monitoring** tracks relevance, accuracy, refusal or non-answer rates, latency and user feedback. Validate confidence measures, offer safe abstention and escalation, and cap retries rather than assuming a fluent response is correct.

AI-enabled threats and incident response

  • **AI-assisted attacks** can accelerate reconnaissance, phishing, vulnerability discovery, payload generation and data discovery. Added capabilities and integrations create new attack paths that need reassessment.
  • **Deepfakes** can impersonate leaders through synthetic voice or video. Verify unusual instructions through an independently known channel; visual artifacts or a convincing likeness alone cannot authenticate a message.
  • **Watermarking and provenance metadata** can support content-origin assessment. Their absence or presence is not conclusive by itself; combine provenance, technical checks and contextual verification.
  • **AI incident response** preserves relevant logs and artifact versions, limits compromised tool or data access, isolates affected sessions and validates recovery. Distinguish malicious tampering from drift, hallucination and configuration mistakes.

AI governance, risk and responsible use

Governance structure and ownership

  • **Business owners** define intended use, value and acceptable risk. Begin adoption with a use-case and risk assessment covering affected people, sensitive data, critical actions and deployment context.
  • **Data scientists** develop and evaluate models; **data engineers** manage data pipelines and quality. **MLOps engineers** operationalize releases and monitoring; platform teams maintain serving infrastructure.
  • **Security architects and analysts** assess attack paths, controls and operational evidence. Risk, legal, privacy and compliance specialists interpret obligations; governance ownership spans these roles rather than one job title.
  • **AI centers of excellence** can publish approved patterns and coordinate review. Define accountable owners, intake and approval processes, acceptable-use policies, development guidelines and configuration standards.

Responsible AI principles

  • **Fairness and inclusiveness** require testing for disparate outcomes and accessibility across affected groups. Postal codes and other proxies can reproduce discrimination even when protected attributes are omitted.
  • **Transparency** communicates AI use, limitations and relevant operating practices. **Explainability** makes the reasons for an outcome understandable; model complexity and high accuracy do not guarantee either.
  • **Accountability** assigns responsibility for decisions and harms. **Auditability** preserves evidence of data, tests, approvals and changes so an independent reviewer can reconstruct what happened.
  • **Human-in-the-loop** review is especially valuable for consequential decisions and irreversible actions. Give reviewers meaningful authority, supporting evidence and a clear route to override or stop the system.

Risk frameworks and assurance

  • **NIST AI Risk Management Framework** organizes work around **Govern, Map, Measure and Manage**. Use it to understand context, evaluate risk and maintain controls across the AI life cycle.
  • **OECD AI Principles** provide guidance for trustworthy AI, including human rights, transparency, robustness and accountability. Principles guide policy; they are distinct from a legal obligation or a product certification.
  • **ISO/IEC 42001** specifies requirements for an AI management system. **ISO/IEC 27001** addresses information security management; **ISO/IEC 27701** addresses privacy information management.
  • **Third-party certification** assesses the defined management-system scope. Review scope, exceptions and evidence alongside product-specific testing; certification does not establish that every model output is safe or fair.

Compliance, vendors and data rights

  • **Applicable law** depends on jurisdiction, use case and data. The **EU AI Act** addresses AI obligations; privacy laws address personal data. Assess employment, lending and healthcare uses with qualified compliance review.
  • **Public datasets** still require review of provenance, licensing, copyright, consent and lawful use. Validate sources and restrictions before collecting, training on or sharing the data.
  • **Third-party risk management** examines provider security, data location and transfers, retention, training use, subcontractors, incident reporting and exit options. Verify controls before sharing sensitive records.
  • **Employee policies and training** define approved tools, permitted data and escalation routes. Public AI services can expose regulated or confidential information; approved access, DLP and minimization support safe use.

Evaluation and continuous assurance

  • **Pre-release evaluation** measures business utility, accuracy, robustness, privacy, fairness and security against stated requirements. Test harmful outputs, leakage, malicious inputs and tool misuse before customer trials.
  • **Hallucination** is plausible but unsupported or incorrect output. Use trusted retrieval, evidence checks, constrained responses and human escalation; grounding and guardrails reduce risk without guaranteeing truth.
  • **Adversarial testing** exercises prompt injection, obfuscation, file uploads, authorization boundaries and resource exhaustion. Re-test after changes to models, prompts, tools, retrieval sources or guardrails.
  • **Continuous assurance** combines monitoring, periodic risk review, incident lessons and controlled remediation. Record validation results and approvals, track residual risks and retire systems when their use is no longer justified.