Chapter 15

Updated 4 Oct 2026

🔐 Chapter 15 — Cloud Security & Privacy Cheat Sheet

Core Problem: Cloud = a black box. You hand over your data and compute to someone else. Even if the provider is honest, malicious insiders, co-tenants, and outside attackers are real threats. Security in the cloud is fundamentally about loss of control, lack of trust, and multi-tenancy.

🏦 Analogy: เหมือนฝากเงินกับธนาคาร แต่ไม่รู้เลยว่าข้างในทำอะไรกับเงินเรา แม้ธนาคารจะซื่อสัตย์ แต่พนักงานอาจไม่ใช่

"Cloud Computing is a security nightmare and it can't be handled in traditional ways." — John Chambers, Cisco CEO


🗺️ Part 1 — Big Picture: Three Root Causes

Root CauseDescriptionMitigation
Loss of ControlData, apps, and resources are physically with the providerMonitoring, Consumer-managed access control, IDM
Lack of TrustHard to verify what the provider is doing internallyPolicy language, Certification, Contracts
Multi-tenancyMultiple users physically share the same infrastructureVPC, Strong tenant separation, ORAM

These three problems exist mainly in 3rd-party managed clouds.
Self-managed clouds have security issues too, but not these three specifically.


😨 Part 2 — Taxonomy of Fear (What Are We Afraid Of?)

Confidentiality ← Most feared in the cloud!

  • Will sensitive data stored on a cloud remain confidential?
  • Will cloud compromises leak confidential client data?
  • Will the cloud provider itself peek into the data?

Integrity

  • How do I know the cloud provider is doing computations correctly?
  • How do I ensure my data wasn't tampered with?

Availability

  • Will a DoS attack bring critical systems down?
  • What if the cloud provider goes out of business?
  • Will the cloud scale well enough?

Privacy

  • Massive data mining risk — cloud stores many clients' data → can run mining algorithms on it
  • Increased attack surface — attacker can target the communication link between client and cloud
  • Cloud provider employees can be phished

Auditability & Forensics

  • Difficult to audit data held outside the organization
  • Clients don't maintain data locally → forensics is harder

💡 If you want to audit → implement it yourself (log files, auditing mechanisms)

  • Who is responsible for complying with: SOX, HIPAA, GLBA, GDPR, PDPA?
  • If provider subcontracts to a third-party cloud — is your data still safe?

🧑‍💻 Part 3 — Attacker Types & Capabilities

Malicious Insider (Client Side)

  • Learn passwords / authentication tokens
  • Gain control of VMs

Malicious Insider (Provider Side)

  • Log client communication
  • Read unencrypted data
  • Peek into or copy VMs
  • Monitor network patterns
  • Why? Sell information or use it directly

Outside Attacker

TypeAction
PassiveListen to network traffic
ActiveInsert malicious traffic, probe cloud structure, launch DoS
GoalsIntrusion, network analysis, MITM, Cartography (map cloud infrastructure)

Attacker Challenges

  • How to find where the target VM lives in the cloud?
  • How to become co-located on the same physical machine?
  • How to extract information from target once co-located?

All answers: ✅ Yes — researchers have shown all of these are practically feasible.


🧾 Part 4 — Threat Model

A structured way to analyze, design, and evaluate security:

Step 1: Identify attackers, assets, threats, and components
Step 2: Rank the threats (severity + likelihood)
Step 3: Choose mitigation strategies
Step 4: Build solutions

Components

  • Attacker Modeling — Insider vs outsider? Single vs collaborator? Capabilities?
  • Attacker Goals — What are they trying to achieve?
  • Vulnerabilities / Threats — What weaknesses exist?

☁️ Part 5 — Top 9 Cloud Threats (CSA)

#ThreatDescription
T1Data Loss / LeakageMost critical; any deletion/accident/breach can destroy data
T2Account / Service HijackingStolen credentials → access to critical cloud areas
T3Insecure Interface (API)Poorly secured APIs → malicious exploitation
T4Denial of Service (DoS/DDoS)Prevents users from accessing data/applications
T5Malicious InsiderAuthorized employee/partner abuses access
T6Data BreachesUnauthorized viewing; encryption helps but key loss = data loss
T7Abuse of Cloud ServicesWeak registration → attackers exploit IaaS/PaaS
T8Insufficient Due DiligenceRushing to cloud without understanding risks → mismatched expectations
T9Insecure VM MigrationDuring migration in hybrid clouds → attacker intercepts or redirects VM

✅❌ Part 6 — Due Diligence vs. Due Care

Due DiligenceDue Care
DefinitionTaking necessary precautions in a given situationDay-to-day habits, policies, and procedures to stay safe
WhenBefore making a decisionAfter/during operations
ExampleInvestigating a detected problemImplementing security controls daily
TypeVerification (are controls being implemented?)Implementation (the controls themselves)
Analogyตรวจสอบก่อนซื้อของใช้ของอย่างระวัง

⚠️ Due Diligence comes BEFORE Due Care — it is a management process used to gather facts before decisions.


🏗️ Part 7 — Infrastructure Security (3 Levels)

Level 1: Network Level

  • Ensure confidentiality & integrity of data-in-transit (e.g., TLS)
  • Ensure proper access control (authentication, authorization, auditing)
  • Ensure availability of Internet-facing resources
  • Replace network zones/tiers model with domains

Level 2: Host Level

  • SaaS / PaaS → abstract the host OS → host security responsibility transferred to CSP
  • As a customer: you don't manage hosts, but you still own the risk of data

Local Host Security ⚠️ Often Forgotten!

  • Local machines are outside the cloud security perimeter
  • A compromised local device can:
    • Let malicious cloud services attack local networks
    • Compromise the cloud for other users
  • Local devices accessing cloud should have:
    • Strong authentication mechanisms
    • Tamper-resistant design
    • Strong app isolation
    • Trusted OS
    • Cryptographic functionality for traffic confidentiality

Level 3: Application Level

AttackDescription
DoSClassic availability attack — overwhelm the service
EDoS (Economic DoS)Attack the billing model — make the victim pay enormous cloud bills until bankrupt

💸 EDoS Analogy: เหมือนให้คนมากด Grab Food สั่งทิ้งไว้ตลอด จนร้านต้องเสียค่าใช้จ่ายจนเจ๊ง

⚠️ Final Exam: For web application protection, both the cloud provider AND consumer share responsibility.
At minimum: cloud provider must provide a Web Application Firewall (WAF).


💾 Part 8 — Data Security & Storage

Data States

StateRiskMitigation
Data-in-transitInterception, tamperingTLS / HTTPS; encryption + non-secured protocol
Data-at-restUsually NOT encrypted (commingled with others)Homomorphic encryption or Predicate encryption (allows search without decryption)
Data being processedMust be decrypted to processTEEs (Trusted Execution Environments)

Homomorphic Encryption vs. Predicate Encryption

TypeWhat It Does
Homomorphic EncryptionCompute on encrypted data without decrypting — result is correct when decrypted
Predicate EncryptionAnswer questions (predicates) about encrypted data without revealing the data

Data Remanence

  • Residual representation of data that remains even after deletion attempts
  • Example: encryption key left in memory → Data Remanence
  • Mitigation:
    • Don't place sensitive data in a public cloud
    • Encrypt data before placing it in the cloud
  • For sure destruction of data:
    • Degaussing (magnetic field scramble — works on HDD, NOT SSD)
    • Shredding / Crushing / Incineration (physical destruction)
    • Overwriting (software wipe)

Searchable Encryption Model

Data Owner: encrypt files + encrypt index → send to Cloud
User: request → get trapdoor → use trapdoor to search encrypted index
→ retrieve matching encrypted files → decrypt locally

🔑 Part 9 — Identity & Access Management (IAM)

Why IAM Matters

  • Organization's trust boundary becomes dynamic (extends to provider domain)
  • Must manage access for: employees, contractors, partners
  • Personal/financial/medical data now in the cloud → need higher-assurance authentication
  • Authentication now happens outside the firewall
  • Need to support authentication from mobile devices

Access Control Architecture: SAML + XACML ⚠️ Final Exam!

[Consumer Domain B]
  1. AuthN request → IDP
  2. ← SAML Assertion (identity token)
  3. Resource request + SAML assertion → [Cloud Provider Domain A]
       4. Redirect to resource owner's domain
       5. Retrieve policy for resource → PDP
       6. PDP decides: grant or deny
          → creates signed+encrypted ticket → ACM (XACML policies)
       7. ← Signed + Encrypted ticket
  4. Decrypt + verify signature → PEP
  5. Retrieve capability from ticket
  6. Grant or deny access

Key Components ⚠️ Final Exam!

ComponentRoleAnalogy
SAMLXML-format identity/authentication tokenบัตรประชาชน
XACMLAccess control protocol/policy frameworkกฎระเบียบของอาคาร
PEP (Policy Enforcement Point)Intercepts ALL resource access requestsยามที่ประตู
PDP (Policy Decision Point)Decides whether user can access resourceHR ที่ตัดสินใจว่าใครเข้าได้
ACM (Access Control Manager)Controls the policy → gives you back control!นโยบายสำนักงาน

Most important component for regaining control from the cloud provider = ACM — because it controls the policy.

Key used to sign and encrypt the ticket = PEP Cloud's Public Key

Consumer-Managed Access Control

  • Consumer keeps the PDP in their own domain → retains decision authority
  • Requires:
    • Pre-existing trust relationship with provider
    • Pre-negotiated standard for describing resources, users, and decisions
    • Provider upholds consumer-side access decisions

🔒 Part 10 — Privacy

What is Privacy?

  • About the collection, use, disclosure, storage, and destruction of PII (Personally Identifiable Information)
  • Two core principles:
    • Accountability — organizations accountable to data subjects
    • Transparency — clear about how personal data is handled

🔍 Security vs. Privacy:

  • Security = a developer/technical concern
  • Privacy = a general public concern

Key Privacy Dimensions

DimensionKey Questions
StorageIs data commingled? Can the government search it without notice? Can the CSP see it?
RetentionHow long is PII kept? Who owns it — organization or CSP? Who enforces the policy?
DestructionIs PII truly destroyed or just made inaccessible? Is the CSP mining it?
Auditing & MonitoringCan organizations monitor their CSP? Are CSPs regularly audited?
Privacy BreachesHow do you know a breach occurred? Who manages notification and costs?

Responsibility Paradox

Example: Hacker breaks into Cloud Provider A → steals data from Company X. Server also has Y & Z's data.

  • Who investigates?
  • Does Company X have the right to see logs of the provider's server?
  • Organizations can transfer liability — but not accountability
  • Data stewardship responsibility stays with the data owner

Data Destruction Methods

MethodWorks On
Degaussing (magnetic field)HDD only — NOT effective on SSD
Shredding / Crushing / IncinerationAny physical media
OverwritingSoftware-level; must be done multiple passes

🛡️ Part 11 — Cloud DLP (Data Loss Prevention)

DLP = process for protecting sensitive data at rest, in-transit, and on endpoints.

Cloud DLP specifically:

  • Ensures sensitive data is encrypted before entering the cloud
  • Ensures data only goes to authorized cloud applications
  • Removes or alters classified/sensitive data before files are shared to cloud
  • Can integrate with on-premise systems (hybrid model)

🔍 DLP checks: does this file contain PII? If so → block or encrypt before sending!

Key Benefits of Cloud DLP

  • Scan servers + identify and encrypt sensitive data before sharing
  • Continuously audit uploaded files
  • Automatically apply controls: prompt, block, or encrypt
  • Instantly alert admins when data is at risk
  • Maintain compliance with privacy regulations

🖥️ Part 12 — VM Security: Co-Tenancy Attacks

New Vulnerabilities in VM Environments

  • Threats from other consumers (co-tenants) on the same physical machine
  • Attacks based on placement and extraction:
    • Map cloud infrastructure
    • Identify likely physical location of target VM
    • Instantiate new VMs until co-resident with target
    • Extract information via cross-VM side-channel attacks

Side-Channel Attack

  • Exploits indirect hardware effects rather than attacking code directly
  • Gathers information by measuring: timing, power consumption, electromagnetic emissions, cache behavior
  • Goal: extract cryptographic keys or sensitive data from a co-located VM

👂 Analogy: เหมือนแอบฟังเสียงพิมพ์คีย์บอร์ดของคนอื่น แทนที่จะแฮ็ครหัสผ่านตรงๆ

Are cryptographic side-channel attacks possible in a virtualization environment?
✅ Yes — because VMs share physical resources (CPU, cache, memory). Data in shared resources can leak.


🛡️ Part 13 — Prevention: Cross-VM Attack Mitigations

A. Hardware-Level Defenses

  • Cache Partitioning
  • Intel CAT (Cache Allocation Technology) — prevents cache sharing between VMs

B. Hypervisor / System-Level Defenses

  • VM Isolation Policy — avoid co-locating sensitive workloads
  • Dedicated cores for high-security VMs

C. Oblivious RAM (ORAM) — Advanced Defense

  • Hides access patterns completely — even if data is encrypted, an attacker watching access patterns can infer what you're doing
  • ORAM makes all accesses look random and indistinguishable
  • Implemented inside: secure processors, memory controllers, TEEs (Intel SGX)

🌳 Part 14 — ORAM (Oblivious RAM) ⚠️ Final Exam: Path ORAM Steps!

The Problem ORAM Solves

Even with encrypted data, an attacker can still observe:

  • Which memory locations are accessed
  • How often and in what order
  • Access patterns over time → reveals what you're doing
ScenarioWhat Attacker Sees
Without ORAMAccess record #5 → attacker sees "you accessed #5"
With ORAMAccess record #5 → system does many random-looking reads/writes → attacker sees noise

📚 Analogy: ORAM = ไปหยิบหนังสือในห้องสมุด แต่แทนที่จะเดินตรงไปหยิบเล่มที่ต้องการ เราเดินวนหยิบหลายๆ เล่มสุ่มๆ ทำให้คนสังเกตไม่รู้ว่าเราต้องการเล่มไหน

Data is remapped every time it's accessed → obfuscates access patterns.
ORAM data disappears when power is off (stored in RAM).
ORAM overhead: too many reads/writes → active research area!


🌳 Part 15 — Path ORAM: 5 Steps ⚠️ Final Exam!

Path ORAM organizes data in a binary tree of buckets. Each block is mapped to a leaf.

Step 1: Program Requests Data (address a)

  • CPU queries the Position Map (on trusted side)
  • Learns: block a is currently mapped to leaf s=5s = 5

Step 2: Read Path (root → leaf 5)

  • ORAM reads the entire path from root to leaf 5 from untrusted DRAM
  • Reads multiple buckets along the path (not just the target block)
  • A block can be stored in any node along its assigned path

Step 3: Load into Stash → Return Data

  • All blocks on the path are decrypted → temporarily stored in Stash (secure buffer)
  • Target block a is found in stash → returned to program

Step 4: Remap (assign new random leaf)

  • Block a is assigned a new random leaf (e.g., old = 5 → new = 2)
  • Position Map is updated

Step 5: Write Path Back (root → leaf 5)

  • Write data back to the same path (root → leaf 5)
  • Place back: some real blocks, some dummy blocks
  • Ensures: storage looks consistent + access pattern remains hidden

Key Mechanisms in Step 3

MechanismPurpose
Data shufflingMove blocks around randomly
Dummy accessesFake read/write operations to confuse observers
Position mapClient secretly tracks real block locations
StashTemporary secure client-side buffer
Position Map (trusted client side):
  block a → leaf 5

Binary Tree (untrusted DRAM):
         [Root]
        /       \
   [Node]       [Node]
   /    \       /    \
[L1]  [L2]  [L3]  [Leaf 5 ← target]

Read entire path root→leaf5, decrypt all, stash, return a, remap to random leaf, write back

🔄 Part 16 — Minimize Loss of Control (4 Sub-Areas)

1. Monitoring

  • Consumer needs situational awareness for critical apps
  • Cloud consumer and cloud provider have different views of the system
SideMechanisms
Provider-sideInfrastructure remapping, shutting down offending components, repairs
Consumer-sideRAdAC (Risk-adaptable Access Control), VM porting with remote attestation, migrate app to another cloud

2. Utilize Different Clouds (Multi-Cloud)

  • "Don't put all your eggs in one basket"
  • Spread risk + increase redundancy + increase mission completion probability
✅ Benefits⚠️ Risks
Redundancy per task/appPolicy incompatibility across clouds
Higher availabilityData dependencies between clouds
Risk spreadingSpreading sensitive data may increase exposure

3. Access Control (see Part 9 — SAML + XACML)

4. Identity Management (IDM) (see Part 17)


🆔 Part 17 — Identity Management (IDM) in the Cloud ⚠️ Final Exam!

The Problem

Users on Amazon Cloud must share: Name, Email, Password, Billing Address, Shipping Address, Credit Card — with Amazon AND multiple services.

Problem: Too much PII disclosed unnecessarily to each service.

Goals of User-Centric IDM

  1. Authenticate without disclosing identifying information
  2. Securely use services even on an untrusted host (cloud VM)
  3. Minimal disclosure — reduce risk of MITM, Side-Channel, and Correlation attacks
  4. Independence from a Trusted Third Party

IDM Approach 1: IDM Wallet + Anonymous Identification (ZKP)

IDM Wallet = uses Active Bundle (AB) scheme to protect PII from untrusted hosts
Anonymous Identification = uses Zero-Knowledge Proof (ZKP) to authenticate without revealing the identifier

🔐 ZKP: Prove you know a secret without revealing the secret itself — like proving you know a password without saying it

Active Bundle (AB) Components

ComponentDescription
Identity DataData used during authentication (SSN, Date of Birth, etc.)
Disclosure PolicyRules for which identity data to share from IDM Wallet
Disclosure HistoryLogs for auditing purposes
Negotiation PolicyBased on ZKP (Anonymous Identification)
Virtual Machine (inside AB)Code that protects data on untrusted hosts; enforces disclosure policies

Shamir's Anonymous Identification (Credit Card ZKP)

1. IdP provides Encrypted Identity Information to both User and Service Provider
2. User and SP interact
3. Both run IdP's public function on certain bits of encrypted data
4. Exchange results → if they match → identity confirmed (without revealing raw data)

IDM Approach 2: Predicate over Encrypted Data + Multi-Party Computing

  • Active Bundle → protects PII on untrusted hosts
  • Predicates over Encrypted Data → authenticate without decrypting identity data
  • Multi-Party Computing → independent of any single trusted third party

Predicate over Encrypted Data Flow

User has: Email, Password, E(Name), E(Shipping), E(Billing), E(CreditCard)

SP sends predicate request:
  → Age Verification: age ≥ 18?
  → Credit Card Verification: card valid?

SP receives: E(Name), E(Billing), E(CreditCard)
SP verifies predicate → WITHOUT seeing raw data ✅

Multi-Party Computing for Key Independence

  • Multiple services hold shares of the secret key: K1′,K2′,K3′,…,Kn′K'_1, K'_2, K'_3, \ldots, K'_n
  • No single party holds the full key → minimizes risk of breach
  • Decryption handled by Key Management Services cooperatively
  • Result: Age Verified ✅, Credit Card Verified ✅

Selective Disclosure (Active Bundle in Action)

User HasSent to eBaySent to FedEx
EmailE(Email)E(Email)
E(Name)E(Name)E(Name)
E(Shipping Address)E(Shipping)E(Shipping)
E(Billing Address)❌ Not sent❌ Not sent
E(Credit Card)❌ Not sent❌ Not sent

FedEx gets only Name + Shipping Address. eBay gets Name + Shipping. Nobody gets raw data. 🔒

Full Amazon Cloud Flow

User has: Name, Email, Password, Billing, Shipping, Credit Card

Amazon:   receives Email + Password (login) + Name + Billing + Card (payment)
FedEx:    receives Name + Shipping (delivery)
E-mail:   receives Email only

IDM Key Characteristics

FeatureHow
Secure on untrusted hostsAB performs self-integrity check; if compromised → apoptosis/evaporation (data self-destructs)
Independent of Third PartyMulti-party computing → prevents correlation attacks
User in controlUser decides who gets what data
Minimal disclosureSP receives only minimum necessary information

🧩 Quick Reference Summary

ConceptWhat It Is
Loss of ControlData/apps/resources are with the provider; consumer relies on provider
Multi-tenancyMultiple users share the same physical infrastructure
EDoSEconomic DoS — attack the billing model to bankrupt the service
Data RemanenceResidual data remaining after deletion (e.g., key left in memory)
Due DiligenceVerify controls are being implemented (comes BEFORE due care)
Due CareDay-to-day habits implementing security controls
DLPData Loss Prevention — protects PII from leaving to unauthorized destinations
Side-Channel AttackExploit indirect hardware effects (timing, cache, power) to steal crypto keys
Cross-VM AttackCo-located VM extracts info from neighbor via shared physical resources
ORAMOblivious RAM — hides memory access patterns so attacker can't infer what you access
Path ORAMBinary tree ORAM: read entire path, stash, remap to new random leaf, write back
StashTemporary secure client-side buffer in ORAM
Position MapClient-side map of block → leaf assignments in ORAM
Active Bundle (AB)Encapsulating mechanism protecting encrypted PII with policies + VM enforcer
ZKPZero-Knowledge Proof — prove knowledge without revealing the secret
PEPPolicy Enforcement Point — intercepts all resource access requests (the gatekeeper)
PDPPolicy Decision Point — decides grant/deny
ACMAccess Control Manager — holds XACML policies; the key to reclaiming control
SAMLXML identity/authentication token format (the ID card)
XACMLAccess control protocol framework (the rule book)
Predicate over Encrypted DataVerify facts about data (age ≥ 18?) without decrypting it
Multi-Party ComputingDistribute key shares across services → no single point of trust
Selective DisclosureSend only the minimum necessary PII to each service
Homomorphic EncryptionCompute on encrypted data without decrypting
VPCVirtual Private Cloud — dedicated virtual environment still within cloud

⚠️ Final Exam Reminders

  1. SAML + XACML flow — be able to trace all 10 steps; know what PEP, PDP, ACM each do

    • Most important component for regaining control = ACM
    • Key used to sign/encrypt ticket = PEP Cloud's Public Key
  2. Path ORAM — know all 5 steps (request → read path → stash → remap → write back); know the 4 mechanisms (shuffling, dummy accesses, position map, stash)

  3. Web Application Security — both cloud provider AND consumer responsible; at minimum, cloud must provide a Web Application Firewall (WAF)

  4. Due Diligence vs Due Care — diligence comes FIRST (verify), care is ongoing (implement)

  5. Active Bundle + ZKP — understand how IDM Wallet protects PII using predicates + multi-party computing + selective disclosure; know what happens on untrusted hosts (apoptosis/evaporation)

  6. EDoS — distinguish from regular DoS: targets billing model, not just availability