HackCert
Advanced 11 min read May 25, 2026

Threat Modeling: সফটওয়্যার ডেভেলপমেন্টের শুরুতেই সিস্টেমের সম্ভাব্য নিরাপত্তা ঝুঁকি শনাক্ত করার আর্কিটেকচারাল ফ্রেমওয়ার্ক!

STRIDE, PASTA, DREAD এবং MITRE ATT&CK-driven threat modeling methodology এবং secure SDLC integration-এর সম্পূর্ণ guide।

Abdullah Al Mamun
Application Security Architect
share
Threat Modeling: সফটওয়্যার ডেভেলপমেন্টের শুরুতেই সিস্টেমের সম্ভাব্য নিরাপত্তা ঝুঁকি শনাক্ত করার আর্কিটেকচারাল ফ্রেমওয়ার্ক!
Overview

আক্রমণ ঘটার পর সিস্টেম patch করার চেয়ে আক্রমণ ঘটার আগে সিস্টেম-এর design-এই সম্ভাব্য vulnerability anticipate এবং eliminate করা শতগুণ বেশি cost-effective এবং কার্যকর। এই philosophy-ই Threat Modeling-এর মৌলিক ভিত্তি। Threat Modeling একটি structured engineering practice যেখানে software architect এবং security engineer একসাথে একটি সিস্টেম-এর architecture দেখে এবং পদ্ধতিগতভাবে প্রশ্ন করেন — "এই সিস্টেমে কী খারাপ হতে পারে?", "কে কীভাবে এই সিস্টেম-কে attack করতে পারে?", "এই attack-এর impact কী?", এবং "আমরা কীভাবে এটি mitigate করব?"। Microsoft, Adobe, Google, এবং নেতৃস্থানীয় financial institution-এর সবার secure development lifecycle (SDL)-এ Threat Modeling একটি core gate। এই article-এ আমরা Threat Modeling-এর philosophy, framework, methodology, tool এবং enterprise integration বিস্তারিতভাবে আলোচনা করব।

Threat Modeling-এর সংজ্ঞা ও Goal

Adam Shostack-এর famous definition অনুসারে Threat Modeling চারটি core question-এর উত্তর খোঁজার process — "What are we working on?", "What can go wrong?", "What are we going to do about it?", এবং "Did we do a good job?"। এই চারটি প্রশ্ন সরল মনে হলেও তাদের systematic উত্তর একটি সিস্টেম-এর entire security posture নির্ধারণ করতে পারে।

Threat Modeling-এর primary goal কয়েকটি। প্রথমত, design-time security flaw shift-left করা — যেখানে fix-এর cost সবচেয়ে কম। NIST এবং IBM-এর research দেখায় production-এ vulnerability fix-এর cost design-time-এর তুলনায় ১০০ গুণ পর্যন্ত বেশি। দ্বিতীয়ত, security requirement-কে explicit এবং documented করা। তৃতীয়ত, developer-এর security mindset cultivate করা। চতুর্থত, audit এবং compliance evidence তৈরি।

কখন Threat Modeling করবেন

Threat Modeling continuous activity, কোনো এক-বার-এর deliverable নয়। কয়েকটি trigger point-

  • New System Design: green-field project শুরুতেই।
  • Major Architecture Change: microservice migration, cloud rehost, new third-party integration।
  • Significant Feature Addition: authentication mechanism, payment integration, new external API।
  • Security Incident Post-Mortem: incident-এর পর existing model-এ gap identify।
  • Regulatory Mandate: GDPR, PCI-DSS, HIPAA compliance audit।
  • Periodic Review: annually বা biannually।

DevSecOps culture-এ ideal target হলো প্রতিটি sprint-এ যেখানে security-relevant change আছে সেখানে micro-threat-modeling।

Threat Modeling Framework এবং Methodology

বহু framework available — প্রতিটির strength এবং fit ভিন্ন।

STRIDE

Microsoft-এর developed STRIDE সম্ভবত সবচেয়ে widely used। ছয়টি threat category-

  • Spoofing: identity falsification। Authentication bypass-এর threat।
  • Tampering: data integrity violation। Unauthorized modification।
  • Repudiation: action deny করার ability। Non-repudiation-এর threat।
  • Information Disclosure: confidential data exposure।
  • Denial of Service: availability disruption।
  • Elevation of Privilege: authorization bypass।

STRIDE Data Flow Diagram (DFD)-এর সাথে combined। প্রতিটি DFD element (external entity, process, data store, data flow)-এর সাথে STRIDE category mapping।

PASTA (Process for Attack Simulation and Threat Analysis)

Tony UcedaVélez-এর developed PASTA সাত-stage risk-centric methodology। Business objective থেকে শুরু করে technical analysis-এ গিয়ে শেষ হয় residual risk-এ।

Stages: Define Objectives → Define Technical Scope → Application Decomposition → Threat Analysis → Vulnerability Analysis → Attack Modeling → Risk Analysis।

PASTA enterprise context-এ valuable কারণ এটি business impact prioritization-এ focus।

DREAD

Risk scoring framework। প্রতিটি threat-এর জন্য পাঁচটি dimension-এ score (1-10):

  • Damage Potential
  • Reproducibility
  • Exploitability
  • Affected Users
  • Discoverability

DREAD score = average। Microsoft এটি deprecated করেছে subjective scoring-এর কারণে, কিন্তু কিছু organization-এ এখনো ব্যবহৃত। CVSS-এর সাথে hybrid scoring popular।

LINDDUN

Privacy-focused threat model। DFD-based। সাতটি category-

  • Linkability
  • Identifiability
  • Non-repudiation
  • Detectability
  • Disclosure of information
  • Unawareness
  • Non-compliance

GDPR-conscious project-এর জন্য valuable।

MITRE ATT&CK-Driven Threat Modeling

Adversary-centric approach। MITRE ATT&CK-এর TTP map-এ system-এর exposure assess। যদি আপনার threat profile-এ APT29 included, তাদের known TTP (techniques) আপনার সিস্টেম-এ কতটা applicable, কোথায় detect করতে পারবেন, কোথায় prevent — সেটি analyze।

Attack Trees

Bruce Schneier-এর popularized notion। Root goal থেকে শুরু করে hierarchical tree। Goal-এর child node — অর্জন করার বিভিন্ন path। প্রতিটি path-এ probability, cost, এবং mitigation।

Data Flow Diagram (DFD): The Foundation

বেশিরভাগ threat modeling DFD-এর উপর দাঁড়িয়ে। DFD-এর চারটি element-

  • External Entity: user, third-party service — system-এর বাইরে।
  • Process: data transform করে।
  • Data Store: data persist করে।
  • Data Flow: element-গুলোর মধ্যে data movement।

প্রতিটি data flow সাধারণত একটি trust boundary cross করে — যেখানে security control প্রয়োজন। Trust boundary-এ Authentication, Authorization, Input Validation, Encryption — এসব mandatory।

Level 0 DFD context diagram। Level 1, Level 2 — increasingly detailed। বেশিরভাগ effective threat modeling Level 1-2 detail-এ থামে।

A Step-by-Step Threat Modeling Workflow

একটি typical Threat Modeling session প্রায় এভাবে চলে।

Step 1 — Scope Definition: কোন feature বা subsystem? কী assumption (out-of-scope)? কোন user role আছে? কোন data classification?

Step 2 — DFD Construction: white-board বা tool-এ data flow draw। Trust boundary mark।

Step 3 — Asset Enumeration: কী protection-এর যোগ্য — user PII, authentication credential, financial data, business logic IP।

Step 4 — STRIDE Application: প্রতিটি element-এ STRIDE category-wise threat brainstorm। উদাহরণ: "Login API endpoint-এ Spoofing — credential stuffing। Tampering — JWT signature forge। Repudiation — login event log না হলে। Information Disclosure — verbose error message। DoS — rate limit absence। EoP — JWT-এ role claim manipulation।"

Step 5 — Threat Prioritization: DREAD বা CVSS-base scoring। High-risk threat-এর জন্য immediate mitigation।

Step 6 — Mitigation Design: প্রতিটি threat-এর জন্য control — preventive, detective, corrective। Example: rate limit (preventive), failed login alert (detective), account lockout (corrective)।

Step 7 — Verification Plan: test case, fuzzing, pen-test scope।

Step 8 — Documentation: threat model document — DFD, threat list, mitigation, residual risk, owner।

Step 9 — Review এবং Iteration: stakeholder review, periodic update।

Threat Modeling Tool

বেশ কয়েকটি tool available।

Microsoft Threat Modeling Tool: Windows-only, free, STRIDE-based, DFD drag-drop। Microsoft SDL-এ default।

OWASP Threat Dragon: open-source, web-based এবং desktop। STRIDE এবং LINDDUN support।

IriusRisk: commercial, automated threat generation, SDLC integration।

SD Elements: requirement-driven, regulatory mapping।

ThreatModeler: enterprise-grade, cloud-aware।

pytm: Python-based "threat modeling as code"। Architecture script-এ লেখা হয়, automated threat generation।

Cairis: research-oriented, comprehensive।

DevSecOps-friendly approach pytm-এর মতো code-as-threat-model — যেখানে threat model version-controlled এবং CI-এ automated update।

STRIDE in Action: A Concrete Example

ধরা যাক একটি online banking application-এর money transfer feature। DFD-এ — User (external) → Web App (process) → Auth Service (process) → Transfer Service (process) → Account DB (data store)।

Web App → Auth Service: Spoofing (forged credentials), Information Disclosure (transmitting plaintext), Tampering (cookie manipulation)। Mitigation: TLS 1.3, HTTP-only Secure cookie, CSRF token।

Auth Service: Spoofing (session fixation), Information Disclosure (error message), DoS (login brute force)। Mitigation: short session TTL, generic error message, rate limit + CAPTCHA।

Transfer Service: Tampering (amount parameter manipulation), EoP (account ID switching), Repudiation (no audit log)। Mitigation: server-side amount validation, ownership check on every transfer, signed audit log।

Account DB: Tampering (SQL injection), Information Disclosure (data leak)। Mitigation: parameterized query, encryption at rest, principle of least privilege।

এই sample mapping দেখায় কীভাবে STRIDE একটি practical security checklist হিসেবে কাজ করে।

Cloud এবং Microservice Threat Modeling

Cloud-native এবং microservice architecture নতুন complexity যোগ করেছে। Single monolith-এর জায়গায় ৫০-১০০ microservice, service mesh, container, serverless function।

Cloud-specific threat-

  • IAM Misconfiguration: over-permissive role, public S3 bucket।
  • Secret Management: hardcoded credential, exposed environment variable।
  • Container Escape: privileged container, runtime exploit।
  • Service-to-Service Authentication: missing mTLS, weak token validation।
  • Supply Chain: vulnerable base image, malicious dependency।

AWS Well-Architected Framework, Microsoft Cloud Adoption Framework, Google Cloud Architecture Framework — এদের security pillar threat modeling-এর foundation।

DevSecOps Integration

Threat modeling-এর সবচেয়ে বড় challenge — যাতে এটি bottleneck না হয়। Continuous Delivery-এর সাথে compatible করতে কয়েকটি practice।

Right-sizing: প্রতিটি feature-এর জন্য full PASTA না। Risk-based — high-risk feature-এ deeper, low-risk feature-এ lighter।

Just-in-Time Threat Modeling: sprint planning-এ ১-২ ঘণ্টার session। Architect + dev + security engineer একসাথে।

Threat Modeling as Code: pytm, threat model in Git, PR review-এ inclusion।

Threat Library: organization-specific reusable threat list — যাতে wheel reinvent না হয়।

Security Champion: প্রতিটি dev team-এ একজন trained security champion — যিনি light-weight threat modeling lead করেন।

Automation: IaC scan, dependency scan, SAST/DAST integration — যা code change-এ automated threat indicator surface করে।

Threat Modeling Anti-Pattern

Common pitfall-গুলো এড়ানো-

  • Boil-the-Ocean: এক session-এ পুরো enterprise architecture model করার চেষ্টা।
  • Bike-Shedding: trivial threat-এ অযথা সময় ব্যয়।
  • Document-and-Forget: এক-বার লিখে ভুলে যাওয়া।
  • Security-Team-Only: dev এবং architect-এর participation ছাড়া।
  • Tool Worship: tool-এ over-reliance, methodology বা thinking-এ underinvestment।
  • No Follow-Through: identified threat-এর mitigation track না করা।
  • Ignoring Privacy: কেবল security threat, privacy threat বাদ দেওয়া।

Threat Modeling Manifesto

২০২০ সালে industry leader-রা "Threat Modeling Manifesto" publish করেছিলেন। চারটি core value-

  • A culture of finding and fixing design issues over checkbox compliance।
  • People and collaboration over processes, methodologies, and tools।
  • A journey of understanding over a security or privacy snapshot।
  • Doing threat modeling over talking about it।

এই value-গুলো প্র্যাকটিশনার-দের জন্য guiding principle।

প্রতিরোধ ও প্রতিকার

Organization-level threat modeling program build করার সুপারিশ-

Executive Sponsorship: CISO এবং CTO-এর joint commitment। Threat modeling-কে SDLC mandatory gate।

Methodology Selection: organization-এর maturity এবং need-এর সাথে সঙ্গতি — STRIDE start-এর জন্য ideal। PASTA enterprise-এর জন্য। LINDDUN privacy-heavy organization-এর জন্য।

Training: developer-দের জন্য threat modeling 101 workshop, security engineer-দের জন্য advanced certification (SANS SEC557)।

Tool Investment: organization-fit tool select। Open-source দিয়ে শুরু করে commercial-এ migrate।

Threat Library: organization-specific reusable threat catalog।

Metric Tracking: # of threat models per quarter, # of threats identified, # of mitigations implemented, threat-to-vulnerability conversion rate।

Continuous Improvement: retrospective, peer review, external audit।

Knowledge Sharing: internal threat modeling community, brown-bag session, war story।

Integration with Other Activity: SAST/DAST/IAST tool, bug bounty finding, pen-test report — সব threat model update-এ feed করে।

Key Takeaways

Threat Modeling সাইবার নিরাপত্তার সেই শাখা যেখানে engineering rigor এবং adversary mindset একসাথে কাজ করে। কোনো সিস্টেম তৈরির আগেই তার সম্ভাব্য weakness identify করা — এটি প্রকৃত "secure by design" approach-এর হৃদয়। STRIDE, PASTA, LINDDUN-এর মতো methodology, Threat Dragon, Microsoft TMT-এর মতো tool, এবং Threat Modeling Manifesto-এর philosophy — সবগুলোই available। কিন্তু শেষ পর্যন্ত success depend করে organizational culture-এর উপর — যেখানে security কোনো afterthought নয়, বরং design conversation-এর integral part। DevSecOps-এর যুগে continuous, just-in-time, code-integrated threat modeling-ই path forward। যে organization এই practice adopt করে, তারা কেবল কম vulnerability ship করে না — তারা একটি security-aware engineering culture build করে যা long-term competitive advantage তৈরি করে।

আপনার জ্ঞান যাচাই করতে প্রস্তুত? আজই HackCert-এ Threat Modeling MCQ Quiz-টি দিন!

Related articles

back to all articles