<?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 Rana chouchane - QU33NR on Medium]]></title>
        <description><![CDATA[Stories by Rana chouchane - QU33NR on Medium]]></description>
        <link>https://medium.com/@ranachouchen4?source=rss-9cc72a924ab5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UxeKMEwcELoI8uIdnfLeOQ.png</url>
            <title>Stories by Rana chouchane - QU33NR on Medium</title>
            <link>https://medium.com/@ranachouchen4?source=rss-9cc72a924ab5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 21:59:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranachouchen4/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[Active Directory 103: Implementing the TechX Domain]]></title>
            <link>https://medium.com/@ranachouchen4/active-directory-103-implementing-the-techx-domain-9800f10a8029?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9800f10a8029</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 20:10:43 GMT</pubDate>
            <atom:updated>2025-11-04T20:10:43.593Z</atom:updated>
            <content:encoded><![CDATA[<p>Active Directory(AD), Network Management</p><p>Hello again ,</p><p>I’m glad you’re still joining me on this learning journey.<br> In this third installment we’ll implement the Active Directory architecture for TechX, step by step. I’ve captured every practical action with screenshots and packed the detailed commands and configuration steps into a companion PDF. Here, instead of repeating every click and screenshot, I’ll walk you through the <em>concepts</em> behind each step so you understand <strong>why</strong> we do what we do. Follow along with the PDF for the hands-on parts; in this article I’ll explain the theory, highlight important decisions, and show how the pieces fit together.</p><p>U can find the pdf and install it from : <a href="https://github.com/RCH2514/Active-directory-TechX/blob/main/AD/Active%20directory%20lab%20TechX-%201.pdf">HERE</a>.</p><p>After taking a look at the PDF, I recommend you keep it open as you follow along here we’ll jump between both, since some concepts deserve a bit more discussion and explanation. I will write the title of each part i am adding comments to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4A4TFRZyNieL5pJIcUPixw.png" /></figure><h4><strong>3.1 Domain Controller Installation</strong></h4><p>Now that the <strong>installation process</strong> is clearly documented in the PDF, I want to walk you through the <strong>reasoning</strong> behind some of the key decisions I made during the setup. Rather than repeating every technical step, let’s focus on understanding <strong>why</strong> we configured things this way.</p><p>The first thing I want to clarify is <strong>why I chose to install Windows Server without a GUI</strong>. In my opinion, the Server Core version is lighter, faster, and more secure. Without the graphical interface, it uses fewer system resources and boots much faster. Plus, in real enterprise environments, administrators often prefer this approach because it reduces vulnerabilities and maintenance needs. It also encourages using PowerShell and remote management tools, great habits to develop early on.</p><p>Another important decision was about <strong>network configuration</strong>. For an Active Directory Domain Controller, the network setup must remain stable and predictable. That’s why I assigned a <strong>static IP address</strong> and configured the <strong>DNS server to point to itself</strong>. Since the DNS service runs on the Domain Controller, it needs to resolve its own name and domain information. This ensures reliability and smooth communication between all domain components.</p><p>Finally, during the AD DS installation, we were asked to set a <strong>Directory Services Restore Mode (DSRM)</strong> password. This password allows administrators to access a special recovery mode on the Domain Controller in case something goes wrong. For example, if the AD database becomes corrupted or replication fails. In this mode, the server starts without Active Directory services, giving you the ability to restore data from backups, fix errors, or even reset the AD administrator password if it’s lost.</p><h4><strong>3.3 Network Configuration</strong></h4><p>For the workstation to join the domain and communicate properly with the Domain Controller, both machines need to be on the same internal network. Active Directory relies on several network protocols mainly <strong>DNS</strong>, <strong>LDAP</strong>, and <strong>Kerberos: </strong>to locate domain services, authenticate users, and manage resources.</p><p>If the workstation isn’t on the same network, it won’t be able to find the Domain Controller or resolve the domain name, which means the domain join process will fail.And also on the workstation, the DNS must point to the Domain Controller because the DC hosts the DNS service that resolves the domain name and allows the workstation to locate and join the domain.</p><h4><strong>4. Creating Sites for Techx:</strong></h4><p>An <strong>Active Directory site</strong> represents a <strong>physical location</strong> where computers are connected through a <strong>fast and reliable network</strong>, such as a local area network (LAN).</p><p>Sites are based on <strong>well-connected subnets</strong>, meaning the computers inside a site can communicate easily and quickly. Active Directory uses this idea to plan <strong>replication traffic</strong> efficiently, it assumes that everything within a site has <strong>good bandwidth and stable connections</strong>.</p><p>Soo what u should get is → A site in Active Directory is a group of computers that share the same fast, reliable network connection, usually within one physical location.</p><p>You should always <strong>differentiate between a site and a domain</strong>.<br> A <strong>domain</strong> is a <strong>logical grouping</strong> of users, computers, and other Active Directory objects, organized based on <strong>administrative and security needs</strong>.<br> A <strong>site</strong>, on the other hand, is a <strong>physical grouping</strong> of computers based on <strong>TCP/IP connectivity</strong>.</p><p>With that said, keep in mind that <strong>domains and sites are not directly connected</strong>. You can have <strong>multiple domains within a single site</strong>, or a <strong>single domain spanning across several sites</strong>.</p><p><strong>Why Sites Are Important in Active Directory?</strong></p><p><strong>Sites</strong> play a key role in how <strong>Active Directory manages network traffic and replication</strong>. They help AD understand the <strong>physical layout</strong> of your network, which computers are close together (connected by fast links) and which ones are separated by slower or more expensive connections.</p><p>So by defining sites correctly, you allow AD to optimize replication traffic, improve logon efficiency and control service location so every client connect to the nearest and most efficient server.</p><p>What Is a Replication Link in Active Directory?</p><p>We already talked about <strong>Domain Controllers (DCs)</strong> and how each one holds a copy of the Active Directory database. So, if a change happens on one DC and not on another, they need a way to <strong>communicate and share updates</strong>. This process is handled by <strong>replication links</strong>, which define <strong>how and when information is synchronized</strong> between Domain Controllers.</p><p>Replication links connect DCs either <strong>within the same site</strong> or <strong>between different sites</strong>, ensuring that all copies of the database stay consistent across the entire network.</p><h4><strong>5. PowerShell Script to automate user addition:</strong></h4><p>When you install <strong>Active Directory Domain Services (AD DS)</strong> and promote a server to a <strong>Domain Controller</strong>, several <strong>default user accounts</strong> are created automatically. These accounts are essential for managing and securing the domain. Let’s look at the main ones:</p><p>Administrator →This is the <strong>most powerful account</strong> in the domain. It has full control over all domain resources, including user management, group policies, and security settings.</p><p>Guest →This account is <strong>disabled by default</strong>. It’s meant to provide <strong>temporary access</strong> to users who don’t have a domain account. Because it poses a potential security risk, it’s best to <strong>keep it disabled</strong>.</p><p>KRBTGT →This is a <strong>service account</strong> used by the <strong>Kerberos authentication protocol</strong>. It stores the encryption key used to issue Kerberos tickets. You should <strong>never delete or modify</strong> this account, it’s critical for authentication in the domain.</p><h4><strong>6. Creating and Managing Group Accounts:</strong></h4><p>In <strong>Active Directory</strong>, groups are used to organize users, computers, and even other groups to simplify permission management. Think of it like this: if you have a rule or permission that needs to be applied to 10 users, instead of assigning it individually to each one, you group them together and apply the rule once to the group.</p><p>At first, I didn’t understand the difference between <strong>groups</strong> and <strong>Organizational Units (OUs)</strong>, but after simplifying things, it became clear:</p><ul><li><strong>OUs</strong> are for <strong>administrative purposes</strong>, such as applying Group Policy Objects (GPOs). They define the <strong>structure</strong>, not access.</li><li><strong>Groups</strong>, on the other hand, are used for <strong>permissions and access control</strong>, such as granting access to shared folders.</li></ul><p>So we can summarize it like this:<br> <strong>OUs = Structure &amp; Policy</strong><br> <strong>Groups = Access &amp; Roles</strong></p><p>Groups are also used inside GPOs for filtering and targeting permissions. Typically, we create the necessary groups first, then reference them when configuring GPOs.</p><p>There are also <strong>group scopes</strong>, which define where in the domain or forest a group can be used. There are three main types:</p><ul><li><strong>Domain Local Groups</strong> → Used to assign permissions (typically to resources) <strong>within the same domain</strong> where the group exists.</li><li><strong>Global Groups</strong> → Used to group users with similar roles or functions <strong>from the same domain</strong>.</li><li><strong>Universal Groups</strong> → Used to assign permissions <strong>across multiple domains</strong> within a forest.</li></ul><p>In addition to scope, groups in AD also have <strong>categories</strong>, depending on their purpose:</p><ul><li><strong>Security Groups</strong> → Used to assign permissions to resources such as files, folders, or printers. Members of a security group can access the resources that the group has been granted rights to.</li><li><strong>Distribution Groups</strong> → Used only for email distribution lists in Exchange environments. They <strong>cannot</strong> be used for assigning permissions.</li></ul><p><strong>SMB Share and NTFS Permissions:</strong></p><p>In Windows environments, file sharing is a key feature that allows users to access files or folders over a network. Two main permission systems control this access: SMB (Share) permissions and NTFS permissions.</p><ol><li>SMB (Share) Permissions:</li></ol><p>SMB stands for <strong>Server Message Block</strong>, which is the network protocol used by Windows for sharing files, folders, and printers.<br> When you share a folder over the network, you configure share permissions: they define who can access the shared folder and what they can do (for example: read, change, or full control).</p><p>These permissions apply <strong>only when users connect through the network</strong> (like \\DC01\SharedFolder), not when they are locally logged in to the machine.</p><p>The main share permission levels are:</p><ul><li><strong>Read</strong> → Users can view and open files, but not modify them.</li><li><strong>Change</strong> → Users can read, add, edit, and delete files.</li><li><strong>Full Control</strong> → Users have all permissions, including changing permissions and ownership.</li></ul><p>2. NTFS Permissions:</p><p><strong>NTFS (New Technology File System)</strong> permissions are <strong>file system–level permissions</strong> applied directly to files and folders stored on an NTFS volume.</p><p>They define <strong>who can access or modify files and folders</strong>, whether the user is accessing them locally or through the network.</p><p>NTFS permissions are <strong>more granular</strong> and <strong>more secure</strong> than share permissions. They allow you to specify detailed access rights such as:</p><ul><li>Read</li><li>Write</li><li>Modify</li><li>Full Control</li><li>List Folder Contents</li><li>Read &amp; Execute</li></ul><p>Why We Need Both?</p><p>When a folder is shared over the network, <strong>both</strong> SMB (share) and NTFS permissions come into play.</p><ul><li><strong>Share permissions</strong> control <strong>network access</strong>.</li><li><strong>NTFS permissions</strong> control <strong>local and network access</strong> to files.</li></ul><p>Windows always applies the <strong>most restrictive combination</strong> of both.<br> For example:</p><ul><li>If a user has <strong>Full Control</strong> at the share level but only <strong>Read</strong> at the NTFS level, the user will only have <strong>Read</strong> access.</li></ul><h4><strong>7. Implement Group Policies (GPOs):</strong></h4><p>In Active Directory, Group Policy Objects (GPOs) are one of the most powerful tools for centralized management and configuration of users and computers in a domain.<br> They allow administrators to enforce settings, security policies, and configurations automatically across multiple machines without having to configure each one manually.</p><p>A <strong>GPO (Group Policy Object)</strong> is a collection of settings that can be applied to <strong>users</strong> or <strong>computers</strong> in an Active Directory environment.</p><p>These settings can control things like:</p><ul><li>Password policies (length, complexity, expiration)</li><li>Desktop settings (wallpaper, Control Panel access, etc.)</li><li>Software installation</li><li>Security configurations (firewall, Windows Update, etc.)</li></ul><p>So instead of setting these configurations on every machine, the admin just creates a GPO and links it to the right place and AD automatically applies it to all target users or computers.</p><p>GPOs can be <strong>linked</strong> to different levels of the Active Directory structure:</p><ol><li><strong>Site</strong> → Applies to all objects in a physical site.</li><li><strong>Domain</strong> → Applies to all users and computers within the domain.</li><li><strong>Organizational Unit (OU)</strong> → Applies only to users and computers inside that specific OU</li></ol><p><strong>Order of Application (GPO Precedence):</strong></p><p>When multiple GPOs exist, Windows applies them in a specific order. You can think of it like <strong>layers </strong>the last one wins if there’s a conflict.</p><p>Here’s the order:</p><ol><li><strong>Local GPO</strong> — Applied first (on the individual machine).</li><li><strong>Site GPOs</strong> — Applied next (for all computers in the same physical site).</li><li><strong>Domain GPOs</strong> — Applied after that (for all users/computers in the domain).</li><li><strong>OU GPOs</strong> — Applied last (for specific users or computers in an Organizational Unit).</li></ol><p>So the <strong>OU-level GPO</strong> has the <strong>highest priority</strong>, meaning it can override settings from domain, site, or local GPOs.</p><p><strong>Types of GPO Settings:</strong></p><p>Each GPO contains two main sections:</p><ul><li><strong>Computer Configuration:</strong> Settings that apply to computers (regardless of who logs in).</li><li><strong>User Configuration:</strong> Settings that apply to users (regardless of which computer they log in to).</li></ul><p>And that brings us to the end of this third part of our Active Directory journey!</p><p>By now, you should not only understand how to set up an AD architecture but also why each configuration choice matters, from installing the Domain Controller without a GUI, assigning static IPs, and configuring DNS properly, to defining sites, managing replication, organizing users through groups, and enforcing policies with GPOs.</p><p>Active Directory might seem complex at first, but once you break it down into these logical pieces, it becomes a very structured and powerful system.</p><p>In the next part, we’ll move beyond the basics and start applying what we’ve built and trying some attacks onou architecture.</p><p>So, stay tuned our TechX environment is just getting started!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9800f10a8029" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Active Directory 102: Planning Your Active Directory Architecture]]></title>
            <link>https://medium.com/@ranachouchen4/active-directory-102-planning-your-active-directory-architecture-64e3490e0a55?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/64e3490e0a55</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 13:03:28 GMT</pubDate>
            <atom:updated>2025-10-23T13:03:28.700Z</atom:updated>
            <content:encoded><![CDATA[<p>Active Directory(AD), Network Management</p><p>Hey everyone <br> Welcome back to my <strong>Active Directory (AD) series</strong>!<br> In the <a href="https://medium.com/@ranachouchen4/active-directory-101-an-introduction-to-active-directory-91fccd1bff4f">previous article</a> (An Introduction to Active Directory), we explored Basics concepts of Active directory and it’s logical structure.</p><p>In this article, we’ll dive into the <strong>first part of planning an AD architecture</strong>. You’ll understand why we chose the architecture presented in the first article for TechX, how to design a structure that fits your business, and what important factors you should consider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4A4TFRZyNieL5pJIcUPixw.png" /></figure><h4><strong>Understanding Namespace in Active Directory</strong></h4><p>An <strong>Active Directory (AD) namespace</strong> refers to the <strong>hierarchical structure of names</strong> within an AD environment.<br> It’s organized using the <strong>Domain Name System (DNS)</strong>, which ensures every object (like users, computers, or printers) can be uniquely identified and located across your network.</p><p>In short:</p><blockquote><em>Every AD name is a DNS name.</em></blockquote><p>That means the entire AD hierarchy depends on DNS to function properly.</p><p>When planning your AD deployment, make sure your <strong>DNS infrastructure</strong> supports these key features :</p><ul><li><strong>SRV (Service Location) Records</strong>: These special DNS records tell clients <strong>where to find domain controllers</strong> in the network. When a user logs in or accesses resources, their computer uses the SRV records to locate the right server automatically. Without SRV, clients would not know which server to contact.</li><li><strong>Dynamic Updates (RFC 2136)</strong>: In modern networks, IP addresses can change often, especially when using DHCP. Dynamic updates allow DNS to <strong>automatically update its records</strong> whenever a computer’s IP address changes. This prevents outdated entries and reduces manual work for administrators.</li><li><strong>DHCP Integration</strong>: DHCP can notify DNS whenever a new device joins the network or an existing device gets a new IP address. This ensures that <strong>name-to-IP mappings remain accurate</strong> and that clients can always resolve names correctly.</li></ul><p>Together, these features make DNS <strong>dynamic, automated, and reliable</strong>, which is crucial for Active Directory to function efficiently across your organization.</p><h4>Root Domain — the principal name for ur Active Directory</h4><p>The <strong>root domain</strong> is the foundation of your entire <strong>Active Directory forest</strong>.<br> All child domains and DNS names are derived from it so choosing a meaningful and long-term name is one of the most important steps in AD design.</p><p>Historically, once a root domain was created, <strong>its name couldn’t be changed</strong> without reinstalling AD completely. That’s why careful planning was (and still is) essential especially if your organization might merge, rebrand, or expand.</p><p>Starting with <strong>Windows Server 2003</strong>, Microsoft introduced a tool called <strong>rendom</strong>, which allows domain rename operations including the root domain.</p><p>However, renaming a domain is not a trivial task. It comes with strict requirements:</p><ul><li>All domain controllers must be running <strong>supported Windows Server versions</strong>.</li><li>Some applications (like older versions of <strong>Exchange</strong>) do <strong>not</strong> support domain rename.</li><li>The <strong>forest must be healthy</strong>, with fully functional replication.</li><li>The rename process also updates <strong>DNS zones, UPNs, trusts, and replication settings </strong>so backups and a rollback plan are essential.</li></ul><p>⚠️ If it’s done incorrectly, it can break your entire forest.</p><p><strong>Best Practice Today:</strong></p><ol><li>If renaming the root domain is too risky, <strong>create a new domain</strong> and <strong>migrate objects</strong> instead.</li><li>Always plan your root domain name with <strong>long-term growth</strong> and <strong>future changes</strong> in mind.</li></ol><h4>Integrating Your Root Domain with the Internet</h4><p>When designing your AD namespace, you also need to consider how it fits with your company’s <strong>Internet presence</strong>.</p><p><strong>Option 1: Keep Them Separate</strong></p><p>The simplest and most secure approach is to use a <strong>different root domain name</strong> for Active Directory than for your Internet domain.</p><p><strong>Example:</strong></p><ul><li>Internet domain → techx.com</li><li>AD internal domain → techxlocal.com, techxinternal.com, or techxad.com</li></ul><p><strong>Advantages:</strong></p><ul><li>Keeps internal resources <strong>private and isolated</strong>.</li><li>Prevents <strong>external DNS leaks or attacks</strong>.</li><li>Easier to manage and troubleshoot.</li></ul><p><strong>Option 2: Use a Child Domain of the Internet Name</strong></p><p>Instead of a totally separate name, you can make your internal AD domain a <strong>subdomain</strong> (child domain) of your Internet domain.</p><p><strong>Example:</strong></p><ul><li>Internet presence → techx.com</li><li>AD internal domain → private.techx.com or corp.techx.com</li></ul><p><strong>How it works:</strong></p><ol><li>Create a new <strong>DNS zone</strong> for private.techx.com.</li><li>In the main DNS for techx.com, add a <strong>delegation record(</strong>set of entries that tell other DNS servers which server is responsible for a specific subdomain (child zone)<strong>)</strong> pointing to the DNS server that manages this new zone.</li><li>Install Active Directory using private.techx.com as the root domain.</li></ol><p><strong>Advantages:</strong></p><ul><li>Reuses your existing Internet domain structure.</li><li>Keeps internal and external DNS servers separate.</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Names can become long (e.g., pc7.dev.eu.private.techx.com).</li><li>Configuration and management are slightly more complex.</li></ul><p><strong>Option 3: Same Domain Name for Internet and AD</strong></p><p>It’s possible though not recommended to use the <strong>same name</strong> for both your Internet and internal AD domains (for example, both named techx.com).</p><p>This requires:</p><ul><li>Two separate <strong>DNS zones</strong> (one public, one private).</li><li>A <strong>firewall</strong> or proxy to isolate public and private DNS traffic.</li></ul><p><strong>Advantage:</strong></p><ul><li>Simpler for users cause same name everywhere.</li></ul><p><strong>Disadvantages:</strong></p><ul><li>Complex DNS configuration.</li><li>Risk of exposing internal records.</li><li>Harder firewall management and troubleshooting.</li></ul><h4><strong>TECHX — PLANNING THE STRUCTURE</strong></h4><p>Let’s make a deal on something before going deeper when you install Active Directory (AD) for the first time, it automatically creates the <strong>first forest</strong> and the <strong>first domain tree</strong>, which is your <strong>root domain</strong>.</p><p>Of course, you can later add other domains (either as <strong>subdomains</strong> or as <strong>new domain trees</strong> inside the same forest).</p><p>Now, let’s recall our previous architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*Q18Wft0NitvRl0xugtzI7Q.png" /></figure><p>we have the <strong>root domain</strong> (<em>techx.com</em>), and within it, we placed different <strong>Organizational Units (OUs)</strong> like <em>Tunis</em>, <em>Paris</em>, and <em>Munich</em>.</p><p>You might wonder: <em>Why aren’t they subdomains?</em> And why did we choose to go with <strong>one forest, one tree, one domain</strong>?</p><p>Here’s the thing about <strong>domains </strong>they are built in <strong>layers</strong>. This means you <strong>can’t insert a new domain between existing ones</strong>.</p><p>For example, if <em>Munich</em>, <em>Paris</em>, and <em>Tunis</em> were domains (not OUs), and we later wanted to reorganize by creating a new parent domain <em>eu.techx.com</em> with <em>munich.eu.techx.com</em> and <em>paris.eu.techx.com</em> under it we couldn’t just “add” that parent. We’d have to <strong>delete and recreate</strong> the domains from scratch.</p><p>In other words, once domains are created, you <strong>can’t reparent</strong> (move) them within the tree. That’s not flexible.</p><p>That’s why today, most organizations prefer to use <strong>a single domain per forest</strong>, and instead of multiple domains, they use <strong>Organizational Units (OUs)</strong> for <strong>delegation and structure</strong>.</p><p>OUs are <strong>flexible</strong> you can move, rename, or reorganize them freely, which solves the “can’t graft” problem of domains.</p><p>So, the best practice here is <strong>one forest, one domain</strong>.</p><ul><li><strong>Multiple domains:</strong></li></ul><p>But what if one day techx buys another company named godev?</p><p>This new company keeps its own identity, staff, and security policies, but now their resources need to be shared.</p><p>In this case, the solution is to create a new domain tree inside the same forest as techx.com.<br> That way, both companies will be part of the same Active Directory forest, share the same Global Catalog, and the DNS can resolve names for both domains.<br> This allows resources to be shared while keeping each company’s structure and security boundaries intact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*McafYYhabR2ywA8RcxdJJA.png" /></figure><ul><li><strong>Multiple forests:</strong></li></ul><p>Normally, a single forest should be enough for your entire organization.<br> However, in some cases, two different companies may need to connect their forests temporarily for example, when working together on a shared project.</p><p>In such cases, administrators can create trust relationships between the two forests so users can access shared resources.<br> But this setup is complex and hard to manage because each forest has its own Global Catalog, schema, and security policies.</p><p>So, while connecting multiple forests is possible, it’s not recommended unless it’s absolutely necessary for a temporary collaboration.</p><p><strong>REMEMBER — Notes about Domain controllers and Global Catalog</strong>:</p><ul><li>Every DC stores a copy of the <strong>AD database</strong> (NTDS.dit), located in %systemroot%\NTDS.</li><li><strong>Replication</strong> keeps these databases consistent across all DCs.</li><li>If one DC fails, others continue to authenticate users(this is <strong>built-in fault tolerance)</strong>.</li><li>the first Dc creates: the first forest, the root domain, the global catalog(the first Dc is the first global catalog).</li><li>Additional DCs are added for : Fault tolerance, load blancing, geographic redundancy.</li><li>Global catalog stores : full copy of objects in it’s own domain and a partial copy from other domains in the forest.</li><li>a best practice is to have a GC server per site.</li></ul><h4>OUs — Understanding the Structure</h4><p>First of all, to clarify how OUs work and how we use them, you need to know that <strong>Organizational Units (OUs) are invisible to DNS</strong>. This means there is no such thing as adam.users.cybersecurity.tunis.techx.com in the example of techX.<br> OUs exist <strong>only for internal organization within Active Directory</strong>, not for DNS addressing.</p><p>So, the user <em>Adam</em> is identified using his <strong>Distinguished Name (DN)</strong> inside Active Directory:</p><p>CN=Adam,OU=Users,OU=Cybersecurity,OU=Tunis,DC=techx,DC=com</p><p>Where:</p><ul><li><strong>CN</strong> = Common Name (the object itself — here, the user “Adam”)</li><li><strong>OU</strong> = Organizational Unit (the containers)</li><li><strong>DC</strong> = Domain Component (the parts of the domain name)</li></ul><p>For user login, the format is: <a href="/service/mailto:adam@techx.com">adam@techx.com</a> or <a href="/service/mailto:adam@tunis.techx.com">adam@tunis.techx.com</a> (if you create additional UPN suffixes).</p><p>As you may have noticed, <strong>OUs can be nested</strong> we can have first-level OUs, second-level OUs, and even more.<br> However, <strong>too much nesting leads to complexity and performance issues</strong>: it can slow down <strong>Group Policy processing</strong>, make <strong>administration and resource discovery</strong> harder, and cause <strong>inheritance conflicts</strong>.</p><p><strong>Best practice:</strong> avoid going beyond <strong>two levels of OU nesting</strong> whenever possible.</p><h4>Wrapping Up</h4><p>As you can see, designing an Active Directory architecture is about more than just installing servers it’s about planning for flexibility, security, and growth. From choosing a meaningful root domain to structuring Organizational Units effectively, every decision impacts how smoothly your network will run and how easy it will be to manage.</p><p>Remember these key takeaways from today’s article:</p><ul><li>One forest, one domain is the modern best practice, with OUs providing the flexibility that domains cannot.</li><li>Careful planning of your root domain and namespace ensures long-term stability and reduces future headaches.</li><li>Organizational Units are your best friends for delegation, policy management, and keeping your Active Directory organized.</li><li>Domain controllers and global catalog servers form the backbone of AD’s reliability and performance.</li></ul><p>In the next article, we’ll move beyond the theory and explore <strong>how to implement this structure in practice</strong> from creating your first domain controller to designing OUs for a real-world business scenario. You’ll see how these concepts come together in a working Active Directory environment.</p><p>Until then, take a moment to review your own organization’s structure and think about how these principles could apply. Planning ahead today will save you countless hours of troubleshooting tomorrow.</p><p>Don’t forget to leave a comment if you have any questions or remarks about the content. I’d love to hear your thoughts and help clarify anything!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64e3490e0a55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Active Directory 101: An Introduction to Active Directory]]></title>
            <link>https://medium.com/@ranachouchen4/active-directory-101-an-introduction-to-active-directory-91fccd1bff4f?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/91fccd1bff4f</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 12:37:35 GMT</pubDate>
            <atom:updated>2025-10-21T12:37:35.025Z</atom:updated>
            <content:encoded><![CDATA[<p>Active Directory(AD), Network Management</p><p><strong>Hello there!</strong><br> I’m happy that you’ve decided to start your journey with <strong>Active Directory. </strong>It’s a great choice to deepen your knowledge in this field. So grab your cup of coffee, focus your mind, and let’s dive in together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4A4TFRZyNieL5pJIcUPixw.png" /></figure><h4>The Problem — The Company’s IT Headache</h4><p>Imagine this: you work at a mid-sized company called <strong>TechX</strong>, which has branches in <strong>Tunis</strong>, <strong>Paris</strong>, and <strong>Munich</strong>. Each branch has several departments: <strong>Development</strong>, <strong>Cybersecurity</strong>, and <strong>Human Resources </strong>with dozens of employees, each using their own computers, printers, and shared folders.</p><p>Every time a new employee joins, the IT team must manually create an account, set up passwords on each computer, assign permissions one by one, and make sure everyone can access the right resources. And when someone moves to another department or branch, the entire process has to be redone from scratch.</p><p>The network has turned into <strong>a messy orchestra where every instrument plays its own tune </strong>too many users, too many computers, too many tasks, and far too little time. TechX is losing both time and money trying to keep everything organized.</p><p>Something needs to change. The company needs a smarter, centralized solution → and that’s where <strong>Active Directory</strong> comes in.</p><h4>The Solution — Understanding Active Directory</h4><p>To truly understand this solution, let’s start with the basics.</p><p>A <strong>directory</strong> is simply a structured collection of information organized in a way that makes it quick and easy to find what you need.</p><p>A <strong>directory service</strong>, on the other hand, is a system that manages and provides access to this information across a network. It helps users and administrators locate and manage resources such as users, computers, printers, and files.</p><blockquote><strong>Active Directory (AD)</strong> is Microsoft’s directory service ,a centralized system that stores, organizes, and manages everything connected to a network: users, computers, printers, servers, and more. It offers one organized database where administrators can easily control access, and users can seamlessly connect to the resources they need.</blockquote><p>With <strong>Active Directory</strong>, TechX finally found a way to bring order to its growing and complex network.</p><h4>The Impact — From Chaos to Control</h4><p>After TechX started implementing Active Directory, the network became much easier to manage, and tasks that once took hours could now be done in minutes. AD provided several key benefits:</p><p>→<strong> Ease of Administration:</strong> Managing devices used to be slow, error-prone, and time-consuming. With AD, administrators now have a <strong>single point of control : </strong>creating users, setting permissions, deploying software, and applying updates can be done for all users or specific groups at once.</p><p>→ <strong>Removing Topology from Users: </strong>AD hides the network’s complexity from employees. Users don’t need to know which server stores their resources. For example, a developer in<strong> Munich</strong> can access \\TechX\Projects without worrying whether it’s on the Tunis or Paris server.</p><p>→<strong>Scalability and Extensibility:</strong> As TechX grew, AD scaled effortlessly, managing hundreds or thousands of computers without slowing down. Its extensibility allowed TechX to customize the directory to meet specific needs. Think of it like a building: scalability is adding <strong>more floors</strong>, extensibility is adding <strong>new rooms or features</strong>.</p><p>→<strong>Easier WAN Management: </strong>Offices in Tunis, Paris, and Munich are fully synchronized. AD automatically replicates changes across all domain controllers:</p><ul><li>Add a user in Tunis → it appears in Paris and Munich.</li><li>Change permissions or policies → they propagate across all branches automatically.</li></ul><p>In short, Active Directory transformed TechX’s network from chaotic and time-consuming into structured, efficient, and easy to manage.</p><h4><strong>logical structure — </strong>How Active Directory Organizes TechX</h4><p>To plan, implement, and manage Active Directory effectively, it’s important to understand its logical structure, which is organized in <strong>three levels</strong>: <strong>Forest → Domain → Organizational Unit (OU)</strong>.</p><ol><li>Forest — Top-Level Container:</li></ol><ul><li>A forest is a <strong>collection of one or more domains</strong> sharing a common schema, configuration, and global catalog.</li></ul><p>2. Domain — A Partition of a Forest:</p><ul><li>A domain is a <strong>collection of objects</strong> (users, computers, groups) within a forest.</li><li>The <strong>first domain</strong> is called the <strong>root domain</strong>; additional domains can be added as <strong>child domains</strong>, forming a <strong>tree</strong>.</li><li><strong>Domain Controllers (DCs):</strong> are servers where Active Directory Domain Services (<strong>AD DS) is installed → </strong>DCs manage the domain, control <strong>user logins</strong>, and <strong>access to resources</strong>. (We’re going to talk more about them later)</li></ul><p><strong><em>A forest can contain one or more trees, each with its own root domain and namespace.</em></strong></p><p>3. Organizational Unit (OU) — Sub-Containers in a Domain:</p><ul><li>OUs are like folders within a domain.</li><li>OUs are containers designed to hold all kinds of Active Directory resources, such as users, computers, printers, and even <strong>other OUs.</strong></li></ul><blockquote>The Active Directory prefers a<em> </em><strong><em>few domains</em> </strong>(or <strong>even just one</strong>) with several Organizational Units (OUs). An OU is like a file folder — it holds important information.</blockquote><p>Now, talking about our company TechX, I’m going to give you an example of the Active Directory hierarchy we could implement:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*Q18Wft0NitvRl0xugtzI7Q.png" /></figure><p>TechX Forest is the top-level container, holding all domains (in this case, a single domain) and ensuring a unified structure across the company. The single domain, techx.com, acts as the central hub for all users, computers, and resources.</p><p>When you set up a domain, Active Directory automatically creates a default OU called the Domain Controllers OU, which manages authentication, replication, and security for the domain.</p><p>TechX uses Organizational Units (OUs) to organize offices and departments, making management easier and more secure. In this structure:</p><ul><li>There are three parent OUs, each representing an office.</li><li>Each parent OU contains three child OUs, representing the departments.</li><li>Each department contains its objects (users, computers, printers, shared folders), and each object has its attributes.</li></ul><p>Think of Active Directory as a database: each object is like a database entry, and the attributes are the fields of that entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*J9N0S_s2uOpsgMhjM4nlvw.png" /></figure><p>Here I want to make a note about trust relationship between different domains:</p><p>A trust is a relationship, which you establish between domains, that makes it possible for users in one domain to be authenticated by a domain controller in the other domain.</p><p>it’s transative : this means that if Domain A trusts Domain B and Domain B trusts Domain C, users from Domain C can access resources in Domain A (when they are assigned the proper permissions).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*MPPflncbJR4Zh3XHPEYbhg.png" /></figure><h4>Domain Controllers — Roles inside AD</h4><p>In Active Directory, a <strong>Domain Controller (DC)</strong> is the core server that stores the directory database and manages all authentication and authorization within a domain. Every time a user logs in, accesses shared resources, or joins a device to the network, the request is processed by a Domain Controller.</p><p>In Active Directory, <strong>all domain controllers have a writable copy</strong> of the directory database.<br> This means any DC can make updates like resetting a password or adding a user and these changes are automatically replicated to the others.</p><p>This <strong>multi-master replication</strong> design ensures both <strong>availability</strong> and <strong>fault tolerance</strong>: if one DC fails, others immediately take over without disrupting operations.</p><p>Although all domain controllers are peers, some domain controllers have certain specialized roles assigned to them. These specialized roles exist because they do not work well functioning on all domain controllers. I&#39;m going to talk about the types of them now:</p><ul><li><strong>Global Catalog Servers — Search Across the Entire Fores</strong>t</li></ul><p>A <strong>Global Catalog (GC)</strong> is a Domain Controller that stores a <strong>full copy of objects in its domain</strong> and <strong>partial copies</strong> (key attributes) of all objects across other domains in the forest.</p><p>This allows users to quickly search for resources anywhere in the organization even outside their own domain without needing multiple queries.</p><p>Global Catalogs are also essential during user logon, as they help verify <strong>universal group memberships</strong>.</p><ul><li><strong>FSMO Roles — Special Responsibilities</strong></li></ul><p>While all Domain Controllers are peers, some operations must be handled by only <strong>one</strong> server to avoid conflicts. These special responsibilities are called <strong>FSMO (Flexible Single Master Operations)</strong> roles.</p><p>There are <strong>five FSMO roles</strong> divided between forest and domain scopes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_jj4qEQCbX-8YhlrCb05A.png" /></figure><h4>AD Schema — The Blueprint of the Directory</h4><p>The <strong>Active Directory Schema</strong> defines the structure of everything stored in Active Directory. It acts as a <strong>blueprint</strong>, describing which object types (such as users, computers, or groups) can exist and which attributes each of them can have.</p><p>Each object belongs to a specific <strong>class</strong> for example, a user object belongs to the <em>User</em> class. The schema determines which attributes are <strong>mandatory</strong> (like username) and which are <strong>optional</strong> (like phone number or department).</p><p>The schema exists on every <strong>Domain Controller</strong> and is kept identical across the forest through replication. Only the <strong>Schema Master</strong> FSMO role can modify it, ensuring changes are controlled and consistent. Extending the schema (adding new object types or attributes) is possible but must be done carefully, as it affects the entire forest.</p><h4>Basics — DNS and LDAP in Active Directory</h4><p>If you’ve made it this far, you’re probably curious to really understand how Active Directory (AD) works behind the scenes. And to do that, we need to talk about two fundamental pillars: <strong>DNS (Domain Name System)</strong> and <strong>LDAP (Lightweight Directory Access Protocol)</strong>.</p><p>Even if you already know a bit about them, it’s worth taking a closer look because <strong>AD relies heavily on both</strong> to keep the entire network functioning smoothly.</p><ul><li><strong>DNS — Turning Names into Addresses</strong></li></ul><p>DNS is the protocol that <strong>translates human-friendly names into IP addresses</strong>. Instead of memorizing a string of numbers like 192.168.10.15, we simply use names such as files.techx.com.</p><p>Think of DNS as the <strong>phonebook of your network</strong> it tells your computer where to find other computers.</p><p>In <strong>TechX’s Active Directory</strong>, DNS makes it possible for users to access resources easily. For example, when someone connects to files.techx.com, DNS automatically resolves that name to its correct IP address so the connection can happen seamlessly.</p><p>Active Directory cannot exist without DNS every domain, computer, and service is registered in the DNS namespace. In fact, <strong>the entire AD hierarchy (forests, domains, and OUs) is built on DNS naming conventions</strong>.</p><p>So, if DNS is the map, AD is the world built upon it.</p><ul><li><strong>LDAP — Querying and Organizing the Directory</strong></li></ul><p>While DNS helps machines find each other, <strong>LDAP helps you find information</strong> <em>about</em> those machines and about users, printers, and any other objects stored in the directory.</p><p>LDAP is the protocol AD uses to <strong>store, search, and retrieve</strong> information efficiently. It’s what lets administrators (or apps) query the directory when they need something specific.</p><p>Each object in Active Directory has its own identifiers that LDAP uses to organize and locate it:</p><ul><li><strong>Distinguished Name (DN):</strong> shows the full path of the object.<br> → CN=Rana.Chouchane,OU=Development,OU=Tunis,DC=techx,DC=com</li><li><strong>Relative Distinguished Name (RDN):</strong> the object’s simple name — here, it’s Rana.Chouchane.</li><li><strong>User Principal Name (UPN):</strong> a user-friendly logon format like rana.chouchen@techx.com.</li><li><strong>GUID (Globally Unique Identifier):</strong> a permanent system-assigned ID that never changes.</li></ul><p>LDAP keeps all these identifiers structured and searchable, making user management and access control in TechX’s network smooth and reliable.</p><h4>Wrapping Up— Where We Go Next</h4><p>In this first article, we’ve explored the <strong>foundations of Active Directory, </strong>its architecture, roles, schema, and the core concepts that make it such a powerful directory service. You now understand how <strong>domains, forests, DNS, LDAP, global catalogs, and FSMO roles</strong> all come together to form a secure, scalable, and well-structured network environment.</p><p>But before jumping into configuration, one critical step remains <strong>planning</strong>. A well-designed Active Directory starts long before installation. You need to understand your organization’s structure, network topology, business goals, and how users and resources are distributed. That planning phase is what ensures your AD deployment runs smoothly and grows with your company.</p><p>In the next parts of this series, we’ll dive deep into the details of <strong>Active Directory deployment </strong>turning the theory you’ve learned here into a practical roadmap.</p><p>If you have <strong>questions, remarks, or suggestions</strong>, feel free to share them in the comments ,I’d love to hear your thoughts and learn from your experiences too. After all, I’m still learning and exploring Active Directory myself.</p><p>Stay tuned for the next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91fccd1bff4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MISC: QnQSec CTF 2025 — Catch Me]]></title>
            <link>https://medium.com/@ranachouchen4/misc-qnqsec-ctf-2025-catch-me-79541cb9a896?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/79541cb9a896</guid>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 09:34:29 GMT</pubDate>
            <atom:updated>2025-10-20T09:34:29.262Z</atom:updated>
            <content:encoded><![CDATA[<h3>MISC: QnQSec CTF 2025 — Catch Me</h3><p>QR code , Digital forensics</p><h3>Challenge Description:</h3><p>You can look all day, but can you catch it before it slips away?</p><p>the Gif: <a href="https://github.com/RCH2514/Medium-attachments/blob/main/qrs.gif">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*6puTOvUTgWNtZIhtG1GBtg.jpeg" /></figure><h3>Solution :</h3><p>We’re given a GIF file full of QR codes, each changing rapidly from frame to frame. The challenge statement hints that only one of the QR codes hides the real flag, while the others contain random strings or decoys.</p><p>First, I downloaded the GIF (qrs.gif) and confirmed it was animated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*og9RpTkz84oa9MUT-rW8iw.jpeg" /></figure><p>To analyze each QR code individually, I used <strong>ffmpeg</strong> to extract all frames as images:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*lFJrmE5cUB4jQkJ8sDn-zA.jpeg" /></figure><p>Now I have a lot of PNG images like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hY2Ereqz10PL1i2cJfcTYA.jpeg" /></figure><p>Manually scanning each frame would be impossible.<br> So I wrote a short <strong>Python script</strong> using pyzbar and Pillow to decode all QR codes automatically.</p><pre>from pyzbar.pyzbar import decode<br>from PIL import Image<br>import os, re<br><br>for f in sorted(os.listdir(&quot;frames&quot;)):<br>    if not f.endswith(&quot;.png&quot;):<br>        continue<br>    path = os.path.join(&quot;frames&quot;, f)<br>    data = decode(Image.open(path))<br>    if data:<br>        content = data[0].data.decode(errors=&#39;ignore&#39;)<br>        if re.search(r&#39;flag|ctf&#39;, content, re.IGNORECASE):<br>            print(f&quot;[FLAG FOUND in {f}] → {content}&quot;)<br>        else:<br>            print(f&quot;{f}: {content}&quot;)</pre><p>The script started printing the decoded content of each frame.<br> Most of them contained random Base64-looking strings like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYeT7XZ7OqnmoEoav3GyZw.jpeg" /></figure><p>They definitely looked like <strong>Base64</strong>. That’s why i tried this code to see the real content :</p><pre>from pyzbar.pyzbar import decode<br>from PIL import Image<br>import os, re, base64<br><br>def try_base64_decode(s):<br>    try:<br>        decoded = base64.b64decode(s.strip(), validate=True)<br>        return decoded.decode(&#39;utf-8&#39;, errors=&#39;ignore&#39;)<br>    except Exception:<br>        return None<br><br>for f in sorted(os.listdir(&quot;frames&quot;)):<br>    if not f.endswith(&quot;.png&quot;):<br>        continue<br><br>    path = os.path.join(&quot;frames&quot;, f)<br>    data = decode(Image.open(path))<br><br>    if data:<br>        content = data[0].data.decode(errors=&#39;ignore&#39;).strip()<br>        decoded_b64 = try_base64_decode(content)<br><br>        flag_detected = re.search(r&#39;QnQSec&#39;, decoded_b64 if decoded_b64 else content)<br><br>        if flag_detected:<br>            print(f&quot;[FLAG FOUND in {f}] → {decoded_b64 if decoded_b64 else content}&quot;)<br>        else:<br>            print(f&quot;{f}: {decoded_b64 if decoded_b64 else content}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FcyYnr9XpJDuq__LTEI0Hw.jpeg" /></figure><p>Flag found: QnQSec{C4TCH_M3_1F_Y0U_C4N}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79541cb9a896" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MISC : Hack.lu CTF 2025 — GISSNINGSLEK]]></title>
            <link>https://medium.com/@ranachouchen4/misc-hack-lu-ctf-2025-gissningslek-926cb6af06f4?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/926cb6af06f4</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 09:33:32 GMT</pubDate>
            <atom:updated>2025-10-20T09:33:32.813Z</atom:updated>
            <content:encoded><![CDATA[<h3>MISC : Hack.lu CTF 2025 — GISSNINGSLEK</h3><p>Linux / Bash scripting / logic puzzle</p><h3>Description :</h3><p>Casino? CS cases? Pff. Now <strong>this game</strong> is really unfair.</p><p>Link: <a href="https://github.com/RCH2514/Medium-attachments/blob/main/GISSNINGSLEK.tar.gz">HERE</a></p><h3>Solution:</h3><p>After extracting the file locally , the directory contained:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mnpt_lR4t18Gzx-y27cXjA.jpeg" /></figure><p>so it’s a containerized challenge and we have the main script gissningslek.sh so i run it :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*tZ4h80st9F24x5z1Zs-0vg.jpeg" /></figure><p>it’s interactive and reads one input.and it says:</p><p>Let’s play a guessing game!<br> Warning: You may not change your guess. :(</p><p>so i went into inspecting the content of the file :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*1eU1cZmAwlh31pypPpAhWg.png" /></figure><p>so this script reads one value into user_guess and then put that into a loop where guess is called to compare our input with a random number generated for 1000 times and it exits on the first mismatch. with success it prints the flag at first glance the task seems impossible to brute force: guessing 1000 fresh random numbers is infeasible. but here in guess, if the user input (${1}) is the four-letter token rand, then the left operand rand in the comparison is interpreted by Bash as the numeric variable rand.</p><p>so here i tried it locally :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gzt86EkANso5SqwkQJBpg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LlDywKWvoJDMeS-bNiUN1g.jpeg" /></figure><p>and it worked .</p><p>then i connected remotely to the server :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8yrgHlicIVHbP8Fx__-gNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*A_4EvI9-ZK7B9CHulgDHnA.png" /></figure><p>and finally /readflag runs after the 1000 iterations, giving access to the flag.</p><p>so in this challenge the weakness was that bash evaluates barewords as variable names in arithmetic comparison ( -eq ).the solution for not bypassing it was to put input validation and not accepting strings as input.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=926cb6af06f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Forensics : ImaginaryCTF 2025 — obfuscated-1]]></title>
            <link>https://medium.com/@ranachouchen4/forensics-imaginaryctf-2025-obfuscated-1-844a592d047c?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/844a592d047c</guid>
            <category><![CDATA[passwords]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 19:31:13 GMT</pubDate>
            <atom:updated>2025-09-07T19:31:13.906Z</atom:updated>
            <content:encoded><![CDATA[<h3>Forensics : ImaginaryCTF 2025 — obfuscated-1</h3><p>Forensics, CTF, TightVNC, VNC password</p><h4><strong>Challenge Description:</strong></h4><p>“I installed every old software known to man… The flag is the VNC password, wrapped in ictf{}.”</p><p>the zip : <a href="https://github.com/RCH2514/Medium-attachments/blob/main/Users.zip">here</a></p><h4>Solution :</h4><p>i first unziped the provided file and then i inspected it so i found a typical Windows user profile layout:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Jh_LqcZSG8liwA2PUMP7vw.jpeg" /></figure><p>Most importantly, the <strong>NTUSER.DAT</strong> file was present. This is a Windows file in each user’s profile that stores all the user-specific settings and software configurations. Many applications save important data such as passwords here, making it a prime target for challenges like this.</p><p>i used strings with grep to find what software the user used for a vnc:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*NIiV_6Q3sV5drVAdOm8Ipw.jpeg" /></figure><p>This confirmed that <strong>TightVNC was installed</strong> and that the password would likely be stored in the registry.</p><p>So now it’s time to explore the registry hive and for that i used reged to open the NTUSER.DAT file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*Klmh8PPX8osLaXFCtQVzdQ.jpeg" /></figure><p>Then navigated to the TightVNC server key step by step using cd and ls the path was Software\TightVNC\Server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*2HS2DxuIrClCxwu2Sv86Zw.jpeg" /></figure><p>I found a registry value named Password of type REG_BINARY and length 8:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*Rinuu-xOd3KOsN-F2ugRYQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*KhgMnxLD-ItNWawMsEg2zA.jpeg" /></figure><pre>7E 9B 31 12 48 B7 C8 A8</pre><p>This is the <strong>encrypted TightVNC password</strong>.</p><p>So here i used AI to understand how to decode the password but actually they didn’t help all the results were false so i went to google the old way for searching and i found this command in a pentesting site that will crack our password :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*NdXYcBRiz3vnWCKU1AnOQQ.jpeg" /></figure><p>so the first step is :</p><pre>echo -n the_Hex| xxd -r -p</pre><p>to convert the hex string into raw binary bytes:</p><ul><li>-r reverses from hex to binary.</li><li>-p treats input as plain hex.</li></ul><p>and the result of this is the binary that willpass to openssl for decryption.</p><p>Here’s what each part does:</p><ul><li>-des-cbc: Uses DES in <strong>CBC mode</strong> (TightVNC uses CBC internally).</li><li>--nopad: Disables padding — important because TightVNC always stores <strong>exactly 8 bytes</strong>.</li><li>--nosalt: No salt is used in TightVNC.</li><li>-K e84ad660c4721ae0: The DES key in hex (TightVNC uses this static key, sometimes derived from the Windows username).</li><li>-iv 0000000000000000: Initialization vector is all zeros — TightVNC uses 0x00 IV.</li><li>-d: Decrypt mode.</li></ul><p>and then the password is passed to hexdump which shows both <strong>hex and ASCII</strong> of the decrypted bytes.</p><p>This successfully decrypted the 8-byte password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*n1WSj4awkSJQdNsypTvgjA.jpeg" /></figure><p>finally we got our password Slay4U!! and the flag is</p><pre>ictf{Slay4U!!}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=844a592d047c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Forensics: BrunnerCTF 2025 — Memory Loss]]></title>
            <link>https://medium.com/@ranachouchen4/forensics-brunnerctf-2025-memory-loss-00f25b55d97b?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/00f25b55d97b</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[memory-forensics]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[volatility]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 11:49:44 GMT</pubDate>
            <atom:updated>2025-08-28T11:49:44.967Z</atom:updated>
            <content:encoded><![CDATA[<h3>Forensics: BrunnerCTF 2025 — Memory Loss</h3><p>Forensics, CTF, Volatility3, Memory Analysis</p><h4>Description:</h4><p>I had just finished baking a <em>brunsviger</em> when I suddenly remembered something important… but now I simply can’t recall what it was! I’m pretty sure I took a picture of it, but where did I put it?</p><p><strong>Password:</strong> VerySecurePasswordForMemoryLoss_BrunnerCTF2025</p><h4>Solution :</h4><p>i was givven in this task a zip that contained a memory dump file named memoryloss.dmp the zip was large i couldn’t put it this time on github to share it with u but if the site of the ctf still open u could download it from there. the password i needed it when unzipping because u will be asked to give a pass.</p><p>My task was to analyze the memory dump to recover the “something important.”</p><p>The very first step in any memory forensics case is to identify the operating system and architecture of the memory image. I used the standard file command and the windows.info.Info plugin for this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*227QCn-5eCQS4Ng5JQsE1Q.jpeg" /></figure><p>This command provided all the necessary metadata for Volatility to properly analyze the dump. Key information included the Windows build number (15.19041), the system&#39;s architecture (Is64Bit True), the number of processors, and the all-important system timestamp (2025-06-07 21:28:35+00:00), which established the timeline of events.</p><p>After confirming the image profile, the next logical step was to get an overview of the running processes. The windows.pslist.PsList plugin is perfect for this, as it lists all active processes at the time of the dump</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1I44dzPIB93BLXzGMGf7cw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJqPx9vyPuEynJ-qoeZNWg.jpeg" /></figure><p>I scanned the list of processes and quickly found DumpIt.exe with a PID of <strong>7692</strong>. This confirmed that the memory dump was indeed a result of this tool being executed. so i did run this command to examining its command line to see if there were any additional clues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMguvEIlzpYV00H0Vdgtqw.jpeg" /></figure><p>The command line for DumpIt.exe showed it was run from <strong>C:\Users\CTF Player\Desktop</strong>. This told me the user was named &quot;CTF Player&quot; and the action was taken from their desktop.</p><p>My initial thought was that the flag was a file on the desktop. I tried to use filescan to find it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMuej3K2x7PJAXVsZFnvMA.jpeg" /></figure><p>This yielded no immediate results. i could’t finf anything.I also tried searching for common keywords like “flag” and “brunner” using yarascan, but those didn&#39;t give me the flag either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvm38wSzPOERStHgQSlL_g.jpeg" /></figure><p>After getting stuck, I reread the challenge description. The word “picture” was the most important clue. This told me the flag was very likely an image file.</p><p>With this new hypothesis, I went back to the filescan plugin with a smarter search filter. I looked for common image file extensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wfcLj2mldGcKT-N-edKUCA.jpeg" /></figure><p>This was a breakthrough! The command returned a number of files, and one of them had a very promising name: <strong>CachedImage_1600_1200_POS4.jpg</strong> with a file object offset of <strong>0xb207c4372590</strong>. This had to be it.I knew I could extract it from the memory image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5-fYdUtrgWrJEQVrZn4qw.jpeg" /></figure><p>so i did the job using those commands and surprisingly :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTNX5b8TV3fOBVJmv7bsrA.jpeg" /></figure><p>the image had nothing inside of it even strings and binwalk did nothing. so i was shocked but then i thought of seeing the other images i found it wasn’t only one u can see it in the capture i took so i went to the first one to see it :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIxo2t_Yq-YXsO6bIIcgtw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZOuDiAI2zWBz2-l2Z2UBQ.jpeg" /></figure><p>and here it is our flag.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00f25b55d97b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crypto : BrunnerCTF 2025 — The Cryptographic Kitchen!]]></title>
            <link>https://medium.com/@ranachouchen4/crypto-brunnerctf-2025-the-cryptographic-kitchen-4108473aa7df?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4108473aa7df</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[encryption]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Sun, 24 Aug 2025 14:25:11 GMT</pubDate>
            <atom:updated>2025-08-24T14:37:14.384Z</atom:updated>
            <content:encoded><![CDATA[<h3>Crypto : BrunnerCTF 2025 — The Cryptographic Kitchen! Writeup</h3><p>ElGamal Encryption, CTF, Cryptography</p><h4><strong>Description:</strong></h4><p>Our brand new baker, ElGamal, has whipped up the most wonderful cheesecake you could ever imagine. Seriously, it’s so good it might encrypt your taste buds.</p><p>But… there’s a problem. One mysterious ingredient is missing from the recipe!<br> Can you crack the code and figure out what ElGamal forgot to mix in?</p><p>The suspiciously scrambled recipe says this:</p><pre>p  = 14912432766367177751<br>g  = 2784687438861268863<br>h  = 8201777436716393968<br>c1 = 12279519522290406516<br>c2 = 10734305369677133991</pre><p>The flag is the recovered plaintext, wrapped in brunner{}.<br> Example: If you found c4rr0t5, the flag should be submitted as brunner{c4rr0t5}.</p><h4>Solution:</h4><p>At first glance, this looks like a math problem. But any cryptographer will immediately recognize <strong>ElGamal encryption</strong> here.</p><p>I recommend reading about it from : <a href="https://www.geeksforgeeks.org/computer-networks/elgamal-encryption-algorithm/">here</a></p><p>Let’s break it down:</p><ul><li>p is a prime modulus.</li><li>g is a generator.</li><li>h = g^x mod p is the public key, corresponding to a secret key x.</li><li>(c1, c2) is the ciphertext:</li><li>c1 = g^k mod p</li><li>c2 = m * h^k mod p</li><li>m is the plaintext: the missing ingredient we need.</li></ul><p>Our goal was to recover m and wrap it in the required flag format: brunner{m}.</p><p>So ElGamal is knowing as a very secure Algo because recovering x from h = g^x mod p is infeasible for large numbers but here in this ctf everything is vulnerable otherwise we could solve nothing so the numbers are really small and we could extract the x.</p><p>I used SymPy’s discrete logarithm function to compute x:</p><pre>from sympy import discrete_log<br><br>x = discrete_log(p, h, g)</pre><p>It’s part of SymPy’s <strong>number theory tools</strong>, designed to solve discrete logarithm problems: g^x = h mod p</p><ul><li>g = generator</li><li>h = target</li><li>p = modulus</li></ul><p>In other words, it solves the <strong>discrete log problem</strong> mathematically.</p><p>Once we had x, decryption in ElGamal is straightforward:</p><pre>c1_pow_x = pow(c1, x, p)<br>c1_inv = mod_inverse(c1_pow_x, p)<br>m = (c2 * c1_inv) % p</pre><p>Explanation of that is that we know x (the private key). Compute:</p><p>c1^x = g^(x.k) mod p</p><p>But also recall that:</p><p>h=g^x --&gt;h^k=(g^x)^k=g^(x.k)mod p</p><p>So c1^x = h^k.</p><p>This is exactly the “shared secret” used in encryption, the part that multiplies m to hide it.</p><p>The ciphertext contains:</p><p>c2 = m * h^k mod p</p><p>We want m. So we need to undo the multiplication by h^k:</p><p>m= c2 * (h^k)^(-1) mod p</p><p>then the recovered m is an integer. I converted it to bytes and decoded it as UTF-8 text. This revealed the missing ingredient our flag.</p><p>the full code is :</p><pre>from sympy import discrete_log, mod_inverse<br>p  = 14912432766367177751<br>g  = 2784687438861268863 <br>h  = 8201777436716393968<br>c1 = 12279519522290406516<br>c2 = 10734305369677133991<br>x = discrete_log(p, h, g)<br>c1_pow_x = pow(c1, x, p) <br>c1_inv = mod_inverse(c1_pow_x, p)<br>m = (c2 * c1_inv) % p<br>plaintext_bytes = m.to_bytes((m.bit_length() + 7) // 8, &#39;big&#39;)<br>plaintext = plaintext_bytes.decode()<br>print(plaintext)</pre><p>he missing ingredient is: buTT3r and the flag is : brunner{buTT3r}.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4108473aa7df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reverse Engineering: BrunnerCTF 2025- Trippi Troppa Chaos Writeup]]></title>
            <link>https://medium.com/@ranachouchen4/reverse-engineering-brunnerctf-2025-trippi-troppa-chaos-32c4c2cf0b96?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/32c4c2cf0b96</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Sun, 24 Aug 2025 14:24:20 GMT</pubDate>
            <atom:updated>2025-08-24T14:37:37.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Reverse Engineering, CTF, Python</p><p><strong>Description:</strong></p><p>The baker got infected with Italian brainrot and obfuscated our flag encoder with memes and nested functions. Can you help us find our flag?</p><p>the givven zip file is <a href="https://github.com/RCH2514/Medium-attachments/blob/main/rev_trippi-troppa-chaos.zip">here</a></p><p><strong>Solution :</strong></p><p>the first this i did is obviously unzipped the file where i found two files inside of the extracted content : output.txt and trippa_troppa_sus.py .</p><p>so i opened the trippa_troppa_sus.py file and started understanding the code written there :</p><pre>import sys as _tralalero_tralala_impostor_____<br>(lambda _bombardiro_crocodilo___: [<br>    setattr(__builtins__, &#39;__boneca_ambalabu_toilet____&#39;, __import__(&#39;base64&#39;).b85encode),<br>    setattr(__builtins__, &#39;___trippa_troppa_mewing___&#39;, __import__(&#39;hashlib&#39;).sha256),<br>    setattr(__builtins__, &#39;__tung_tung_sahur_cycle_____&#39;, __import__(&#39;itertools&#39;).cycle),<br>    setattr(__builtins__, &#39;____pinguino_arrabiato_seed____&#39;, __import__(&#39;random&#39;).seed)<br>][_bombardiro_crocodilo___] and None)(0) or ____pinguino_arrabiato_seed____(69420)<br><br></pre><p>so here we see that instead of using standard import statements, the script renames key functions from Python’s libraries and makes them available globally but with strange names so that it makes understanding it more difficult . then we see that we got a series of function that every function return another function untill we founf the one that really process the flag it’s ____touch_grass_tralalero_function____() that opens flag.txt and start doing the transformations :</p><ul><li><strong>XOR with a Key:</strong> The flag bytes were XORed with a repeating key. The key was a 7-byte string generated from the SHA-256 hash of “skibidiskibidi”.</li><li><strong>Modular Multiplication:</strong> The result was put through a mathematical operation. Each byte was multiplied by 7, with the result taken modulo 256. This operation can be expressed as: (b⋅7)(mod256)</li><li><strong>Byte Reversal:</strong> The entire sequence of bytes was reversed.</li><li><strong>Base85 Encoding:</strong> The reversed bytes were encoded into a printable string using Base85 encoding.</li><li><strong>UTF-8 Decoding:</strong> Finally, the Base85-encoded output was decoded from bytes to a string. This was the output that’s inside output.txt</li></ul><p>i know its hard to understand the code with the format it’s given the author really did well making it hard but any AI could help u with making it simple and clear . psst”i used Gemini”</p><p>then now we should reverse those steps to extract our flag starting from the last step to the first applying the transformations to the output we got so i wrote this python script :</p><pre>import base64<br>import hashlib<br>import itertools<br><br>encoded_output = &#39;qjuA_QZVI_ua24NQ}fM1hX4ecdyVShKb2vJjeQJ@Jz=zws0^9Enr1fR+Em_5w2j=p4)2&lt;#m3EZ?m3Oo@&#39;<br>step_four = base64.b85decode(encoded_output)<br>step_three = step_four[::-1]<br>mod_inverse = 183<br>step_two = bytes([(b * mod_inverse) % 256 for b in step_three])<br>sussy_key = b&quot;skibidi&quot;<br>key_source = (sussy_key.decode() + sussy_key.decode()).encode()<br>full_hash = hashlib.sha256(key_source).digest()<br>key = full_hash[:len(sussy_key)]<br>flag_bytes = bytes([x ^ y for x, y in zip(step_two, itertools.cycle(key))])<br><br>print(f&quot;{flag_bytes.decode(&#39;latin-1&#39;)}&quot;)</pre><p>just running this script will give you the flag :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*zHV-Y8Mb-OiyYpITeBzWRg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32c4c2cf0b96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MISC: BrunnerCTF 2025 — The Yeast Key]]></title>
            <link>https://medium.com/@ranachouchen4/misc-brunnerctf-2025-the-yeast-key-10585f6ea493?source=rss-9cc72a924ab5------2</link>
            <guid isPermaLink="false">https://medium.com/p/10585f6ea493</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Rana chouchane - QU33NR]]></dc:creator>
            <pubDate>Sun, 24 Aug 2025 14:23:31 GMT</pubDate>
            <atom:updated>2025-08-24T14:37:59.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>MISC: BrunnerCTF 2025 — The Yeast Key Writeup</h3><p>DNA Encryption, CTF, Cryptography</p><p>Description:</p><p>Many years ago, the legendary baker Lionel Poilâne entrusted us with his original sourdough recipe. It’s been locked away in the Vault ever since.</p><p>Only Poilâne knew the passphrase, and now he’s gone. The only clue left behind? A strand of synthetic DNA extracted from his prized baker’s yeast.</p><p>Can you decode the DNA and recover the vault key? The DNA is:</p><p>CGAGCTAGCTCCCGTGCGTGCGCCCTAGCTGTATACCGGCATAACGTGATATCGTACCTTCTAAATAACGGCATACATCACGTGATATCCTTCGTCATCAATCCATCTATATCTAGCCTTATAACGCGCCTTATCCATAACTCCCTAGCGCAATAACTCCATCGCGGACCTTCTAAATCAATCCATCCCTAACGGACTAGATCAATCCATATCCTTATACATCCCCTTCGATCTAGATAAATACATCCATCCATCACGTGATCTCCCGATCACTCCATACATCTAGACATGCATATCTTC</p><p>Solution:</p><p>So in this task we have a text composed of the base of DNA (A, C, G, T). I tried to search on the internet about this type of encoding and it was common to convert the DNA to the binary and that four letters are perfectly matching the 2 bits:</p><ul><li>A = 00</li><li>C = 01</li><li>G = 10</li><li>T = 11</li></ul><p>so i wrote a code that will transfer that string into bits :</p><pre>mapping = {<br>    &#39;A&#39;: &#39;00&#39;,<br>    &#39;C&#39;: &#39;01&#39;,<br>    &#39;G&#39;: &#39;10&#39;,<br>    &#39;T&#39;: &#39;11&#39;<br>}<br><br>dna = &quot;CGAGCTAGCTCCCGTGCGTGCGCCCTAGCTGTATACCGGCATAACGTGATATCGTACCTTCTAAATAACGGCATACATCACGTGATATCCTTCGTCATCAATCCATCTATATCTAGCCTTATAACGCGCCTTATCCATAACTCCCTAGCGCAATAACTCCATCGCGGACCTTCTAAATCAATCCATCCCTAACGGACTAGATCAATCCATATCCTTATACATCCCCTTCGATCTAGATAAATACATCCATCCATCACGTGATCTCCCGATCACTCCATACATCTAGACATGCATATCTTC&quot;<br><br>binary_str = &#39;&#39;.join(mapping[base] for base in dna)<br>print(binary_str)</pre><p>and when I run the code i got the binary :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6sgmpM6PeCFXImDgal7Ug.jpeg" /></figure><p>so i copied it and went to cyberchef and i got our flag :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efVO00KaSPzPtYXyPOen6A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*FnMZmjnb9s96Anh3mkJxuA.jpeg" /></figure><p>so it’s just mapping the binary to ASCII.</p><p>The trick in this challenge was recognizing that DNA bases can be mapped to binary pairs, and using the canonical A=00, C=01, G=10, T=11 mapping gave a valid ASCII string.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10585f6ea493" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>