<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by appsecvenue on Medium]]></title>
        <description><![CDATA[Stories by appsecvenue on Medium]]></description>
        <link>https://medium.com/@appsecvenue?source=rss-6214e6f57cb0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*72XQlC2wmoYdqZdRZ32W7A.png</url>
            <title>Stories by appsecvenue on Medium</title>
            <link>https://medium.com/@appsecvenue?source=rss-6214e6f57cb0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:10:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@appsecvenue/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mastering Nmap in 2025: Advanced Nmap Tactics for Bug Bounty Hunters & Security Pros — Final Part]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-in-2025-advanced-nmap-tactics-for-bug-bounty-hunters-security-pros-final-part-ca5f53378c0d?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca5f53378c0d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Sun, 28 Sep 2025 17:30:08 GMT</pubDate>
            <atom:updated>2025-09-28T17:30:08.161Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><h3>Mastering Nmap in 2025: <strong>Advanced Nmap Tactics for Bug Bounty Hunters &amp; Security Pros</strong> — Final Part</h3><p># Beyond Port Scanning: Advanced Nmap Tactics for Bug Bounty Hunters &amp; Security Pros</p><p>&gt; **Disclaimer &amp; ethics:** Only run these scans on systems you own or are explicitly authorized to test. The techniques below are for defensive research, authorized pentests, bug-bounty programs (in-scope), and lab learning. Misuse is illegal and unethical.</p><p>— -</p><p>## 🔥 Introduction — Why this final chapter matters</p><p>We’ve come a long way. In Parts 1–5 you learned how to find hosts, bypass firewall filters, detect vulnerabilities with NSE, turn raw scans into polished reports, and tune scan timing for speed vs. stealth.</p><p>Those are essential skills — but they’re not the finish line.</p><p>This final chapter turns Nmap inside out. You’ll learn to:<br>- see *exactly* what packets Nmap sends (` — packet-trace`),<br>- craft custom TCP flag probes and reason about why a firewall or IDS responded the way it did (` — scanflags`),<br>- analyze how defenders detect scanning (Wireshark, Snort/Suricata patterns),<br>- responsibly test authentication with NSE auth/brute scripts, and<br>- automate advanced workflows that combine tracing, evasion checks, and safe auth tests.</p><p>If you want to move from “I ran \`nmap -sV\`” to *mastering* the wire-level behavior, detection surface, and responsible exploitation checks — read on. This is the advanced playbook.</p><p>— -</p><p>## 🧩 1 — Packet tracing &amp; TCP flags (what happens on the wire)</p><p>**Why it matters:** Flags, sequence numbers, retransmits and ICMP replies explain why a scan returned `open`, `closed`, or `filtered`. Packet tracing turns guesswork into reproducible evidence.</p><ul><li>*Key commands**<br>```bash<br>nmap — packet-trace -p 80,443 target.com<br>nmap — packet-trace — reason -p 80 target.com<br>nmap — scanflags FIN,PSH -p 80 target.com</li></ul><p>sudo tcpdump -i eth0 host target.com -w nmap_trace.pcap<br>wireshark nmap_trace.pcap</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca5f53378c0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Nmap (Part 5) in 2025: Timing & Performance Optimization]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-part-5-in-2025-timing-performance-optimization-a2b98f187e0c?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2b98f187e0c</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Sun, 21 Sep 2025 17:03:37 GMT</pubDate>
            <atom:updated>2025-09-28T17:35:35.722Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><h3>🔥 Introduction</h3><p>If you’ve been following this series, you already know how to:</p><ul><li>Discover hidden hosts (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-1-in-2025-host-discovery-recon-for-bug-bounty-hunters-1af4a3e451a1">Part 1</a>)</li><li>Slip past firewalls and filters (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-2-advanced-scans-firewall-evasion-for-bug-bounty-hunters-e005dcaf21a7">Part 2</a>)</li><li>Uncover real vulnerabilities with NSE (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-3-in-2025-vulnerability-detection-exploitation-with-nse-6e3b899eb64d">Part 3</a>)</li><li>Turn raw scans into clean reports (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-4-in-2025-output-formats-reporting-a75d0501eada">Part 4</a>)</li></ul><p>But here’s the catch: <strong>none of that matters if your scans take forever or trip every intrusion detection system (IDS) along the way.</strong></p><p>Timing is everything in cybersecurity.</p><p>Scan too aggressively and you’ll:</p><ul><li>Flood the target with noise</li><li>Trigger alarms</li><li>Risk getting your IP banned</li></ul><p>Scan too slowly and you’ll:</p><ul><li>Waste valuable recon time</li><li>Miss out on live opportunities during a bug bounty window</li><li>Fail to scale across large target scopes</li></ul><p>This is where <strong>Nmap’s timing and performance controls</strong> come into play. With the right flags, you can decide whether to be <strong>a ghost that slips under the radar</strong> or <strong>a sprinter that maps thousands of ports in seconds</strong>.</p><p>In this post, we’ll break down:</p><ul><li>Nmap’s <strong>timing templates (</strong><strong>-T0 → </strong><strong>-T5)</strong></li><li>Custom tuning for <strong>parallelism, retries, and scan delays</strong></li><li>Real-world <strong>bug bounty scenarios</strong> where speed vs. stealth can make or break your findings</li></ul><p>By the end, you’ll know how to run scans that are not only effective but also <strong>strategically optimized for your mission</strong> — whether that’s quick recon in a live program or stealthy pentesting behind layers of defenses.</p><h3>⏱️ 1 — Nmap Timing Templates: -T0 through -T5</h3><p>Nmap ships with six predefined timing templates. Use them as a starting point — then fine-tune.</p><ul><li>-T0 <strong>Paranoid</strong> — extremely slow. Designed to evade IDS.</li><li>-T1 <strong>Sneaky</strong> — still very slow and stealthy.</li><li>-T2 <strong>Polite</strong> — reduces resource usage; polite to the target.</li><li>-T3 <strong>Normal</strong> — Nmap’s default balanced behavior.</li><li>-T4 <strong>Aggressive</strong> — faster; good for stable networks you control.</li><li>-T5 <strong>Insane</strong> — maximum speed; noisy and risky on real targets.</li></ul><p><strong>Examples</strong></p><pre># Stealthy SYN scan<br>nmap -sS -T1 target.com<br><br># Aggressive full port scan<br>nmap -sS -T4 -p- target.com</pre><p><strong>Rule of thumb:</strong> start at -T3. Move to -T4 when you need speed and the environment is stable. Avoid -T5 outside your own lab.</p><h3>⚡ 2 — Controlling Parallelism &amp; Host Grouping</h3><p>When scanning many hosts or many ports, Nmap sends multiple probes in parallel. You can control how many to send to balance speed vs noise.</p><ul><li>--min-parallelism &lt;N&gt;</li><li>--max-parallelism &lt;N&gt;</li></ul><p>Host grouping controls how many hosts are scanned together:</p><ul><li>--min-hostgroup &lt;N&gt;</li><li>--max-hostgroup &lt;N&gt;</li></ul><p><strong>Examples</strong></p><pre># Increase parallel probes (faster, noisier)<br>nmap --min-parallelism 50 --max-parallelism 150 10.0.0.0/24<br><br># Scan big hostgroups (fast subnet scanning)<br>nmap --min-hostgroup 64 --max-hostgroup 128 -T4 10.0.0.0/16</pre><p><strong>When to increase parallelism:</strong> trusted networks, internal pentests, or time-sensitive recon windows.<br><strong>When to decrease it:</strong> external bug bounty targets, fragile hosts, or when minimizing detection risk.</p><h3>🔁 3 — Retries, Timeouts &amp; Scan Delays</h3><p>Tune retries and timeouts to reduce false negatives or avoid hanging on flaky hosts.</p><ul><li>--max-retries &lt;N&gt; — how many times to retry unresponsive probes.</li><li>--host-timeout &lt;time&gt; — give up on a host after this duration.</li><li>--scan-delay &lt;time&gt; — fixed delay between probes.</li><li>--max-rate &lt;N&gt; — limit probes per second (rate limiting).</li></ul><p><strong>Examples</strong></p><pre># Reduce retries and add host timeout<br>nmap --max-retries 1 --host-timeout 30s target.com</pre><pre># Add a small delay between probes (stealthy)<br>nmap --scan-delay 200ms -sS target.com</pre><pre># Limit total probe rate<br>nmap --max-rate 100 -p 1-65535 target.com</pre><p><strong>Tip:</strong> For targets behind flaky networks, increasing retries may be necessary. For stealth, prefer --scan-delay or lower parallelism.</p><h3>🎯 4 — Practical Bug Bounty Use Cases</h3><p><strong>Fast Recon (wide, shallow)</strong></p><ul><li>Goal: discover as much surface area quickly.</li></ul><pre>nmap -sS -T4 -p- --min-parallelism 100 target.com</pre><p>Use when you have a short recon window or scanning many hosts.</p><p><strong>Stealth Recon (deep, low-noise)</strong></p><ul><li>Goal: avoid IDS/WAF detection, carefully probe services.</li></ul><pre>nmap -sS -T1 --scan-delay 150ms -p 21,22,80,443 target.com</pre><p>Use this in sensitive targets or when you want to remain undetected for long-running recon.</p><p><strong>Focused Follow-ups</strong></p><ul><li>After a fast pass, run targeted, slow scans on interesting hosts:</li></ul><pre>nmap -sV -sC -T2 -p22,80,443 discovered-host.com</pre><p><strong>Mass Subnet Scan</strong></p><pre>nmap -T4 --min-hostgroup 100 192.168.1.0/22</pre><p>Useful when mapping internal networks in a white-box engagement.</p><h3>🤖 5 — Automation: Recon Mode Switcher &amp; Parallel Scans</h3><h3>🐚 Bash — Recon Mode Switcher</h3><p>Small helper to pick fast/stealth/polite modes:</p><pre>#!/usr/bin/env bash<br># recon_mode.sh &lt;target&gt; &lt;mode&gt;<br>target=$1<br>mode=$2<br><br>case &quot;$mode&quot; in<br>  fast)<br>    nmap -sS -T4 -p- &quot;$target&quot; -oN &quot;${target}_fast.nmap&quot;<br>    ;;<br>  stealth)<br>    nmap -sS -T1 --scan-delay 200ms -p 21,22,80,443 &quot;$target&quot; -oN &quot;${target}_stealth.nmap&quot;<br>    ;;<br>  polite)<br>    nmap -sS -T2 &quot;$target&quot; -oN &quot;${target}_polite.nmap&quot;<br>    ;;<br>  *)<br>    echo &quot;Usage: $0 &lt;target&gt; [fast|stealth|polite]&quot;<br>    ;;<br>esac</pre><p>Usage:</p><pre>chmod +x recon_mode.sh<br>./recon_mode.sh target.com stealth</pre><h3>🐍 Python — Parallel Targets Scanner</h3><p>Scan multiple targets sequentially with a chosen speed:</p><pre>#!/usr/bin/env python3<br>import subprocess, sys<br><br>if len(sys.argv) &lt; 3:<br>    print(&quot;Usage: python3 multi_scan.py &lt;mode&gt; &lt;target1&gt; [target2 ...]&quot;)<br>    sys.exit(1)<br><br>mode = sys.argv[1]<br>targets = sys.argv[2:]<br><br>flags = {<br>    &quot;fast&quot;: [&quot;-sS&quot;, &quot;-T4&quot;, &quot;-p-&quot;, &quot;-oN&quot;],<br>    &quot;stealth&quot;: [&quot;-sS&quot;, &quot;-T1&quot;, &quot;--scan-delay&quot;, &quot;200ms&quot;, &quot;-oN&quot;],<br>    &quot;polite&quot;: [&quot;-sS&quot;, &quot;-T2&quot;, &quot;-oN&quot;]<br>}<br><br>for t in targets:<br>    output = f&quot;{t}_{mode}.nmap&quot;<br>    cmd = [&quot;nmap&quot;] + flags[mode][:-1] + [flags[mode][-1] if flags[mode][-1].startswith(&quot;-&quot;) else &quot;&quot;] + [t, &quot;-oN&quot;, output]<br>    # Simplified: use the fast flag set<br>    if mode == &quot;fast&quot;:<br>        cmd = [&quot;nmap&quot;, &quot;-sS&quot;, &quot;-T4&quot;, &quot;-p-&quot;, t, &quot;-oN&quot;, output]<br>    elif mode == &quot;stealth&quot;:<br>        cmd = [&quot;nmap&quot;, &quot;-sS&quot;, &quot;-T1&quot;, &quot;--scan-delay&quot;, &quot;200ms&quot;, t, &quot;-oN&quot;, output]<br>    else:<br>        cmd = [&quot;nmap&quot;, &quot;-sS&quot;, &quot;-T2&quot;, t, &quot;-oN&quot;, output]<br>    print(&quot;[*] Running:&quot;, &quot; &quot;.join(cmd))<br>    subprocess.run(cmd)</pre><p>(Adapt to your needs — add logging, threading, or scheduling.)</p><h3>🧠 6 — Pro Tips &amp; Common Pitfalls</h3><ul><li><strong>Baseline is </strong><strong>-T3.</strong> Use it unless you have a reason to change.</li><li><strong>Avoid </strong><strong>-T5 on live targets.</strong> Only in labs.</li><li><strong>Document timing &amp; flags</strong> in your bug report — it shows care and professionalism.</li><li><strong>Combine </strong><strong>-oA with timing</strong> to keep reproducible logs:</li></ul><pre>nmap -sV -T2 -oA scan_target target.com</pre><ul><li><strong>Use </strong><strong>ndiff</strong> to show remediation:</li></ul><pre>ndiff old_scan.xml new_scan.xml &gt; diff_report.txt</pre><ul><li><strong>Be mindful of legal and program rules.</strong> Some programs disallow noisy scans or automated brute force.</li></ul><h3>📌 Final Notes</h3><p>Timing and performance tuning is about <strong>intent</strong>. Know what you want to achieve (speed vs stealth) before choosing flags. Always test combinations in your lab before running on live targets.</p><p>Master the controls and your scans will be faster, smarter, and more actionable.</p><h3>📌 Closing &amp; CTA</h3><p>That’s Part 5 — timing and performance in the hands of a thoughtful operator turn noisy scans into surgical recon.</p><p>Next up: <a href="https://medium.com/@appsecvenue/mastering-nmap-in-2025-advanced-nmap-tactics-for-bug-bounty-hunters-security-pros-final-part-ca5f53378c0d"><strong>Final Part— Advanced Nmap Tactics for Bug Bounty Hunters &amp; Security Pros</strong></a><strong>.</strong></p><p>👏 If this helped, give it a clap on Medium (up to 50x) and subscribe so you don’t miss the final part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2b98f187e0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Nmap (Part 4) in 2025: Output Formats & Reporting]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-part-4-in-2025-output-formats-reporting-a75d0501eada?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a75d0501eada</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 19:58:55 GMT</pubDate>
            <atom:updated>2025-09-21T17:36:03.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><p>In the first three parts of this series, we’ve gone from the <strong>basics of host discovery</strong> (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-1-in-2025-host-discovery-recon-for-bug-bounty-hunters-1af4a3e451a1">Part 1</a>), to <strong>sneaky firewall evasion tricks</strong> (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-2-advanced-scans-firewall-evasion-for-bug-bounty-hunters-e005dcaf21a7">Part 2</a>), and then unleashed the <strong>Nmap Scripting Engine (NSE)</strong> for vulnerability detection and even light exploitation (<a href="https://medium.com/@appsecvenue/mastering-nmap-part-3-in-2025-vulnerability-detection-exploitation-with-nse-6e3b899eb64d">Part 3</a>).</p><p>But here’s the problem: even the best recon or vuln scan is useless if you can’t <strong>prove it, share it, or reproduce it</strong>. Bug bounty hunters know this all too well — a sloppy screenshot or half-cut terminal paste won’t get you that P1 bounty. Security professionals face the same challenge: stakeholders don’t want raw data; they want <strong>structured, readable reports</strong>.</p><p>That’s why in Part 4 we’ll shift focus from <em>finding issues</em> to <em>reporting them like a pro</em>. You’ll learn how to:</p><ul><li>Save scan results in multiple formats (normal, grepable, XML, JSON)</li><li>Parse output automatically with Bash/Python scripts</li><li>Generate clean HTML/Markdown reports for bug bounty submissions</li><li>Use ndiff to track changes over time (patch verification)</li></ul><p>Think of this chapter as the bridge between <strong>hacker recon</strong> and <strong>professional reporting</strong> — the step that turns findings into credibility (and payouts 💰).</p><h3>📜 1. Normal Output (Human-Readable)</h3><p>The default, human-friendly format. Save it with:</p><pre>nmap target.com -oN results.txt</pre><p>💡 Use this for quick, shareable reports or personal notes.</p><h3>📊 2. Grepable Output (for quick parsing)</h3><p>If you like command-line magic with grep, awk, or cut, this one’s for you:</p><pre>nmap target.com -oG results.gnmap</pre><p>Sample snippet:</p><pre>Host: 192.168.1.10 ()  Status: Up<br>Ports: 22/open/tcp//ssh///, 80/open/tcp//http///</pre><h3>🧾 3. XML Output (automation &amp; tool integration)</h3><pre>nmap target.com -oX results.xml</pre><p>Why XML? It’s machine-readable and integrates easily with tools like Metasploit, Splunk, or custom Python scripts.</p><p>Convert to a clean HTML report:</p><pre>xsltproc results.xml -o results.html</pre><h3>📑 4. JSON Output (modern workflows)</h3><p>Nmap doesn’t natively output JSON, but you can convert from XML:</p><pre>xsltproc results.xml | jq &#39;.&#39; &gt; results.json</pre><p>Useful for dashboards, SIEM pipelines, or bug bounty automation scripts.</p><h3>🖥️ 5. Save in All Formats at Once</h3><p>Use -oA to generate Normal, Grepable, and XML together:</p><pre>nmap target.com -oA results</pre><p>Creates:</p><ul><li>results.nmap (normal)</li><li>results.gnmap (grepable)</li><li>results.xml (XML)</li></ul><h3>🎯 6. Real-World Bug Bounty Example</h3><p>You scan a scope and find:</p><ul><li>SSH (OpenSSH 7.4, outdated)</li><li>Apache (2.4.29, with known CVEs)</li></ul><p>Instead of pasting raw terminal output into your report, you:</p><ol><li>Save results in XML:</li></ol><pre>nmap -sV -oX bounty.xml target.com</pre><p>2. Convert to HTML:</p><pre>xsltproc bounty.xml -o bounty.html</pre><p>3. Attach <strong>bounty.html</strong> to your bug bounty submission → looks clean, credible, and reproducible.</p><h3>🤖 7. Automating Reporting</h3><h3>🐚 Bash: Extract CSV from Grepable Output</h3><pre>#!/usr/bin/env bash<br># parse_gnmap.sh<br>IN=&quot;$1&quot;<br>echo &quot;Host,Port,State,Service&quot;<br>grep &#39;^Host:&#39; &quot;$IN&quot; | while read -r line; do<br>  ip=$(echo &quot;$line&quot; | awk &#39;{print $2}&#39;)<br>  ports=$(echo &quot;$line&quot; | sed -n &#39;s/.*Ports: //p&#39;)<br>  IFS=&#39;,&#39; read -ra parr &lt;&lt;&lt; &quot;$ports&quot;<br>  for p in &quot;${parr[@]}&quot;; do<br>    port=$(echo &quot;$p&quot; | cut -d&#39;/&#39; -f1)<br>    state=$(echo &quot;$p&quot; | cut -d&#39;/&#39; -f2)<br>    service=$(echo &quot;$p&quot; | cut -d&#39;/&#39; -f5)<br>    echo &quot;$ip,$port,$state,$service&quot;<br>  done<br>done</pre><p>Usage:</p><pre>./parse_gnmap.sh results.gnmap &gt; summary.csv</pre><h3>🐍 Python: Parse XML into CSV</h3><pre>#!/usr/bin/env python3<br>import sys, csv, xml.etree.ElementTree as ET<br><br>xmlfile, outfile = sys.argv[1], sys.argv[2]<br>tree = ET.parse(xmlfile)<br>root = tree.getroot()<br><br>rows = []<br>for host in root.findall(&#39;host&#39;):<br>    ip = host.find(&#39;address&#39;).get(&#39;addr&#39;)<br>    for port in host.findall(&#39;.//port&#39;):<br>        portid = port.get(&#39;portid&#39;)<br>        state = port.find(&#39;state&#39;).get(&#39;state&#39;)<br>        service = port.find(&#39;service&#39;).get(&#39;name&#39;) if port.find(&#39;service&#39;) is not None else &#39;&#39;<br>        rows.append([ip, portid, state, service])<br><br>with open(outfile, &#39;w&#39;, newline=&#39;&#39;) as f:<br>    w = csv.writer(f)<br>    w.writerow([&#39;IP&#39;, &#39;Port&#39;, &#39;State&#39;, &#39;Service&#39;])<br>    w.writerows(rows)<br><br>print(f&quot;[+] Wrote {len(rows)} rows to {outfile}&quot;)</pre><p>Usage:</p><pre>python3 parse_nmap_xml.py results.xml summary.csv</pre><h3>🐍 Python: Generate Markdown Report (Bug Bounty Ready)</h3><pre>#!/usr/bin/env python3<br>import sys, xml.etree.ElementTree as ET<br><br>xmlfile, outfile = sys.argv[1], sys.argv[2]<br>tree = ET.parse(xmlfile)<br>root = tree.getroot()<br><br>lines = [&quot;# Nmap Scan Report\n&quot;]<br>for host in root.findall(&#39;host&#39;):<br>    ip = host.find(&#39;address&#39;).get(&#39;addr&#39;)<br>    lines.append(f&quot;## Host: {ip}\n&quot;)<br>    for port in host.findall(&#39;.//port&#39;):<br>        if port.find(&#39;state&#39;).get(&#39;state&#39;) != &#39;open&#39;:<br>            continue<br>        portid = port.get(&#39;portid&#39;)<br>        service = port.find(&#39;service&#39;).get(&#39;name&#39;)<br>        lines.append(f&quot;- **{portid}/tcp** - {service}\n&quot;)<br><br>with open(outfile, &#39;w&#39;) as f:<br>    f.write(&quot;\n&quot;.join(lines))<br><br>print(f&quot;[+] Markdown report saved: {outfile}&quot;)</pre><p>Usage:</p><pre>python3 xml_to_md_report.py results.xml report.md</pre><p>Attach report.md directly in your bug bounty submission.</p><h3>🧠 Pro Tips</h3><ul><li>Use <strong>-sV</strong> with output formats for richer detail.</li><li>Always scan with -oA → one command, all formats.</li><li>Use ndiff old.xml new.xml to compare scans → perfect for showing remediation progress.</li><li>For bug bounty submissions, attach both raw XML <strong>and</strong> a clean report (Markdown/HTML).</li></ul><h3>✅ Takeaway</h3><p>Nmap isn’t just about finding vulnerabilities — it’s about <strong>reporting them effectively</strong>. By mastering output formats and automation, you:</p><ul><li>Save clean reports for bug bounty programs</li><li>Automate recon pipelines in CI/CD</li><li>Present findings like a professional pentester</li></ul><p>That’s Part 4! In <a href="https://medium.com/@appsecvenue/mastering-nmap-part-5-in-2025-timing-performance-optimization-a2b98f187e0c"><strong>Part 5</strong></a>, we’ll dive into <strong>Timing &amp; Performance Optimization</strong> — how to balance <strong>speed, stealth, and accuracy</strong> in your scans.</p><p>💬 Over to you:<br>➡️ Which output format do you rely on most — Normal, XML, or Grepable? Drop it in the comments!</p><p>👏 If this helped, smash that clap button (up to 50x) so more security pros can find this series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a75d0501eada" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Nmap (Part 3) in 2025: Vulnerability Detection & Exploitation with NSE]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-part-3-in-2025-vulnerability-detection-exploitation-with-nse-6e3b899eb64d?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e3b899eb64d</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Sat, 30 Aug 2025 18:07:31 GMT</pubDate>
            <atom:updated>2025-09-21T09:31:21.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><p>Most bug bounty hunters stop at port scanning. They find open services, take a few notes, and move on. But the real gold is hidden <em>behind those ports</em> — in the <strong>misconfigurations, outdated services, </strong>and<strong> unpatched CVEs </strong>quietly waiting to be exploited. This is where Nmap becomes more than a scanner.</p><p>With the <strong>Nmap Scripting Engine (NSE)</strong>, you’re no longer just mapping the surface — you’re uncovering vulnerabilities, testing exploitability, and sometimes even proving impact directly from the command line.</p><p>If you’ve been using Nmap only for ports and banners, this chapter will change the way you think about it. In <a href="https://medium.com/@appsecvenue/mastering-nmap-part-1-in-2025-host-discovery-recon-for-bug-bounty-hunters-1af4a3e451a1">Part 1</a>, we focused on host discovery. In <a href="https://medium.com/@appsecvenue/mastering-nmap-part-2-advanced-scans-firewall-evasion-for-bug-bounty-hunters-e005dcaf21a7">Part 2</a>, we went deeper with advanced scans and firewall evasion. Now in Part 3, we’ll go hands-on with NSE to <strong>level up from reconnaissance to exploitation</strong>.</p><p>With NSE, you’re not just mapping services. You’re:</p><ul><li>Detecting <strong>real-world vulnerabilities</strong> (EternalBlue, Heartbleed, Shellshock).</li><li>Testing <strong>authentication bypasses and brute force attempts</strong>.</li><li>Automating reconnaissance with repeatable scans.</li><li>Even <strong>writing custom scripts</strong> tailored to your target.</li></ul><h3>🔍 1. What is Nmap Scripting Engine (NSE)?</h3><p>NSE is one of Nmap’s most powerful features. It lets you run <strong>community-written Lua scripts</strong> that extend scanning far beyond ports and banners.</p><p>Scripts are grouped into categories:</p><ul><li><strong>auth</strong> — authentication bypass checks</li><li><strong>brute</strong> — brute-force password attempts</li><li><strong>vuln</strong> — known vulnerability detection</li><li><strong>exploit</strong> — active exploitation attempts</li><li><strong>discovery</strong> — advanced enumeration</li></ul><p>Think of NSE as the bridge between <strong>basic scanning</strong> and <strong>lightweight vulnerability scanning</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kamBzUhU_DoAHw2oMrUNkw.png" /></figure><h3>📂 2. Where are Scripts Stored?</h3><p>If you want to explore or modify scripts, here’s where to look:</p><p><strong>Windows</strong></p><h3>On Windows:</h3><pre>C:\Program Files (x86)\Nmap\scripts<br>C:\Program Files (x86)\Nmap\scripts\script.db</pre><h3>On Linux/macOS:</h3><pre>/usr/share/nmap/scripts<br>/usr/share/nmap/scripts/script.db</pre><blockquote><strong>Pro tip:</strong> After adding/updating scripts, run:</blockquote><pre>nmap --script-updatedb</pre><p>To see script usage/help:</p><pre>nmap --script-help=vuln</pre><h3>⚡ 3. Vulnerability Detection with NSE</h3><p>The <strong>vuln</strong> category is the sweet spot for bug bounty hunters and pentesters. Instead of guesswork, these scripts check for <strong>specific CVEs and misconfigs</strong>.</p><p>In this section, we’ll walk through <strong>real-world NSE examples</strong> that help you uncover vulnerabilities directly during reconnaissance. Each example includes the exact command, a sample output, and why it matters in security testing.</p><p>To quickly run all scripts in the <strong>vuln</strong> category:</p><pre>nmap --script vuln -p 80,443 target.com</pre><h3>Example 1: Detecting EternalBlue (MS17–010)</h3><pre>nmap -p 445 --script smb-vuln-ms17-010 target.com</pre><p>Output (sample):</p><pre>Host is up (0.12s latency).<br>PORT    STATE SERVICE<br>445/tcp open  microsoft-ds<br>| smb-vuln-ms17-010:<br>|   VULNERABLE:<br>|   Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)<br>|     State: VULNERABLE<br>|     IDs:  CVE:CVE-2017-0143<br></pre><h3>Example 2: Detecting Heartbleed</h3><pre>nmap --script ssl-heartbleed -p 443 target.com</pre><h3>Example 3: FTP Anonymous Login</h3><pre>nmap --script ftp-anon -p 21 target.com</pre><h3>🎯 4. Exploitation-Oriented NSE Scripts</h3><p>While NSE isn’t a full Metasploit replacement, it <em>can</em> test exploitability.</p><p><strong>Example: Shellshock Test</strong></p><pre>nmap --script http-shellshock --script-args uri=/cgi-bin/test.cgi -p 80 target.com</pre><p>This confirms whether Shellshock is exploitable on a web server — without switching tools.</p><h3>Writing Your Own NSE Script</h3><p>NSE scripts are written in <strong>Lua</strong>. Here’s a simple example that fetches the HTTP title of a page:</p><pre>description = [[<br>Fetches the title of the target web page.<br>]]<br><br>author = &quot;YourName&quot;<br>categories = {&quot;discovery&quot;}<br><br>portrule = function(host, port)<br>  return port.protocol == &quot;tcp&quot; and port.number == 80<br>end<br><br>action = function(host, port)<br>  local http = require &quot;http&quot;<br>  local resp = http.get(host, port, &quot;/&quot;)<br>  return resp.body:match(&quot;&lt;title&gt;(.-)&lt;/title&gt;&quot;) or &quot;No title found&quot;<br>end</pre><h3>🤖 6. Automating Vulnerability Detection</h3><p>Running one script at a time doesn’t scale. Bug bounty hunters often need <strong>repeatable scans across multiple hosts</strong>.</p><h3>🐚 Bash Automation Example</h3><pre>#!/bin/bash<br>TARGET=$1<br>nmap -sV --script vuln $TARGET -oN vuln_scan_$TARGET.txt</pre><h3>Python Automation Example</h3><pre>import subprocess, sys<br><br>target = sys.argv[1]<br>cmd = [&quot;nmap&quot;, &quot;-sV&quot;, &quot;--script&quot;, &quot;vuln&quot;, target, &quot;-oN&quot;, f&quot;vuln_scan_{target}.txt&quot;]<br>subprocess.run(cmd)</pre><h3>Automating Vulnerability Detection with NSE</h3><p>Running one script at a time is fine for quick checks, but bug bounty hunters often need to <strong>scan multiple hosts and run multiple NSE scripts together</strong>.</p><p>Here’s how you can <strong>automate</strong> the process using <strong>Bash</strong> and <strong>Python</strong>.</p><h3>🐚 Bash Automation Script</h3><p>This script scans a target for <strong>EternalBlue, Heartbleed, and Anonymous FTP</strong> all at once:</p><pre>#!/bin/bash<br># nse-vuln-scan.sh<br># Automates common NSE vulnerability scans<br><br>TARGET=$1<br><br>if [ -z &quot;$TARGET&quot; ]; then<br>    echo &quot;Usage: $0 &lt;target&gt;&quot;<br>    exit 1<br>fi<br><br>echo &quot;[*] Scanning $TARGET for vulnerabilities...&quot;<br><br>nmap -p 445 --script smb-vuln-ms17-010 $TARGET -oN smb-ms17.txt<br>nmap -p 443 --script ssl-heartbleed $TARGET -oN ssl-heartbleed.txt<br>nmap -p 21 --script ftp-anon $TARGET -oN ftp-anon.txt<br><br>echo &quot;[+] Scans complete. Reports saved as smb-ms17.txt, ssl-heartbleed.txt, ftp-anon.txt&quot;</pre><p><strong>How to run:</strong></p><pre>chmod +x nse-vuln-scan.sh<br>./nse-vuln-scan.sh target.com</pre><h3>🐍 Python Automation Script</h3><p>This script executes multiple NSE scans and saves the results in a single consolidated report.</p><pre>#!/usr/bin/env python3<br># nse_vuln_scanner.py<br>import subprocess<br>import sys<br>from datetime import datetime<br><br>def run_scan(target, script, ports, filename):<br>    print(f&quot;[*] Running {script} on {target}...&quot;)<br>    cmd = [&quot;nmap&quot;, f&quot;-p{ports}&quot;, f&quot;--script={script}&quot;, target, &quot;-oN&quot;, filename]<br>    subprocess.run(cmd)<br><br>def main():<br>    if len(sys.argv) &lt; 2:<br>        print(&quot;Usage: python3 nse_vuln_scanner.py &lt;target&gt;&quot;)<br>        sys.exit(1)<br><br>    target = sys.argv[1]<br>    timestamp = datetime.now().strftime(&quot;%Y%m%d_%H%M%S&quot;)<br>    report_file = f&quot;nse_report_{timestamp}.txt&quot;<br><br>    scans = [<br>        (&quot;smb-vuln-ms17-010&quot;, &quot;445&quot;, &quot;smb-ms17.txt&quot;),<br>        (&quot;ssl-heartbleed&quot;, &quot;443&quot;, &quot;ssl-heartbleed.txt&quot;),<br>        (&quot;ftp-anon&quot;, &quot;21&quot;, &quot;ftp-anon.txt&quot;)<br>    ]<br><br>    with open(report_file, &quot;w&quot;) as report:<br>        for script, port, filename in scans:<br>            run_scan(target, script, port, filename)<br>            with open(filename, &quot;r&quot;) as f:<br>                report.write(f&quot;\n--- Results for {script} ---\n&quot;)<br>                report.write(f.read())<br><br>    print(f&quot;[+] All scans complete. Consolidated report saved as {report_file}&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p><strong>How to run:</strong></p><pre>python3 nse_vuln_scanner.py target.com</pre><p>✅📌 Pro Tips</p><ul><li>Always test NSE scripts in a controlled environment first.</li><li>Pair with -sV for accurate version detection.</li><li>Use -Pn to bypass firewalls blocking ICMP.</li><li>Combine with -oA for full reporting (.nmap, .xml, .gnmap).</li></ul><h3>Nmap NSE Cheetsheet:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Ms2e1PnHGap_IiTOO5mDg.png" /></figure><p>✅ Key Takeaway</p><p>SE takes Nmap from a <strong>scanner</strong> → to a <strong>vulnerability detection toolkit</strong> → and even into <strong>light exploitation checks</strong>.</p><p>As a bug bounty hunter or security professional, using NSE means you don’t just report “port 445 open” — you can submit <strong>proof-of-concept evidence with CVEs attached.</strong> That’s the difference between a <strong>low-info report</strong> and a <strong>high-impact finding</strong>.</p><p>In <strong>Part 4</strong>, we’ll dive into <strong>Nmap Output &amp; Reporting</strong> — turning raw scan results into clean, professional reports that bug bounty platforms and stakeholders actually value.</p><p>👉 Want to dig deeper? Visit the official docs at <a href="https://nmap.org/">nmap.org</a>.</p><p>💬 <strong>Your turn</strong>:</p><p>➡️ What’s the <em>most interesting bug</em> you’ve ever found with NSE? Drop it in the comments — let’s share war stories!</p><p>👏 If this helped, smash that clap button — it helps others find the series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e3b899eb64d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Nmap (Part 2) in 2025 : Advanced Scans & Firewall Evasion for Bug Bounty Hunters]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-part-2-advanced-scans-firewall-evasion-for-bug-bounty-hunters-e005dcaf21a7?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e005dcaf21a7</guid>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Sat, 23 Aug 2025 19:51:16 GMT</pubDate>
            <atom:updated>2025-08-30T18:08:31.774Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><p>If <a href="https://medium.com/p/1af4a3e451a1">Part 1</a> showed you how to <em>knock on the front door</em> with basic host discovery and port scans, Part 2 is where we learn how to <em>sneak past the security guards</em>. But real-world security assessments don’t stop there. Whether you’re a <strong>bug bounty hunter</strong> probing for overlooked services or a <strong>security engineer</strong> validating your organization’s defenses, you’ll need more than the basics.</p><p>Modern networks aren’t defenseless. They’re armed with <strong>firewalls, IDS/IPS systems, and logging tools</strong> designed to flag or block obvious scans. Running a plain nmap target.com will often get you noticed—or worse, blocked.</p><p>That’s where <strong>advanced Nmap scanning techniques</strong> come into play. These aren’t just flashy tricks; they’re practical methods to:</p><ul><li>For <strong>bug bounty hunters</strong>: Evade detection, reduce noise, and uncover services admins thought were hidden.</li><li>For <strong>security teams</strong>: Simulate adversarial behavior to test how well defenses hold up under stealthy scans.</li></ul><p>In this post, we’ll cover:</p><ul><li>🔹 <strong>Stealth scanning</strong>: SYN, FIN, NULL, and Xmas scans for slipping past defenses</li><li>🔹 <strong>Timing and performance tuning</strong>: From polite scans to ultra-aggressive sweeps</li><li>🔹 <strong>Firewall/IDS evasion</strong>: Fragmentation, decoys, spoofing, and randomization</li><li>🔹 <strong>Practical bug bounty &amp; enterprise use cases</strong> with command examples</li></ul><p>By the end of this guide, you’ll know how to go <strong>beyond discovery into advanced reconnaissance</strong>, whether you’re sharpening your bug bounty methodology or hardening your organization’s security posture.</p><p>By the end, you won’t just know <em>how</em> to scan—you’ll know how to <strong>stay invisible while doing it</strong>.</p><blockquote>⚠️ <strong>Disclaimer</strong>: Always scan only systems you own or have permission to test. Unauthorized scanning is illegal.</blockquote><h3>1. Stealth Scanning Techniques</h3><h3>🔸 SYN Scan (-sS) — Half-Open Stealth</h3><p>The most popular advanced scan. Instead of completing the TCP handshake, Nmap sends a <strong>SYN</strong> and analyzes the response.</p><pre>nmap -sS scanme.nmap.org</pre><p>📌 <strong>How it works:</strong></p><ul><li>SYN + SYN/ACK → Port is <strong>open</strong></li><li>SYN + RST → Port is <strong>closed</strong></li><li>No response / ICMP → Likely <strong>filtered</strong></li></ul><p><strong>Use Case:</strong></p><ul><li><strong>Bug bounty</strong>: <em>Quietly enumerate ports without completing connections (less likely to be logged)</em>.</li><li><strong>Enterprise</strong>: <em>Simulate an attacker performing reconnaissance</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shcWRBulAYRXhUKXR7DzYg.png" /></figure><h3>🔸 FIN, NULL, and Xmas Scans (sneaky scans)</h3><p>Some firewalls and IDS primarily filter <strong>SYN packets</strong>. Nmap can use unusual flags to slip past:</p><pre># FIN scan<br>nmap -sF scanme.nmap.org  <br><br># NULL scan<br>nmap -sN scanme.nmap.org <br> <br># Xmas scan<br>nmap -sX scanme.nmap.org</pre><p>📌 <strong>Behavior:</strong></p><ul><li>If the port is <strong>closed</strong> → Target replies with RST.</li><li>If the port is <strong>open</strong> → No response (RFC 793 quirk).</li></ul><p><strong>Use Case:</strong></p><ul><li><strong>Bug bounty</strong>: <em>Catch services admins assumed were “hidden behind a firewall.”</em></li><li><strong>Enterprise</strong>: <em>Validate that firewalls/IDS detect and block </em><strong><em>non-standard scans</em></strong><em>.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-6YdaZ8yyQla_9Zuj5uDw.png" /></figure><h3>2. Firewall &amp; IDS Evasion</h3><p>Sometimes stealthy scans aren’t enough — you’ll need to trick firewalls and IDS into ignoring you.</p><h3>🔸 Packet Fragmentation (-f)</h3><p>Splits packets into tiny chunks to slip past packet filters:</p><pre>nmap -f scanme.nmap.org</pre><p>📌 Some older firewalls struggle to reassemble fragmented packets, letting your scan sneak through.</p><h3>🔸 Decoys ( — decoy)</h3><p>Make it look like multiple IPs are scanning the target, hiding your real source:</p><pre>nmap -D RND:10 scanme.nmap.org</pre><p>This adds 10 random decoys. The target will see many IPs scanning, not just you.</p><h3>🔸 Spoofed Source IP (-S)</h3><p>Fake the source IP to make scans harder to trace:</p><pre>nmap -S 192.168.1.100 scanme.nmap.org</pre><p>⚠️ Requires special conditions (e.g., root/admin privileges + routing).</p><h3>🔸 Randomize Scan Order (-r)</h3><p>Instead of scanning ports sequentially, randomize them to avoid pattern detection:</p><pre>nmap -p 1-65535 -r scanme.nmap.org</pre><h3>3. Timing &amp; Performance Tuning</h3><p>Firewalls and IDS often flag <strong>fast, aggressive scans</strong>. You can tune Nmap’s speed with the -T option:</p><pre># Paranoid (extremely slow, avoids detection)<br>nmap -T0 scanme.nmap.org  <br><br># Sneaky (slow but practical)<br>nmap -T1 scanme.nmap.org  <br><br># Normal<br>nmap -T3 scanme.nmap.org  <br><br># Aggressive (fast, noisy)<br>nmap -T4 scanme.nmap.org  <br><br># Insane (very fast, triggers defenses)<br>nmap -T5 scanme.nmap.org</pre><p><strong>Pro Tip 💡</strong>: Start with <strong>T2/T3</strong> for stealth, and only use <strong>T4/T5</strong> in internal tests where speed matters more than stealth.</p><h3>4. Real-World Use Cases</h3><p>✅ <strong>Bug Bounty Hunter Example</strong></p><blockquote><em>You’re testing an e-commerce site behind Cloudflare. A normal scan gets blocked. Using a </em><strong><em>NULL scan (-sN)</em></strong><em>with </em><strong><em>fragmentation (-f)</em></strong><em>, you discover port </em><strong><em>8080/tcp</em></strong><em> running an exposed admin panel.</em></blockquote><p>✅ <strong>Enterprise Security Example</strong></p><blockquote><em>During an internal pentest, you run </em><strong><em>decoy scans ( — decoy)</em></strong><em> to simulate a distributed attack. The SOC analysts review logs to see if they can spot the real source IP.</em></blockquote><h3>5. Best Practices for Advanced Scanning</h3><ul><li>🛡️ Always scan responsibly — get written permission.</li><li>🎯 Start with stealth scans before moving to evasions.</li><li>🕵️ Combine evasion techniques (e.g., SYN + fragmentation + timing).</li><li>📑 Document findings: Security teams need actionable evidence.</li></ul><h3>Shell Script — stealth and evasion techniques</h3><pre>#!/bin/bash<br><br># Advanced Nmap scanning script with stealth and evasion techniques<br>TARGET=$1<br><br>if [ -z &quot;$TARGET&quot; ]; then<br>  echo &quot;Usage: $0 &lt;target&gt;&quot;<br>  exit 1<br>fi<br><br># Stealth Scanning<br>echo &quot;Running SYN Scan...&quot;<br>nmap -sS &quot;$TARGET&quot; -oN syn_scan_results.txt<br><br>echo &quot;Running FIN Scan...&quot;<br>nmap -sF &quot;$TARGET&quot; -oN fin_scan_results.txt<br><br>echo &quot;Running NULL Scan...&quot;<br>nmap -sN &quot;$TARGET&quot; -oN null_scan_results.txt<br><br>echo &quot;Running Xmas Scan...&quot;<br>nmap -sX &quot;$TARGET&quot; -oN xmas_scan_results.txt<br><br># Firewall/IDS Evasion<br>echo &quot;Running Fragmented Scan...&quot;<br>nmap -f &quot;$TARGET&quot; -oN fragmented_scan_results.txt<br><br>echo &quot;Running Scan with 10 Random Decoys...&quot;<br>nmap -D RND:10 &quot;$TARGET&quot; -oN decoy_scan_results.txt<br><br>echo &quot;Running Scan with Randomized Port Order...&quot;<br>nmap -p 1-65535 -r &quot;$TARGET&quot; -oN random_port_scan_results.txt<br><br># Timing and Performance Tuning<br>echo &quot;Running Paranoid Scan (T0)...&quot;<br>nmap -T0 &quot;$TARGET&quot; -oN paranoid_scan_results.txt<br><br>echo &quot;Running Sneaky Scan (T1)...&quot;<br>nmap -T1 &quot;$TARGET&quot; -oN sneaky_scan_results.txt<br><br>echo &quot;Running Normal Scan (T3)...&quot;<br>nmap -T3 &quot;$TARGET&quot; -oN normal_scan_results.txt<br><br>echo &quot;All scans completed. Results saved to respective text files.&quot;</pre><h3>Python Script — stealth and evasion techniques</h3><pre>import nmap<br>import time<br><br># Initialize the PortScanner<br>nm = nmap.PortScanner()<br><br># Target input<br>target = input(&quot;Enter the target IP/domain: &quot;)<br><br># Stealth Scanning<br>print(&quot;Running SYN Scan...&quot;)<br>nm.scan(target, arguments=&quot;-sS -oN syn_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running FIN Scan...&quot;)<br>nm.scan(target, arguments=&quot;-sF -oN fin_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running NULL Scan...&quot;)<br>nm.scan(target, arguments=&quot;-sN -oN null_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running Xmas Scan...&quot;)<br>nm.scan(target, arguments=&quot;-sX -oN xmas_scan_results.txt&quot;)<br>time.sleep(2)<br><br># Firewall/IDS Evasion<br>print(&quot;Running Fragmented Scan...&quot;)<br>nm.scan(target, arguments=&quot;-f -oN fragmented_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running Scan with 10 Random Decoys...&quot;)<br>nm.scan(target, arguments=&quot;-D RND:10 -oN decoy_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running Scan with Randomized Port Order...&quot;)<br>nm.scan(target, arguments=&quot;-p 1-65535 -r -oN random_port_scan_results.txt&quot;)<br>time.sleep(2)<br><br># Timing and Performance Tuning<br>print(&quot;Running Paranoid Scan (T0)...&quot;)<br>nm.scan(target, arguments=&quot;-T0 -oN paranoid_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running Sneaky Scan (T1)...&quot;)<br>nm.scan(target, arguments=&quot;-T1 -oN sneaky_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;Running Normal Scan (T3)...&quot;)<br>nm.scan(target, arguments=&quot;-T3 -oN normal_scan_results.txt&quot;)<br>time.sleep(2)<br><br>print(&quot;All scans completed. Results saved to respective text files.&quot;)</pre><h3>What’s Next?</h3><p>With stealth and evasion under your belt, you’re now thinking like an adversary — or testing like a defender.</p><p>In <a href="https://medium.com/@appsecvenue/mastering-nmap-part-3-in-2025-vulnerability-detection-exploitation-with-nse-6e3b899eb64d"><strong>Part 3</strong></a>, we’ll explore <strong>Nmap scripting (NSE)</strong> for vulnerability detection and automation — the real power of Nmap beyond just scanning.</p><p>👉 Want to dig deeper? Visit the official docs at <a href="https://nmap.org/">nmap.org</a>.</p><p>💬 <strong>Your turn</strong>:</p><ul><li><strong>Bug bounty folks </strong>— what’s your favorite stealth trick?</li><li><strong>Security pros</strong> — how do you train teams against evasive scans?</li></ul><p>👏 If this helped, give it a clap (or 50)!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e005dcaf21a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Nmap (Part 1) in 2025: Host Discovery & Recon for Bug Bounty Hunters]]></title>
            <link>https://medium.com/@appsecvenue/mastering-nmap-part-1-in-2025-host-discovery-recon-for-bug-bounty-hunters-1af4a3e451a1?source=rss-6214e6f57cb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1af4a3e451a1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[appsecvenue]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 19:54:39 GMT</pubDate>
            <atom:updated>2026-01-20T05:11:05.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-2BR2Io5nqCjBwMC6L9Vg.png" /></figure><p><strong>Ever wondered how professional bug bounty hunters map entire attack surfaces before finding vulnerabilities?</strong></p><p>It starts with one skill: <em>host discovery</em>. Before you look for exposed services, SQLi, or misconfigurations, you need to know <strong>which hosts are alive and worth testing</strong>.</p><p>That’s where <strong>Nmap</strong> comes in — not just as a scanner, but as a <em>reconnaissance framework</em>.</p><blockquote><em>🔒 </em><strong><em>Disclaimer</em></strong><em>: Only scan networks you have permission to test. Unauthorized scanning can get you banned or worse. Use safe targets like </em><a href="https://nmap.org/"><strong><em>scanme.nmap.org</em></strong></a><em> or </em><strong><em>your lab setup</em></strong><em>.</em></blockquote><h3>Why Host Discovery Matters in Recon</h3><p>In bug bounty and red team ops, <em>time is money</em>. You don’t want to spend hours scanning dead IPs or firewalled systems. Host discovery helps you:</p><ul><li><strong>Filter noise</strong> → Identify only active, responding systems in large IP ranges.</li><li><strong>Prioritize scope</strong> → Target the most responsive assets for deeper scans.</li><li><strong>Stay stealthy</strong> → Use lighter probes instead of blasting full TCP connections.</li></ul><p>Imagine you’ve got a <strong>/22 range from a bug bounty program</strong> (1,024 IPs). Instead of running a full scan on all, you first sweep for live hosts, cutting that list down to maybe 50 active systems.</p><h3>Installing Nmap (Quick Ref for Pros)</h3><ul><li><strong>Linux</strong>: sudo apt install nmap or sudo dnf install nmap</li><li><strong>macOS</strong>: brew install nmap</li><li><strong>Windows</strong>: Download from <a href="https://nmap.org/">nmap.org</a> (include Npcap).</li></ul><p>Verify with:</p><pre>nmap --version</pre><h3>Host Discovery Techniques for Security Pros</h3><p>Nmap offers multiple ways to check if a host is alive. Each method has pros/cons for <strong>stealth, reliability, and evasion</strong>.</p><h3>1. ICMP Echo Scan (Ping Sweep)</h3><pre>nmap -sn 192.168.1.0/24</pre><ul><li>Sends ICMP Echo requests to find live hosts.</li><li>Fast but easily blocked by firewalls.</li></ul><p>🔹 <strong>Pro Tip</strong>: Many enterprise networks block ICMP. Don’t rely only on this.</p><h3>2. TCP SYN Ping</h3><pre>nmap -PS80,443 10.10.0.0/24</pre><ul><li>Sends SYN probes to specific ports (e.g., 80, 443).</li><li>More likely to bypass ICMP restrictions.</li></ul><p>Use Case: Check if web servers are alive in scope.</p><h3>3. TCP ACK Ping</h3><pre>nmap -PA80,443 10.10.0.0/24</pre><ul><li>Sends ACK packets to test if a firewall allows return traffic.</li><li>Good for environments with strict filtering.</li></ul><h3>4. UDP Ping</h3><pre>nmap -PU53,161 10.10.0.0/24</pre><ul><li>Sends UDP probes (e.g., DNS on port 53, SNMP on 161).</li><li>Useful for catching UDP services often missed in bug bounties.</li></ul><h3>5. Combining Multiple Methods</h3><pre>nmap -PE -PS80,443 -PA3389 -PU53 10.10.0.0/24</pre><ul><li>Layered approach: ICMP + SYN + ACK + UDP.</li><li>Increases detection rate when firewalls are unpredictable.</li></ul><h3>Beyond “Is Host Up?” — Smarter Recon</h3><p>When you’ve identified live hosts, go beyond just “up/down.”</p><ul><li><strong>Save results for chain tools</strong>:</li></ul><pre>nmap -sn -oG livehosts.txt 192.168.1.0/24<br>grep Up livehosts.txt | cut -d &quot; &quot; -f2 &gt; alive.txt</pre><p>Now you have a clean list of targets to feed into <strong>HTTP probing tools</strong> (httprobe, httpx) or <strong>subdomain enumeration pipelines</strong>.</p><ul><li><strong>Stealthier Sweeps for Bounties</strong></li></ul><pre>nmap -sn --max-retries 1 --host-timeout 5s 10.10.0.0/24</pre><p>→ Keeps scans fast, avoids tripping IDS.</p><h3>Practical Bug Bounty Use Case</h3><p>Scenario: You’re in a program with the scope *.target.com, and you’ve resolved 5,000 subdomains. Now you want to know which ones actually respond.</p><p>Pipeline:</p><ol><li>Resolve subdomains → list of IPs.</li><li>Run Nmap host discovery with SYN ping.</li><li>Pipe alive IPs to port scan (-sS -p-).</li><li>Focus testing only on confirmed live hosts.</li></ol><p>This approach saves <strong>hours of wasted scans</strong> and helps you go straight for exploitable targets.</p><h3>Best Practices for Recon with Nmap</h3><p>✅ Always start with host discovery → then escalate to service/version scans.<br>✅ Use -oA (output in all formats) for clean reporting.<br>✅ Blend techniques (ICMP + TCP + UDP) to avoid blind spots.<br>✅ For stealth: randomize scan order (--randomize-hosts).<br>✅ Respect rate limits: don’t flood bug bounty targets.</p><h3>Automating Host Discovery for Bug Bounty Recon</h3><h3>🐚 Shell Script — Bug Bounty Recon with Nmap</h3><pre>#!/bin/bash<br># bugbounty-recon.sh<br># Advanced Nmap Host Discovery for Bug Bounty Recon<br>if [ $# -ne 1 ]; then<br>    echo &quot;Usage: $0 &lt;target-subnet or IP list&gt;&quot;<br>    echo &quot;Example: $0 10.10.0.0/24&quot;<br>    exit 1<br>fi<br>TARGET=$1<br>OUTPUT_DIR=&quot;recon_results&quot;<br>mkdir -p $OUTPUT_DIR<br><br>echo &quot;[*] Running advanced host discovery on $TARGET...&quot;<br>nmap -PE -PS80,443 -PA3389 -PU53 --max-retries 1 --host-timeout 5s -sn -oG $OUTPUT_DIR/hosts.gnmap $TARGET<br><br>echo &quot;[*] Extracting alive hosts...&quot;<br>grep &quot;Up&quot; $OUTPUT_DIR/hosts.gnmap | awk &#39;{print $2}&#39; &gt; $OUTPUT_DIR/alive_hosts.txt<br><br>echo &quot;[+] Alive hosts saved to $OUTPUT_DIR/alive_hosts.txt&quot;<br><br># Optional: Feed into httpx/httprobe for bug bounty recon<br>if command -v httpx &amp;&gt; /dev/null; then<br>    echo &quot;[*] Probing alive hosts for HTTP services...&quot;<br>    cat $OUTPUT_DIR/alive_hosts.txt | httpx -title -status-code -o $OUTPUT_DIR/http_hosts.txt<br>    echo &quot;[+] HTTP results saved to $OUTPUT_DIR/http_hosts.txt&quot;<br>fi</pre><p>🔹 <strong>Workflow</strong>:</p><ul><li>Runs ICMP + SYN + ACK + UDP discovery in one sweep.</li><li>Extracts alive hosts to alive_hosts.txt.</li><li>If httpx is installed, it auto-probes alive hosts for web services.</li></ul><h3>🐍 Python Script — Advanced Recon with Nmap</h3><pre>#!/usr/bin/env python3<br># bugbounty_recon.py<br># Python script to automate Nmap host discovery for bug bounty recon<br><br>import subprocess<br>import sys<br><br>def run_nmap(target):<br>    print(f&quot;[*] Running Nmap host discovery on {target}...&quot;)<br>    cmd = [<br>        &quot;nmap&quot;, &quot;-PE&quot;, &quot;-PS80,443&quot;, &quot;-PA3389&quot;, &quot;-PU53&quot;,<br>        &quot;--max-retries&quot;, &quot;1&quot;, &quot;--host-timeout&quot;, &quot;5s&quot;,<br>        &quot;-sn&quot;, &quot;-oG&quot;, &quot;hosts.gnmap&quot;, target<br>    ]<br>    subprocess.run(cmd)<br><br>def extract_alive_hosts():<br>    print(&quot;[*] Extracting alive hosts...&quot;)<br>    alive_hosts = []<br>    with open(&quot;hosts.gnmap&quot;, &quot;r&quot;) as f:<br>        for line in f:<br>            if &quot;Up&quot; in line:<br>                ip = line.split()[1]<br>                alive_hosts.append(ip)<br>    with open(&quot;alive_hosts.txt&quot;, &quot;w&quot;) as f:<br>        f.write(&quot;\n&quot;.join(alive_hosts))<br>    print(f&quot;[+] {len(alive_hosts)} alive hosts saved to alive_hosts.txt&quot;)<br>    return alive_hosts<br><br>def probe_http(alive_hosts):<br>    print(&quot;[*] Probing alive hosts for HTTP services with httpx (if available)...&quot;)<br>    try:<br>        with open(&quot;alive_hosts.txt&quot;, &quot;w&quot;) as f:<br>            f.write(&quot;\n&quot;.join(alive_hosts))<br>        subprocess.run([&quot;httpx&quot;, &quot;-title&quot;, &quot;-status-code&quot;, &quot;-o&quot;, &quot;http_hosts.txt&quot;])<br>        print(&quot;[+] HTTP results saved to http_hosts.txt&quot;)<br>    except FileNotFoundError:<br>        print(&quot;[!] httpx not installed. Skipping HTTP probing.&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    if len(sys.argv) != 2:<br>        print(&quot;Usage: python3 bugbounty_recon.py &lt;target-subnet&gt;&quot;)<br>        sys.exit(1)<br><br>    target = sys.argv[1]<br>    run_nmap(target)<br>    alive_hosts = extract_alive_hosts()<br>    if alive_hosts:<br>        probe_http(alive_hosts)<br>    else:<br>        print(&quot;[-] No alive hosts found.&quot;)</pre><p>🔹 <strong>Workflow</strong>:</p><ul><li>Performs advanced discovery scan.</li><li>Parses results into alive_hosts.txt.</li><li>If hosts are found, it optionally pipes them into <strong>httpx</strong>.</li><li>Easy to extend (e.g., add masscan, service scans, screenshots).</li></ul><h3>What’s Next</h3><p>Now that you know how to find live hosts, in <a href="https://medium.com/@appsecvenue/mastering-nmap-part-2-advanced-scans-firewall-evasion-for-bug-bounty-hunters-e005dcaf21a7"><strong>Part 2</strong></a> we’ll dive into:</p><ul><li>Scanning for open ports (-sS, -sU, -p-)</li><li>Detecting services (-sV)</li><li>Exporting results for vulnerability tools</li></ul><p>Stay tuned 👀</p><p>👉 If you found this guide useful, drop a <strong>clap</strong> and share your <strong>favorite Nmap recon trick</strong> in the comments.</p><p>👉 Buy me a coffee:</p><p><a href="https://buymeacoffee.com/appsecvenux">AppSecVenue</a></p><figure><a href="https://buymeacoffee.com/appsecvenux"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxwhk9Pw_78iCAU_7qs3DA.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1af4a3e451a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>