شعار Analyzing Rust Binaries

Analyzing Rust Binaries

المجتمع
trilwu
analyzing-rust-binaries

أجرِ هندسة عكسية للملفات الثنائية المكتوبة بـ Rust — بفك تشفير أسماء الرموز وفق مخططات التسمية القديمة وv0، والتعرّف على الأدوية العامة المُخصّصة، وتدفق التحكم في Result وOption، وآلية توزيع استدعاءات جدول الدوال الافتراضية لكائنات السمات، وسلاسل مواقع الذعر التي تكشف مسارات المصدر وأسماء الحزم. استخدم هذه المهارة عندما يحتوي الملف الثنائي على سلاسل إصدار rustc أو core::panicking أو رموز مشفرة الأسماء بـ _ZN/_R، أو يكون الملف الثنائي المنزوع الرموز أكبر من المتوقع، أو عند تحليل برمجية خبيثة مكتوبة بـ Rust أو خدمة مبنية عليه.

Add to TypingMind

نظرة عامة

الناشرtrilwu
المستودعsecskills
اسم المهارةanalyzing-rust-binaries
النجوم
144
التفريعات
15
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها trilwu على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Analyzing Rust Binaries في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/analyzing-rust-binaries
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/analyzing-rust-binaries .claude/skills/analyzing-rust-binaries
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Analyzing Rust Binaries في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Analyzing Rust Binaries تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Analyzing Rust Binaries بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Analyzing Rust Binaries

Rust binaries are large, statically linked, and full of inlined generic code — but they leak more than most people expect. Panic sites embed the source file path and line, symbols carry crate and module structure, and the standard library's formatting machinery is instantly recognizable. The job is knowing which parts are yours and which are the 90% that is core, alloc, and vendored crates.

When to Use

  • strings shows rustc version, core::panicking, /rustc/<hash>/library/
  • Symbols begin with _ZN...17h<hex>E (legacy) or _R (v0 mangling)
  • A stripped binary is 3–30 MB with minimal dynamic imports
  • Analyzing Rust malware, a Rust CLI, or a compiled Rust service

When NOT to Use

  • Go binaries — use analyzing-go-binaries; symbol recovery differs entirely
  • .NET or Unity — use the matching skill
  • Suspected malware, before containment — use analyzing-malware first
  • Source is available — use auditing-code-for-vulnerabilities, which has the Rust unsafe checklist

Confirm and Fingerprint

bash
strings -n 8 target | rg -m8 'rustc version|/rustc/[0-9a-f]{40}|core::panicking|cargo/registry'

Two artifacts do most of the work before you disassemble anything:

Panic strings leak the source tree. Rust embeds the file path and line number of every panic!, unwrap(), and bounds check. That gives you the crate layout, the developer's directory structure, and often the project name.

bash
strings -n 10 target | rg 'src/[a-z_/]+\.rs' | sort -u | head -40
# → src/main.rs, src/crypto/aes.rs, /home/dev/projects/implant/src/c2.rs

Registry paths name the dependencies. Vendored crates compiled in leave their ~/.cargo/registry/src/.../<crate>-<version>/ paths in panic sites, which is effectively a dependency list.

bash
strings target | rg -o 'cargo/registry/src/[^/]+/([a-z0-9_-]+-[0-9.]+)' -r '$1' | sort -u

That combination — module layout plus dependency list — usually tells you what the binary does before a single instruction is read.

Demangle

Rust has two mangling schemes, and tools must handle both.

bash
# Legacy: _ZN4core3fmt5Write9write_fmt17h<16 hex>E
nm -C target | head -30
rustfilt < symbols.txt

# v0 (RFC 2603): starts with _R, encodes generics and paths properly
rustfilt      # handles both
# Ghidra 11+ and IDA 8+ have v0 demanglers; enable Rust demangling in the
# analyzer options rather than reading raw symbols
bash
# Filter to your target's code. Everything under core::, alloc::, std::, and
# a registry crate name is stock.
nm -C target 2>/dev/null | rg -v '^.* (core|alloc|std|hashbrown|serde|tokio)::' | head -40

When symbols are fully stripped, fall back to the panic strings: each one is adjacent to the function that contains it, so cross-referencing a panic message with a known source path names the surrounding function.

Reading Rust in a Disassembler

Five patterns account for most of the confusion:

Monomorphization. A generic function is compiled once per concrete type, so Vec<u8>::push and Vec<String>::push are separate functions with similar bodies. Expect duplicates, and do not assume two near-identical functions are copy-paste.

Result and Option returns. These are enums returned by value, often in two registers — a discriminant and a payload. A function returning Result<T, E> looks like it returns a struct; the branch immediately after the call testing the first register is the error check. Recognizing this makes error paths readable, and error paths are where the bugs are.

Bounds checks everywhere. Every slice index emits a comparison and a conditional branch to a panic site. These clutter the listing; learn to skip them. Their absence is informative — it means unsafe or get_unchecked.

Trait object dispatch. dyn Trait calls go through a vtable: a pointer pair (data, vtable), then an indirect call at a fixed vtable offset. Recover the vtable to recover the concrete type, the same way you would for C++.

String handling. Rust String and &str are pointer+length with no terminator, exactly like Go. Adjacent literals run together in strings output; find the length constant next to the pointer load.

Finding the Interesting Code

bash
# Panic paths point at your code; use them as anchors
strings -t x target | rg 'src/' | head -30      # offsets included
# Cross-reference an offset in the disassembler to land in the owning function

# Crypto and network crates are recognizable by their panic paths
strings target | rg -i 'ring-|rustls|openssl|aes-gcm|chacha20|reqwest|hyper|tokio'

For a service or implant, the fastest route is: identify the async runtime (tokio is near-universal), find the request handler or the C2 loop by its panic paths, then read outward.

Rust-Specific Security Review

If you are hunting bugs rather than behaviour:

  • unsafe blocks are where memory-safety bugs live. In a binary, look for the absence of bounds checks around indexing, and for from_raw_parts / transmute call sites if symbols survive.
  • Integer overflow is checked in debug builds and wraps silently in release. A release binary's arithmetic has no overflow traps.
  • unwrap() / expect() on attacker-controlled input is a remote panic — a denial of service, and a real finding for a network service.
  • FFI boundaries. extern "C" functions taking pointers are where Rust's guarantees stop.
  • Deserialization with serde into types whose invariants the constructor enforces but Deserialize does not.

With source, use auditing-code-for-vulnerabilities and cargo geiger.

Rust Malware Notes

Rust is increasingly used for ransomware and loaders, largely for cross-compilation and analyst friction. What still helps you:

  • Panic paths leak the developer's build environment — usernames, project names, and directory structures, which are attribution-relevant.
  • The dependency list from registry paths identifies the networking and crypto crates, which narrows the C2 protocol and the encryption scheme before you read the code.
  • rustc version in the binary dates the build.
  • Samples that strip aggressively still emit bounds-check panic sites unless compiled with panic=abort and heavy strip; when even those are gone, note it as a deliberate anti-analysis measure.

Hand containment and IOC work to analyzing-malware.

Rationalizations to Reject

  • "It's stripped, nothing to recover." Panic strings survive stripping and name the source files.
  • "Thousands of functions." Most are core/alloc/vendored crates. Filter by demangled path.
  • "These two functions are identical, it's copy-paste." It is monomorphization of one generic.
  • "The decompiler shows a struct return I don't understand." It is Result/Option. The discriminant test after the call is the error branch.
  • "Rust is memory-safe, so there are no memory bugs." unsafe and FFI exist, and logic bugs are unaffected by the borrow checker.
  • "The strings are corrupted." Rust strings are pointer+length, not null-terminated.

References

  • analyzing-binaries — general triage, dynamic analysis, anti-analysis
  • analyzing-go-binaries — the other statically-linked-and-large case
  • analyzing-malware — containment and IOCs for Rust samples
  • auditing-code-for-vulnerabilities — the Rust unsafe checklist with source
  • rustfilt, Ghidra/IDA Rust demanglers, cargo-geiger, Binary Ninja

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Analyzing Rust Binaries؟

أجرِ هندسة عكسية للملفات الثنائية المكتوبة بـ Rust — بفك تشفير أسماء الرموز وفق مخططات التسمية القديمة وv0، والتعرّف على الأدوية العامة المُخصّصة، وتدفق التحكم في Result وOption، وآلية توزيع استدعاءات جدول الدوال الافتراضية لكائنات السمات، وسلاسل مواقع الذعر التي تكشف مسارات المصدر وأسماء الحزم. استخدم هذه المهارة عندما يحتوي الملف الثنائي على سلاسل إصدار rustc أو core::panicking أو رموز مشفرة الأسماء بـ _ZN/_R، أو يكون الملف الثنائي المنزوع الرموز أكبر من المتوقع، أو عند تحليل برمجية خبيثة مكتوبة بـ Rust أو خدمة مبنية عليه.

لماذا تستخدم Analyzing Rust Binaries على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Analyzing Rust Binaries عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Analyzing Rust Binaries في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/trilwu/secskills/tree/main/secskills-core/skills/analyzing-rust-binaries. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Analyzing Rust Binaries؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Analyzing Rust Binaries؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Analyzing Rust Binaries معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Analyzing Rust Binaries مجانية؟

نعم. نشرها trilwu على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل
شعار nexu-io

Pricing Page

nexu-io
مؤسسةشائع

صفحة تسعير مستقلة تضم ترويسة وباقات وخططًا، وجدولًا لمقارنة الميزات، وقسمًا للأسئلة الشائعة. استخدمها عندما يطلب الملخص صفحة «التسعير» أو «الخطط» أو «باقات الاشتراك» أو «مقارنة الخطط».

11.5K
98.9K
الملفات: 1
عرض
شعار nexu-io

Replit Deck

nexu-io
مؤسسةشائع

لأعمال إدارة المنتجات والجوانب التقنية: حوّل مستندات PRD وخرائط الطريق وRFC ومراجعات البنية التقنية والمراجعات الختامية إلى مستندات لاتخاذ القرار. ترتكز على الاستعلام الأساسي "pm-feature-business-case-deck"، وتستند إلى…

11.5K
98.9K
الملفات: 9
عرض
شعار nexu-io

Dcf Valuation

nexu-io
مؤسسةشائع

تحليل تقييم الشركات العامة باستخدام التدفقات النقدية المخصومة وتقدير القيمة الجوهرية. استخدمه عندما يطلب الوصف DCF أو القيمة العادلة أو القيمة الجوهرية أو السعر المستهدف أو تحليلًا لتحديد ما إذا كانت الشركة مقوّمة بأقل من قيمتها أو بأكثر منها…

11.2K
96.7K
الملفات: 1
عرض
شعار nexu-io

Html Ppt Zhangzara Block Frame

nexu-io
مؤسسةشائع

تحويل عرض فوضوي لشركة ناشئة إلى منظومة تليق بمجلس الإدارة — التشخيص، وقواعد تنسيق الصفحات، وصفحات الإثبات المعاد بناؤها. صُمم كعرض عن الحِرفة التصميمية لاتخاذ القرار للمؤسسين والمسؤول التنفيذي عن العرض.

11.2K
96.7K
الملفات: 2
عرض

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇