<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Asm-P01NTs on P01NT</title><link>https://outofsrvc.github.io/ar/asm/</link><description>Recent content in Asm-P01NTs on P01NT</description><generator>Hugo</generator><language>ar</language><lastBuildDate>Tue, 25 Aug 2026 20:45:00 +0300</lastBuildDate><atom:link href="https://outofsrvc.github.io/ar/asm/index.xml" rel="self" type="application/rss+xml"/><item><title>أساسيات x86 (x86 Basics)</title><link>https://outofsrvc.github.io/ar/asm/x86-basics/</link><pubDate>Tue, 25 Aug 2026 20:00:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/x86-basics/</guid><description>&lt;h2 id="هذه-المقالات-مستخلصة-من-كورس-macc---flare-learning-hub-الذي-قمت-بدراسته-من-فترة-قصيرة-اتمنى-ان-ينفعكم-الله-به">السلام عليكم ورحمة الله تعالى وبركاته
سنتحدث في هذه السلسلة عن لغة التجميع x86-64 ونقوم بحل تمارين عملية
هذه المقالات مستخلصة من كورس MACC - FLARE Learning Hub الذي قمت بدراسته من فترة قصيرة اتمنى ان ينفعكم الله به.&lt;/h2>
&lt;h2 id="1-التجميع-وفك-التجميع-assembly-and-disassembly">1. التجميع وفك التجميع (Assembly and Disassembly)&lt;/h2>
&lt;p>لنبدأ بتعريف بعض المصطلحات التي ستتكرر كثيرًا في هذه الدورة:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>كود التجميع (Assembly Code)&lt;/strong> — ويُشار إليه غالبًا بلغة التجميع أو اختصارًا بـ Assembly — هو التمثيل النصّي لشيفرة الآلة (Machine Code) التي ينفّذها المعالج. يُعد التجميع أعلى مستوى تمثيل للبرنامج يمكن استرجاعه بشكل موثوق دون الوصول إلى الشيفرة المصدرية الأصلية. وبينما تمتلك كل بنية حاسوبية (مثل x86 و ARM و MIPS) لغة تجميع خاصة بها، فإن المبادئ الأساسية التي ستتعلمها هنا في تحليل x86 وامتداده ذات 64-بت (x86-64) هي مبادئ عالمية.&lt;/p></description></item><item><title>المكدس (The Stack)</title><link>https://outofsrvc.github.io/ar/asm/the-stack/</link><pubDate>Tue, 25 Aug 2026 20:05:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/the-stack/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;p>في المقال السابق تحدثنا عن أساسيات x86 asm، وفي هذا الدرس سنكمل في الأساسيات وسنناقش سويًا المكدس.&lt;/p>
&lt;hr>
&lt;h2 id="1-المكدس-the-stack">1. المكدس (The Stack)&lt;/h2>
&lt;p>المكدس هو بنية بيانات من نوع &lt;strong>LIFO&lt;/strong> (آخر يدخل، أولًا يخرج — Last In, First Out) تُيسّر تنفيذ البرامج. يعمل المكدس كمنطقة تخزين قصيرة المدى للدوال، حيث يدير تبادل البيانات بينها. وتشمل البيانات المخزنة على المكدس عادةً: المتغيرات المحلية للدالة، ووسائطها (Arguments)، وعنوان الإرجاع (Return Address).&lt;/p></description></item><item><title>التحكم الأساسي في التدفق (Basic Flow Control)</title><link>https://outofsrvc.github.io/ar/asm/basic-flow-control/</link><pubDate>Tue, 25 Aug 2026 20:10:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/basic-flow-control/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;p>سنناقش في هذا المقال التحكم في تدفق البرامج&lt;/p>
&lt;hr>
&lt;h2 id="1-تعليمة-jmp">1. تعليمة JMP&lt;/h2>
&lt;p>تنفّذ تعليمة &lt;code>JMP&lt;/code> قفزة &lt;strong>غير مشروطة&lt;/strong> (Unconditional Jump). فهي تعادل وظيفيًا الكتابة فوق مؤشر التعليمات (&lt;code>EIP&lt;/code>) بالعنوان المحدد في المعامل.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-asm" data-lang="asm">&lt;span class="line">&lt;span class="cl">&lt;span class="nl">start:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nf">mov&lt;/span> &lt;span class="no">eax&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">0&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nl">top:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nf">inc&lt;/span> &lt;span class="no">eax&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nf">jmp&lt;/span> &lt;span class="no">top&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>القائمة 3.1: استخدام تعليمة JMP لتكوين حلقة لا نهائية بسيطة&lt;/em>&lt;/p>
&lt;p>توضح القائمة 3.1 حلقة لا نهائية بسيطة:&lt;/p>
&lt;ol>
&lt;li>تُهيّئ &lt;code>EAX&lt;/code> إلى القيمة 0.&lt;/li>
&lt;li>تدخل الحلقة وتزيد &lt;code>EAX&lt;/code> بمقدار 1.&lt;/li>
&lt;li>تقفز عائدةً إلى عنوان التسمية &lt;code>top&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>ولأنه لا يوجد شرط للخروج، تتكرر الحلقة إلى ما لا نهاية حتى يتم إنهاء البرنامج.&lt;/p></description></item><item><title>بنى الدوال (Function Constructs)</title><link>https://outofsrvc.github.io/ar/asm/function-constructs/</link><pubDate>Tue, 25 Aug 2026 20:15:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/function-constructs/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;p>في هذا المقال سنتعرف على كيفية تعريف الدوال.&lt;/p>
&lt;hr>
&lt;h2 id="1-أطر-المكدس-stack-frames">1. أطر المكدس (Stack Frames)&lt;/h2>
&lt;p>في أعلى مستويات التجريد، يُنظَّم المكدس إلى &lt;strong>أطر مكدس&lt;/strong> (Stack Frames). كل استدعاء دالة يُنشئ إطار مكدس جديدًا يحتوي على جميع البيانات المتعلقة بتلك النسخة من الدالة.&lt;/p>
&lt;p>&lt;img alt="الشكل 4.1: المكدس منظّم في سلسلة من أطر المكدس" decoding="async" loading="lazy" src="https://outofsrvc.github.io/assets/img/asm/figure-4-1.png">&lt;/p>
&lt;p>&lt;em>الشكل 4.1: المكدس منظّم في سلسلة من أطر المكدس&lt;/em>&lt;/p>
&lt;p>عندما تستدعي دالةٌ دالةً أخرى، تُنشئ الدالة المستدعاة إطار مكدسها الخاص &lt;strong>فوق&lt;/strong> إطار مكدس الدالة المستدعية. وعندما ترجع الدالة المستدعاة، تنظّف إطار مكدسها. وبناءً عليه، فإن عمر إطار المكدس يطابق مدة تنفيذ دالته.&lt;/p></description></item><item><title>التفريع المشروط (Conditional Branching)</title><link>https://outofsrvc.github.io/ar/asm/conditional-branching/</link><pubDate>Tue, 25 Aug 2026 20:20:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/conditional-branching/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;h2 id="في-هذا-المقال-سنتكلم-عن-القفز-المشروط-وتعليمات-المقارنة">في هذا المقال سنتكلم عن القفز المشروط وتعليمات المقارنة.&lt;/h2>
&lt;h2 id="1-التفريع-المشروط-conditional-branching">1. التفريع المشروط (Conditional Branching)&lt;/h2>
&lt;p>&lt;img alt="الشكل 5.1: عبارات if-else تُترجم غالبًا إلى مزيج من تعليمات المقارنة والقفز المشروط" decoding="async" loading="lazy" src="https://outofsrvc.github.io/assets/img/asm/figure-5-1.png">&lt;/p>
&lt;p>&lt;em>الشكل 5.1: عبارات if-else تُترجم غالبًا إلى مزيج من تعليمات المقارنة والقفز المشروط&lt;/em>&lt;/p>
&lt;p>تُعد بنى التفريع المشروط، مثل عبارات &lt;code>if-else&lt;/code> أو الحلقات، من اللبنات الأساسية في اللغات عالية المستوى. لكن هذه البنى &lt;strong>لا توجد&lt;/strong> على مستوى التجميع. بدلًا من ذلك، يترجم المترجم بنى التفريع المشروط إلى مزيج من:&lt;/p></description></item><item><title>فك التجميع المتوسط (Intermediate Disassembly)</title><link>https://outofsrvc.github.io/ar/asm/intermediate-disassembly/</link><pubDate>Tue, 25 Aug 2026 20:25:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/intermediate-disassembly/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;p>في هذا المقال سنتحدث عن فك التجميع المتوسط.&lt;/p>
&lt;hr>
&lt;h2 id="1-المؤشرات-والذاكرة-pointers-and-memory">1. المؤشرات والذاكرة (Pointers and Memory)&lt;/h2>
&lt;p>في اللغات عالية المستوى مثل C، &lt;strong>المؤشر (Pointer)&lt;/strong> هو متغير يخزّن عنوان ذاكرة. في الشيفرة على الجانب الأيسر من الشكل 7.1، يحصل البرنامج على عنوان المتغيرين الصحيحين &lt;code>num1&lt;/code> و &lt;code>num2&lt;/code> عبر معامل &amp;ldquo;عنوان&amp;rdquo; (&lt;code>&amp;amp;&lt;/code>) ويسندهما تباعًا إلى متغير المؤشر &lt;code>ptr&lt;/code>.&lt;/p>
&lt;p>&lt;img alt="الشكل 7.1: يسار: شيفرة C تستخدم متغير مؤشر. يمين: تجميع البرنامج. أسفل: حالة الذاكرة أثناء التنفيذ" decoding="async" loading="lazy" src="https://outofsrvc.github.io/assets/img/asm/figure-7-1.png">&lt;/p></description></item><item><title>تجميع x86-64 (x86-64 Assembly)</title><link>https://outofsrvc.github.io/ar/asm/x86-64-assembly/</link><pubDate>Tue, 25 Aug 2026 20:30:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/x86-64-assembly/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;p>في هذا المقال سنتحدث عن أساسيات x64 asm.&lt;/p>
&lt;hr>
&lt;h2 id="1-سجلات-x86-64-الرئيسية-primary-x86-64-registers">1. سجلات x86-64 الرئيسية (Primary X86-64 Registers)&lt;/h2>
&lt;p>بنية &lt;strong>x86-64&lt;/strong> (المعروفة أيضًا باسم AMD64 و x64) هي امتداد لبنية x86. وهي تُحدّث مجموعة السجلات بالطرق التالية:&lt;/p>
&lt;ul>
&lt;li>توسّع السجلات العامة الثمانية الموجودة إلى 64-بت وتعيد تسميتها بالبادئة &lt;code>R&lt;/code>: &lt;code>RAX&lt;/code> و &lt;code>RBX&lt;/code> و &lt;code>RCX&lt;/code> و &lt;code>RDX&lt;/code> و &lt;code>RSI&lt;/code> و &lt;code>RDI&lt;/code> و &lt;code>RBP&lt;/code> و &lt;code>RSP&lt;/code>.&lt;/li>
&lt;li>تُقدم ثمانية سجلات عامة جديدة بحجم 64-بت مرقمة من &lt;code>R8&lt;/code> إلى &lt;code>R15&lt;/code>.&lt;/li>
&lt;li>توسّع مؤشر التعليمات إلى 64-بت (&lt;code>RIP&lt;/code>) وكذلك سجل الأعلام (&lt;code>RFLAGS&lt;/code>).&lt;/li>
&lt;/ul>
&lt;p>&lt;img alt="الشكل 8.1: مجموعة السجلات الموسعة في x86-64" decoding="async" loading="lazy" src="https://outofsrvc.github.io/assets/img/asm/figure-8-1.png">&lt;/p></description></item><item><title>حلول معملَي apple.exe و bomb.exe (الفصل الخامس)</title><link>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-5/</link><pubDate>Tue, 25 Aug 2026 20:35:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-5/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;hr>
&lt;h1 id="المعمل-الأول-حل-معمل-appleexe-lab-solution---appleexe">المعمل الأول: حل معمل apple.exe (Lab Solution - apple.exe)&lt;/h1>
&lt;h2 id="معلومات-العينة">معلومات العينة&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>اسم الملف:&lt;/strong> apple.exe&lt;/li>
&lt;li>&lt;strong>MD5:&lt;/strong> &lt;code>30e92463ee572d8dbfa95ff3285bfa82&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="الإجابات-المختصرة-short-answers">الإجابات المختصرة (Short Answers)&lt;/h2>
&lt;p>&lt;strong>1. ما القيمة المدفوعة عند العنوان &lt;code>0x401099&lt;/code> كوسيط للدالة &lt;code>sub_401000&lt;/code>؟&lt;/strong>&lt;/p>
&lt;p>الوسيط هو &lt;strong>المحرف الأول من السلسلة النصية&lt;/strong> التي أدخلها المستخدم من سطر الأوامر.&lt;/p>
&lt;p>&lt;strong>2. ادخل إلى الدالة &lt;code>sub_401000&lt;/code>. ما الذي تقابله الثوابت &lt;code>0x61&lt;/code> و &lt;code>0x62&lt;/code> و &lt;code>0x63&lt;/code>؟&lt;/strong>&lt;/p>
&lt;p>تقابل الثوابت قيم ASCII: &lt;code>0x61&lt;/code> = &lt;code>a&lt;/code> و &lt;code>0x62&lt;/code> = &lt;code>b&lt;/code> و &lt;code>0x63&lt;/code> = &lt;code>c&lt;/code>.&lt;/p></description></item><item><title>حل معمل guesser.exe (الفصل السادس)</title><link>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-6/</link><pubDate>Tue, 25 Aug 2026 20:40:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-6/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;hr>
&lt;h2 id="معلومات-العينة">معلومات العينة&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>اسم الملف:&lt;/strong> guesser.exe&lt;/li>
&lt;li>&lt;strong>MD5:&lt;/strong> &lt;code>d60f46728627e44ab8742e17e7cd4562&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="الإجابات-المختصرة-short-answers">الإجابات المختصرة (Short Answers)&lt;/h2>
&lt;p>&lt;strong>1. ما القيمة التي يجب أن ترجعها استدعاء الدالة &lt;code>sub_401000&lt;/code> عند &lt;code>0x4010F9&lt;/code> حتى يقبل البرنامج مفتاح التسجيل؟&lt;/strong>&lt;/p>
&lt;p>يجب أن ترجع الدالة &lt;code>sub_401000&lt;/code> &lt;strong>صفرًا&lt;/strong> حتى يقبل البرنامج مفتاح التسجيل.&lt;/p>
&lt;p>&lt;strong>2. ما وسيط الدالة الممرر إلى &lt;code>sub_401000&lt;/code> عند &lt;code>0x4010F9&lt;/code>؟&lt;/strong>&lt;/p>
&lt;p>وسيط الدالة هو &lt;strong>سلسلة مفتاح التسجيل&lt;/strong> التي أدخلها المستخدم في سطر الأوامر.&lt;/p>
&lt;p>&lt;strong>3. حلّل الدالة &lt;code>sub_401000&lt;/code>. ما العملية التي تطبقها على وسيط الدالة؟&lt;/strong>&lt;/p></description></item><item><title>حل معمل quizshow.exe (الفصل السابع)</title><link>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-7/</link><pubDate>Tue, 25 Aug 2026 20:45:00 +0300</pubDate><guid>https://outofsrvc.github.io/ar/asm/asm-lab-solutions-7/</guid><description>&lt;p>بسم الله الرحمن الرحيم&lt;/p>
&lt;hr>
&lt;h2 id="معلومات-العينة">معلومات العينة&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>اسم الملف:&lt;/strong> quizshow.exe&lt;/li>
&lt;li>&lt;strong>MD5:&lt;/strong> &lt;code>fed60db5c7afbb8b0f016e0b2de06b93&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="الإجابات-المختصرة-short-answers">الإجابات المختصرة (Short Answers)&lt;/h2>
&lt;p>&lt;strong>1. تمرر الدالة &lt;code>main&lt;/code> موقع ذاكرة يحتوي على بيانات إلى &lt;code>sub_140001360&lt;/code> عند العنوان &lt;code>0x1400011C5&lt;/code>. ما نوع البيانات الموجودة في موقع الذاكرة هذا؟&lt;/strong>&lt;/p>
&lt;p>تمرر الدالة &lt;code>main&lt;/code> العنوان &lt;code>0x140003260&lt;/code> الذي يبدو أنه يحتوي على &lt;strong>بيانات متعلقة بأسئلة المسابقة&lt;/strong>.&lt;/p>
&lt;p>&lt;strong>2. ادخل إلى الدالة &lt;code>sub_140001360&lt;/code>. ما الدالة التي يبدو أنها تحدد ما إذا كانت إجابة سؤال المسابقة صحيحة؟&lt;/strong>&lt;/p>
&lt;p>تفترض الدالة &lt;code>sub_140001360&lt;/code> بناءً على القيمة المرجعة من الدالة &lt;code>sub_140001060&lt;/code> لتحديد ما إذا كانت إجابة السؤال صحيحة.&lt;/p></description></item></channel></rss>