<?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 Sama Ghorab on Medium]]></title>
        <description><![CDATA[Stories by Sama Ghorab on Medium]]></description>
        <link>https://medium.com/@samaghorab?source=rss-44cb90769cd7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-HiLoqFJW4PSZMpL7N8sow.jpeg</url>
            <title>Stories by Sama Ghorab on Medium</title>
            <link>https://medium.com/@samaghorab?source=rss-44cb90769cd7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:32:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samaghorab/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[CyberTalents: iam-legend]]></title>
            <link>https://samaghorab.medium.com/cybertalents-iam-legend-87f7603cf749?source=rss-44cb90769cd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/87f7603cf749</guid>
            <category><![CDATA[obfuscation]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[i-am-legend]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-talents]]></category>
            <dc:creator><![CDATA[Sama Ghorab]]></dc:creator>
            <pubDate>Sat, 22 Mar 2025 20:24:21 GMT</pubDate>
            <atom:updated>2025-03-22T20:36:15.518Z</atom:updated>
            <content:encoded><![CDATA[<h3>CyberTalents_iam-legend</h3><blockquote>Introduction to Cybersecurity: Obfuscation, Challenges — I Am Legend</blockquote><h3>Introduction</h3><p>During my analysis of the login page, I first observed the page behavior to understand how it handled authentication. When I attempted to log in with incorrect credentials, an alert appeared indicating an invalid password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*pLHCCGzE5j8TDxZhwqLYGg.png" /><figcaption>login page behavior</figcaption></figure><h3>Identifying JavaScript Obfuscation</h3><p>Upon inspecting the source code, I found that the script was encoded using a specific obfuscation technique, making it unreadable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAdi08npwbD4L9R3revGjQ.png" /><figcaption>login page source code</figcaption></figure><h3>What is Obfuscation?</h3><p>Obfuscation is the process of deliberately making code difficult to read or understand, often used for security purposes, intellectual property protection, or preventing reverse engineering. There are different types of obfuscation. The type of obfuscation here was JSFuck and no, I didn’t come up with it. It’s actually a real obfuscation technique that rewrites JavaScript using only six characters: []()!+.</p><h3>What is Deobfuscation?</h3><p>Deobfuscation is the process of reversing obfuscation to restore the original or a more readable version of the code. This is often used in security research, malware analysis, and penetration testing to understand and analyze protected scripts.</p><h3>Traffic Analysis with Burp Suite</h3><p>Before I started decrypting the script, I wanted to analyze the page behavior and check whether it sent an authentication request to a server using Burp Suite. I found that no request was being sent, which meant that the credentials must be present somewhere in the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXXfNoq00UWGXJNWwAcm7A.png" /></figure><h3>Finding an Alternative Approach</h3><p>I attempted to use various deobfuscation tools, but most of them either failed or returned unreadable results. Since deobfuscation tools were ineffective, I decided to take another approach by closely inspecting the source code again. I noticed that the login form called a function named check() when the submit button was clicked. This indicated that the function contained the authentication logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1LlmomySOSwytKP6VkG-Kg.png" /></figure><p>I then executed the check() function directly in the browser’s developer console. As a result, the username, password, and flag were displayed, successfully bypassing the obfuscation without needing to fully decrypt the script.</p><p>that was the <strong>Flag: {J4V4_Scr1Pt_1S_S0_D4MN_FUN}</strong></p><blockquote>After solving the challenge and reading other write-ups, I came across a useful tool that successfully deobfuscated the script : <a href="https://filipemgs.github.io/poisonjs/">https://filipemgs.github.io/poisonjs/</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87f7603cf749" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>