DevSecOps
ฝังความปลอดภัยเข้าไปในทุกขั้นของวงจรพัฒนาและส่งมอบซอฟต์แวร์ ให้ทีมส่งของได้เร็วโดยความเสี่ยงอยู่ในระดับที่ควบคุมได้
- ผลลัพธ์เมื่อจบ
- ออกแบบ secure pipeline, ทำ threat modeling, จัดการ supply chain, ป้องกัน container/K8s/cloud และตั้ง detection + compliance as code ได้
- ต้องมีพื้นฐาน
- Stage 0 F-TOOL-1, เขียนโปรแกรมได้อย่างน้อย 1 ภาษา, เข้าใจ CI/CD และ container เบื้องต้น
- โมดูล
- 14
- หัวข้อ
- 51
- คีย์เวิร์ด
- 189
- คำย่อย
- 795
- Lab/โปรเจกต์
- 17
- ชั่วโมง
- 185
โมดูลทั้งหมด
M1Security Fundamentals for Engineers
เป้าหมายการเรียนรู้
- อธิบาย CIA triad, risk และหลักออกแบบปลอดภัยด้วยตัวอย่างจากระบบจริง
- จำแนกประเภทภัยคุกคามและช่องโหว่หลักได้
- ใช้ภาษาเดียวกับทีม security (vulnerability, threat, risk, control)
Core Conceptsแนวคิดหลัก
CIA triad
สามเป้าหมายของความปลอดภัย
- confidentiality
- integrity
- availability
- + authenticity
- non-repudiation
- privacy
Risk vocabulary
คำศัพท์ความเสี่ยง
- asset
- threat
- vulnerability
- exploit
- risk = likelihood × impact
- residual risk
- risk appetite
Controls
มาตรการควบคุม
- preventive
- detective
- corrective
- deterrent
- technical/administrative/physical
- compensating control
AAA
การยืนยันตัวตนและสิทธิ์
- authentication
- authorization
- accounting/auditing
Secure Design Principlesหลักการออกแบบปลอดภัย
Least privilege
ให้สิทธิ์น้อยที่สุดที่จำเป็น
- need-to-know
- just-in-time access
- scoped tokens
Defense in depth
ป้องกันหลายชั้น
- layered controls
- network + host + app + data layers
Secure defaults & fail-safe
ค่าเริ่มต้นปลอดภัย
- deny by default
- fail closed vs fail open
- minimal attack surface
Separation of duties
แยกหน้าที่
- four-eyes principle
- maker-checker
- break-glass
Zero Trust
ไม่เชื่อใจโดยปริยาย
- verify explicitly
- assume breach
- identity-centric
- micro-segmentation
- continuous verification
Threat Landscapeภาพรวมภัยคุกคาม
Threat actors
ผู้คุกคาม
- script kiddies
- cybercriminals
- insiders
- hacktivists
- nation-state/APT
- motivation
Attack classes (แนวคิด)
กลุ่มการโจมตี
- phishing/social engineering
- malware/ransomware
- credential stuffing
- supply chain compromise
- DDoS
- misconfiguration exploitation
Vulnerability identifiers
ระบบระบุช่องโหว่
- CVE
- CWE
- CVSS
- EPSS
- KEV catalog
- NVD
- vendor advisories
Cryptography Essentialsคริปโตที่วิศวกรต้องรู้
Primitives
องค์ประกอบพื้นฐาน
- symmetric (AES-GCM)
- asymmetric (RSA, ECDSA, Ed25519)
- hashing (SHA-256)
- HMAC
- KDF
Password storage
เก็บรหัสผ่าน
- salting
- Argon2id
- bcrypt
- scrypt
- never encrypt passwords reversibly
PKI
โครงสร้างกุญแจสาธารณะ
- certificates
- CA
- chain of trust
- revocation (CRL/OCSP)
- certificate lifetimes
Common mistakes
ข้อผิดพลาดที่พบบ่อย
- rolling your own crypto
- ECB mode
- hardcoded keys
- weak randomness
- nonce reuse
Lab / แบบฝึก
Checkpoint
- ตอบโจทย์สถานการณ์ว่าควรใช้ control ประเภทใด
- ประเมิน CVSS + EPSS เพื่อจัดลำดับแก้ช่องโหว่ได้สมเหตุสมผล
M2Linux & Networking for Security
เป้าหมายการเรียนรู้
- harden เซิร์ฟเวอร์ Linux ตาม baseline ได้
- อ่าน traffic และ log พื้นฐานเพื่อหาสิ่งผิดปกติ
- อธิบาย TLS และการแบ่ง network segment
Linux Securityความปลอดภัย Linux
Access control
การควบคุมสิทธิ์
- file permissions
- setuid risks
- sudoers
- PAM
- capabilities
- ACL
MAC
การควบคุมแบบบังคับ
- SELinux (contexts, enforcing/permissive)
- AppArmor profiles
- seccomp
Hardening
การเสริมความปลอดภัย
- CIS benchmarks
- minimal packages
- SSH hardening
- auditd
- unattended patching
- kernel parameters (sysctl)
Logging for security
log เพื่อความปลอดภัย
- auth.log/secure
- journald
- auditd rules
- remote log shipping
- tamper resistance
Networking for Securityเครือข่ายเพื่อความปลอดภัย
Protocols & ports
โปรโตคอลและพอร์ต
- TCP/UDP
- common ports
- DNS
- HTTP(S)
- SSH
- insecure protocols (Telnet, FTP)
TLS deep dive
TLS เชิงลึก
- handshake
- cipher suites
- forward secrecy
- HSTS
- certificate pinning (แนวคิด)
- mTLS
Segmentation
แบ่งส่วนเครือข่าย
- VLAN
- subnets
- DMZ
- firewall zones
- micro-segmentation
- egress filtering
Traffic analysis
วิเคราะห์ traffic
- packet capture (ใน lab)
- Wireshark filters
- flow logs
- NetFlow
- DNS logs
Identity & Network Accessตัวตนและการเข้าถึง
Remote access
เข้าถึงระยะไกล
- VPN
- bastion
- SSH certificates
- identity-aware proxy
- ZTNA
Name resolution security
ความปลอดภัย DNS
- DNSSEC (แนวคิด)
- DNS over HTTPS/TLS
- DNS spoofing (แนวคิด)
- domain takeover (dangling CNAME)
Lab / แบบฝึก
Checkpoint
- เครื่องผ่าน baseline scan ≥ 90%
- อธิบายว่า segmentation ลด blast radius อย่างไรด้วย diagram
M3Secure SDLC & Threat Modeling
เป้าหมายการเรียนรู้
- ทำ threat model ด้วย data flow diagram + STRIDE และได้รายการ mitigation
- ฝังกิจกรรม security ลงในแต่ละเฟสของ SDLC
- เขียน security requirements และ abuse cases ได้
Secure SDLC Modelsโมเดล SDLC ปลอดภัย
Frameworks
กรอบอ้างอิง
- Microsoft SDL
- OWASP SAMM
- NIST SSDF (SP 800-218)
- BSIMM (แนวคิด)
Phase activities
กิจกรรมต่อเฟส
- requirements → design → implement → verify → release → operate
- security gates
Shift left & shift right
เลื่อนซ้ายและขวา
- early feedback
- runtime protection
- feedback loops จาก production
Security champions
ผู้นำด้านความปลอดภัยในทีม
- champion program
- enablement
- office hours
- paved roads
Security Requirementsข้อกำหนดความปลอดภัย
Sources
แหล่งที่มา
- OWASP ASVS
- regulatory (PDPA, PCI DSS)
- internal policies
- privacy by design
Abuse cases
กรณีใช้ในทางที่ผิด
- misuse stories
- evil user stories
- acceptance criteria ด้านความปลอดภัย
Data classification
จัดชั้นข้อมูล
- public/internal/confidential/restricted
- PII
- handling rules
Threat Modelingการจำลองภัยคุกคาม
Four questions
คำถามหลัก
- what are we building
- what can go wrong
- what are we going to do
- did we do a good job
Data Flow Diagram
แผนภาพการไหลของข้อมูล
- external entity
- process
- data store
- data flow
- trust boundary
STRIDE
หมวดภัย
- Spoofing
- Tampering
- Repudiation
- Information disclosure
- Denial of service
- Elevation of privilege
- STRIDE-per-element
Other methods
วิธีอื่น
- PASTA
- LINDDUN (privacy)
- attack trees
- kill chain mapping
- DREAD (ข้อจำกัด)
Tooling
เครื่องมือ
- OWASP Threat Dragon
- Microsoft Threat Modeling Tool
- threat-model-as-code (pytm, Threagile) (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Continuous threat modeling
ทำต่อเนื่อง
- lightweight per feature
- design review checklist
- update on architecture change
Secure Coding & Reviewเขียนและรีวิวโค้ดอย่างปลอดภัย
Secure coding practices
แนวปฏิบัติ
- input validation
- output encoding
- parameterized queries
- safe deserialization
- error handling ไม่รั่วข้อมูล
Security code review
รีวิวด้านความปลอดภัย
- checklist
- high-risk areas (auth, crypto, file upload, serialization)
- diff-focused review
Developer training
การฝึกนักพัฒนา
- secure coding katas
- just-in-time guidance in IDE
Lab / แบบฝึก
Checkpoint
- threat model ที่มี trust boundary ครบและทุก threat มี mitigation หรือ risk acceptance
- map กิจกรรม security ลงทุกเฟส SDLC ของทีมตัวอย่าง
M4Application Security & OWASP
เป้าหมายการเรียนรู้
- อธิบายช่องโหว่ใน OWASP Top 10 และ API Top 10 ระดับกลไกและการป้องกัน
- ตรวจพบและแก้ช่องโหว่ในแอปจำลองของแพลตฟอร์ม
- ออกแบบ authentication/session ที่ปลอดภัย
OWASP Top 10 Conceptsแนวคิดช่องโหว่เว็บ
Broken Access Control
ควบคุมสิทธิ์ผิดพลาด
- IDOR
- missing function-level authorization
- privilege escalation
- CORS misconfiguration
- deny-by-default
Cryptographic Failures
ใช้คริปโตผิด
- plaintext transmission
- weak algorithms
- key management
- sensitive data exposure
Injection
การฉีดคำสั่ง
- SQL injection
- NoSQL injection
- OS command injection
- LDAP injection
- XSS (reflected/stored/DOM)
- parameterization
- context-aware encoding
Insecure Design
ออกแบบไม่ปลอดภัย
- missing threat modeling
- business logic flaws
- rate limit absence
Security Misconfiguration
ตั้งค่าผิด
- default credentials
- verbose errors
- unnecessary features
- missing security headers
- XXE
Vulnerable & Outdated Components
ส่วนประกอบล้าสมัย
- dependency CVEs
- end-of-life frameworks
- SCA
Identification & Authentication Failures
ยืนยันตัวตนผิดพลาด
- credential stuffing
- weak password policy
- session fixation
- missing MFA
Software & Data Integrity Failures
ความถูกต้องของซอฟต์แวร์/ข้อมูล
- insecure deserialization
- unsigned updates
- CI/CD tampering
Logging & Monitoring Failures
ไม่มี log/การเฝ้าระวัง
- missing audit logs
- no alerting
- log injection
SSRF
หลอกเซิร์ฟเวอร์ให้เรียกปลายทางภายใน
- cloud metadata endpoint risk
- allowlist
- egress controls
- IMDSv2
API Securityความปลอดภัย API
OWASP API Top 10 concepts
แนวคิดช่องโหว่ API
- BOLA
- broken authentication
- BOPLA/mass assignment
- unrestricted resource consumption
- BFLA
- unsafe consumption of APIs
- improper inventory
API controls
มาตรการ
- schema validation (OpenAPI)
- rate limiting
- API gateway
- object-level authz checks
- API inventory/shadow APIs
GraphQL & gRPC concerns
ประเด็นเฉพาะ
- query depth/complexity limits
- introspection in production
- authz per resolver
Authentication & Sessionการยืนยันตัวตนและเซสชัน
Auth protocols
โปรโตคอล
- OAuth 2.0 flows (authorization code + PKCE, client credentials)
- OpenID Connect
- SAML
Tokens
โทเคน
- JWT structure
- signature validation
- alg confusion (แนวคิด)
- expiry
- refresh token rotation
- token storage
Sessions
เซสชัน
- secure cookie flags (Secure, HttpOnly, SameSite)
- CSRF protection
- session timeout
- logout invalidation
MFA & passwordless
ยืนยันหลายปัจจัย
- TOTP
- WebAuthn/passkeys
- phishing-resistant MFA
Browser & Frontend Securityความปลอดภัยฝั่งเบราว์เซอร์
Security headers
header ป้องกัน
- Content-Security-Policy
- HSTS
- X-Content-Type-Options
- frame-ancestors
- Referrer-Policy
- Permissions-Policy
Same-origin & CORS
นโยบาย origin
- SOP
- CORS preflight
- credentialed requests
- misconfiguration patterns
Client-side risks
ความเสี่ยงฝั่ง client
- third-party scripts
- Subresource Integrity
- clickjacking
- open redirect
Lab / แบบฝึก
Checkpoint
- แก้ช่องโหว่ในแอปจำลองครบตามรายการและมี regression test ยืนยัน
- อธิบายกลไกและการป้องกันของแต่ละหมวด OWASP Top 10 ได้
M5Security Testing in CI/CD (SAST/DAST/IAST/SCA)
เป้าหมายการเรียนรู้
- เลือกและตั้งเครื่องมือ SAST/SCA/DAST/IaC/secret scan ใน pipeline ได้
- จัดการผลการสแกน (triage, false positive, SLA) อย่างเป็นระบบ
- ออกแบบ security gate ที่สมดุลระหว่างความเร็วและความเสี่ยง
Static Analysisการวิเคราะห์แบบสถิต
SAST
วิเคราะห์ซอร์สโค้ด
- taint analysis
- source/sink
- data flow
- pattern-based rules
- Semgrep
- CodeQL
- SonarQube (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Custom rules
เขียนกฎเอง
- rule authoring
- org-specific patterns
- banned APIs
IDE & pre-commit
ตรวจตั้งแต่เครื่องนักพัฒนา
- IDE plugins
- pre-commit hooks
- fast feedback
Linters & type safety
linter
- security linters (Bandit, ESLint security plugins)
- strict typing
Dependency & Composition Analysisวิเคราะห์ dependency
SCA
ตรวจไลบรารีบุคคลที่สาม
- lockfiles
- transitive dependencies
- vulnerability databases (OSV, GHSA)
- reachability analysis
Automated updates
อัปเดตอัตโนมัติ
- Dependabot
- Renovate
- grouping
- auto-merge policy
- breaking change risk
License compliance
ใบอนุญาต
- permissive vs copyleft
- license policy
- SPDX identifiers
Dependency risks
ความเสี่ยงอื่น
- typosquatting
- dependency confusion
- abandoned packages
- malicious packages (แนวคิด)
- OpenSSF Scorecard
Dynamic & Interactive Testingทดสอบขณะรัน
DAST
สแกนแอปที่กำลังรัน
- crawling
- authenticated scanning
- OWASP ZAP baseline/full scan
- API scanning ด้วย OpenAPI
- scan เฉพาะ environment ทดสอบ
IAST
agent ตรวจในแอป
- runtime instrumentation
- low false positives
- language support
Fuzzing
ป้อนข้อมูลสุ่ม
- coverage-guided fuzzing
- API fuzzing
- OSS-Fuzz (แนวคิด)
Security unit tests
ทดสอบความปลอดภัยในโค้ด
- authz tests
- input validation tests
- regression tests for fixed vulns
Other Scannersเครื่องสแกนอื่น
Secret scanning
หาความลับในโค้ด
- gitleaks
- TruffleHog
- history scanning
- push protection
- entropy vs pattern
IaC scanning
สแกน infrastructure code
- Checkov
- Trivy config
- KICS
- Terraform/K8s/Dockerfile misconfig
Container scanning
สแกน image
- Trivy
- Grype
- OS vs language packages
- base image recommendations
Pipeline Integration & Triageการรวมเข้ากับ pipeline
Gate design
ออกแบบด่าน
- block on new critical
- baseline/diff mode
- warn vs fail
- break-glass exception
Result management
จัดการผล
- SARIF format
- deduplication
- ASPM/vulnerability management platforms (DefectDojo)
- ownership routing
Triage workflow
ขั้นตอนคัดกรอง
- true/false positive
- risk acceptance with expiry
- fix SLA by severity
- metrics (MTTR vulns)
Lab / แบบฝึก
Checkpoint
- pipeline ที่มี 5 ชนิด scan, ผลเป็น SARIF รวมศูนย์, gate เฉพาะ finding ใหม่
- อธิบายจุดแข็ง/จุดอ่อนของ SAST vs DAST vs IAST vs SCA
M6Secrets, Identity & Least Privilege in Pipelines
เป้าหมายการเรียนรู้
- กำจัด long-lived credentials ออกจาก CI/CD ด้วย OIDC/workload identity
- ออกแบบสิทธิ์ของ pipeline และ runner แบบ least privilege
- ตอบสนองเหตุ secret รั่วได้ตาม playbook
Secrets Managementการจัดการความลับ
Secret types
ประเภทความลับ
- API keys
- DB passwords
- certificates/private keys
- tokens
- encryption keys
Secret stores
ที่เก็บ
- Vault/OpenBao
- cloud secret managers
- KMS/HSM
- envelope encryption
Lifecycle
วงจรชีวิต
- creation
- distribution
- rotation
- revocation
- expiry
- audit
Dynamic & short-lived
อายุสั้น
- dynamic DB creds
- leases
- PKI secrets engine
- just-in-time access
Leak response
รับมือการรั่ว
- revoke first
- rotate
- scope assessment
- history rewrite ไม่พอ
- notify
Workload & Pipeline Identityตัวตนของ workload และ pipeline
OIDC federation
ยืนยันตัวตนข้ามระบบ
- CI OIDC token
- claims (repo, branch, environment)
- trust policy conditions
- audience
Workload identity
ตัวตนของ workload
- IRSA/EKS Pod Identity
- GKE Workload Identity
- Azure Workload Identity
- SPIFFE/SPIRE
Service accounts
บัญชีบริการ
- per-pipeline scope
- no shared accounts
- key-less where possible
Least Privilege in CI/CDสิทธิ์น้อยที่สุด
Token permissions
สิทธิ์ของ token
- default read-only
- per-job permissions
- fine-grained PAT
- expiry
Runner security
ความปลอดภัย runner
- ephemeral runners
- isolation
- no privileged containers
- network egress control
- self-hosted risks on public repos
Pipeline threats (แนวคิด)
ภัยต่อ pipeline
- poisoned pipeline execution
- untrusted fork PRs
- script injection via untrusted input
- compromised third-party actions
Environment protection
ปกป้อง environment
- required reviewers
- deployment branches
- separate prod credentials
- approval audit
Human Accessการเข้าถึงของคน
Privileged access
สิทธิ์สูง
- PAM
- JIT elevation
- break-glass accounts
- session recording
SSO & MFA for dev tools
SSO สำหรับเครื่องมือ
- SCM SSO
- enforced MFA
- offboarding automation
- access reviews
Lab / แบบฝึก
Checkpoint
- ไม่มี long-lived credential ใน CI และ trust policy จำกัดด้วย claim
- playbook secret leak ที่ระบุเวลาและผู้รับผิดชอบแต่ละขั้น
M7Software Supply Chain Security
เป้าหมายการเรียนรู้
- สร้าง SBOM, ลงนาม artifact และสร้าง provenance attestation อัตโนมัติ
- ตรวจ signature/provenance ก่อน deploy
- อธิบายกรอบ SLSA และประเมินระดับของ pipeline ตัวเอง
Threat Model of the Supply Chainภัยต่อห่วงโซ่
Attack surface (แนวคิด)
จุดเสี่ยง
- source tampering
- build compromise
- dependency compromise
- artifact substitution
- registry compromise
Case studies
กรณีศึกษา
- build system compromise
- malicious package updates
- maintainer account takeover (วิเคราะห์บทเรียนเชิงป้องกัน)
Frameworks
กรอบ
- SLSA
- NIST SSDF
- CNCF supply chain best practices
- OpenSSF
SBOMรายการส่วนประกอบซอฟต์แวร์
Formats
รูปแบบ
- SPDX
- CycloneDX
- components
- relationships
- PURL
- CPE
Generation
การสร้าง
- Syft
- build-time vs image-time SBOM
- completeness
- per-release SBOM
Usage
การใช้งาน
- vulnerability matching
- VEX (exploitability statements)
- license audit
- SBOM sharing with customers
Signing & Provenanceลงนามและที่มา
Artifact signing
ลงนาม artifact
- Sigstore
- cosign
- keyless signing (Fulcio, OIDC identity)
- transparency log (Rekor)
- key-based signing with KMS
Attestations
คำรับรอง
- in-toto attestation
- predicate types (SLSA provenance, SBOM, vuln scan)
- DSSE envelope
SLSA levels (แนวคิด)
ระดับความน่าเชื่อถือของ build
- build track levels
- hosted build platform
- non-falsifiable provenance
- isolated builds
Source integrity
ความถูกต้องของซอร์ส
- signed commits (GPG/SSH/gitsign)
- branch protection
- two-person review
Verification & Policyการตรวจสอบ
Deploy-time verification
ตรวจตอน deploy
- admission policies (Kyverno verifyImages, Sigstore policy-controller)
- identity-based trust policies
Dependency hygiene
สุขอนามัย dependency
- pinning by hash
- private mirrors/proxies
- allowlisted registries
- reproducible builds
Artifact repositories
คลัง artifact
- immutable artifacts
- provenance stored alongside
- retention
Lab / แบบฝึก
Checkpoint
- image ที่ไม่ได้ลงนามจาก pipeline ที่กำหนดถูกบล็อกโดยอัตโนมัติ
- รายงาน SLSA gap analysis ของ pipeline ตัวอย่าง
M8Container Security
เป้าหมายการเรียนรู้
- สร้าง image ที่มีพื้นผิวการโจมตีน้อยและไม่มี critical CVE
- อธิบาย isolation boundary ของ container และความเสี่ยง container escape (แนวคิด)
Image Securityความปลอดภัยของ image
Minimal images
image ขนาดเล็ก
- distroless
- scratch
- Chainguard/Wolfi-style minimal bases
- slim variants (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Dockerfile hygiene
Dockerfile ที่ดี
- non-root USER
- no secrets in layers
- BuildKit secret mounts
- pin digests
- multi-stage
- Hadolint
Scanning & patching
สแกนและแพตช์
- OS + language packages
- rebuild cadence
- base image update automation
- unfixed CVEs handling
Runtime Isolationการแยกขณะรัน
Kernel isolation
การแยกระดับเคอร์เนล
- namespaces
- cgroups
- user namespaces/rootless
- seccomp profiles
- AppArmor/SELinux
Privilege risks (แนวคิด)
ความเสี่ยงสิทธิ์สูง
- privileged containers
- host mounts (docker.sock, /)
- hostPID/hostNetwork
- dangerous capabilities (SYS_ADMIN)
Sandboxed runtimes
runtime แยกพิเศษ
- gVisor
- Kata Containers
- Firecracker microVMs
Container escape (แนวคิด)
การหลุดออกจาก container
- kernel vulnerability class
- misconfiguration class
- detection signals
- prevention layers
Registry & Hostregistry และเครื่อง host
Registry security
ความปลอดภัย registry
- private registry
- access control
- image immutability
- scanning on push
- signature storage
Host hardening
เสริม host
- container-optimized OS (Bottlerocket, Flatcar, COS)
- CIS Docker benchmark
- minimal host access
Lab / แบบฝึก
Checkpoint
- image สุดท้ายรัน non-root, read-only rootfs, ไม่มี critical CVE
M9Kubernetes Security
เป้าหมายการเรียนรู้
- ตั้ง RBAC, Pod Security และ NetworkPolicy ให้คลัสเตอร์ได้ตามหลัก least privilege
- ตรวจคลัสเตอร์ด้วย benchmark และแก้ misconfiguration
Cluster Hardeningเสริมความปลอดภัยคลัสเตอร์
Control plane security
ปกป้อง control plane
- API server access
- private endpoint
- etcd encryption at rest
- audit logging
- anonymous auth disabled
Node security
ปกป้อง node
- kubelet authn/authz
- node restriction
- minimal OS
- auto-upgrade
- IMDS protection
Benchmarks
มาตรฐานตรวจ
- CIS Kubernetes Benchmark
- kube-bench
- managed service responsibility split
Access Controlการควบคุมสิทธิ์
Authentication
ยืนยันตัวตน
- OIDC for users
- client certificates
- service account tokens (bound, projected)
- cloud IAM mapping
RBAC
สิทธิ์ตามบทบาท
- Role/ClusterRole
- bindings
- wildcard risks
- escalate/bind/impersonate verbs
kubectl auth can-i --list- rbac audit tools
Service accounts
บัญชีบริการ
- automountServiceAccountToken: false
- per-workload SA
- workload identity to cloud
Workload Securityความปลอดภัย workload
Pod Security Standards
มาตรฐาน pod
- privileged/baseline/restricted
- Pod Security Admission labels
- enforce/audit/warn modes
securityContext
การตั้งค่าความปลอดภัย
- runAsNonRoot
- runAsUser
- readOnlyRootFilesystem
- allowPrivilegeEscalation: false
- capabilities drop ALL
- seccompProfile RuntimeDefault
Secrets in K8s
ความลับใน K8s
- base64 ≠ encryption
- KMS encryption provider
- external secret stores
- RBAC on secrets
Network & Admissionเครือข่ายและ admission
NetworkPolicy
นโยบายเครือข่าย
- default deny ingress/egress
- namespace isolation
- DNS egress allowance
- Cilium L7 policies
Service mesh security
ความปลอดภัย mesh
- automatic mTLS
- authorization policies
- workload identity (SPIFFE)
Admission control
ด่านตรวจก่อนสร้าง object
- validating/mutating webhooks
- Kyverno
- OPA Gatekeeper
- ValidatingAdmissionPolicy (CEL)
- image policy
Posture scanning
ตรวจสภาพ
- Kubescape
- Trivy operator
- Polaris
- kube-hunter-style assessments ใน lab (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Lab / แบบฝึก
Checkpoint
- namespace ทั้งหมด enforce restricted PSS และ default-deny network
- รายงานผล benchmark ก่อน/หลังแก้
M10Cloud Security & Posture Management
เป้าหมายการเรียนรู้
- ออกแบบ IAM และ account structure ที่ลด blast radius
- ตรวจหาและแก้ misconfiguration ด้วย CSPM
- ปกป้องข้อมูลด้วย encryption และ network controls
Cloud Security Foundationsพื้นฐาน
Shared responsibility
ความรับผิดชอบร่วม
- IaaS/PaaS/SaaS split
- customer responsibilities
- managed service nuances
Account/project strategy
โครงสร้างบัญชี
- multi-account
- landing zone
- security/log archive accounts
- guardrails (SCP/org policies)
Common misconfigurations
การตั้งค่าผิดที่พบบ่อย
- public buckets
- open security groups
- overly permissive IAM
- unencrypted storage
- exposed metadata
Cloud IAM Deep DiveIAM เชิงลึก
Policy model
โมเดลนโยบาย
- identity vs resource policies
- conditions
- permission boundaries
- session policies
- explicit deny
Privilege escalation paths (แนวคิด)
เส้นทางยกระดับสิทธิ์
- iam:PassRole class
- policy attachment rights
- role chaining
- detection with graph tools
Analysis tools
เครื่องมือวิเคราะห์
- IAM Access Analyzer
- policy simulator
- unused permissions
- CIEM
Federation
การรวมตัวตน
- SSO
- IdP integration
- short-lived sessions
- no IAM users with keys
Data & Network Protectionปกป้องข้อมูลและเครือข่าย
Encryption
การเข้ารหัส
- at rest (KMS, CMK, key policies)
- in transit
- envelope encryption
- key rotation
- BYOK/HYOK
Data security
ความปลอดภัยข้อมูล
- DLP
- data classification
- Macie-style discovery
- backup immutability
- object lock
Network controls
ควบคุมเครือข่าย
- private subnets
- VPC endpoints/private link
- egress filtering
- WAF
- DDoS protection
- IMDSv2
Posture & Threat Detectionสภาพและการตรวจจับ
CSPM
จัดการสภาพความปลอดภัย cloud
- continuous config assessment
- benchmark mapping (CIS)
- Prowler
- ScoutSuite
- native (Security Hub, Security Command Center, Defender for Cloud)
CNAPP
แพลตฟอร์มรวม
- CSPM + CWPP + CIEM + KSPM
- attack path analysis (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Cloud logging
log ของ cloud
- CloudTrail/Cloud Audit Logs/Activity Log
- VPC flow logs
- DNS logs
- centralized log archive
Native threat detection
ตรวจจับในตัว
- GuardDuty
- Security Command Center threat detection
- Defender
- finding triage
Lab / แบบฝึก
Checkpoint
- ผล CSPM ก่อน/หลังพร้อมการแก้เป็นโค้ด
- สถาปัตยกรรม multi-account พร้อม guardrails ที่อธิบายได้
M11Policy as Code
เป้าหมายการเรียนรู้
- เขียน policy ด้วย Rego/Kyverno/CEL และทดสอบ policy เหมือนโค้ด
- บังคับใช้ policy ที่หลายจุด: IaC, CI, admission, runtime
Conceptsแนวคิด
Policy as code
นโยบายเป็นโค้ด
- versioned
- tested
- reviewed
- decoupled decision vs enforcement (PDP/PEP)
Enforcement points
จุดบังคับใช้
- pre-commit
- CI (Conftest)
- plan-time (Terraform)
- admission (Gatekeeper/Kyverno)
- runtime
- API authz
Policy Languagesภาษา policy
OPA & Rego
engine ทั่วไป
- rules
- packages
- input/data
- partial evaluation
opa test- bundles
Kyverno
policy แบบ YAML สำหรับ K8s
- validate
- mutate
- generate
- verifyImages
- policy reports
- exceptions
CEL
Common Expression Language
- ValidatingAdmissionPolicy
- lightweight expressions
Cloud-native policies
policy ของ cloud
- SCP
- Azure Policy
- GCP Organization Policy
- tag policies
Policy Lifecycleวงจร policy
Testing
การทดสอบ
- unit tests
- fixtures
- policy coverage
- CI for policies
Rollout
การปล่อยใช้
- audit/dry-run mode first
- warn → enforce
- exception workflow with expiry
Governance
การกำกับ
- policy library
- ownership
- mapping to controls
Lab / แบบฝึก
Checkpoint
- policy ชุดหนึ่งมี test coverage และ rollout plan แบบ audit → enforce
M12Runtime Security, Detection & Response
เป้าหมายการเรียนรู้
- ตั้ง runtime detection ใน K8s/cloud และเขียน rule ที่ลด false positive
- ทำ incident response สำหรับ cloud-native workload ใน sandbox
Runtime Detectionการตรวจจับขณะรัน
eBPF-based security
ใช้ eBPF
- syscall monitoring
- process/network/file events
- low overhead
- Falco
- Tetragon
- Tracee (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Detection rules
กฎตรวจจับ
- shell spawned in container
- unexpected outbound connection
- sensitive file read
- privilege escalation signals
- crypto-mining indicators
Drift prevention
กันการเปลี่ยนขณะรัน
- immutable containers
- binary drift detection
- read-only rootfs
Runtime enforcement
บังคับขณะรัน
- kill/block actions
- LSM enforcement
- risk of false positive blocking
Security Monitoring Pipelineระบบเฝ้าระวัง
Log sources
แหล่ง log
- K8s audit logs
- cloud audit logs
- runtime events
- app logs
- WAF logs
- IdP logs
SIEM & data lake
ที่รวมข้อมูล
- normalization (OCSF/ECS)
- correlation
- retention
- cost control
Detection as code
การตรวจจับเป็นโค้ด
- Sigma rules
- version control
- testing with sample events
- CI for detections
Alert quality
คุณภาพ alert
- precision/recall
- tuning
- enrichment
- severity mapping
- MITRE ATT&CK mapping (Containers/Cloud matrices)
Cloud-native Incident Responseตอบสนองเหตุ
IR lifecycle
วงจร
- preparation
- detection & analysis
- containment
- eradication
- recovery
- lessons learned
Containment in K8s/cloud
จำกัดความเสียหาย
- isolate pod with NetworkPolicy
- cordon node
- revoke credentials
- snapshot for forensics
- quarantine account
Evidence
หลักฐาน
- volatile data
- container snapshots
- log preservation
- chain of custody
Automation
อัตโนมัติ
- SOAR playbooks
- auto-remediation with guardrails
- ChatOps notifications
Lab / แบบฝึก
Checkpoint
- detection rule ที่ทดสอบด้วยข้อมูลตัวอย่างและ map กับ ATT&CK
- IR runbook สำหรับ compromised pod ที่ทำตามได้จริงใน sandbox
M13Compliance as Code & Security Metrics
เป้าหมายการเรียนรู้
- map control ของมาตรฐานเข้ากับการตรวจอัตโนมัติและเก็บหลักฐานต่อเนื่อง
- นำเสนอ security metrics ที่ผู้บริหารเข้าใจและทีมนำไปใช้ได้
Compliance Frameworksกรอบการปฏิบัติตาม
Standards overview
ภาพรวมมาตรฐาน
- ISO/IEC 27001 Annex A
- SOC 2 trust services criteria
- PCI DSS
- NIST CSF
- NIST 800-53
- CIS Controls
Thai context
บริบทไทย
- PDPA (พ.ร.บ.คุ้มครองข้อมูลส่วนบุคคล)
- พ.ร.บ.การรักษาความมั่นคงปลอดภัยไซเบอร์
- แนวปฏิบัติของหน่วยงานกำกับ (ภาพรวม)
Control mapping
map control
- control → technical check → evidence
- common control frameworks
- crosswalks
Compliance Automationอัตโนมัติ
Continuous compliance
ตรวจต่อเนื่อง
- automated checks
- drift alerts
- compliance dashboards
OSCAL
รูปแบบข้อมูล compliance
- catalogs
- profiles
- component definitions
- SSP as code (แนวคิด)
Evidence collection
เก็บหลักฐาน
- pipeline logs
- signed attestations
- change records
- access reviews
- audit trail immutability
Infrastructure compliance
ตรวจ infra
- InSpec/Chef-style compliance profiles
- OpenSCAP
- cloud config rules (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Security Metrics & Programตัวชี้วัดและโปรแกรม
Operational metrics
ตัวชี้วัดปฏิบัติการ
- vuln MTTR by severity
- SLA compliance
- % builds with SBOM/signature
- scan coverage
- secret leak count
Risk metrics
ตัวชี้วัดความเสี่ยง
- risk register
- exceptions aging
- critical exposure window
- posture score trend
Maturity
ระดับความพร้อม
- OWASP SAMM
- DSOMM (DevSecOps Maturity Model)
- roadmap
Reporting
การรายงาน
- executive dashboards
- team scorecards
- avoiding vanity metrics
Lab / แบบฝึก
Checkpoint
- control matrix ที่ทุก control มีแหล่งหลักฐานอัตโนมัติหรือเหตุผลที่ต้องทำด้วยมือ
M14AI/LLM Security in Pipelines
เป้าหมายการเรียนรู้
- อธิบายความเสี่ยงหลักของแอป LLM และ agent ตาม OWASP LLM Top 10 (แนวคิด)
- ใส่ guardrails, eval ด้านความปลอดภัย และ supply chain control สำหรับโมเดลใน pipeline
- กำหนดนโยบายการใช้ AI coding assistant อย่างปลอดภัย
LLM Application Risksความเสี่ยงของแอป LLM
Prompt injection (แนวคิด)
การแทรกคำสั่ง
- direct vs indirect injection
- untrusted content in context
- instruction hierarchy
- defense limitations
Data leakage
ข้อมูลรั่ว
- sensitive info in prompts/outputs
- system prompt exposure
- training data memorization
- PII redaction
Insecure output handling
ใช้ output โดยไม่ตรวจ
- treat model output as untrusted
- output encoding
- no direct exec/SQL from output
Excessive agency
agent มีสิทธิ์เกิน
- tool permission scoping
- human approval for high-impact actions
- sandboxed execution
Resource abuse
ใช้ทรัพยากรเกิน
- unbounded consumption
- rate limits
- token budgets
- cost alerts
Model & Data Supply Chainห่วงโซ่ของโมเดล
Model provenance
ที่มาของโมเดล
- model cards
- signed models
- hash verification
- trusted registries
Unsafe formats
รูปแบบไฟล์เสี่ยง
- pickle deserialization risk
- safetensors
- model scanning
Data poisoning (แนวคิด)
การวางยาข้อมูล
- dataset provenance
- RAG corpus integrity
- access control on knowledge base
AI BOM
รายการส่วนประกอบ AI
- models
- datasets
- prompts
- dependencies (แนวคิด)
Controls in the Pipelineมาตรการใน pipeline
Guardrails
ราวกั้น
- input/output filters
- content classifiers
- allowlisted tools
- structured outputs (เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน)
Security evals & red teaming
ทดสอบความปลอดภัย
- adversarial test sets
- regression evals in CI
- automated red-team harnesses ใน sandbox
- scoring thresholds
Agent security
ความปลอดภัย agent
- MCP/tool server trust
- least privilege tokens
- audit logging of tool calls
- egress restrictions
AI coding assistants
ผู้ช่วยเขียนโค้ด AI
- review AI-generated code
- secret exposure to assistants
- hallucinated packages risk
- org usage policy
Frameworks
กรอบอ้างอิง
- OWASP LLM Top 10
- NIST AI RMF
- MITRE ATLAS
- ISO/IEC 42001 (ภาพรวม)
Lab / แบบฝึก
Checkpoint
- threat model ของ LLM app พร้อม control ที่ทดสอบได้ใน CI
- นโยบายการใช้ AI assistant ขององค์กรตัวอย่าง
Capstone
- Project 01
Secure Delivery Pipeline
แอปตัวอย่าง: threat model → SAST/SCA/secret/IaC/image scan → SBOM + cosign + SLSA provenance → admission verify → deploy · ส่งมอบ: pipeline, threat model, SLSA gap report, demo บล็อก image ที่ไม่ได้ลงนาม
- Project 02
Hardened Kubernetes Platform
คลัสเตอร์ที่มี RBAC, PSS restricted, NetworkPolicy, Kyverno policies, Falco detections, External Secrets · ส่งมอบ: IaC/manifest, ผล benchmark ก่อน/หลัง, detection rules + test events, IR runbook
- Project 03
Cloud Posture & Compliance as Code
บัญชี sandbox: CSPM baseline, แก้ด้วย Terraform, policy as code, control matrix ISO 27001/PDPA พร้อมหลักฐานอัตโนมัติ · ส่งมอบ: รายงาน posture, control matrix, dashboard metrics
- Project 04
Secure LLM Feature
เพิ่มฟีเจอร์ AI ให้แอป พร้อม threat model, guardrails, security evals ใน CI, agent least privilege · ส่งมอบ: eval report, policy, design doc
เครื่องมือและระบบนิเวศ
Threat modeling
- OWASP Threat Dragon
- Microsoft TMT
- pytm
- Threagile
SAST
- Semgrep
- CodeQL
- SonarQube
- Bandit
เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน
SCA & updates
- OSV-Scanner
- Dependabot
- Renovate
- OpenSSF Scorecard
DAST/Fuzz
- OWASP ZAP
- API fuzzers
สแกนเฉพาะระบบที่ได้รับอนุญาต
Secrets
- gitleaks
- TruffleHog
- Vault/OpenBao
- External Secrets
IaC/Container scan
- Checkov
- Trivy
- Grype
- KICS
- Hadolint
Supply chain
- Syft
- cosign/Sigstore
- in-toto
- SLSA generators
K8s security
- kube-bench
- Kubescape
- Kyverno
- OPA Gatekeeper
- Polaris
Runtime
- Falco
- Tetragon
- Tracee
เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน
Cloud posture
- Prowler
- ScoutSuite
- Security Hub
- SCC
- Defender for Cloud
Policy
- OPA/Rego
- Conftest
- Kyverno
- CEL
Vuln mgmt
- DefectDojo
- SARIF tooling
Compliance
- OSCAL
- OpenSCAP
- InSpec-style profiles
AI security
- guardrail frameworks
- model scanners
- eval harnesses
เครื่องมือเปลี่ยนเร็ว — รีวิวทุก 3–6 เดือน
คำศัพท์ต้องรู้ 55 คำ
CIA triad- ความลับ ความถูกต้อง ความพร้อมใช้งาน
least privilege- ให้สิทธิ์เท่าที่จำเป็นเท่านั้น
defense in depth- ป้องกันหลายชั้นซ้อนกัน
Zero Trust- ตรวจสอบทุกคำขอ ไม่เชื่อใจตามตำแหน่งเครือข่าย
CVE- รหัสอ้างอิงช่องโหว่สาธารณะ
CWE- หมวดหมู่ประเภทจุดอ่อนของซอฟต์แวร์
CVSS- คะแนนความรุนแรงของช่องโหว่
EPSS- ความน่าจะเป็นที่ช่องโหว่จะถูกใช้โจมตีจริง
Secure SDLC- วงจรพัฒนาที่ฝังกิจกรรมความปลอดภัยทุกเฟส
threat modeling- การวิเคราะห์ว่าระบบอาจถูกโจมตีอย่างไรและป้องกันอย่างไร
trust boundary- เส้นแบ่งระหว่างส่วนที่มีระดับความเชื่อใจต่างกัน
STRIDE- หกหมวดภัยสำหรับ threat modeling
abuse case- สถานการณ์การใช้ระบบในทางที่ผิด
SAST- วิเคราะห์ซอร์สโค้ดหาช่องโหว่โดยไม่รัน
DAST- ทดสอบแอปที่กำลังรันจากภายนอก
IAST- ตรวจช่องโหว่ด้วย agent ภายในแอปขณะทดสอบ
SCA- วิเคราะห์ช่องโหว่และใบอนุญาตของไลบรารี
SARIF- รูปแบบมาตรฐานของผลการวิเคราะห์โค้ด
false positive- ผลแจ้งว่ามีปัญหาแต่จริง ๆ ไม่มี
IDOR/BOLA- เข้าถึง object ของผู้อื่นเพราะไม่ตรวจสิทธิ์ระดับ object
SSRF- หลอกให้เซิร์ฟเวอร์ส่ง request ไปปลายทางที่ไม่ควร
XSS- แทรกสคริปต์ให้ทำงานในเบราว์เซอร์ผู้อื่น
CSP- header จำกัดแหล่งที่มาของสคริปต์และทรัพยากร
PKCE- ส่วนขยาย OAuth ป้องกันการขโมย authorization code
OIDC federation- ใช้ token ชั่วคราวแทน credential ถาวร
workload identity- ตัวตนของแอป/pod สำหรับเข้าถึง cloud
dynamic secret- ความลับที่สร้างตามคำขอและหมดอายุอัตโนมัติ
poisoned pipeline execution- การทำให้ pipeline รันโค้ดที่ไม่น่าเชื่อถือ
SBOM- รายการส่วนประกอบซอฟต์แวร์
VEX- คำแถลงว่าผลิตภัณฑ์ได้รับผลกระทบจากช่องโหว่หรือไม่
provenance- ข้อมูลที่มาว่า artifact ถูก build อย่างไร ที่ไหน
attestation- คำรับรองที่ลงนามเกี่ยวกับ artifact
SLSA- กรอบระดับความน่าเชื่อถือของ build supply chain
Sigstore/cosign- ระบบและเครื่องมือลงนาม artifact แบบ keyless
transparency log- บันทึกสาธารณะแบบ append-only ของ signature
distroless- image ที่มีเฉพาะ runtime ไม่มี shell/package manager
seccomp- ตัวกรอง system call ของโปรเซส
Pod Security Standards- ระดับนโยบายความปลอดภัยของ pod ใน K8s
admission controller- ด่านตรวจ/แก้ object ก่อนบันทึกใน K8s
NetworkPolicy- กฎควบคุมทราฟฟิกระหว่าง pod
CSPM- ตรวจ misconfiguration ของ cloud อย่างต่อเนื่อง
CNAPP- แพลตฟอร์มรวมความปลอดภัย cloud-native
CIEM- จัดการสิทธิ์ของตัวตนใน cloud
KMS- บริการจัดการกุญแจเข้ารหัส
policy as code- นโยบายเขียนเป็นโค้ดที่ทดสอบและ version ได้
Rego- ภาษา policy ของ OPA
eBPF- กลไกรันโปรแกรมในเคอร์เนลอย่างปลอดภัย ใช้ตรวจจับขณะรัน
Sigma- รูปแบบกฎตรวจจับที่ใช้ข้าม SIEM ได้
MITRE ATT&CK- ฐานความรู้ยุทธวิธีและเทคนิคของผู้โจมตี
SOAR- การประสานและตอบสนองเหตุอัตโนมัติ
compliance as code- ตรวจและเก็บหลักฐาน compliance อัตโนมัติ
OSCAL- รูปแบบข้อมูลมาตรฐานสำหรับ control และ compliance
prompt injection- การแทรกคำสั่งเพื่อเปลี่ยนพฤติกรรม LLM
excessive agency- agent มีสิทธิ์/ความสามารถมากเกินความจำเป็น
guardrails- มาตรการกรอง input/output และจำกัดพฤติกรรมของ AI