침해 지표와 YARA 규칙
악성 코드 분석 결과를 재사용 가능한 탐지 기능으로 전환합니다. 침해 지표를 추출하고 관련 샘플을 식별하는 YARA 규칙을 작성합니다.
침해 지표와 YARA 규칙은(는) CoddyKit의 무료 Reverse Engineering & Binary Analysis Basics 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Reverse Engineering & Binary Analysis Basics 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Reverse Engineering & Binary Analysis Basics 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
From Analysis to Detection
You can classify malware types, perform basic behavioral analysis, and unpack samples. The payoff is detection: converting what you learned into signals that catch the same threat elsewhere.
What Is an IOC?
An Indicator of Compromise (IOC) is an observable artifact that suggests an intrusion.
- File hashes (MD5, SHA-256)
- Domains and IP addresses
- Registry keys, mutexes, file paths
Hashes: Precise but Brittle
A SHA-256 hash uniquely fingerprints one file. But changing a single byte changes the hash, so attackers evade hash-only detection easily.
That is why we need more resilient indicators.
sha256sum sample.exe
# 9f86d0818... sample.exeFuzzy and Behavioral IOCs
More robust indicators survive minor changes:
- A unique mutex name the malware creates
- A hardcoded user-agent string
- A characteristic command-and-control URL pattern
These catch whole families, not just one sample.
Introducing YARA
YARA is a pattern-matching tool that describes malware via rules. Each rule has metadata, strings, and a condition.
YARA scans files or memory and reports matches, making your findings reusable.
Anatomy of a YARA Rule
A rule has three sections: meta for documentation, strings for patterns, and condition for the matching logic.
rule Example_Trojan {
meta:
author = 'analyst'
desc = 'Detects sample family X'
strings:
$a = 'evil-c2.example.com'
$b = { 6A 40 68 00 30 00 00 }
condition:
$a or $b
}Text vs Hex Strings
YARA matches both text strings (with modifiers like nocase, wide) and hex byte sequences.
Hex patterns with wildcards (??) catch code that varies slightly.
strings:
$ua = 'Mozilla/4.0 (compatible; Evil)' wide nocase
$stub = { E8 ?? ?? ?? ?? 83 C4 04 }Writing Good Conditions
Conditions combine strings with logic and counts.
all of themrequires every string2 of ($a, $b, $c)needs at least two- Add
filesizeor PE checks to reduce false positives
condition:
uint16(0) == 0x5A4D and 2 of ($s*)Avoiding False Positives
A rule that matches common library strings will fire on innocent files. Choose strings that are unique to the malware, and test against a clean goodware set.
Tight conditions keep analysts trusting your rules.
Sharing Detection
IOCs and YARA rules are shareable threat intelligence. Distribute them via formats like STIX or simple rule files so other defenders benefit.
This is how one analysis protects an entire community.
yara -r my_rules.yar /samples/Hunting with Rules
Beyond scanning one file, you can sweep a whole estate. Recursively scan endpoints or even live memory to find every machine matching the family.
This turns a single analysis into proactive threat hunting.
yara -r -p 8 trojan.yar /mnt/hosts/ > hits.txtQuick Check
Why is a SHA-256 hash a brittle indicator of compromise on its own?
Recap
You now operationalize malware analysis:
- Extract IOCs: hashes, domains, mutexes, behaviors
- Prefer resilient indicators over brittle hashes
- Write YARA rules with meta, strings, and tight conditions
- Test against goodware and share as threat intel
자주 묻는 질문
“침해 지표와 YARA 규칙” 강의는 무료인가요?
네 — “침해 지표와 YARA 규칙” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Reverse Engineering & Binary Analysis Basics 강의 전체를 잠금 해제할 수 있습니다. Reverse Engineering & Binary Analysis Basics 강의에는 총 4개의 강의가 포함되어 있습니다.
“침해 지표와 YARA 규칙”에서 뭘 배우나요?
악성 코드 분석 결과를 재사용 가능한 탐지 기능으로 전환합니다. 침해 지표를 추출하고 관련 샘플을 식별하는 YARA 규칙을 작성합니다. 브라우저에서 직접 실행하는 실습 코드로 Reverse Engineering & Binary Analysis Basics을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Reverse Engineering & Binary Analysis Basics을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Reverse Engineering & Binary Analysis Basics은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“침해 지표와 YARA 규칙” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Reverse Engineering & Binary Analysis Basics 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Reverse Engineering & Binary Analysis Basics 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 악성코드의 유형과 동작
- 행동 분석 기초
- 악성코드 언패킹 입문
- 침해 지표와 YARA 규칙