HackCert
Intermediate 10 min read May 25, 2026

Detection Engineering: সাইবার হামলা শনাক্ত করতে আধুনিক অ্যালার্ট সিস্টেম তৈরি!

Detection Engineering-এর মাধ্যমে কীভাবে কার্যকর alert system, detection rule এবং threat hunting workflow তৈরি করা যায়।

Abdullah Al Mamun
Detection Engineer
share
Detection Engineering: সাইবার হামলা শনাক্ত করতে আধুনিক অ্যালার্ট সিস্টেম তৈরি!
Overview

আধুনিক Security Operations Center বা SOC-এর সবচেয়ে বড় সমস্যাটি কী জানেন? অসংখ্য alert। একজন গড় SOC analyst দৈনিক হাজার হাজার alert handle করেন, যার ৯০ শতাংশেরও বেশি false positive। এই alert fatigue-এর কারণে প্রকৃত আক্রমণ প্রায়ই missed হয়ে যায়— ২০২০ সালের Verizon DBIR অনুযায়ী, breach detection-এর গড় সময় এখনো ২০০ দিনের বেশি।

এই সমস্যার সমাধানে আবির্ভাব হয়েছে Detection Engineering নামক একটি নতুন discipline। এটি SOC analyst-এর কাজ থেকে আলাদা— এটি software engineering-এর কঠোর শৃঙ্খলা সাইবার threat detection-এ প্রয়োগ করে। Detection-কে code হিসেবে treat করা, version control-এ রাখা, test করা, এবং continuously improve করা— এটাই Detection Engineering-এর মূল কথা। এই নিবন্ধে আমরা এই শিল্পের মূল ধারণা, পদ্ধতি, tool এবং সেরা অনুশীলন বিশদভাবে আলোচনা করব।

মূল ধারণা

Detection Engineering হলো একটি systematic approach যেখানে threat detection capability-কে software product-এর মতো develop, deploy এবং maintain করা হয়। এটি ad-hoc rule writing-এর traditional model থেকে fundamentally আলাদা।

Traditional SOC-এ একজন analyst দেখলেন একটি malicious IP, তিনি দ্রুত SIEM-এ একটি rule যোগ করলেন— "যদি এই IP-তে connection হয়, alert তৈরি কর।" এই approach reactive, এবং rule-গুলোর coverage, performance, false positive rate— এসব কেউ track করে না। Rule-গুলো ধীরে ধীরে stale হয়, performance impact বাড়ায়, এবং noise তৈরি করে।

Detection Engineering-এর approach সম্পূর্ণ ভিন্ন। প্রতিটি detection rule একটি product— এর research, design, implementation, testing, deployment এবং maintenance phase রয়েছে। Rule-গুলো version-controlled repository-তে রাখা হয়, peer review-এর মাধ্যমে validate হয়, এবং metrics track করা হয়।

Detection Engineering-এর core principle: Detection-as-Code। এই philosophy-তে detection logic-কে software-এর মতো treat করা হয়। YAML বা Domain-Specific Language-এ লেখা rule, Git-এ stored, CI/CD pipeline-এ tested এবং deployed। এই approach-এ reproducibility, transparency এবং continuous improvement সম্ভব।

MITRE ATT&CK framework Detection Engineering-এর জন্য fundamental। ATT&CK হলো adversary tactic, technique এবং procedure-এর comprehensive knowledge base। প্রতিটি detection rule একটি specific ATT&CK technique-এর সাথে map করা হয়, যা coverage এবং gap analysis-এ সাহায্য করে।

Detection Engineering Lifecycle

একটি detection rule-এর full lifecycle অনেকগুলো stage-এর মধ্য দিয়ে যায়। প্রথম stage হলো Threat Intelligence Gathering। কোন threat actor target করছে আপনার industry-কে? তারা কোন technique ব্যবহার করছে? এই information সংগ্রহ হয় threat intelligence platform, ISAC, vendor report এবং open source intelligence থেকে। MITRE ATT&CK-এর techniques এবং threat actor mapping এই phase-এ গুরুত্বপূর্ণ।

দ্বিতীয় stage— Use Case Definition। একটি specific detection scenario define করা হয়। যেমন: "Adversary Active Directory enumeration জন্য BloodHound-এর SharpHound collector ব্যবহার করছে। আমরা এটি detect করতে চাই।" এই scenario-এর জন্য কোন ATT&CK technique relevant (T1018, T1069, T1087), কোন data source প্রয়োজন (Windows Event Log, Process Creation Log), কোন observable identifiable— এসব document করা হয়।

তৃতীয় stage— Data Source Mapping। Detection-এর জন্য কোন log source প্রয়োজন— এবং সেই log source কি collected হচ্ছে? প্রায়ই দেখা যায় desired detection-এর জন্য prerequisite data source missing। Endpoint Detection and Response (EDR) telemetry, Sysmon log, Windows Security Event log, DNS log, Proxy log— এসব common source।

চতুর্থ stage— Logic Design। Detection logic তৈরি— সাধারণত কোনো query language-এ যেমন KQL (Kusto Query Language, Microsoft Sentinel), SPL (Splunk), Sigma (vendor-neutral), Lucene (Elastic), বা Snort/Suricata rule (network)। Logic-এ true positive maximize এবং false positive minimize-এর balance খুঁজতে হয়।

পঞ্চম stage— Testing। Test environment-এ rule-এর behavior verify করা। Atomic Red Team— Red Canary-এর open source project— এই উদ্দেশ্যে designed। প্রতিটি ATT&CK technique-এর জন্য simple, reproducible test থাকে যা আপনার rule fire করবে কিনা যাচাই করে।

ষষ্ঠ stage— Deployment। Tested rule production-এ deploy। Deployment automated হওয়া উচিত— CI/CD pipeline-এর মাধ্যমে Git থেকে SIEM-এ rule push।

সপ্তম stage— Tuning এবং Monitoring। Production-এ rule-এর performance track— false positive rate, true positive rate, mean time to detect (MTTD)। যদি false positive অনেক বেশি, rule tune করা; যদি technique evolve করেছে, rule update করা।

অষ্টম stage— Retirement। কিছু rule eventually relevance হারায়— threat actor technique পরিবর্তন করেছে, vulnerable software আর deployed নেই, ইত্যাদি। এই rule-গুলো retire করা প্রয়োজন যাতে rule sprawl না বাড়ে।

Detection Format ও Standard

Sigma-এর জন্ম এই space-এর সবচেয়ে গুরুত্বপূর্ণ development। Sigma হলো একটি vendor-agnostic detection rule format— YAML-এ written, যেকোনো SIEM platform-এর native query language-এ convert করা যায়। Florian Roth-এর তৈরি, এখন community-driven।

একটি Sigma rule-এ থাকে: title, status, description, references, author, date, modified date, MITRE ATT&CK tags, logsource (কোন data source), এবং detection logic। Detection logic-এ selection criteria এবং condition থাকে। উদাহরণস্বরূপ, একটি Windows process creation event-এ "powershell.exe -EncodedCommand" detect করার rule সহজে লেখা যায়।

Sigma rule-এর community repository-তে কয়েক হাজার pre-built rule আছে, MITRE ATT&CK-এ mapped। নতুন threat-এর জন্য প্রায়ই কয়েক দিনের মধ্যে community থেকে Sigma rule আসে।

Yara rule— file-based detection-এর জন্য standard— complementary। যেখানে Sigma log event detect করে, Yara malicious file content শনাক্ত করে। দুটি মিলিয়ে comprehensive detection coverage।

Snort/Suricata rule network-level detection-এর জন্য standard। ET Open এবং ET Pro ruleset-এ লক্ষ লক্ষ pre-built rule রয়েছে।

KQL Microsoft ecosystem-এ growing standard— Microsoft Sentinel, Defender for Endpoint, এবং অন্যান্য Microsoft security product-এ ব্যবহৃত। SPL Splunk-এর native; অনেক enterprise এই দুটি-র মধ্যে কোনো একটি ব্যবহার করে।

False Positive ব্যবস্থাপনা

Detection Engineering-এর সবচেয়ে কঠিন challenge false positive। একটি rule যদি দিনে ১০,০০০ alert তৈরি করে যার ০.১ শতাংশ true positive, এটা কার্যত useless— analyst noise-এ ডুবে যাবেন।

False positive কমানোর কৌশল বহুমুখী। প্রথমত, Baseline Establishment। প্রতিষ্ঠানের normal behavior বুঝা— কোন user কোন time-এ কী করেন, কোন server-এ কোন process স্বাভাবিক, কোন network pattern routine। Baseline থেকে deviation-ই suspicious।

দ্বিতীয়ত, Context Enrichment। Raw event-এর সাথে context যোগ— user role, asset criticality, geographic origin, time-of-day। একটি admin login রাত ৩টায় বিদেশী IP থেকে— suspicious; অফিস সময়ে অফিস IP থেকে— normal।

তৃতীয়ত, Multi-stage Correlation। Single event-এ rely না করে multiple event-এর correlation— যেমন একটি suspicious process creation + outbound network connection + registry modification— একসাথে হলে confidence অনেক বেশি।

চতুর্থত, User and Entity Behavior Analytics বা UEBA— machine learning-based approach যা per-user এবং per-entity baseline শিখে এবং anomaly শনাক্ত করে। Splunk UBA, Exabeam, Microsoft Defender for Cloud Apps— এই space-এর product।

পঞ্চমত, Allowlisting। Known good behavior-কে rule থেকে exclude— specific admin tool, scheduled maintenance script, vendor remote support। কিন্তু allowlist-গুলো carefully managed হতে হবে যাতে attacker সেগুলো abuse করতে না পারে।

Threat Hunting এবং Detection

Detection Engineering threat hunting-এর সাথে closely intertwined। Threat hunting হলো hypothesis-driven proactive search— "যদি adversary X technique ব্যবহার করে আমাদের network-এ, তাহলে কী evidence থাকবে?" এই hypothesis test করতে hunt চালানো হয়।

Successful hunt-এর findings detection engineering pipeline-এ ফিরে আসে। যা manually discovered হয়েছিল, সেটাকে automated detection-এ পরিণত করা হয়। এই feedback loop— hunt → detection → automated alert— detection coverage continuously expand করে।

Hunt Mission Statement একটি useful framework। প্রতিটি hunt-এর জন্য একটি clear statement— what we're hunting for, why now, what techniques, what data sources, what success looks like। হান্ট শেষে findings এবং follow-up action document করা।

Atomic Red Team এবং Caldera— offensive simulation tool— hunt এবং detection-এর জন্য oxygen। নিজেদের environment-এ controlled attack simulate করে detection coverage validate করা হয়। যদি simulated attack detected হয়, ভালো; নাহলে detection gap শনাক্ত হয়।

Purple Team Exercise— red team এবং blue team-এর collaboration— detection engineering-এর জন্য অপরিহার্য। Red team specific technique demonstrate করে, blue team detection-এ gap শনাক্ত করে এবং rule তৈরি করে। এই iterative process detection capability দ্রুত উন্নত করে।

Metrics এবং Measurement

Detection Engineering-এ "you can't improve what you don't measure"— এই principle critical। Key metrics-এ রয়েছে:

MTTD (Mean Time To Detect)— breach শুরু থেকে detection পর্যন্ত গড় সময়। কম MTTD ভালো।

MTTR (Mean Time To Respond)— detection থেকে containment-এ গড় সময়।

True Positive Rate এবং False Positive Rate— প্রতিটি detection rule-এর জন্য individually এবং aggregate।

Coverage Metrics— MITRE ATT&CK-এ কত percent technique covered। DeTT&CT— একটি free tool— ATT&CK navigator-এর সাথে integrate করে detection coverage visualize করে।

Alert Quality Score— analyst feedback-এর ভিত্তিতে প্রতিটি rule-এর rating।

এই metrics-গুলো regular dashboard-এ track করতে হবে, এবং trends-এর ভিত্তিতে prioritization করতে হবে।

Tooling Ecosystem

Modern Detection Engineering toolchain-এ অনেক component। SIEM Platform— Splunk, Microsoft Sentinel, Elastic SIEM, Sumo Logic, Chronicle— central detection engine। EDR Platform— CrowdStrike, SentinelOne, Microsoft Defender, Carbon Black— endpoint visibility এবং detection।

SOAR Platform— Splunk SOAR (Phantom), Palo Alto XSOAR, Microsoft Sentinel Playbook— automated response orchestration। Detection-এর পর automatic action— host isolation, account disable, ticket creation— SOAR-এর কাজ।

Threat Intelligence Platform— MISP (open source), Anomali, Recorded Future— external intelligence ingestion এবং internal correlation।

Detection-as-Code Tooling— dnif-co-এর Catalogue, Anvilogic, Panther, Tines— দ্রুত বর্ধমান category, যা detection lifecycle management সরল করে।

Test Automation— Atomic Red Team, Caldera, AttackIQ, SafeBreach— continuous validation এবং BAS (Breach and Attack Simulation)।

Career এবং Skills

একজন Detection Engineer-এর জন্য skill set comprehensive। Strong understanding of operating system internals— Windows, Linux, macOS— বিশেষ করে process, file system, network এবং authentication-এর details। MITRE ATT&CK-এর deep familiarity। Adversary tradecraft এবং common malware behavior সম্পর্কে practical knowledge।

Technical skills-এ rule writing language (KQL, SPL, Sigma), Python scripting, regular expression, এবং basic data engineering। Software engineering practice— version control, code review, CI/CD।

Communication skill— analyst, threat intelligence team, এবং leadership-এর সাথে কাজ করতে।

Continuous learning— এই field rapidly evolving। Threat actor technique পরিবর্তিত হচ্ছে, new platform আসছে (cloud, container, SaaS), detection tooling improved হচ্ছে।

Key Takeaways

Detection Engineering modern SOC-এর জন্য একটি transformative discipline। এটি ad-hoc, reactive detection-কে structured, proactive এবং measurable practice-এ রূপান্তর করে। যে প্রতিষ্ঠানগুলো এই approach গ্রহণ করছে, তারা দ্রুত detection coverage বাড়াচ্ছে এবং dwell time— attacker-এর initial compromise থেকে detection পর্যন্ত সময়— দ্রুত কমাচ্ছে।

কোনো প্রতিষ্ঠান যদি এখনো ad-hoc rule writing-এর মডেলে আছে, তাদের জন্য Detection-as-Code-এ migration শুরু করার সময় এখনই। Sigma-এর মতো open standard, MITRE ATT&CK-এর knowledge base, এবং growing ecosystem of tooling এই transformation-কে accessible করেছে। প্রতিটি ভালোভাবে engineered detection rule— একটি invisible shield যা ভবিষ্যৎ আক্রমণের বিরুদ্ধে আপনার প্রতিষ্ঠানকে রক্ষা করছে। আজকের একটি ভালো detection rule আগামীকালের একটি প্রতিরোধিত breach।

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

Related articles

back to all articles