performing-static-malware-analysis-with-pe-studio
ما الذي تفعله
تحلل هذه المهارة ملفات ويندوز المشبوهة دون تشغيلها. تفحص الشيفرة والبيانات داخل الملف لمعرفة وظيفته، مثل محاولة إخفاء نفسه أو احتوائه على أجزاء ضارة.
متى تستخدمها
- ✓عندما تجد ملفاً تنفيذياً مشبوهاً على ويندوز.
- ✓عندما تريد فكرة سريعة عما يفعله الملف قبل تجربته في بيئة آمنة.
- ✓عندما تبحث عن معلومات مثل عناوين المواقع أو مفاتيح السجل داخل الملف.
رابط المهارة
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-static-malware-analysis-with-pe-studio/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“ساعدني في تحليل هذا الملف المشبوه، وأخبرني إن كان يبدو ضاراً.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تنظر هذه المهارة في البنية الداخلية للملف والدوال التي يستخدمها والنصوص التي يحتويها. تبحث عن أنماط شائعة في البرمجيات الخبيثة أو محاولات للتمويه.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Performing Static Malware Analysis with PEStudio
When to Use
- A suspicious Windows executable has been collected and needs initial triage before sandbox execution
- You need to identify imports, strings, and resources that reveal malware functionality without running the sample
- Determining whether a PE file is packed, obfuscated, or contains anti-analysis techniques
- Extracting indicators of compromise (hashes, URLs, IPs, registry keys) embedded in a binary
- Classifying a sample's capabilities based on its import table and section characteristics
Do not use for dynamic behavioral analysis requiring execution; use a sandbox (Cuckoo, ANY.RUN) for runtime behavior observation.
Prerequisites
- PEStudio (free edition from https://www.winitor.com/) installed on an isolated analysis workstation
- Python 3.8+ with
pefilelibrary for scripted PE analysis (pip install pefile) - CFF Explorer or PE-bear as supplementary PE analysis tools
- Access to VirusTotal API for hash lookups and community intelligence
- Isolated analysis VM with no network connectivity to production systems
- FLOSS (FireEye Labs Obfuscated String Solver) for extracting obfuscated strings
Workflow
Step 1: Compute File Hashes and Verify Sample Integrity
Generate cryptographic hashes for identification and intelligence lookup:
# Generate MD5, SHA-1, and SHA-256 hashes
md5sum suspect.exe
sha1sum suspect.exe
sha256sum suspect.exe
# Check hash against VirusTotal
curl -s -X GET "https://www.virustotal.com/api/v3/files/$(sha256sum suspect.exe | cut -d' ' -f1)" \
-H "x-apikey: $VT_API_KEY" | jq '.data.attributes.last_analysis_stats'
# Get file type with magic bytes verification
file suspect.exe
Step 2: Examine PE Headers and Section Table
Open the sample in PEStudio and inspect structural properties:
PEStudio Analysis Points:
━━━━━━━━━━━━━━━━━━━━━━━━━
File Header: Compilation timestamp, target architecture (x86/x64)
Optional Header: Entry point address, image base, subsystem (GUI/console)
Section Table: Section names, virtual/raw sizes, entropy values
High entropy (>7.0) in .text/.rsrc suggests packing
Signatures: Authenticode signature presence and validity
Scripted PE Header Analysis with pefile:
import pefile
import hashlib
import math
pe = pefile.PE("suspect.exe")
# Compilation timestamp
import datetime
timestamp = pe.FILE_HEADER.TimeDateStamp
compile_time = datetime.datetime.utcfromtimestamp(timestamp)
print(f"Compile Time: {compile_time} UTC")
# Section analysis with entropy calculation
for section in pe.sections:
name = section.Name.decode().rstrip('\x00')
entropy = section.get_entropy()
raw_size = section.SizeOfRawData
virtual_size = section.Misc_VirtualSize
ratio = virtual_size / raw_size if raw_size > 0 else 0
print(f"Section: {name:8s} Entropy: {entropy:.2f} Raw: {raw_size:>10} Virtual: {virtual_size:>10} Ratio: {ratio:.2f}")
if entropy > 7.0:
print(f" [!] HIGH ENTROPY - likely packed or encrypted")
if ratio > 10:
print(f" [!] HIGH V/R RATIO - unpacking stub likely present")
Step 3: Analyze Import Address Table (IAT)
Identify suspicious API imports that indicate malware capabilities:
# Extract and categorize imports
suspicious_imports = {
"Process Injection": ["VirtualAllocEx", "WriteProcessMemory", "CreateRemoteThread", "NtCreateThreadEx"],
"Keylogging": ["GetAsyncKeyState", "SetWindowsHookExA", "GetKeyState"],
"Persistence": ["RegSetValueExA", "CreateServiceA", "SchTasksCreate"],
"Evasion": ["IsDebuggerPresent", "CheckRemoteDebuggerPresent", "NtQueryInformationProcess"],
"Network": ["InternetOpenA", "HttpSendRequestA", "URLDownloadToFileA", "WSAStartup"],
"File Operations": ["CreateFileA", "WriteFile", "DeleteFileA", "MoveFileA"],
"Crypto": ["CryptEncrypt", "CryptDecrypt", "CryptAcquireContextA"],
}
for entry in pe.DIRECTORY_ENTRY_IMPORT:
dll_name = entry.dll.decode()
for imp in entry.imports:
if imp.name:
func_name = imp.name.decode()
for category, funcs in suspicious_imports.items():
if func_name in funcs:
print(f"[!] {category}: {dll_name} -> {func_name}")
Step 4: Extract and Analyze Strings
Use FLOSS for obfuscated strings and standard strings extraction:
# Standard strings extraction (ASCII and Unicode)
…
الأسئلة الشائعة
ما هو « التحليل الساكن »؟
هو مثل فحص سيارة دون تشغيل المحرك. تنظر إلى أجزائها وتصميمها لتفهم طريقة عملها، وإن كان فيها شيء غير عادي.
هل أحتاج إلى تثبيت أي شيء؟
نعم، تحتاج إلى برنامج PEStudio وبعض الأدوات الإضافية لإجراء التحليل كاملاً.
هل يمكنني استخدامها على أي نوع من الملفات؟
لا، هذه المهارة مخصصة لملفات ويندوز التنفيذية، أي ملفات .exe و.dll.
التفاصيل
الوصف الأصلي من المؤلف
Performs static analysis of Windows PE malware samples using PEStudio to examine file headers, imports, strings, and resources without executing the binary, identifying packing, anti-analysis tricks, and malicious imports. Use for pre-execution triage of a suspicious Windows executable before sandbox detonation.
الشعبية
- نجوم GitHub
- 35k
- الترتيب
- #8315
- الترخيص
- Apache-2.0
- آخر تحديث
- 31/8/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
abusing-dpapi-for-credential-access
35kيمنح وكيل الذكاء الاصطناعي تعليمات جاهزة لمهمة محددة، ليؤديها بشكل أفضل وأسرع.
abusing-shadow-credentials-for-privesc
35kيعلّم وكيل الذكاء الاصطناعي لديك كتابة نص واضح ومنظم جيدًا.
achieving-cmmc-level-2-compliance
35kيساعد وكيلك على تجهيز بيئة للامتثال لمستوى CMMC 2. يطبق متطلبات الأمان ويدير الوثائق اللازمة.
acquiring-disk-image-with-dd-and-dcfldd
35kيساعد وكيلك على إنشاء نسخ مطابقة تمامًا لأقراص التخزين. هذا مفيد لضمان عدم فقدان أي معلومات أو تغييرها أثناء التحقيقات.
مهارات مشابهة
reverse-engineer-anything
422kيساعد وكيلك على فحص التطبيقات والحزم المنشورة من الداخل ليشرح الميزات ويقارن الإصدارات ويرشد إلى إعادة البناء، باستخدام أداة REA.
1password
394kيساعد وكيلك على إعداد واجهة سطر أوامر 1Password وتسجيل الدخول، وقراءة الأسرار أو حقنها دون طباعة قيمها في المحادثة.
healthcheck
394kيساعد وكيلك على تدقيق جهاز OpenClaw أو خادمه أمنيًا، مثل SSH والجدار الناري والتحديثات، ويقترح إصلاحات آمنة قابلة للتراجع.