<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
>
    <channel>
        <language>en-us</language>
        <title>edwardsploit</title>
        <link>https://edwardsploit.com/</link>
        <atom:link href="https://edwardsploit.com/index.xml" rel="self" type="application/rss&#43;xml" />
        <atom:link href="https://pubsubhubbub.appspot.com/" rel="hub" />

        <description>Research and writeups on cybersecurity and ethical hacking by @edwardsploit.</description><lastBuildDate>Wed, 23 Sep 2026 00:00:00 &#43;0000</lastBuildDate>

        <sy:updatePeriod>hourly</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>
        <item>
            <title>Nmap Basics for Hackers</title><link>https://edwardsploit.com/nmap-basics-for-hacker/</link>
            <guid isPermaLink="true">https://edwardsploit.com/nmap-basics-for-hacker/</guid>
            <dc:creator>edwardsploit</dc:creator><pubDate>Wed, 23 Sep 2026 00:00:00 +0000</pubDate><description/><content:encoded><![CDATA[ <p>Nmap (Network Mapper) is the industry-standard, open-source tool for network discovery and security auditing. This tutorial covers everything from installation to advanced evasion and scripting, structured for both beginners and experienced professionals.</p>
<h2 id="core-concepts--installation">Core Concepts &amp; Installation</h2>
<p>Nmap uses raw IP packets to determine what hosts are available, what services they offer, and what operating systems they run.</p>
<p>Installation (Linux/Ubuntu):</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt install nmap -y</span></span></code></pre></div><p>Installation (Windows/macOS): Download the installer from the official Nmap website or use <code>brew install nmap</code> on macOS.</p>
<h2 id="the-nmap-formula">The Nmap Formula</h2>
<p>A standard Nmap command follows a logical formula. You combine a Target, Scan Type, Port Specification, Detection methods, Timing, Scripts, and Evasion techniques.</p>
<h2 id="target-specification">Target Specification</h2>
<p>Define what you are scanning before you begin:</p>
<ul>
<li>Single IP/Hostname: <code>nmap 192.168.1.1</code> or <code>nmap scanme.nmap.org</code></li>
<li>IP Range: <code>nmap 192.168.1.1-50</code></li>
<li>Subnet (CIDR): <code>nmap 192.168.1.0/24</code></li>
<li>From a File: <code>nmap -iL targets.txt</code></li>
<li>Exclude Hosts: <code>nmap 192.168.1.0/24 --exclude 192.168.1.5</code></li>
</ul>
<h2 id="host-discovery-finding-live-hosts">Host Discovery (Finding Live Hosts)</h2>
<p>Before scanning ports, find which hosts are actually online. This is often the first step in any assessment.</p>
<ul>
<li>Ping Scan (no port scan): <code>nmap -sn 192.168.1.0/24</code> (This is the fastest way to map a network).</li>
<li>Disable Host Discovery (Scan even if down): <code>nmap -Pn 192.168.1.1</code> (Use this if a firewall blocks ping requests).</li>
</ul>
<h2 id="port-scanning-techniques">Port Scanning Techniques</h2>
<p>Nmap&rsquo;s core function is identifying open ports. Different scan types vary in speed, stealth, and reliability.</p>
<ul>
<li><strong>TCP SYN Scan (<code>-sS</code>)</strong>: The default and most popular scan. It is fast and relatively stealthy because it never completes a full TCP connection (half-open scan).</li>
<li><strong>TCP Connect Scan (<code>-sT</code>)</strong>: Uses the full TCP three-way handshake. Use this if you do not have raw packet privileges (e.g., non-root users).</li>
<li><strong>UDP Scan (<code>-sU</code>)</strong>: Essential for services like DNS (53), SNMP (161), and DHCP (67). UDP scanning is slower and less reliable than TCP.</li>
<li><strong>Port Selection</strong>: By default, Nmap scans the top 1000 ports. You can customize this:
<ul>
<li>Specific Ports: <code>-p 80,443</code></li>
<li>Range: <code>-p 1-1000</code></li>
<li>All Ports: <code>-p-</code> (Scans all 65,535 ports).</li>
</ul>
</li>
</ul>
<h2 id="service--os-detection">Service &amp; OS Detection</h2>
<p>Once ports are open, you need to know what is running on them.</p>
<ul>
<li><strong>Version Detection (<code>-sV</code>)</strong>: Probes open ports to determine the service name and version (e.g., Apache httpd 2.4.41).</li>
<li><strong>OS Detection (<code>-O</code>)</strong>: Attempts to identify the target&rsquo;s operating system by analyzing TCP/IP stack fingerprints.</li>
<li><strong>Aggressive Scan (<code>-A</code>)</strong>: A convenience flag that enables OS detection, version detection, script scanning, and traceroute all at once.</li>
</ul>
<h2 id="the-nmap-scripting-engine-nse">The Nmap Scripting Engine (NSE)</h2>
<p>The NSE is Nmap&rsquo;s most powerful feature, allowing automation of tasks like vulnerability detection and enumeration.</p>
<ul>
<li>Run Default Scripts: <code>nmap -sC &lt;target&gt;</code> (Same as <code>--script=default</code>).</li>
<li>Run a Specific Category: <code>nmap --script=vuln &lt;target&gt;</code> (Checks for known vulnerabilities).</li>
<li>Run Specific Scripts: <code>nmap --script=http-title,smb-os-discovery &lt;target&gt;</code>.</li>
<li>Script Arguments: <code>nmap --script=ssh-brute --script-args userdb=users.txt &lt;target&gt;</code>.</li>
</ul>
<h2 id="timing--performance">Timing &amp; Performance</h2>
<p>Speed and stealth are a trade-off. Nmap has timing templates <code>-T0</code> (Paranoid) to <code>-T5</code> (Insane).</p>
<ul>
<li><code>-T4</code> (Aggressive): Recommended for fast, reliable scans on local networks.</li>
<li><code>-T2</code> (Polite): Slower, uses less bandwidth, and is less likely to crash fragile devices.</li>
<li><code>--max-rate 5</code>: Sends no more than 5 packets per second (great for evading rate-based IDS).</li>
</ul>
<h2 id="firewall--ids-evasion">Firewall &amp; IDS Evasion</h2>
<p>When you need to be stealthy or bypass filtering, these techniques help.</p>
<ul>
<li>Decoy Scan (<code>-D</code>): <code>nmap -D RND:10 &lt;target&gt;</code> (Spoofs 10 random IPs alongside yours to confuse logs).</li>
<li>Fragment Packets (<code>-f</code>): <code>nmap -f &lt;target&gt;</code> (Splits packets into tiny fragments to evade simple packet filters).</li>
<li>Source Port Spoofing: <code>nmap --source-port 53 &lt;target&gt;</code> (Makes traffic look like DNS replies to bypass misconfigured firewalls).</li>
<li>Idle/Zombie Scan (<code>-sI</code>): <code>nmap -sI &lt;zombie_host&gt; &lt;target&gt;</code> (The ultimate anonymous scan; uses a third-party idle host to scan the target without revealing your IP).</li>
</ul>
<h2 id="output-formats">Output Formats</h2>
<p>Always save your scan results for later analysis.</p>
<ul>
<li>Normal (<code>-oN</code>): Human-readable text (<code>nmap -oN scan.txt 192.168.1.1</code>).</li>
<li>XML (<code>-oX</code>): Machine-readable, perfect for importing into tools like Metasploit (<code>-oX scan.xml</code>).</li>
<li>All (<code>-oA</code>): Saves in all formats at once (<code>-oA myscan</code>).</li>
</ul>
<h2 id="practical-workflow-example">Practical Workflow Example</h2>
<p>A typical penetration testing workflow might look like this:</p>
<ul>
<li>Discovery: <code>sudo nmap -sn 192.168.1.0/24</code> (Find live hosts).</li>
<li>Fast Port Scan: <code>sudo nmap -sS -T4 -iL live_hosts.txt</code> (Quickly find open ports).</li>
<li>Deep Enumeration: <code>sudo nmap -sV -sC -O -p 22,80,443 -iL live_hosts.txt</code> (Get versions and default scripts on found ports).</li>
<li>Vulnerability Check: <code>sudo nmap --script=vuln -p 80,443 &lt;target&gt;</code>.</li>
</ul>
<p><strong>Legal &amp; Ethical Warning</strong>: Only use Nmap on systems you own or have explicit written permission to test. Unauthorized port scanning is illegal in many jurisdictions and can be considered a precursor to an attack.</p>
 ]]></content:encoded>
        </item>
        
    </channel>
</rss>