File size: 11,667 Bytes
5959221 32fd05c f400015 32fd05c f400015 12f0912 5959221 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nmap Cheat Sheet | Security+ QuickCheat Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
@media print {
.no-print {
display: none !important;
}
body {
padding: 0;
margin: 0;
background: white;
color: black;
}
.print-section {
page-break-inside: avoid;
}
}
.code-block {
background-color: #1e293b;
color: #f8fafc;
border-radius: 0.5rem;
font-family: monospace;
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 font-sans">
<div class="container mx-auto px-4 py-8 max-w-4xl">
<!-- Header -->
<header class="mb-8 text-center no-print">
<h1 class="text-4xl font-bold text-blue-600 mb-2">Nmap Cheat Sheet</h1>
<p class="text-lg text-green-600">Comprehensive Nmap scanning reference</p>
<div class="flex justify-center gap-4 mt-4">
<button onclick="window.print()" class="px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition flex items-center">
<i data-feather="printer" class="mr-2"></i> Print Cheat Sheet
</button>
<a href="index.html" class="px-6 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition flex items-center">
<i data-feather="arrow-left" class="mr-2"></i> Back to Main
</a>
<div class="relative group">
<button class="px-6 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition flex items-center">
<i data-feather="book" class="mr-2"></i> Lesson Recaps
<i data-feather="chevron-down" class="ml-2"></i>
</button>
<div class="absolute hidden group-hover:block bg-white shadow-lg rounded-lg mt-1 w-48 z-10">
<a href="lesson_1.html" class="block px-4 py-2 text-gray-800 hover:bg-purple-100 rounded-t-lg">Lesson 1 Recap</a>
<a href="lesson_2.html" class="block px-4 py-2 text-gray-800 hover:bg-purple-100">Lesson 2 Recap</a>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="bg-white shadow-lg rounded-lg p-6 print:p-0">
<!-- Basic Scans Section -->
<section class="mb-10 print-section">
<h2 class="text-2xl font-bold text-blue-600 border-b-2 border-blue-600 pb-2 mb-4 flex items-center">
<i data-feather="search" class="mr-2"></i> Basic Scans
</h2>
<div class="grid grid-cols-1 gap-4">
<div class="code-block p-4">
<span class="text-green-300"># Basic TCP connect scan (no root required)</span><br>
<span class="text-blue-300">nmap</span> -sT <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Quick scan (top 100 ports)</span><br>
<span class="text-blue-300">nmap</span> -F <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Standard scan (top 1000 ports)</span><br>
<span class="text-blue-300">nmap</span> <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Ping scan (host discovery only)</span><br>
<span class="text-blue-300">nmap</span> -sn <target>
</div>
</div>
</section>
<!-- Advanced Scans Section -->
<section class="mb-10 print-section">
<h2 class="text-2xl font-bold text-blue-600 border-b-2 border-blue-600 pb-2 mb-4 flex items-center">
<i data-feather="zap" class="mr-2"></i> Advanced Scans (Root Required)
</h2>
<div class="grid grid-cols-1 gap-4">
<div class="code-block p-4">
<span class="text-green-300"># SYN scan (stealth scan, default for root)</span><br>
<span class="text-blue-300">nmap</span> -sS <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># UDP scan (often missed in assessments)</span><br>
<span class="text-blue-300">nmap</span> -sU <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Comprehensive scan (all ports, OS/service detection)</span><br>
<span class="text-blue-300">nmap</span> -p- -A <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Aggressive scan (OS/service detection, scripts, traceroute)</span><br>
<span class="text-blue-300">nmap</span> -A <target>
</div>
</div>
</section>
<!-- Port Specification Section -->
<section class="mb-10 print-section">
<h2 class="text-2xl font-bold text-blue-600 border-b-2 border-blue-600 pb-2 mb-4 flex items-center">
<i data-feather="hash" class="mr-2"></i> Port Specification
</h2>
<div class="grid grid-cols-1 gap-4">
<div class="code-block p-4">
<span class="text-green-300"># Scan specific ports</span><br>
<span class="text-blue-300">nmap</span> -p 22,80,443 <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Scan port range</span><br>
<span class="text-blue-300">nmap</span> -p 1-1024 <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Scan top ports</span><br>
<span class="text-blue-300">nmap</span> --top-ports 50 <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Scan all ports (slow)</span><br>
<span class="text-blue-300">nmap</span> -p- <target>
</div>
</div>
</section>
<!-- Output Options Section -->
<section class="mb-10 print-section">
<h2 class="text-2xl font-bold text-blue-600 border-b-2 border-blue-600 pb-2 mb-4 flex items-center">
<i data-feather="file-text" class="mr-2"></i> Output Options
</h2>
<div class="grid grid-cols-1 gap-4">
<div class="code-block p-4">
<span class="text-green-300"># Save to normal format</span><br>
<span class="text-blue-300">nmap</span> -oN output.txt <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Save to XML format</span><br>
<span class="text-blue-300">nmap</span> -oX output.xml <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Save to all formats</span><br>
<span class="text-blue-300">nmap</span> -oA output <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Verbose output</span><br>
<span class="text-blue-300">nmap</span> -v <target>
</div>
</div>
</section>
<!-- Scripting Engine Section -->
<section class="print-section">
<h2 class="text-2xl font-bold text-blue-600 border-b-2 border-blue-600 pb-2 mb-4 flex items-center">
<i data-feather="code" class="mr-2"></i> NSE Scripting Engine
</h2>
<div class="grid grid-cols-1 gap-4 mb-6">
<div class="code-block p-4">
<span class="text-green-300"># Run default scripts</span><br>
<span class="text-blue-300">nmap</span> -sC <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Run specific script</span><br>
<span class="text-blue-300">nmap</span> --script=http-vuln-cve2017-5638 <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Run script category</span><br>
<span class="text-blue-300">nmap</span> --script=vuln <target>
</div>
<div class="code-block p-4">
<span class="text-green-300"># Run multiple scripts</span><br>
<span class="text-blue-300">nmap</span> --script=smb-enum*,http-title <target>
</div>
</div>
<div class="bg-blue-600 bg-opacity-10 p-4 rounded-lg">
<h3 class="font-semibold text-blue-600 mb-2">Common Script Categories:</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
<div>
<span class="font-mono bg-white px-2 py-1 rounded">auth</span> - Authentication related<br>
<span class="font-mono bg-white px-2 py-1 rounded">default</span> - Default scripts<br>
<span class="font-mono bg-white px-2 py-1 rounded">discovery</span> - Service discovery<br>
<span class="font-mono bg-white px-2 py-1 rounded">dos</span> - Denial of service checks
</div>
<div>
<span class="font-mono bg-white px-2 py-1 rounded">exploit</span> - Exploit checks<br>
<span class="font-mono bg-white px-2 py-1 rounded">intrusive</span> - Potentially intrusive<br>
<span class="font-mono bg-white px-2 py-1 rounded">safe</span> - Safe scripts<br>
<span class="font-mono bg-white px-2 py-1 rounded">vuln</span> - Vulnerability checks
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="mt-12 text-center text-sm text-gray-500 no-print">
<p>Nmap Cheat Sheet - Security+ QuickCheat Pro</p>
<p class="mt-1">For optimal printing, use Chrome/Firefox and select "Background graphics" in print settings</p>
</footer>
</div>
<script>
feather.replace();
</script>
</body>
</html> |