<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: itsmegsg</title>
    <description>The latest articles on Forem by itsmegsg (@itsmegsg).</description>
    <link>https://forem.com/itsmegsg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3284000%2Fc16861b7-2379-40d1-8420-60f28fbd85b7.png</url>
      <title>Forem: itsmegsg</title>
      <link>https://forem.com/itsmegsg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/itsmegsg"/>
    <language>en</language>
    <item>
      <title>Web Pentesting Beginner Roadmap (2026): From Recon to Server-Side Attacks</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Thu, 19 Mar 2026 13:26:04 +0000</pubDate>
      <link>https://forem.com/itsmegsg/web-pentesting-beginner-roadmap-2026-from-recon-to-server-side-attacks-57gp</link>
      <guid>https://forem.com/itsmegsg/web-pentesting-beginner-roadmap-2026-from-recon-to-server-side-attacks-57gp</guid>
      <description>&lt;p&gt;The Web Pentesting Beginner’s Roadmap: From Recon to Server-Side&lt;br&gt;
A structured reference guide for anyone who just finished their first web security course.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fripuxpzna32s1buxshdd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fripuxpzna32s1buxshdd.png" alt="Web Pentesting Mindmap" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After completing the Hacksmarter Web Pentesting course, I wanted to consolidate the methodology into a single source of truth. Whether you are preparing for a bug bounty or just securing your own apps, this is the mental framework you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Reconnaissance (The Foundation)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Pro-Tip: Always check robots.txt and sitemap.xml before running heavy scans. You’d be surprised what developers "hide" in plain sight.&lt;/p&gt;

&lt;p&gt;Fingerprinting: Use Curl, Burp/Caido, or the Wappalyzer extension to identify the tech stack.&lt;/p&gt;

&lt;p&gt;Directory Brute Forcing: Dirsearch, dirb, or gobuster to find hidden endpoints.&lt;/p&gt;

&lt;p&gt;Subdomains &amp;amp; Vhosts: FFUF (with custom scripts) and gobuster.&lt;/p&gt;

&lt;p&gt;Business Logic Prep: Become a user! Map out the site functionalities. What can a standard user do vs. an Admin?&lt;/p&gt;

&lt;p&gt;OSINT: Google Dorks, Shodan, and Nmap for port scanning.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Authentication Assessment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Credential Attacks: Testing for weak passwords and credential stuffing.&lt;/p&gt;

&lt;p&gt;MFA Bypass: Can you skip the 2FA step by manipulating the URL or response?&lt;/p&gt;

&lt;p&gt;Password Resets: Testing for predictable tokens or Host Header Injection in reset links.&lt;/p&gt;

&lt;p&gt;OAuth: Checking for misconfigured redirect URIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Session Management&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Cookie Security: Ensure HttpOnly and Secure flags are set.&lt;/p&gt;

&lt;p&gt;Session Fixation: Does the session ID stay the same after login? (It shouldn't).&lt;/p&gt;

&lt;p&gt;JWT (JSON Web Tokens): Test for weak secrets or the infamous alg: none vulnerability.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Authorization (The "Permission" Gap)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;IDOR (Insecure Direct Object Reference): Changing id=123 to id=124 to see someone else's data.&lt;/p&gt;

&lt;p&gt;Broken Access Control: Accessing /admin as a guest.&lt;/p&gt;

&lt;p&gt;Mass Assignment: Can you add "is_admin": true to a profile update JSON?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Client-Side Vulnerabilities&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;XSS: Reflected, Stored, and DOM-based attacks.&lt;/p&gt;

&lt;p&gt;CSRF: Forcing users to perform actions without their consent (e.g., changing an email).&lt;/p&gt;

&lt;p&gt;The Rest: Open Redirects, CORS misconfigurations, HTML Injection, and Clickjacking.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;6. Server-Side Vulnerabilities&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Injections: SQLi and NoSQLi.&lt;/p&gt;

&lt;p&gt;SSRF: Forcing the server to make requests to internal metadata services (e.g., AWS/GCP).&lt;/p&gt;

&lt;p&gt;File Uploads: Bypassing filters to upload a Web Shell (PHP/JSP).&lt;/p&gt;

&lt;p&gt;Execution &amp;amp; Traversal: Path Traversal, SSTI (Template Injection), and OS Command Injection.&lt;/p&gt;

</description>
      <category>websecurity</category>
      <category>bugbounty</category>
      <category>cybersecurity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Open Book of Active Directory: Leveraging (and Securing) LDAP Queries</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Sun, 18 Jan 2026 11:51:41 +0000</pubDate>
      <link>https://forem.com/itsmegsg/the-open-book-of-active-directory-leveraging-and-securing-ldap-queries-1k45</link>
      <guid>https://forem.com/itsmegsg/the-open-book-of-active-directory-leveraging-and-securing-ldap-queries-1k45</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction: The Convenience Trap
&lt;/h2&gt;

&lt;p&gt;Active Directory (AD) is designed for collaboration. By default, it acts like a global office directory. However, this convenience often leads to an &lt;strong&gt;information disclosure&lt;/strong&gt; vulnerability. Even a low-privileged user can query a massive amount of data about every other user, group, and machine in the domain.&lt;/p&gt;

&lt;p&gt;In this article, we explore how an attacker uses simple LDAP queries to extract sensitive information and how a Blue Teamer can surgically shut those leaks down using &lt;strong&gt;dsacls&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Lab Setup
&lt;/h2&gt;

&lt;p&gt;To follow along, the lab environment consists of two virtual machines on the same NAT network:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows Server 2019
&lt;/li&gt;
&lt;li&gt;Domain Controller: &lt;code&gt;cybercommando.org&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Attacker&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kali Linux&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The attacker has already gained an initial foothold and possesses credentials of a standard domain user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Username: prabhu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. What is ldapsearch?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ldapsearch&lt;/code&gt; is a command-line utility used to query LDAP directories. While Windows administrators often rely on PowerShell and GUI tools, &lt;code&gt;ldapsearch&lt;/code&gt; is the Swiss Army Knife for attackers and Linux-based administrators.&lt;/p&gt;

&lt;p&gt;It allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bind (authenticate) to a Domain Controller&lt;/li&gt;
&lt;li&gt;Perform granular searches using LDAP filters&lt;/li&gt;
&lt;li&gt;Retrieve raw directory attributes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. The Attacker's Reconnaissance
&lt;/h2&gt;

&lt;p&gt;Once inside the network, the attacker does not need exploits. They only need to ask Active Directory the &lt;em&gt;right questions&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Global User Search
&lt;/h3&gt;

&lt;p&gt;The attacker begins by listing all users and inspecting metadata fields for human mistakes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ldapsearch &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="s2"&gt;"URL"&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; &lt;span class="s2"&gt;"user@domain_name"&lt;/span&gt; &lt;span class="nt"&gt;-W&lt;/span&gt; &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="s2"&gt;"Domain_Name"&lt;/span&gt; &lt;span class="s2"&gt;"(objectClass=user)"&lt;/span&gt; description
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd7dqcb94iawqphs7sz8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd7dqcb94iawqphs7sz8.png" alt="LDAP command" width="800" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-x&lt;/code&gt; : Simple authentication
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-D&lt;/code&gt; : Bind DN (compromised user)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-b&lt;/code&gt; : Base DN (search root)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;description&lt;/code&gt; : Attribute being queried
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Leak
&lt;/h3&gt;

&lt;p&gt;The attacker discovers a user object where an administrator mentioned important details in the &lt;strong&gt;description&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8pya34zmt44tbwbmjer.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8pya34zmt44tbwbmjer.png" alt="User descriptions seen" width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because &lt;strong&gt;Authenticated Users&lt;/strong&gt; have read access by default, this sensitive information is exposed to &lt;em&gt;any logged-in domain user&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Impact
&lt;/h3&gt;

&lt;p&gt;With this leaked password, an attacker can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Perform password spraying&lt;/li&gt;
&lt;li&gt;Identify accounts still using default credentials&lt;/li&gt;
&lt;li&gt;Escalate privileges silently&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Blue Team Defense: Surgery with dsacls
&lt;/h2&gt;

&lt;p&gt;Deleting the description value is only a temporary fix. The real solution is controlling &lt;em&gt;who can read sensitive attributes&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Goal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Admins can read the description&lt;/li&gt;
&lt;li&gt;Standard users cannot&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The dsacls Command
&lt;/h3&gt;

&lt;p&gt;Run the following on the Domain Controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dsacls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CN=manoj,CN=Users,DC=cybercommando,DC=org"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/D&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Authenticated Users"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;RP&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhjjp3mccbbepbe2ulb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhjjp3mccbbepbe2ulb1.png" alt="dsacls command" width="800" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Breakdown&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CN=manoj,...&lt;/code&gt; : Target user object
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/D&lt;/code&gt; : Explicit deny
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Authenticated Users&lt;/code&gt; : Group being restricted
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RP;description&lt;/code&gt; : Deny &lt;em&gt;Read Property&lt;/em&gt; for the description attribute only
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This command can be adapted to protect multiple users or entire OUs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  6. Verification
&lt;/h2&gt;

&lt;p&gt;Back on the Kali machine, rerun the same &lt;code&gt;ldapsearch&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user object is returned&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;description&lt;/code&gt; attribute of User: Manoj is missing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhkk1d6rhpk6a9oqbflb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhkk1d6rhpk6a9oqbflb.png" alt="Description of user is hidden" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Works
&lt;/h3&gt;

&lt;p&gt;The Domain Controller evaluates the ACL, detects the explicit deny rule, and redacts the sensitive attribute before responding.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion: Privacy Is a Permission
&lt;/h2&gt;

&lt;p&gt;Active Directory security is not only about strong passwords; it is about &lt;strong&gt;visibility control&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Understanding how attackers view AD through LDAP allows Blue Teamers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify silent data leaks&lt;/li&gt;
&lt;li&gt;Enforce the principle of least privilege&lt;/li&gt;
&lt;li&gt;Harden environments without breaking functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
If a standard user does not need to see an attribute to do their job, they should not be able to see it at all.&lt;/p&gt;

</description>
      <category>sysadm</category>
      <category>cybersecurity</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Windows Registry Internals — A Beginner-Friendly Deep Dive</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Sat, 20 Dec 2025 12:17:52 +0000</pubDate>
      <link>https://forem.com/itsmegsg/windows-registry-internals-a-beginner-friendly-deep-dive-36pk</link>
      <guid>https://forem.com/itsmegsg/windows-registry-internals-a-beginner-friendly-deep-dive-36pk</guid>
      <description>&lt;h2&gt;
  
  
  What We’ll Cover
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Windows Registry Internals&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unit 1: Architecture &amp;amp; Anatomy&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit 2: The Logical Structure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit 3: Data Types &amp;amp; Values&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unit 4: Tools &amp;amp; Manipulation&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Unit 1: Architecture &amp;amp; Anatomy
&lt;/h2&gt;

&lt;p&gt;The Windows Registry is a hierarchical database that stores low-level configuration settings for the operating system and applications.&lt;br&gt;&lt;br&gt;
Almost every serious Windows component talks to the registry in some form.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;1. The Concept of “Hives”&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Hive&lt;/strong&gt; is a logical group of registry keys backed by physical files on disk.&lt;/p&gt;

&lt;p&gt;At boot time, Windows loads these hive files and assembles the registry tree.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;2. Physical Location of Registry Hives&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Most system hives are stored at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Windows\System32\config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Critical Hives&lt;/strong&gt;
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hive&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SAM&lt;/td&gt;
&lt;td&gt;User accounts &amp;amp; password hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SECURITY&lt;/td&gt;
&lt;td&gt;Local security policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SOFTWARE&lt;/td&gt;
&lt;td&gt;Installed software settings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SYSTEM&lt;/td&gt;
&lt;td&gt;Drivers, services, boot config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEFAULT&lt;/td&gt;
&lt;td&gt;Default user profile&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;The User Hive (Exception)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Each user has a personal hive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\&amp;lt;Username&amp;gt;\NTUSER.DAT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contains user-specific settings like wallpaper, mouse speed, and application preferences.&lt;/p&gt;




&lt;h2&gt;
  
  
  Unit 2: The Logical Structure (Root Keys)
&lt;/h2&gt;

&lt;p&gt;Windows presents registry data using logical &lt;strong&gt;Root Keys&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;The Big Two&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;HKEY_LOCAL_MACHINE (HKLM)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Applies to the entire system&lt;/li&gt;
&lt;li&gt;Shared by all users&lt;/li&gt;
&lt;li&gt;Backed by SYSTEM, SOFTWARE, SAM, SECURITY hives&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;HKEY_CURRENT_USER (HKCU)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Applies only to the logged-in user&lt;/li&gt;
&lt;li&gt;Backed by NTUSER.DAT&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Derived Root Keys&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HKEY_USERS (HKU)&lt;/strong&gt; – All loaded user profiles
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HKEY_CLASSES_ROOT (HKCR)&lt;/strong&gt; – File associations
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HKEY_CURRENT_CONFIG (HKCC)&lt;/strong&gt; – Hardware profile at boot
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Unit 3: Keys, Values &amp;amp; Data Types
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keys&lt;/strong&gt; act like folders
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Values&lt;/strong&gt; act like files
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each value has:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Name
&lt;/li&gt;
&lt;li&gt;Type
&lt;/li&gt;
&lt;li&gt;Data
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Common Data Types&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;REG_SZ&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Human-readable string&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;REG_DWORD&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;32-bit integer (often used as on/off flags)&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;REG_BINARY&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Raw binary data&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;REG_EXPAND_SZ&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Expandable string with variables like &lt;code&gt;%SystemRoot%&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;REG_MULTI_SZ&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Multiple strings stored as a list&lt;/p&gt;




&lt;h2&gt;
  
  
  Unit 4: Tools &amp;amp; Manipulation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Registry Editor&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Open with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Win + R → regedit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Always export a key before editing.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Backup &amp;amp; Restore&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Export: Right-click key → Export
&lt;/li&gt;
&lt;li&gt;Restore: Double-click &lt;code&gt;.reg&lt;/code&gt; file
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Automation with .reg Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to make changes to registry, you can simply create a .reg file, double click it and make changes. &lt;br&gt;
Here as an example we are creating a .reg file for creating a game setting of FULLSCREEN. Since fullscreen settings have boolean value of On/Off we have used the REG_DWORD value here to set it to 1 ie true,.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\MyGame]
"PlayerName"="itsmegsg"
"FullScreen"=dword:00000001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;strong&gt;Command Line (REG)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Command-Line can also be used to make changes to Windows Registry. Here is a simple example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;REG ADD HKCU\Software\MyGame /v PlayerName /t REG_SZ /d "itsmegsg"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The Windows Registry is foundational for Windows internals, malware analysis, forensics, and Active Directory security.&lt;/p&gt;

&lt;p&gt;Once you understand its structure, it becomes a powerful ally instead of a black box.&lt;/p&gt;

</description>
      <category>windows</category>
      <category>internals</category>
      <category>registry</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Hunting Malware Like a Pro: A Beginner's Guide to YARA</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Sun, 14 Dec 2025 12:49:00 +0000</pubDate>
      <link>https://forem.com/itsmegsg/hunting-malware-like-a-pro-a-beginners-guide-to-yara-clg</link>
      <guid>https://forem.com/itsmegsg/hunting-malware-like-a-pro-a-beginners-guide-to-yara-clg</guid>
      <description>&lt;h2&gt;
  
  
  Introduction: The "Ctrl+F" of Cyber Security
&lt;/h2&gt;

&lt;p&gt;Imagine you are looking for a specific needle in a massive haystack. Now, imagine that needle is a piece of malware hiding inside thousands of files on a corporate server. How do you find it? You don't browse manually—you use &lt;strong&gt;YARA&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YARA&lt;/strong&gt; (Yet Another Ridiculous Acronym) is the industry standard tool for malware research and detection. It allows defenders to create descriptions (called "rules") of malware families based on text or binary patterns. Think of it as a super-powered "Ctrl+F" that doesn't just look for words, but for the specific DNA of a virus.&lt;/p&gt;

&lt;p&gt;YARA was created by &lt;strong&gt;Victor Alvarez&lt;/strong&gt; of VirusTotal (now owned by Google). It has since become the Swiss Army Knife for the entire security industry.&lt;/p&gt;

&lt;p&gt;If you are getting into YARA, you cannot ignore &lt;strong&gt;Florian Roth&lt;/strong&gt; (known as &lt;em&gt;Neo23&lt;/em&gt;). He is arguably the most prolific writer of YARA rules in the community. His GitHub repositories (like &lt;code&gt;signature-base&lt;/code&gt;) are the gold standard, providing thousands of free rules that protect companies worldwide. &lt;/p&gt;




&lt;h2&gt;
  
  
  What Does YARA Actually "See"?
&lt;/h2&gt;

&lt;p&gt;YARA is a &lt;strong&gt;Static Analysis&lt;/strong&gt; tool. This means it inspects files without actually running them (which is safer!). It primarily looks for three things. Here is how to understand them without the computer science jargon:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Strings (The Words)
&lt;/h3&gt;

&lt;p&gt;This is the simplest layer. YARA looks for specific readable text inside the file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; If a hacker writes a program and leaves the sentence &lt;em&gt;"Hacked by Lazarus"&lt;/em&gt; inside the code, YARA can search for that exact phrase.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Limitation:&lt;/em&gt; Attackers often encrypt or scramble their words to hide them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Binary Patterns (The DNA)
&lt;/h3&gt;

&lt;p&gt;Not everything in a computer file is readable text. Most of it is "machine code"—the raw instructions the computer CPU reads.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Analogy:&lt;/strong&gt; Even if a virus changes its name, the raw code (Hexadecimal patterns) used to build it often stays the same. YARA scans for these "digital fingerprints" inside the hex of the file. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Behaviors (The Blueprint)
&lt;/h3&gt;

&lt;p&gt;Wait, if YARA doesn't run the file, how does it see behavior?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Blueprint Analogy:&lt;/strong&gt; YARA looks at the "Import Table" of a file—a list of tools the program asks Windows to provide.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; If YARA sees a file packing "Microphone Access" and "Internet Connection" tools, it infers the behavior: &lt;strong&gt;Spyware&lt;/strong&gt;. It doesn't need to watch the spy work; it just checks the spy's bag.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Proof of Concept: Catching the "Internet Hunter"
&lt;/h2&gt;

&lt;p&gt;To show you how this works in practice, I built a simple Proof of Concept (POC) in my Kali Linux lab.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Goal:&lt;/strong&gt; Write a YARA rule that detects &lt;em&gt;any&lt;/em&gt; Windows program capable of connecting to the internet, regardless of what the file is named.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Creating the "Dummy Malware"
&lt;/h3&gt;

&lt;p&gt;I wrote a small C program that doesn't do anything malicious, but it imports the &lt;code&gt;WININET.dll&lt;/code&gt; library. This is the standard Windows library used for browsing the web. If a program has this, it has the &lt;em&gt;capability&lt;/em&gt; to talk to the internet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;windows.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;wininet.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// We just load the internet tools, we don't attack anything!&lt;/span&gt;
    &lt;span class="n"&gt;HINTERNET&lt;/span&gt; &lt;span class="n"&gt;hInternet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;InternetOpenA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"MalwareAgent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;INTERNET_OPEN_TYPE_DIRECT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hInternet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Internet Library Loaded Successfully!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I compiled this into a Windows Executable (&lt;code&gt;internet_test.exe&lt;/code&gt;) using the MinGW compiler on Kali.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshhdifm2k8hx4x82gjsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshhdifm2k8hx4x82gjsd.png" alt="My C code for the internet_test.exe" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Writing the YARA Rule
&lt;/h3&gt;

&lt;p&gt;Now, I wrote a rule named &lt;code&gt;yara_for_internet&lt;/code&gt;. I told YARA to look for the &lt;strong&gt;"MZ"&lt;/strong&gt; header (which proves it is a Windows .exe file) AND the specific library string &lt;strong&gt;"WININET.dll"&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "console"

rule yara_for_internet
{
   meta:
     author = "itsmegsg"
     description = "Checks for executables that can connect to the internet"
     confidence = "medium"

   strings:
     $mz = { 4D 5A }           This is for Mark Zowkowsksi
     $dll = "WININET.dll"      This is for the dll file
     $int = "InternetOpenA"     This is for the specific function

   condition:

     ($mz and ($dll or $int))  - I put a simple condition here. It should be an executable with either WININET or InternetOpenA

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjwwm5tiu1nhq27ffz7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjwwm5tiu1nhq27ffz7u.png" alt="My YARA rule" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: The Moment of Truth
&lt;/h3&gt;

&lt;p&gt;I ran the rule against my folder containing the dummy malware.&lt;/p&gt;

&lt;p&gt;Command:&lt;br&gt;
&lt;code&gt;yara yara_for_internet.yar &amp;lt;folder path&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Folder contents - I am scanning this entire file with the above YARA rule&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kby49vccszr0wikuqe0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kby49vccszr0wikuqe0.png" alt="Folder contents - I am scanning this entire file with the above YARA rule" width="800" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf719w160gntwu7m6exm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf719w160gntwu7m6exm.png" alt="Final Output" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, YARA immediately flagged the file. It looked inside the file's structure, saw the tools it was carrying, and alerted me immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;YARA moves us from "guessing" to "hunting." Instead of waiting for an antivirus update, we can write our own logic to detect threats based on what they &lt;em&gt;are&lt;/em&gt; and what they can &lt;em&gt;do&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you are getting started in Blue Teaming, mastering YARA is one of the best investments you can make.&lt;/p&gt;




</description>
      <category>cybersecurity</category>
      <category>tooling</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Introducing osquery_hunter — Lightweight Windows Triage Tool for DFIR &amp; Threat Hunting</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Sat, 18 Oct 2025 03:31:38 +0000</pubDate>
      <link>https://forem.com/itsmegsg/introducing-osqueryhunter-lightweight-windows-triage-tool-for-dfir-threat-hunting-1flh</link>
      <guid>https://forem.com/itsmegsg/introducing-osqueryhunter-lightweight-windows-triage-tool-for-dfir-threat-hunting-1flh</guid>
      <description>&lt;h1&gt;
  
  
  Introducing osquery_hunter
&lt;/h1&gt;

&lt;p&gt;When you're working a security incident and &lt;strong&gt;don't have an EDR agent&lt;/strong&gt; or enterprise console to lean on, you still need a quick way to understand what's running on a Windows host.&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;osquery_hunter&lt;/strong&gt; comes in — a simple Python-based helper that uses &lt;a href="https://osquery.io/" rel="noopener noreferrer"&gt;osquery&lt;/a&gt; to collect process and network data, then flags &lt;strong&gt;unsigned or suspicious binaries&lt;/strong&gt; for rapid triage.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lists all active processes and network sockets using osquery.&lt;/li&gt;
&lt;li&gt;Flags executables &lt;strong&gt;not simultaneously trusted&lt;/strong&gt; in the local Windows trust store &lt;strong&gt;and Microsoft-signed&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Displays potential &lt;strong&gt;LOLBIN (Living off the Land)&lt;/strong&gt; usage.&lt;/li&gt;
&lt;li&gt;Helps identify &lt;strong&gt;unsigned or third‑party binaries&lt;/strong&gt; still active in memory.&lt;/li&gt;
&lt;li&gt;Perfect for quick &lt;strong&gt;DFIR triage&lt;/strong&gt;, &lt;strong&gt;incident response&lt;/strong&gt;, and &lt;strong&gt;blue‑team&lt;/strong&gt; checks.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python:&lt;/strong&gt; 3.10+ (tested on 3.11)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;osquery:&lt;/strong&gt; version 5.19.0 (Windows x64)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Official download: &lt;a href="https://osquery.io/downloads/" rel="noopener noreferrer"&gt;https://osquery.io/downloads/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verified SHA256 (&lt;code&gt;osqueryi.exe&lt;/code&gt;):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EDA5AC01F705F976957ABD8C9D14BBD355616EBEF6C5B45F28A2AE44F53E207D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Create and activate a virtual environment (optional)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;venv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;venv&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\.venv\Scripts\Activate.ps1&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# 2. Install dependencies&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;pip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-r&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;requirements.txt&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# 3. Run the script&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\osquery_hunter.py&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;osqueryi.exe&lt;/code&gt; isn’t on PATH, point to it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;OSQUERYI_PATH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Program Files\osquery\osqueryi.exe"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why This Project Exists
&lt;/h2&gt;

&lt;p&gt;In many environments, especially air‑gapped or restricted systems, analysts don’t have EDR coverage everywhere.&lt;br&gt;&lt;br&gt;
&lt;code&gt;osquery_hunter&lt;/code&gt; gives you a &lt;strong&gt;portable way to inspect process behavior&lt;/strong&gt; and &lt;strong&gt;verify binary signatures&lt;/strong&gt; using native Windows APIs and osquery data.&lt;/p&gt;

&lt;p&gt;It’s &lt;strong&gt;open source&lt;/strong&gt; and fully auditable — designed to complement, not replace, commercial tools.&lt;/p&gt;




&lt;h2&gt;
  
  
  Repository
&lt;/h2&gt;

&lt;p&gt;👉 GitHub: &lt;a href="https://github.com/ItsmeGSG/osquery_hunter" rel="noopener noreferrer"&gt;ItsmeGSG/osquery_hunter&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;The best DFIR tools are often the simplest.&lt;br&gt;&lt;br&gt;
&lt;code&gt;osquery_hunter&lt;/code&gt; started as a lab helper and evolved into a compact, no‑dependency triage companion that gives you insight into what’s really happening on a Windows box.&lt;/p&gt;

&lt;p&gt;Give it a star ⭐ on GitHub if you find it useful or extend it for your environment!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;MIT Licensed — developed for educational and defensive security purposes.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dfir</category>
      <category>osquery</category>
      <category>threathunting</category>
      <category>windows</category>
    </item>
    <item>
      <title>ADS — Alternate Data Streams (Beginner friendly PoC)</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Tue, 30 Sep 2025 16:35:59 +0000</pubDate>
      <link>https://forem.com/itsmegsg/ads-alternate-data-streams-beginner-friendly-poc-27m4</link>
      <guid>https://forem.com/itsmegsg/ads-alternate-data-streams-beginner-friendly-poc-27m4</guid>
      <description>&lt;p&gt;&lt;strong&gt;One-line summary:&lt;/strong&gt; NTFS Alternate Data Streams (ADS) let a file carry &lt;em&gt;named&lt;/em&gt; hidden streams of data (e.g. &lt;code&gt;file.txt:secret&lt;/code&gt;). They’re useful for metadata but can be abused for stealthy storage — here’s a safe, beginner lab showing how to hide an image or a benign PowerShell script in an ADS and how to run it in a controlled environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Lab safety &amp;amp; ethics:&lt;/strong&gt; Run these steps &lt;strong&gt;only&lt;/strong&gt; in an isolated Windows VM with an NTFS disk. Snapshot the VM first. Do &lt;strong&gt;not&lt;/strong&gt; try on production systems or devices you don’t own/authorize.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What is an ADS? (short &amp;amp; simple)
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;Alternate Data Stream (ADS)&lt;/strong&gt; is an extra named data stream attached to an NTFS file. The normal content you see is the default stream. An ADS is like a hidden compartment inside a briefcase — the briefcase is the visible file, and the ADS is the hidden pocket.The beauty is you can create any number of secret compartments(ADS) for a single file. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key facts :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ADS is an &lt;strong&gt;NTFS&lt;/strong&gt; feature (not FAT/exFAT) and may be lost if the file is moved to a non-NTFS filesystem.
&lt;/li&gt;
&lt;li&gt;A file can hold &lt;strong&gt;multiple&lt;/strong&gt; named streams: &lt;code&gt;filename:stream1&lt;/code&gt;, &lt;code&gt;filename:stream2&lt;/code&gt;, etc.
&lt;/li&gt;
&lt;li&gt;Explorer shows only the &lt;em&gt;default&lt;/em&gt; stream size; ADS bytes are stored in NTFS metadata (MFT) and require special tools to see.
&lt;/li&gt;
&lt;li&gt;There is no simple NTFS switch to disable ADS — defenders must scan and monitor for them.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Legitimate uses:&lt;/strong&gt; metadata, compatibility with legacy resource forks, application-specific needs.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abuse potential:&lt;/strong&gt; attackers can hide scripts, small binaries, images, or exfiltrated data inside ADS to evade cursory checks. Modern AV/EDR can and does detect many ADS-related behaviours, but ADS remains a stealthy lever in many scenarios.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Important ADS commands (cmd method)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Commands&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
echo Diwali wishes &amp;gt; C:\Lab\Diwali.txt    # To create visible host file, in this case a TXT file named Diwali.

copy /b "C:\Lab\images\diya.jpg" "C:\Lab\Diwali.txt:Diya"   # Command to copy a image file to the ADS of Diwali.txt

dir /R C:\Lab # Command to list all ADS files in a directory. 

copy /b "C:\Lab\Diwali.txt:Diya" "C:\Temp\Diya_extracted.jpg"   # Command to extract the image file from ADS and paste it in a folder

start "C:\Temp\Diya_extracted.jpg"  # Command to open the file

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What you’ll see&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dir /R&lt;/code&gt; or &lt;code&gt;streams -s C:\Lab&lt;/code&gt; will show &lt;code&gt;Diwali.txt:Diya&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;After extract, the default image viewer opens the  &lt;code&gt;Diya_extracted.jpg&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am attaching screenshots with similar commands executed in my VM. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcap3osn76yhs3q8m7gh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcap3osn76yhs3q8m7gh.png" alt="Creating ADS using cmd prompt" width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ka9wn93nbrycy7dtsce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ka9wn93nbrycy7dtsce.png" alt="Identifying ADS existence" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5oz9c3fdj98na57y5hk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5oz9c3fdj98na57y5hk4.png" alt="Opening ADS" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  PowerShell payload in ADS (PoC)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Quick lab PoC overview
&lt;/h3&gt;

&lt;p&gt;Step 1. A harmless looking Image-File is downloaded into the victim machine. &lt;br&gt;
This is the payload/exploit for this particular setup. This seemingly harmless text file has ADS with powershell scripts in it. Since this is a lab setup the powershell script is kept to bare minimum. It scans for images stored in the system. It copies all such files to a location within the system. It compresses and makes them into a single file. It finally uploads the file to a remote server. Ideally I would have put 2 more lines to break the compressed file into smaller chunks. Since this is a lab setup and I had very few photos in my VM, I took the liberty of not doing it.&lt;/p&gt;

&lt;p&gt;Step 2. The AD script is shown in the below screenshot. It is obfuscated to hide few details. But the important fact is such scripts can be written with very little effort. &lt;/p&gt;

&lt;p&gt;Powershell script is partly shown : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feuwkzfei5pda6gj9ae5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feuwkzfei5pda6gj9ae5a.png" alt="Powershell script" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3. The script is executed. I have also attached a screenshot to show that a .rar file has been created because of the powershell script. This entire exercise emulates a classic data exfiltration scenario. &lt;/p&gt;

&lt;p&gt;Executing the script: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6avcuzn5k0v7zboi6p5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6avcuzn5k0v7zboi6p5d.png" alt="Script execution" width="800" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Final result in victim machine: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbabujqhdyd3m7mvdoz68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbabujqhdyd3m7mvdoz68.png" alt="Final result in Victim machine" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Cleanup (remove ADS and artifacts)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# remove ADS from host file&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Remove-Item&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'C:\Users\Testuser1\Downloads\Diwali_wishes.jpg'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Stream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Cracker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ErrorAction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SilentlyContinue&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Detection &amp;amp; Blue-Team hints (short)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick tools:&lt;/strong&gt; Sysinternals &lt;code&gt;streams.exe&lt;/code&gt; (&lt;code&gt;streams -s &amp;lt;path&amp;gt;&lt;/code&gt;) and PowerShell &lt;code&gt;Get-Item -Stream *&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated scan:&lt;/strong&gt; run a scheduled PowerShell script that enumerates files with more than one stream and reports them (I’ll publish one in the Blue-Team post - my subsequent post).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logging &amp;amp; monitoring:&lt;/strong&gt; watch for suspicious &lt;code&gt;PowerShell&lt;/code&gt; process invocations that read unusual file streams or for &lt;code&gt;CreateProcess&lt;/code&gt; events where command lines reference temp extracts. Use Procmon/Sysmon to capture and tune alerts.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forensics:&lt;/strong&gt; MFT and USN journal entries can help timeline ADS creation/deletion.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion &amp;amp; what’s next
&lt;/h2&gt;

&lt;p&gt;ADS is a small NTFS feature with outsized impact: it’s legitimately useful but can be abused for stealth. In this post we created ADS entries for both an image and a benign PowerShell payload, demonstrated in-memory execution, and showed verification and cleanup steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next post (coming soon):&lt;/strong&gt; a detailed &lt;strong&gt;Blue-Team&lt;/strong&gt; guide showing a reusable PowerShell ADS scanner, Sysmon rules to detect suspicious ADS usage, a Procmon walkthrough, and a short response playbook for triage &amp;amp; remediation. Stay tuned!&lt;/p&gt;




&lt;h2&gt;
  
  
  References &amp;amp; further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft docs on file streams and NTFS (search for &lt;em&gt;NTFS alternate data streams&lt;/em&gt;).
&lt;/li&gt;
&lt;li&gt;Sysinternals &lt;code&gt;Streams.exe&lt;/code&gt; — small tool for listing/deleting streams.
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>tutorial</category>
      <category>cybersecurity</category>
      <category>ads</category>
      <category>security</category>
    </item>
    <item>
      <title>Abusing LOLBins: rundll32.exe Lab &amp; Sysmon Detection</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Tue, 02 Sep 2025 06:41:54 +0000</pubDate>
      <link>https://forem.com/itsmegsg/abusing-lolbins-rundll32exe-lab-sysmon-detection-170h</link>
      <guid>https://forem.com/itsmegsg/abusing-lolbins-rundll32exe-lab-sysmon-detection-170h</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;When attackers compromise a Windows system, they don’t always drop flashy malware. Instead, they often &lt;em&gt;live off the land&lt;/em&gt; by abusing built-in Windows tools that administrators themselves rely on. These tools, known as &lt;strong&gt;LOLBins (Living-Off-the-Land Binaries)&lt;/strong&gt;, are signed by Microsoft and trusted by the OS. Because of this, their misuse often slips past antivirus and security defenses.  &lt;/p&gt;

&lt;p&gt;In this post, we’ll explore what LOLBins are, why they are stealthy, and walk through a hands-on lab where a simple DLL is executed using the LOLBin &lt;code&gt;rundll32.exe&lt;/code&gt;. Finally, we’ll flip perspectives to the defender’s side and see how Sysmon logs reveal the tell-tale signs of abuse.  &lt;/p&gt;




&lt;h2&gt;
  
  
  2. What are LOLBins?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LOLBins&lt;/strong&gt; are legitimate executables and scripts that come pre-installed with operating systems (like Windows). Attackers can abuse them to perform malicious actions without dropping custom malware.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rundll32.exe&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;certutil.exe&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;powershell.exe&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mshta.exe&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since they are signed by Microsoft and widely used for admin tasks, their execution often bypasses security controls and raises less suspicion.  &lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;How attackers use LOLBins:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Downloading payloads
&lt;/li&gt;
&lt;li&gt;Executing arbitrary code
&lt;/li&gt;
&lt;li&gt;Lateral movement
&lt;/li&gt;
&lt;li&gt;Data exfiltration
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;How defenders detect misuse:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor unusual command-line arguments
&lt;/li&gt;
&lt;li&gt;Trace parent-child process relationships
&lt;/li&gt;
&lt;li&gt;Analyze telemetry from Sysmon or EDR tools
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Why are LOLBins Stealthy?
&lt;/h2&gt;

&lt;p&gt;LOLBins are stealthy because:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are &lt;strong&gt;trusted, signed binaries&lt;/strong&gt; already present in Windows.
&lt;/li&gt;
&lt;li&gt;They allow attackers to avoid dropping new executables (lowers AV detection risk).
&lt;/li&gt;
&lt;li&gt;They can &lt;strong&gt;proxy malicious commands&lt;/strong&gt; through normal admin utilities (e.g., &lt;code&gt;certutil&lt;/code&gt; for downloads, &lt;code&gt;rundll32&lt;/code&gt; for DLL execution).
&lt;/li&gt;
&lt;li&gt;Their execution blends in with normal system/admin behavior.
&lt;/li&gt;
&lt;li&gt;They often run with &lt;strong&gt;inherited or elevated privileges&lt;/strong&gt;, giving attackers powerful access while appearing benign.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Lab Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  4.1 Basic Windows-Only Setup
&lt;/h3&gt;

&lt;p&gt;In this setup, I created a &lt;code&gt;.dll&lt;/code&gt; file locally and executed it with &lt;code&gt;rundll32.exe&lt;/code&gt;.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Hello.dll&lt;/code&gt; file is harmless and only pops up a message box.
&lt;/li&gt;
&lt;li&gt;But an attacker could replace it with malicious code.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What happened?&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I compiled a DLL with an exported function.
&lt;/li&gt;
&lt;li&gt;Used &lt;code&gt;rundll32.exe&lt;/code&gt; to execute it.
&lt;/li&gt;
&lt;li&gt;Proof: the pop-up &lt;em&gt;“Hello from rundll32”&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w3iertv98bno8t8s9bq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w3iertv98bno8t8s9bq.png" alt="Malicious file created locally" width="800" height="566"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2wr9rmjn8v5iikusaik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2wr9rmjn8v5iikusaik.png" alt="Malicious .dll file executed using rundll32" width="800" height="569"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why &lt;code&gt;rundll32.exe&lt;/code&gt;?&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in LOLBin, signed by Microsoft
&lt;/li&gt;
&lt;li&gt;Loads and executes arbitrary DLLs
&lt;/li&gt;
&lt;li&gt;Can bypass application whitelisting controls
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;Significance&lt;/strong&gt;: even though the message box is harmless, the same method could load a Cobalt Strike beacon, keylogger, or ransomware.  &lt;/p&gt;




&lt;h3&gt;
  
  
  4.2 Advanced: Kali + Windows Setup
&lt;/h3&gt;

&lt;p&gt;Here I simulated a more realistic attacker scenario using Kali + Windows.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Attempted to download &lt;code&gt;Hello.dll&lt;/code&gt; from Kali to Windows using &lt;code&gt;certutil&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WSC blocked the download.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Switched to PowerShell &lt;code&gt;Invoke-WebRequest&lt;/code&gt; and successfully downloaded it.
&lt;/li&gt;
&lt;li&gt;Executed DLL using &lt;code&gt;rundll32.exe&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuhjldj31jzfvmt8x6r2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuhjldj31jzfvmt8x6r2.png" alt="WSC detects malicious use of certutil" width="800" height="586"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgbbg42ituo28v1200kg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvgbbg42ituo28v1200kg.png" alt="Using Invoke-WebRequest to download malicious file" width="800" height="206"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxc14ycx1vz0s78wnf9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxc14ycx1vz0s78wnf9x.png" alt="Executing the malicious file using rundll32" width="800" height="555"&gt;&lt;/a&gt;  &lt;/p&gt;




&lt;h3&gt;
  
  
  4.3 Blue-Team Activities
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Sysmon Event ID 1&lt;/strong&gt; (Process Creation) revealed the suspicious process:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CommandLine&lt;/code&gt; → shows &lt;code&gt;rundll32.exe&lt;/code&gt; loading a DLL from &lt;strong&gt;Desktop&lt;/strong&gt; (unusual).
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ParentProcess&lt;/code&gt; → &lt;code&gt;cmd.exe&lt;/code&gt;, confirming it was manually launched.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;User&lt;/code&gt; &amp;amp; &lt;code&gt;IntegrityLevel&lt;/code&gt; → shows who executed it and privilege level.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Hashes&lt;/code&gt; → defenders can track the specific DLL in the future.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayttdgsmsf24q36po3vv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayttdgsmsf24q36po3vv.png" alt="Sysmon EVENT 1 log details" width="800" height="532"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Fields to Watch in Event ID 1:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Image&lt;/strong&gt; → &lt;code&gt;C:\Windows\System32\rundll32.exe&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CommandLine&lt;/strong&gt; → &lt;code&gt;rundll32.exe C:\Users\testuser1\Desktop\Hello.dll,HelloExport&lt;/code&gt; (suspicious location)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CurrentDirectory&lt;/strong&gt; → &lt;code&gt;C:\Users\testuser1\Desktop\&lt;/code&gt; (should normally be &lt;code&gt;System32&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt; → &lt;code&gt;ANNU\testuser1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ParentImage&lt;/strong&gt; → &lt;code&gt;cmd.exe&lt;/code&gt; (manual execution chain)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hashes&lt;/strong&gt; → unique fingerprint (can be checked in VirusTotal)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IntegrityLevel&lt;/strong&gt; → &lt;code&gt;High&lt;/code&gt; (ran with elevated permissions)
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  5. Conclusion
&lt;/h2&gt;

&lt;p&gt;LOLBins highlight a critical reality in modern security: attackers don’t always need to bring their own tools. By abusing trusted binaries like &lt;code&gt;rundll32.exe&lt;/code&gt;, they can execute arbitrary code, evade detection, and blend into normal activity.  &lt;/p&gt;

&lt;p&gt;Even a harmless “Hello World” DLL shows how dangerous this technique can be if swapped for real malware.  &lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;For defenders&lt;/strong&gt;: monitor command-line arguments, parent-child processes, and execution paths (like DLLs from user directories). Understanding these abuse cases helps red teams demonstrate risk and blue teams detect attacks.  &lt;/p&gt;

</description>
      <category>lolbins</category>
      <category>cybersecurity</category>
      <category>sysmon</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Lab Setup: Using SOCKS Proxies, ProxyChains, and SSH Dynamic Port Forwarding</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Fri, 15 Aug 2025 05:43:38 +0000</pubDate>
      <link>https://forem.com/itsmegsg/lab-setup-using-socks-proxies-proxychains-and-ssh-dynamic-port-forwarding-1i5c</link>
      <guid>https://forem.com/itsmegsg/lab-setup-using-socks-proxies-proxychains-and-ssh-dynamic-port-forwarding-1i5c</guid>
      <description>&lt;p&gt;&lt;em&gt;Meta Description:&lt;/em&gt; Step-by-step SOCKS proxy lab setup with SSH dynamic port forwarding, ProxyChains integration, and real pentesting scenarios with screenshots.&lt;/p&gt;

&lt;p&gt;LAB SETUP for achieving SOCKS PROXY&lt;/p&gt;

&lt;h2&gt;
  
  
  Networking setup
&lt;/h2&gt;

&lt;p&gt;I have 3 VMs with multiple virtual network adaptors in each. I have explained them briefly here:&lt;/p&gt;

&lt;p&gt;a.      Kali (Attacker)&lt;/p&gt;

&lt;p&gt; ├─ eth0: 192.168.56.x  → Host-only network that can talk to Ubuntu&lt;/p&gt;

&lt;p&gt; └─ eth1: 10.0.2.x      → NAT ( For Internet)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqr6k0vfwn5ck5n6c5gim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqr6k0vfwn5ck5n6c5gim.png" alt="Network setup in the attacker machine" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;b.     Ubuntu (Jump Host)&lt;/p&gt;

&lt;p&gt;  ├─ enp0s3: 192.168.56.x  → Host-only network with Kali&lt;/p&gt;

&lt;p&gt;    └─ enp0s8: 10.10.20.1    → Internal network that can talk to Windows   machine&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyrt19qq76w86c6rqa3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyrt19qq76w86c6rqa3f.png" alt="Network setup in the pivot machine" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;c.      Windows Server 2019 (Target)&lt;/p&gt;

&lt;p&gt;    └─ NIC: 10.10.20.x  → Internal network with Ubuntu&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;-SSH is installed &amp;amp; enabled in both Ubuntu &amp;amp; Kali.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the SOCKS proxy from my attacker machine (KALI)
&lt;/h2&gt;

&lt;p&gt;What ssh -D does&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The -D [port] option sets up dynamic port forwarding.&lt;/li&gt;
&lt;li&gt;SSH listens on a local port (e.g., 127.0.0.1:1080).&lt;/li&gt;
&lt;li&gt;That port speaks SOCKS protocol (SOCKS4 or SOCKS5 depending on your client request).&lt;/li&gt;
&lt;li&gt;Any program that supports SOCKS can send traffic to this port.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SSH then forwards that traffic over the encrypted SSH connection to the remote host, which then connects to the destination server on your behalf.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffx5eatjkjzrnayw6xw7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffx5eatjkjzrnayw6xw7v.png" alt="Initiating SSH 'D' dynamic port" width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using nmap scans to scan the windows machine from my Kali. Remember, Kali cannot ping/reach the windows machine directly.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvved3jz842fxrb87g248.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvved3jz842fxrb87g248.png" alt="Using nmap with proxychains" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  SOCKS in comparison to SSH Local port forwarding.
&lt;/h2&gt;

&lt;p&gt;a. When local port forwarding is used you cannot use any other port other than the one for which port forwarding is setup. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2rgd7drortzyru8z4e1d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2rgd7drortzyru8z4e1d.png" alt="Setting up LPF using SSH" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcrtvx52jn37qldpkhh9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcrtvx52jn37qldpkhh9z.png" alt="LPF is able to access only that port through which it was setup" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;b. Whereas using socks “D” dynamic port forwarding makes every port accessible from the Kali.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr3pp6u9pd87khx08vssg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr3pp6u9pd87khx08vssg.png" alt="SOCKS proxy accessing more than one port" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Combining proxychains with SOCKS
&lt;/h2&gt;

&lt;p&gt;Here I have used proxychains to do a nmap scan of the otherwise unreachable host. Also, I have shown that ICMP pings are not proxied because ProxyChains only supports TCP connections. This is why the ping test fails even when other tools work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqz5sblpzkr4ec7qyol5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqz5sblpzkr4ec7qyol5.png" alt="Using nmap with proxychains" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>socks</category>
      <category>networking</category>
      <category>cybersecurity</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Top Tools and Applications That Support SOCKS5 Proxies</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Fri, 15 Aug 2025 05:43:17 +0000</pubDate>
      <link>https://forem.com/itsmegsg/top-tools-and-applications-that-support-socks5-proxies-n3o</link>
      <guid>https://forem.com/itsmegsg/top-tools-and-applications-that-support-socks5-proxies-n3o</guid>
      <description>&lt;p&gt;&lt;em&gt;Meta Description:&lt;/em&gt; Explore popular tools and applications that support SOCKS5 proxies, including browsers, SSH tunnels, Tor, and penetration testing frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools and Applications That Use SOCKS5 Proxies
&lt;/h2&gt;

&lt;p&gt;Finally, let’s look at some common tools, services, and applications that leverage SOCKS5 proxies. Knowing these will help you recognize where SOCKS proxies can fit into your workflow or network design:&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Web Browsers:&lt;/strong&gt; Most web browsers support SOCKS proxies. For example, Mozilla Firefox and Google Chrome can be configured to use a SOCKS5 proxy for all web traffic. This is useful for quickly testing a website through a proxy or routing browsing activity via an anonymizing network. A common scenario is setting your browser’s proxy to 127.0.0.1:9050 (Tor’s local SOCKS proxy) to route all traffic through the Tor network for anonymity. Browser extensions like &lt;strong&gt;FoxyProxy&lt;/strong&gt; make it easy to switch proxies on the fly (e.g., toggling between a Burp Suite proxy and a SOCKS pivot proxy as described in some dev.to tutorials).&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;OpenSSH (SSH Dynamic Port Forwarding):&lt;/strong&gt; The ssh client has a built-in option -D  that opens a local SOCKS5 proxy on the specified port. This is a fantastic tool for admins and pentesters. By running ssh -D 1080 [user]@[jumpbox], you create a SOCKS5 proxy at localhost:1080 that tunnels through your SSH connection to the remote host. No special software needed — you’re effectively using SSH as an encrypted SOCKS VPN. Many people use this trick to access internal networks or even to securely browse the internet via their home server when on untrusted Wi-Fi.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Tor (The Onion Router)&lt;/strong&gt;: Tor is an anonymity network that routes traffic through multiple encrypted relays. Importantly, the Tor client itself exposes a &lt;strong&gt;SOCKS5 proxy interface&lt;/strong&gt; on your machine (by default on port 9050). Applications that want to use Tor simply point their traffic to this local SOCKS5 proxy. Tools like ProxyChains often use this, and even the Tor Browser internally uses the SOCKS proxy to send your web requests into the Tor network. So while Tor is much more than just a single proxy, from the user’s perspective it behaves as a local SOCKS5 proxy that gives you access to the entire Tor network.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;ProxyChains and ProxyCap/Proxifier:&lt;/strong&gt; We discussed ProxyChains on Linux. On Windows, &lt;strong&gt;Proxifier&lt;/strong&gt; and &lt;strong&gt;ProxyCap&lt;/strong&gt; are popular GUI tools that allow you to force applications to use a proxy (they can work with SOCKS5). These tools are used in environments where an application doesn’t natively support proxies. For instance, if a particular corporate app has no proxy settings but you need it to go through a SOCKS proxy, Proxifier can intercept its traffic and redirect it. Proxifier supports SOCKS5, SOCKS4, HTTP proxies, etc., and can apply rules for which traffic to proxy.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Shadowsocks:&lt;/strong&gt; &lt;strong&gt;Shadowsocks&lt;/strong&gt; is an open-source encrypted proxy project widely used to bypass censorship (notably in countries with heavy internet filtering). Technically, Shadowsocks is a secure SOCKS5 proxy: you run a Shadowsocks client locally which provides a SOCKS5 proxy interface, and it encrypts and relays traffic to a Shadowsocks server elsewhere. Because it uses encryption and can often evade detection, it’s used as a lightweight alternative to VPNs. For our purposes, it’s an example of a tool built on the SOCKS5 protocol, extending it with encryption.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Metasploit and C2 Frameworks:&lt;/strong&gt; Many penetration testing frameworks have features to create SOCKS proxies for pivoting. For instance, &lt;strong&gt;Metasploit&lt;/strong&gt; can deploy a SOCKS4a proxy on a compromised host (via meterpreter) – allowing the attacker to route tools through that host. Other red-team C2 platforms (Cobalt Strike, etc.) also offer SOCKS proxy modules. While these might not be user-facing “tools you run,” it’s good to be aware that under the hood they are using the SOCKS protocol for providing pivoting infrastructure.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Chisel and SSHuttle:&lt;/strong&gt; These are tools for creating tunnels and pivots. &lt;strong&gt;Chisel&lt;/strong&gt; is described as “a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.” In practice, one of Chisel’s common use modes is to create a SOCKS5 proxy to pivot into a network (similar to SSH -D but using the Chisel client/server). &lt;strong&gt;SSHuttle&lt;/strong&gt; is another tool that transparently tunnels traffic (often compared to a poor man’s VPN), but conceptually it’s doing a similar job. These tools often go hand-in-hand with ProxyChains — for example, a pen-tester might run Chisel to establish a SOCKS proxy through a compromised host, then configure ProxyChains to use that SOCKS proxy, enabling all their tools to work through the new tunnel.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;BitTorrent and Other P2P Clients:&lt;/strong&gt; Many BitTorrent clients (uTorrent, qBittorrent, Vuze, etc.) allow configuration of a SOCKS5 proxy for all peer communications. Users concerned about exposing their IP on P2P networks use this to funnel torrent traffic through a proxy (often one provided by a VPN service). SOCKS5 is ideal since it supports UDP (used by torrent trackers and the DHT system) – something HTTP proxies can’t do – and doesn’t modify data (ensuring the torrent protocol functions correctly). Keep in mind, this hides your IP from other peers, but unless the proxy itself is encrypted or combined with a VPN, your ISP can still detect that you’re torrenting.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Automation Tools and APIs:&lt;/strong&gt; Various programming languages and tools have native support for SOCKS. For example, Python’s requests library or Node.js can often be configured to use a SOCKS proxy for outgoing connections. This is useful when writing scripts that need to scrape websites, test from different network vantage points, or connect through intermediate hops. Even cURL supports SOCKS5 (--socks5 flag) which is handy for quick tests. Many QA teams use these to simulate traffic from different IPs or to test failover via backup proxies.&lt;/p&gt;

&lt;p&gt;In essence, any time you need a &lt;strong&gt;generic, flexible proxy solution&lt;/strong&gt;, SOCKS5 is the go-to, and there’s a rich ecosystem of tools that support it. Cybersecurity professionals, in particular, should be comfortable with setting up and using SOCKS proxies and tools like ProxyChains, because they are invaluable for safe reconnaissance, controlled exploitation, and accessing segregated networks during engagements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; SOCKS proxies might not be as commonly discussed as VPNs or HTTP proxies in everyday life, but in technical circles (especially networking and security) they are extremely useful. We started with the basics – a SOCKS proxy is a middleman that relays traffic without caring what that traffic is – and then delved into how that simple concept enables a wide range of advanced uses from pentest pivoting to anonymous browsing. We compared SOCKS with other proxies and VPNs, highlighting where each shines. Armed with this understanding, you should be able to identify when a SOCKS5 proxy could help in your work, configure one (perhaps with a quick ssh -D or a proxy service), and integrate it with tools like ProxyChains for maximum effect. Happy proxying!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next:&lt;/strong&gt; &lt;a href="https://dev.to/saravana_gautham_g/lab-setup-using-socks-proxies-proxychains-and-ssh-dynamic-port-forwarding-1i5c"&gt;Part 6 – Lab Setup: Using SOCKS Proxies, ProxyChains, and SSH Dynamic Port Forwarding&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>networking</category>
      <category>socks</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Proxy Chaining Explained: Using ProxyChains for Stealth and Pivoting in Pen-Testing</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Fri, 15 Aug 2025 05:42:41 +0000</pubDate>
      <link>https://forem.com/itsmegsg/proxy-chaining-explained-using-proxychains-for-stealth-and-pivoting-in-pen-testing-8dd</link>
      <guid>https://forem.com/itsmegsg/proxy-chaining-explained-using-proxychains-for-stealth-and-pivoting-in-pen-testing-8dd</guid>
      <description>&lt;p&gt;&lt;em&gt;Meta Description:&lt;/em&gt; Understand proxy chaining and learn how ProxyChains routes traffic through multiple proxies for stealth, anonymity, and pentest pivoting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proxy Chaining and &lt;strong&gt;ProxyChains&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You might have noticed that using a single proxy still leaves a single point of exposure (the proxy itself sees your info). To further increase anonymity or to navigate through multiple network hops, people use &lt;strong&gt;proxy chaining&lt;/strong&gt; – connecting through &lt;em&gt;multiple&lt;/em&gt; proxies in series. The idea of &lt;strong&gt;proxy chaining&lt;/strong&gt; is that your traffic goes through &lt;strong&gt;one proxy after another&lt;/strong&gt; (potentially in different locations or networks) before reaching the destination. For example, your data might go from your computer -&amp;gt; Proxy A -&amp;gt; Proxy B -&amp;gt; Proxy C -&amp;gt; target server. Each proxy only sees the IP of the previous hop, not your original IP, which makes tracing back to you more difficult. This layered approach is similar in spirit to how Tor routes traffic through multiple relays. In fact, using Tor &lt;em&gt;with&lt;/em&gt; other proxies is an example of proxy chaining (often called Tor-over-VPN, VPN-over-Tor, etc., depending on order).&lt;/p&gt;

&lt;p&gt;In practice, setting up a chain of proxies manually can be tedious. This is where the popular tool &lt;strong&gt;ProxyChains&lt;/strong&gt; comes in. &lt;strong&gt;ProxyChains&lt;/strong&gt; (specifically the updated &lt;em&gt;proxychains-ng&lt;/em&gt;) is a program that &lt;em&gt;forces any application’s TCP connections through a series of proxies&lt;/em&gt; by hooking network calls. You configure ProxyChains with a list of proxies (SOCKS4, SOCKS5, or HTTP) and a chaining mode (strict, dynamic, random, etc.), and then you prefix your application command with proxychains. The tool will ensure that the app’s traffic is redirected through the proxies in the chain you defined.&lt;/p&gt;

&lt;p&gt;For example, many penetration testers configure ProxyChains to use &lt;strong&gt;Tor’s SOCKS5 proxy (127.0.0.1:9050)&lt;/strong&gt; as the last link in the chain, possibly preceded by other proxies, to combine anonymity networks with their own hops. With ProxyChains, you could run: proxychains nmap -sT target.com and have your Nmap scan traffic go through, say, a SOCKS proxy on a compromised host and then out through the Tor network. This dramatically increases anonymity (though also increases latency) and can help bypass egress restrictions. As another example, if you set up an SSH dynamic SOCKS proxy to a jump box (as described earlier), you can add socks5 127.0.0.1 1080 (or whatever port) to ProxyChains’ config. Then running proxychains firefox would route your browser through the SSH tunnel into the network where the jump box resides, allowing you to browse internal sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key points about ProxyChains:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;·         Instead of a single proxy, it &lt;strong&gt;connects many proxies in series&lt;/strong&gt; (hence "chains"). You can chain proxies of different types. By default, it often includes Tor as one proxy (since Tor itself is a network of proxies, this becomes a multi-layer chain).&lt;/p&gt;

&lt;p&gt;·         This greatly increases anonymity because an adversary would have to trace through multiple providers/jurisdictions to find the origin. It also &lt;strong&gt;helps evade simple IP-based blocking&lt;/strong&gt;, as your apparent source IP can rotate or be from an expected network.&lt;/p&gt;

&lt;p&gt;·         ProxyChains is &lt;strong&gt;commonly used in penetration testing&lt;/strong&gt; to &lt;strong&gt;mask the source of attacks or scans&lt;/strong&gt;. It can also help testers bypass outbound firewall rules by bouncing through intermediate hosts that have access. For example, if a target network only allows HTTP out, you might compromise a web server inside and use it as a SOCKS pivot; then ProxyChains can route your attack tools through that pivot.&lt;/p&gt;

&lt;p&gt;·         The tool supports &lt;strong&gt;TCP connections only&lt;/strong&gt;, which is usually fine because most applications (except ICMP ping, some UDP services, etc.) use TCP. It &lt;em&gt;can&lt;/em&gt; handle DNS queries by sending them through the SOCKS proxy as UDP (to avoid DNS leaks), which is important when using something like Tor (you don’t want to do DNS lookups outside the proxy chain).&lt;/p&gt;

&lt;p&gt;·         ProxyChains allows different chaining strategies:&lt;/p&gt;

&lt;p&gt;·         &lt;em&gt;Strict chain&lt;/em&gt; (use proxies in a fixed order exactly as listed),&lt;/p&gt;

&lt;p&gt;·         &lt;em&gt;Dynamic chain&lt;/em&gt; (skip dead proxies in the sequence),&lt;/p&gt;

&lt;p&gt;·         &lt;em&gt;Random chain&lt;/em&gt; or &lt;em&gt;Round-robin&lt;/em&gt; (to vary the order). This flexibility can balance between reliability and anonymity.&lt;/p&gt;

&lt;p&gt;·         It’s &lt;strong&gt;easy to use&lt;/strong&gt; on Linux: many pentesting distros like Kali have proxychains-ng preinstalled. On Windows, ProxyChains isn’t natively available, but alternatives like &lt;strong&gt;Proxifier&lt;/strong&gt; serve a similar purpose.&lt;/p&gt;

&lt;p&gt;In summary, &lt;strong&gt;proxy chaining&lt;/strong&gt; is a technique for enhancing anonymity or navigating complex network paths by using multiple proxies. &lt;strong&gt;ProxyChains (tool)&lt;/strong&gt; is a convenient way to implement this for your applications without needing each app to support proxies individually. Cybersecurity professionals often rely on ProxyChains when they need to route tool traffic through multiple hops – for example, chaining a corporate HTTP proxy with an external SOCKS proxy, or chaining a compromised host’s SOCKS proxy with Tor for anonymized exploitation traffic.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world note:&lt;/em&gt; A classic use of ProxyChains in pentesting is to put socks5 127.0.0.1 9050 (Tor) at the end of your chain in &lt;strong&gt;/etc/proxychains.conf&lt;/strong&gt;, ensuring all tool traffic goes through Tor. With Tor running and ProxyChains configured, you can route, for instance, your SQLMap or Metasploit traffic through multiple Tor nodes — greatly obscuring attribution (at the cost of speed).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next:&lt;/strong&gt; &lt;a href="https://dev.to/saravana_gautham_g/top-tools-and-applications-that-support-socks5-proxies-n3o"&gt;Part 5 – Tools and Applications That Support SOCKS5 Proxies&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>sysadmin</category>
      <category>socks</category>
      <category>networking</category>
    </item>
    <item>
      <title>Real-World SOCKS Proxy Use Cases for Cybersecurity and Network Administration</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Fri, 15 Aug 2025 05:42:17 +0000</pubDate>
      <link>https://forem.com/itsmegsg/real-world-socks-proxy-use-cases-for-cybersecurity-and-network-administration-1h3f</link>
      <guid>https://forem.com/itsmegsg/real-world-socks-proxy-use-cases-for-cybersecurity-and-network-administration-1h3f</guid>
      <description>&lt;p&gt;&lt;em&gt;Meta Description:&lt;/em&gt; Discover real-world SOCKS proxy use cases, from penetration testing pivots to bypassing firewalls, boosting privacy, and improving network speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Use Cases for SOCKS Proxies
&lt;/h2&gt;

&lt;p&gt;SOCKS proxies have a variety of applications in the real world, especially in cybersecurity and network administration contexts. These scenarios highlight where SOCKS proxies outperform traditional proxies and why they’ve become a staple in penetration testing toolkits. Here are some common use cases and scenarios where SOCKS proxies are useful:&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Bypassing Firewalls and Network Restrictions:&lt;/strong&gt; SOCKS proxies are often used to &lt;strong&gt;tunnel out of restricted networks&lt;/strong&gt;. For example, in a corporate or school environment where certain sites or services are blocked, a SOCKS5 proxy can help route traffic to an outside server that isn’t blocked, effectively bypassing the firewall. Because SOCKS can carry any protocol, it’s ideal for circumventing more restrictive filters that go beyond just web filtering. &lt;em&gt;(Of course, use this only where it’s permitted!)&lt;/em&gt; In some cases, administrators themselves set up SOCKS proxies on bastion hosts to allow controlled external access without opening raw network access.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Anonymity and Privacy:&lt;/strong&gt; Simply hiding your IP address can grant a degree of anonymity for everyday browsing or specific tasks. A SOCKS proxy will mask your IP so that the target service sees the proxy’s IP instead. People use SOCKS5 proxies (often in combination with tools like Tor) to &lt;strong&gt;anonymize their web traffic or scanner traffic&lt;/strong&gt; during penetration testing. Unlike HTTP proxies, SOCKS proxies support a wider variety of traffic, allowing you to stay anonymous even for non-web activities. For instance, a penetration tester could run scanning tools through a SOCKS proxy so the scans appear to come from another location, helping avoid easy tracing.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Penetration Testing &amp;amp; Pivoting:&lt;/strong&gt; In cybersecurity assessments, after gaining access to one machine in a network, attackers/testers often set up a SOCKS proxy on the compromised host to &lt;strong&gt;pivot&lt;/strong&gt; deeper into the network. The compromised host (or a jump server) acts as a pivot proxy, allowing the tester’s tools to connect through it to reach internal systems that were not directly accessible. Using a SOCKS proxy for pivoting lets the tester run tools like nmap, RDP clients, browsers, etc., as if they were inside the target network. This technique is invaluable for &lt;strong&gt;red teams and OSCP students&lt;/strong&gt;: for example, compromise one machine, turn it into a SOCKS proxy, and route all further attacks through that to hit other internal hosts – all transparently via ProxyChains or similar. It’s much more flexible than trying to forward individual ports; a SOCKS proxy on a pivot can forward &lt;em&gt;any&lt;/em&gt; port to &lt;em&gt;any&lt;/em&gt; host in the internal network as needed. I have simulated this and explained it with screenshots in the &lt;strong&gt;&lt;em&gt;LAB SECTION&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Accessing Internal Resources (Jump Hosts):&lt;/strong&gt; Even outside of malicious scenarios, SOCKS proxies are useful for administrators. Consider a secure network where direct access is blocked. An admin might SSH into a bastion host and use &lt;strong&gt;dynamic port forwarding (SSH&lt;/strong&gt; &lt;strong&gt;-D&lt;/strong&gt; &lt;strong&gt;option) to create a SOCKS5 proxy&lt;/strong&gt; on their local machine that tunnels through the SSH connection. This allows the admin to use their local web browser (or API client, etc.) to access an internal web interface or service by simply pointing it to the local SOCKS proxy. In effect, you’re browsing from the perspective of the remote network, all while using your local tools. This is much simpler than setting up a full VPN in many cases and doesn’t require special privileges on the intermediate server beyond SSH.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Web Scraping and Automation:&lt;/strong&gt; SOCKS proxies are popular in web scraping because of their flexibility. A scraper might need to fetch not just standard HTTP pages, but also handle things like CAPTCHA solving services or FTP downloads. SOCKS5 proxies can be used to &lt;strong&gt;rotate through different IP addresses&lt;/strong&gt; (for example, via proxy pools) to avoid IP-based blocking. Because they don’t alter data, they work seamlessly with HTTPS and other protocols that scrapers might encounter. Many web scraping providers offer SOCKS5 proxy endpoints for clients to use.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Peer-to-Peer, Torrenting, and Streaming:&lt;/strong&gt; A lot of P2P applications (like BitTorrent clients) support SOCKS5 proxies. The reasoning is that you can hide your IP from other peers or trackers by relaying traffic through a proxy, without losing functionality. SOCKS5 is well-suited here because it supports UDP (important for tracker communications and peer discovery in torrents) and doesn’t interfere with the data packets. Additionally, if using a proxy from a VPN provider (like some VPN services provide a SOCKS5 proxy endpoint), it can sometimes give better speeds than a full VPN for torrenting since only the torrent traffic goes through it and possibly with less encryption overhead. &lt;em&gt;Note:&lt;/em&gt; While a SOCKS proxy can hide your IP on P2P networks, remember it doesn’t encrypt the traffic – your ISP could still detect torrenting activity, so some users combine this with a VPN or only torrent over HTTPS connections.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Improving Network Performance or Latency:&lt;/strong&gt; In some scenarios, a proxy might improve performance. For example, gamers have used SOCKS proxies to connect through servers that route traffic more optimally to game servers, potentially reducing latency. Also, by masking your traffic’s true origin, you might avoid certain ISP throttling (some ISPs throttle specific protocols or sites; routing through a proxy can make the traffic type less obvious). A SOCKS proxy, being lightweight, is a good choice here over a VPN if you only care about the performance aspect.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Testing from Different Geographic Locations:&lt;/strong&gt; If you want to test how a service behaves from another country (perhaps it’s geo-restricted or has different content), you can use a SOCKS proxy server located in that region. This is commonly done for QA of web services and apps. SOCKS proxies are handy because you can test not just web but any networked application from that perspective. For example, an API call from your software, DNS resolution, etc., can all be tested via a SOCKS proxy in another region. Some QA and monitoring tools integrate SOCKS proxies to simulate requests from various IPs.&lt;/p&gt;

&lt;p&gt;As you can see, SOCKS proxies fill a lot of niches but important roles. They are like multi-purpose tunnels that can be employed wherever flexibility and routing of traffic is needed without application-level smarts. For cybersecurity professionals, they are everyday tools—whether it’s for hiding your identity during recon, pivoting in a network, or simply getting around an obstacle during an engagement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next:&lt;/strong&gt; &lt;a href="https://dev.to/saravana_gautham_g/proxy-chaining-explained-using-proxychains-for-stealth-and-pivoting-in-pen-testing-8dd"&gt;Part 4 – Proxy Chaining &amp;amp; ProxyChains&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>socks</category>
      <category>networking</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>SOCKS4 vs SOCKS5: Key Differences, Security Features, and Comparisons with HTTP &amp; VPN</title>
      <dc:creator>itsmegsg</dc:creator>
      <pubDate>Fri, 15 Aug 2025 05:41:52 +0000</pubDate>
      <link>https://forem.com/itsmegsg/socks4-vs-socks5-key-differences-security-features-and-comparisons-with-http-vpn-38c2</link>
      <guid>https://forem.com/itsmegsg/socks4-vs-socks5-key-differences-security-features-and-comparisons-with-http-vpn-38c2</guid>
      <description>&lt;p&gt;&lt;em&gt;Meta Description:&lt;/em&gt; Compare SOCKS4 and SOCKS5 proxies, their key features, and how they stack up against HTTP proxies and VPNs in security and flexibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  SOCKS4 vs SOCKS5: Proxy Versions
&lt;/h2&gt;

&lt;p&gt;Over time, the SOCKS protocol has evolved. &lt;strong&gt;SOCKS4&lt;/strong&gt; and &lt;strong&gt;SOCKS5&lt;/strong&gt; are the two main versions, with SOCKS5 being the more advanced and widely used today. Both versions serve the same basic purpose, but there are important differences in features and capabilities:&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Protocol Support:&lt;/strong&gt; SOCKS4 supports only TCP connections. SOCKS5 supports &lt;strong&gt;both TCP and UDP&lt;/strong&gt; traffic. UDP support in SOCKS5 is crucial for applications like DNS queries, certain games, VoIP, and other UDP-based protocols which SOCKS4 cannot handle.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;DNS Resolution:&lt;/strong&gt; SOCKS4 clients must resolve domain names themselves (sending the proxy an IP address), whereas &lt;strong&gt;SOCKS5 can perform DNS resolution on behalf of the client&lt;/strong&gt;. This means with SOCKS5, you can send a domain name through the proxy and let the proxy resolve it. This is safer for privacy (preventing DNS leaks) and useful behind firewalls – the target domain name is not exposed to local network DNS servers.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Authentication:&lt;/strong&gt; SOCKS4 has very minimal authentication (it essentially trusts clients based on IP or not at all). &lt;strong&gt;SOCKS5 supports various authentication methods&lt;/strong&gt;, including plain username/password and GSSAPI for secure authentication. This allows a SOCKS5 server to restrict access to authorized users.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;IPv6 support:&lt;/strong&gt; SOCKS4 was designed for IPv4 only. &lt;strong&gt;SOCKS5 supports IPv6&lt;/strong&gt; in addition to IPv4, as well as domain name addresses.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Proxy chaining:&lt;/strong&gt; SOCKS5 introduced support for proxy chaining (the ability to route from one proxy to another) as well as &lt;strong&gt;better support for working through firewalls&lt;/strong&gt; (because of UDP and remote DNS capabilities). In practice, proxy chaining is often implemented by client software (or by running one SOCKS proxy through another), but SOCKS5 was designed with this flexibility in mind.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Security:&lt;/strong&gt; By itself, SOCKS is not an encrypted protocol. However, &lt;strong&gt;SOCKS5 allows encryption at the authentication stage and can be used in conjunction with secure tunneling&lt;/strong&gt;. For example, running a SOCKS5 proxy over SSH (which &lt;em&gt;is&lt;/em&gt; encrypted) is a common way to get an encrypted SOCKS tunnel. SOCKS5’s support for authentication and its flexibility makes it more secure than SOCKS4 when properly deployed. (Note that statements about SOCKS5 “encryption” usually refer to these added layers or to specific implementations like SSH or SSL tunneling; the SOCKS5 protocol itself does not encrypt the payload of your traffic).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bottom line:&lt;/strong&gt; SOCKS5 is a &lt;strong&gt;significant upgrade&lt;/strong&gt; over SOCKS4 and is the de-facto standard today (even though SOCKS5 has existed since 1996). It provides greater versatility and security features. One source sums it up well: SOCKS4 is basic and legacy (TCP only, no auth, no DNS relay), whereas &lt;strong&gt;SOCKS5 “improves on nearly every aspect of SOCKS4”&lt;/strong&gt; – adding UDP support, authentication, remote DNS, IPv6, etc. Unless you’re dealing with a very old system that only knows SOCKS4, you’ll likely be using SOCKS5 for modern applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  SOCKS Proxy vs HTTP Proxy (and Other Proxies)
&lt;/h2&gt;

&lt;p&gt;It’s useful to compare SOCKS proxies with the more familiar &lt;strong&gt;HTTP proxies&lt;/strong&gt; (and by extension, HTTPS proxies) since both are commonly used but in different scenarios.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Layer &amp;amp; Protocol:&lt;/strong&gt; An &lt;strong&gt;HTTP proxy&lt;/strong&gt; operates at the application layer (Layer 7 of OSI) and understands HTTP(S) protocol. It can only handle web traffic (HTTP/HTTPS requests). In contrast, a &lt;strong&gt;SOCKS proxy operates at the session layer (Layer 5)&lt;/strong&gt; and is &lt;strong&gt;agnostic to the traffic type&lt;/strong&gt;. This means an HTTP proxy &lt;strong&gt;only&lt;/strong&gt; works for web browsing (and other apps that specifically speak HTTP), whereas a SOCKS proxy can carry &lt;em&gt;any&lt;/em&gt; protocol (web, FTP, SMTP, peer-to-peer, etc.) because it doesn’t need to know the details of that traffic. For example, you couldn’t use an HTTP-only proxy to forward a Skype call or a torrent stream, but you can do that with a SOCKS proxy.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Data Handling:&lt;/strong&gt; Because an HTTP proxy &lt;strong&gt;understands the HTTP protocol&lt;/strong&gt;, it can read and even modify the content of web requests and responses. This allows for features like content filtering, caching, and scanning for malware in HTTP traffic. A company or school might use an HTTP proxy to block certain websites or cache frequently accessed pages. A SOCKS proxy, on the other hand, &lt;strong&gt;does not interpret the data&lt;/strong&gt; it’s carrying. It will not modify your traffic or cache it. This makes SOCKS proxies simpler “pipe-like” proxies – great for flexibility and speed, but they &lt;strong&gt;don’t provide caching or content filtering&lt;/strong&gt; on their own.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Performance:&lt;/strong&gt; Generally, SOCKS proxies have less overhead. Since they don’t inspect or manipulate traffic at the application level, they tend to be &lt;strong&gt;faster for raw data transfer&lt;/strong&gt; and introduce minimal latency. HTTP proxies, while potentially adding value through caching or filtering, involve more processing per packet. For tasks like large downloads, streaming, or gaming, a SOCKS5 proxy might offer better throughput or lower latency than an HTTP proxy because it’s not bogging down inspecting the payload. One source notes that SOCKS proxies “operate at a lower level and do not need to understand or process the data,” making them &lt;strong&gt;faster for simple data transfer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;·         &lt;strong&gt;Use Cases:&lt;/strong&gt; If your goal is to &lt;strong&gt;filter or log web activity&lt;/strong&gt; (say, in a corporate environment or parental control setting), an HTTP proxy is suitable because it can look into the content (e.g., URLs, headers) and enforce rules. If your goal is to &lt;strong&gt;tunnel various types of traffic or bypass restrictions&lt;/strong&gt; without caring about content, SOCKS is often the better choice. For instance, a SOCKS proxy can tunnel &lt;strong&gt;non-HTTP traffic through firewalls&lt;/strong&gt; by piggybacking on allowed ports. It’s common to use SOCKS when you need a generic solution that “just passes bytes” – for example, routing email or database connections through a proxy – tasks an HTTP proxy cannot do.&lt;/p&gt;

&lt;p&gt;In summary, &lt;strong&gt;HTTP proxies&lt;/strong&gt; are specialized for web traffic and can enforce web-related policies (but can’t handle other protocols), while &lt;strong&gt;SOCKS proxies&lt;/strong&gt; are generalists that will proxy &lt;strong&gt;almost anything&lt;/strong&gt; but don’t offer protocol-specific features. Many providers and tools support both. Often, &lt;strong&gt;cybersecurity pros use SOCKS5 proxies when they need to route &lt;em&gt;arbitrary traffic&lt;/em&gt; (not just web) through intermediate hosts&lt;/strong&gt;, especially in penetration testing or network troubleshooting scenarios where multiple protocols might be in play.&lt;/p&gt;

&lt;h2&gt;
  
  
  SOCKS Proxy vs VPN
&lt;/h2&gt;

&lt;p&gt;Because both SOCKS proxies and VPNs can hide your IP address and help bypass network restrictions, it’s worth clarifying how they differ:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encryption and Security:&lt;/strong&gt; The biggest difference is that a &lt;strong&gt;VPN (Virtual Private Network) encrypts all your traffic&lt;/strong&gt; between your device and the VPN server, whereas a &lt;strong&gt;SOCKS proxy does not encrypt traffic by itself&lt;/strong&gt;. A VPN creates an encrypted tunnel at the network level (often using protocols like OpenVPN, WireGuard, IPsec, etc.), which means anyone intercepting your connection (e.g. your ISP) cannot see the contents &lt;em&gt;or&lt;/em&gt; even the specific destinations of your traffic. In contrast, with a SOCKS proxy, the data packets are not encrypted by the SOCKS protocol – they’re only encapsulated and forwarded. &lt;strong&gt;Anyone monitoring your connection (like a firewall or ISP) can still observe which IPs you are communicating with and potentially read the data (if it’s not otherwise encrypted by the application)&lt;/strong&gt;. This is why, if you use a SOCKS proxy for privacy, you should ideally use it in combination with encryption (for example, using &lt;strong&gt;SSH tunnels&lt;/strong&gt; or running the SOCKS proxy over TLS, or only using it with protocols that are encrypted like HTTPS). In fact, it’s common to &lt;strong&gt;pair SOCKS with other tools&lt;/strong&gt;: for example, using an SSH dynamic port forward (which creates a local SOCKS5 proxy over an encrypted SSH connection) – this gives you the flexibility of SOCKS with the security of SSH encryption. Please read the LAB SECTION to see how I have used SOCKS with SSH dynamic port forward, the commands and execution are pretty simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope (System vs Application):&lt;/strong&gt; A VPN typically captures &lt;em&gt;all&lt;/em&gt; network traffic from your device and routes it through the VPN server (system-wide tunneling). A SOCKS proxy usually needs to be configured per-application (or system-wide via proxy settings or special software) – not all apps will automatically use a SOCKS proxy without configuration. This means a VPN is more of a broad brush (covering everything, which can include DNS, etc.), whereas a SOCKS proxy is more granular (you can point certain programs to it). For example, you might configure your web browser to use a SOCKS5 proxy and keep other traffic direct, whereas with a VPN, your entire device’s traffic is tunneled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; VPNs often come with additional features like &lt;strong&gt;DNS leak protection, kill-switches, split tunneling, etc.&lt;/strong&gt;, and they often use authentication and encryption by design. A standalone SOCKS proxy service is usually more barebones – it’s just a proxy endpoint. Any extra features (like rotation, multiple hops, etc.) have to be managed by the user or a specialized client. SOCKS5 does support &lt;strong&gt;authentication&lt;/strong&gt;, but it won’t, for instance, automatically reconnect if a connection drops (whereas many VPN clients have reconnection or kill-switch features to prevent leaks).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt; Because a SOCKS proxy does not encrypt or deeply inspect traffic, it can be a bit faster in terms of raw throughput and latency. A well-configured SOCKS5 proxy might offer better speeds than a VPN in bandwidth-intensive activities like large downloads, P2P sharing, or online gaming. VPN encryption adds some overhead (though modern VPNs are quite fast with minimal impact for most cases). If you’re very latency-sensitive (e.g. a gamer), using a SOCKS proxy could potentially result in slightly lower ping than using a VPN to a similar location, since the proxy isn’t encrypting/decrypting packets. In fact, some users prefer SOCKS proxies for activities like &lt;strong&gt;torrenting or gaming to maximize speed&lt;/strong&gt;, accepting the trade-off of no encryption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case Distinctions:&lt;/strong&gt; If &lt;strong&gt;privacy and security&lt;/strong&gt; are your primary concerns (for example, evading a censoring regime or preventing any local surveillance), a VPN (or a SOCKS proxy &lt;em&gt;over&lt;/em&gt; a VPN) is generally a more robust solution, since encryption shields your data from prying eyes. If &lt;strong&gt;speed or protocol flexibility&lt;/strong&gt; is the goal (for example, accessing an internal network through a jump box, or speeding up certain connections) and you’re not as worried about encryption (or you have encryption at the application layer), a SOCKS proxy might be preferable. In practice, many power users use both: for instance, they might connect to a VPN, and &lt;em&gt;inside&lt;/em&gt; that, use a SOCKS proxy to reach a specific network segment or service. However, for an average scenario, a reputable VPN service is a more all-in-one privacy solution, whereas SOCKS proxies shine in niche cases or as building blocks in a larger setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next:&lt;/strong&gt; &lt;a href="https://dev.to/saravana_gautham_g/real-world-socks-proxy-use-cases-for-cybersecurity-and-network-administration-1h3f"&gt;Part 3 – Real-World Use Cases for SOCKS Proxies&lt;/a&gt;&lt;/p&gt;

</description>
      <category>socks</category>
      <category>networking</category>
      <category>cybersecurity</category>
      <category>sysadmins</category>
    </item>
  </channel>
</rss>
