Master Nmap in 27 Minutes: 60 Commands Every Hacker Needs — Transcript
Full transcript
- 0:00This is Sentinel. 60 Nmap commands, 27
- 0:03minutes, one live lab. No boring theory,
- 0:06no endless slides, just real commands,
- 0:08real targets, and real [music] results.
- 0:10We're testing network discovery, stealth
- 0:12techniques, firewall behavior, and
- 0:14attack surfaces across isolated Windows,
- 0:16Ubuntu, and Metasploitable machines.
- 0:18Everything is running inside a private
- 0:20VirtualBox lab for educational purposes.
- 0:2260 commands, 27 minutes. Let's start.
- 0:25Command one, the foundation. The most
- 0:27basic scan. We just type Nmap followed
- 0:30by our target IP, 192.168.56.106.
- 0:35Why start here? Because by default, Nmap
- 0:38automatically scans the top 1,000 most
- 0:40common TCP ports. Look at the screen. In
- 0:42just 2.27 seconds, we have our result.
- 0:45The system tells us 998 ports are
- 0:48closed, but port 22 for SSH and port
- 0:513,000 for PPP are wide open. In a
- 0:54real-world external pen test, these two
- 0:56open ports would be our immediate attack
- 0:58vectors. This is basic reconnaissance.
- 1:00Command two, who else is hiding on our
- 1:03network? In a real scenario, you rarely
- 1:05know your target's exact IP up front. We
- 1:07need to map the environment. We use the
- 1:09dash SN flag, also known as a ping scan.
- 1:12We are telling Nmap, "Don't waste time
- 1:14checking ports. Just sweep the entire
- 1:16subnet and tell me who is alive." Look
- 1:18at the output. In 7.42 seconds, it swept
- 1:21all 256 addresses, and we have exactly
- 1:24six active hosts on our network. This
- 1:27confirms our primary targets at the 105,
- 1:29106, and 107 addresses are up and
- 1:32running. Command three, surgical
- 1:34precision. Sometimes we don't need all
- 1:37the noise. If you're specifically
- 1:38hunting for web servers, scanning
- 1:40thousands of ports will just trigger the
- 1:42admin's alarms. To stay quiet and save
- 1:44time, we use the dash P flag followed by
- 1:46port 80. Our request to the
- 1:48Metasploitable machine came back in just
- 1:502.12 seconds, confirming that port 80 is
- 1:53indeed open for HTTP traffic. Fast,
- 1:56clean, and highly targeted. Command
- 1:57four, scanning a specific range. What if
- 2:00we only want to check the most critical
- 2:02system ports? They usually reside within
- 2:04the first thousand. By typing {dash} P1
- 2:07{dash} 1000, we scan our Windows 10
- 2:09machine strictly within this boundary.
- 2:12The result shows that out of 1000 ports,
- 2:14995 are closed, but critical Windows
- 2:17services like port 80, 135 for MSRP, 139
- 2:22for NetBIOS, 443, and 445 are sitting
- 2:26wide open. We know exactly where to
- 2:28strike. Command five, the exhaustive
- 2:30[music]
- 2:31sweep. Nothing stays hidden. Imagine a
- 2:33clever sysadmin hiding critical services
- 2:36on high, non-standard ports to avoid
- 2:38detection. How do we find them? We use
- 2:40{dash} P {dash}. That single {dash}
- 2:43tells Nmap to relentlessly scan every
- 2:45single one of the 65,535
- 2:48available TCP ports. It's loud, [music]
- 2:50but it works. Look at the result. In
- 2:5214.21 seconds, we've exposed every
- 2:55secret on the Metasploitable system.
- 2:57We're not just seeing the standard port
- 2:5922 or 80. We've uncovered unknown
- 3:01services hiding way up on ports 8180,
- 3:048787, and even 53541.
- 3:07Command six, the mistake. In
- 3:09cybersecurity, one missing letter can
- 3:12ruin an operation. Watch the screen
- 3:14closely. I tried to scan a TCP port 80
- 3:17and a UDP port 53 at the same time. But
- 3:19look, a yellow wing ring popped [music]
- 3:21up in the terminal. What is Nmap telling
- 3:23us? You requested a UDP port, but you
- 3:26forgot to include the {minus} SU flag
- 3:28for UDP scanning. Look how smart this
- 3:30tool is. It caught the error, ignored
- 3:32the UDP request, and just returned the
- 3:34TCP result. Always double-check your
- 3:36syntax. Command seven, the race against
- 3:39time. In live operations, time is your
- 3:41most expensive resource. If you don't
- 3:43have time for a full 1000 port scan, you
- 3:45use {dash} F for fast mode. Nmap uses
- 3:48its internal database to filter down and
- 3:50scan only the top 100 most commonly
- 3:52exploited ports in the world. And the
- 3:54result? Our Windows 10 machine was
- 3:57scanned in a blazing 3.23 seconds,
- 3:59handing us the most critical attack
- 4:01surfaces on a silver platter. Command
- 4:03eight, live monitoring. When your scan
- 4:05is targeting hundreds of machines and
- 4:06taking hours, you can't just stare at a
- 4:08blank terminal. You need to see what the
- 4:10system is doing in the background. We
- 4:12achieve this with dash V for versus
- 4:14mode. Now, instead of waiting until the
- 4:16very end, Nmap instantly prints
- 4:18discovered open port to the screen the
- 4:20exact millisecond it finds one. This
- 4:22gives you absolute real-time control
- 4:24over the operation.
- 4:28Command nine, the microscopic view. If
- 4:31one dash V gives you updates, what does
- 4:33double verbose dash VV do? It explains
- 4:36exactly why Nmap is making its
- 4:37decisions. Pay attention to the output.
- 4:40It doesn't just say port 22 is open. It
- 4:42explains why it thinks it's open,
- 4:44explicitly stating syn-ack TTL 64. This
- 4:47means the target server actively replied
- 4:49to our probe with a positive syn-ack
- 4:51flag. You aren't just using a tool, you
- 4:53are watching network protocols talk to
- 4:55each other. Command 10, the missing
- 4:57list. Mass scanning.
- 5:00Hackers don't sit there typing dozens of
- 5:02IP addresses manually. They load them
- 5:04all into a text file and feed it to the
- 5:06scanner. Let's type -iL
- 5:10throws an error. Failed to open input
- 5:13file targets.txt.
- 5:15File not found. The reason is simple. I
- 5:17forgot to actually create the target
- 5:19list file before running the command.
- 5:21The software won't think for you. Always
- 5:23prep your workspace and verify your
- 5:25files before launching an attack.
- 5:26Command 11, full connection, loud but
- 5:29reliable.
- 5:30The most classic port scanning method is
- 5:32-sT, the TCP connect scan. Nmap
- 5:36completes the full three-way handshake
- 5:38with every single port. It's incredibly
- 5:40reliable, but I guarantee you will leave
- 5:42massive footprints in the target's
- 5:44firewall logs. Let's check the screen.
- 5:46In 2.29 seconds, we successfully mapped
- 5:49every open port on the Metasploitable
- 5:50system from 21 FTP all the way up to
- 5:538180. Command 12, ninja mode. What if
- 5:57you don't want to end up in the security
- 5:58logs? We use {dash} SS, the SYN stealth
- 6:01scan. In this mode, Nmap never finishes
- 6:04the connection. It sends a SYN packet,
- 6:06gets the response, and immediately drops
- 6:08the connection before it's logged. On
- 6:10our Ubuntu machine, this command
- 6:11executed in a stealthy 2.22 seconds,
- 6:14silently finding port 22 and port 3000
- 6:17without raising alarms. Command 13, the
- 6:20UDP headache. Watch carefully. We are
- 6:22scanning UDP ports with {dash} SU.
- 6:24[music]
- 6:25Notice how the process completely froze.
- 6:27Look at the terminal. 6 minutes and 36
- 6:29seconds have passed, and Nmap says it's
- 6:31only 45.53%
- 6:34done. Why? Because UDP is
- 6:36connectionless. Firewalls silently
- 6:38swallow the packets, and Nmap just sits
- 6:40there waiting, thinking maybe the packet
- 6:42got lost, retrying endlessly. We are
- 6:44hitting control plus C. We don't have
- 6:46time for this. Command 14, the UDP speed
- 6:49hack. Let's take control. To make UDP
- 6:52scanning viable, we add {dash} F to scan
- 6:54only the top 100 ports, and {dash} T4 to
- 6:57force aggressive timing. Even though
- 6:59Nmap warns us about retransmission cap
- 7:01hit, we pulled the results in just 31.08
- 7:04seconds.
- 7:05>> [music]
- 7:05>> We successfully confirmed that the 137
- 7:07NetBIOS {dash} NS port is wide open via
- 7:10UDP on our Windows 10 machine. Command
- 7:1215, unmasking the services. Knowing a
- 7:15port is open is useless if you don't
- 7:17know what's running behind it. We need
- 7:19the exact software version to find
- 7:20[music] an exploit. The {dash} SV flag
- 7:23performs service version detection.
- 7:25In 13.93 seconds, it revealed that port
- 7:2821 isn't just FTP, it's explicitly
- 7:31running vsftpd 2.3.4, and port 80 is
- 7:34running Apache HTTPD 2.2.8. This is
- 7:37exactly the intelligence a hacker needs
- 7:39to find a working payload. Command 16,
- 7:42the deep interrogation. In our previous
- 7:44scans, Ubuntu's port 3000 just showed up
- 7:47as a generic PPP service. Let's apply
- 7:49pressure by adding missions intensity
- 7:51five. We force Nmap to interrogate the
- 7:53port heavily. Look at the screen. In
- 7:5613.58 seconds, Nmap didn't just identify
- 7:59the service. It ripped the raw HTML code
- 8:01right out of the web page, fully
- 8:03exposing that the famous vulnerable
- 8:04OWASP Juice Shop application is running
- 8:07there. That is brilliant analysis.
- 8:09Command 17, the light touch. If high
- 8:11intensity alerts the target or takes too
- 8:13long, you use version light. We scanned
- 8:16our Windows 10 machine using this fast
- 8:18lightweight method. In 16.76 seconds, we
- 8:21easily identified Apache HTTPD 2.4.58 on
- 8:25port 80 and the MariaDB database running
- 8:27on port 3306.
- 8:29Command 18, maximum effort. Let's
- 8:32unleash Nmap completely. The version all
- 8:34flag throws every single detection probe
- 8:36in Nmap's database at the target. In
- 8:3913.6 e-ro seconds, we stripped the
- 8:41Metasploitable system bare, generating a
- 8:43highly detailed report that exposes
- 8:45exact database versions like MySQL
- 8:485.0.51a
- 8:51and PostgreSQL 8.3.0.
- 8:54Command 19, two birds, one stone. Why
- 8:57run two scans when you can run one? We
- 8:59combine version detection -sV and
- 9:02operating system detection -O. In just
- 9:0414.97 seconds, we needed to know what
- 9:07architecture our Ubuntu system was
- 9:08running. Nmap proudly prints operating
- 9:11system details, Linux 4.15.5.19,
- 9:14[music]
- 9:14right to the terminal. We now hold the
- 9:16target's complete technical passport.
- 9:18Command 20, aggressive mode. This is why
- 9:20Nmap is the king of scanners. We trigger
- 9:23the -A flag. With one command, it
- 9:25simultaneously performs OS detection,
- 9:27version scanning, script scanning, and
- 9:29traceroute. Look at this massive
- 9:3128-second analysis.
- 9:33>> [music]
- 9:33>> It instantly warns us that anonymous FTP
- 9:35login allowed is wide open, identifies
- 9:37the exact Samba smbd 3.0.20 version, and
- 9:41even dumps the expiration dates of the
- 9:43SSL certificates. This isn't just a port
- 9:45scan. It's a full-scale intelligence
- 9:47operation. Command 21, targeting Windows
- 9:50SMB. If we are hunting Windows networks,
- 9:53we focus on the weakest links. Ports 139
- 9:56and 445 are the standard for file
- 9:59sharing and printers via the SMB
- 10:01protocol. In just 8.71 seconds, we
- 10:04confirm that both the NetBIOS SSN and
- 10:07Microsoft DS services are active on our
- 10:09Windows 10 target. Why is this critical?
- 10:12Because devastating ransomware, like
- 10:13WannaCry and the EternalBlue exploit,
- 10:15use these exact ports to compromise
- 10:17millions of systems worldwide.
- 10:20Command 22, OS fingerprinting. Let's
- 10:23find out exactly what build of Windows
- 10:25we are dealing with. The dash O command
- 10:27analyzes the specific way the target
- 10:29responds to TCP UDP packets, its
- 10:31fingerprint, to determine the OS. In
- 10:344.71 seconds, Nmap confidently mapped
- 10:37this machine as Microsoft Windows 10,
- 10:39specifically pinning it between builds
- 10:411709 and 21H2. This level of detail even
- 10:44hints at whether the system is fully
- 10:46patched.
- 10:47Command 23, the art of guessing.
- 10:50Systems don't always give themselves up
- 10:53easily. Hardened servers often drop
- 10:55packets to avoid detection. What do we
- 10:57tell Nmap to do? We use double dash
- 10:59Oscan-guess to allow it to make an
- 11:01educated assumption.
- 11:03In 3.58 seconds, Nmap analyzed the
- 11:06Metasploitable machine and
- 11:07cross-referenced its database to guess
- 11:09that it is running a Linux kernel
- 11:10between 2.6.9
- 11:12and 2.6.33.
- 11:14Even when the scanner isn't 100% sure,
- 11:17it gives you the best possible
- 11:18intelligence.
- 11:20Command 24, the time-saver. When
- 11:23auditing a corporate network with
- 11:25thousands of endpoints, you cannot
- 11:26afford to waste time analyzing dead
- 11:28hosts. The double dash Oscan-limit flag
- 11:32is irreplaceable.
- 11:33It tells Nmap to only attempt OS
- 11:35detection on hosts that have at least
- 11:37one open and one closed port, the
- 11:39perfect conditions for an accurate read.
- 11:41Our Ubuntu machine met the criteria, and
- 11:43in 3.62 seconds, its Linux 4.15.5.19
- 11:48identity was confirmed.
- 11:51Command 25, mapping the route. How far
- 11:54away is our target? Seeing the routers
- 11:56and hops between our machine and the
- 11:57target is vital for security analysis.
- 12:00We use the double-dash traceroute
- 12:01command to map the path. Look at the
- 12:03screen under the traceroute section. Our
- 12:05target is just one hop away, sitting at
- 12:07a 3.19 ms distance.
- 12:09>> [music]
- 12:09>> If we were scanning across the internet,
- 12:11you would see dozens of intermediate IP
- 12:13addresses listed here.
- 12:15Command 26, the invisible trace.
- 12:18What if you want to find the exact route
- 12:20to a device without poking its ports and
- 12:22triggering security alarms? We combine
- 12:24{dash}sn, do not port scan, with
- 12:26double-dash traceroute. Instantly, in
- 12:28just 2.08 seconds, we mapped the
- 12:31location of the Ubuntu machine with a
- 12:32blazing 0.74 ms ping speed, a flawless
- 12:36geographical trace with absolutely zero
- 12:38port noise.
- 12:41Command 27, local network dominance.
- 12:44>> [music]
- 12:44>> On a local area network, standard IP
- 12:46packets aren't always the best choice.
- 12:48ARP scanning is the ultimate guaranteed
- 12:51method for local discovery.
- 12:53The {if}tpr command sweeps the network
- 12:55using ARP requests, which no local
- 12:57operating system firewall can block or
- 12:59hide from. Although sweeping the entire
- 13:01subnet took 2.13 seconds, the result is
- 13:04definitive. Out of 256 possible
- 13:06addresses, it mapped exactly six active
- 13:08devices in real time.
- 13:11Command 28, bypassing ICMP blocks. What
- 13:15do you do when a strict firewall blocks
- 13:17all traditional ICMP pings? Most
- 13:19computers will appear dead to the
- 13:21scanner. This is where UDP ping shines.
- 13:23Using {dash}pu53, we send a probe
- 13:26directly to port 53, the DNS port.
- 13:28Firewalls almost always allow DNS
- 13:30traffic through and look at [music]
- 13:32that, the Windows 10 machine revealed
- 13:34itself returning a response in just
- 13:350.022 s latency confirming the host is
- 13:39up.
- 13:41Command 29, the classic ping.
- 13:44Sometimes the simplest tool is the most
- 13:46reliable. We use the dash PE flag to
- 13:48send a standard ICMP echo request to the
- 13:51target. This is the most widely used
- 13:53method to verify if a system is online.
- 13:56As you can see on the terminal, the
- 13:57Metasploitable system replied in 2.29
- 13:59seconds proving our request traveled and
- 14:02returned with a latency of just 0.0020
- 14:05s. Command 30, Nmap's x-ray machine.
- 14:08Watch the screen closely. If you want to
- 14:10see exactly what Nmap is doing behind
- 14:12the scenes, double dash packet dash
- 14:14trace is your x-ray vision. Look at this
- 14:16massive flood of data hitting the
- 14:18terminal.
- 14:19From the initial ARP requests to
- 14:20hundreds of TCP connections, you see
- 14:22every sent and RCVD line. We are
- 14:25watching every single byte of data
- 14:27leaving our machine and returning from
- 14:28the target live.
- 14:30When a scan fails or a firewall blocks
- 14:32you, elite engineers read this raw
- 14:33traffic trace to find the exact point of
- 14:35failure.
- 14:37Command 31, exposing the reasoning.
- 14:40How does Nmap actually know a port is
- 14:41open?
- 14:42It doesn't just guess. By adding the
- 14:44double reason flag, we force the scanner
- 14:46to justify its results. Look at the
- 14:48terminal. Next to every open port, it
- 14:50explicitly prints SYNACKTTL64.
- 14:54This proves that the target machine
- 14:55actively responded to our TCP SYN
- 14:58packets with an acknowledgement. Trust,
- 15:00but verify.
- 15:03Command 32. Unleashing the Nmap
- 15:06scripting engine. Port scanning is just
- 15:08the beginning. The dash SC flag runs a
- 15:10batch of default safe scripts against
- 15:12the target. It's like sending an army of
- 15:14automated mini hackers. In 79.83
- 15:17seconds, it extracted SSH host keys,
- 15:20identified the MySQL salt, and flagged
- 15:22that anonymous FTP login is permitted.
- 15:25We are moving from reconnaissance to
- 15:26active vulnerability hunting.
- 15:30Command 33, auditing authentication. We
- 15:33want to know how the target system
- 15:35allows users to log in. We run the
- 15:37authentication scripts against our
- 15:38Ubuntu machine. Instantly, Nmap probes
- 15:41the SSH service on port 22 and reveals
- 15:44the supported authentication methods,
- 15:46public key [music] and password. It even
- 15:48checks if any public keys are accepted
- 15:50by default. This tells us exactly which
- 15:53brute force methods might work.
- 15:55Command 34, the system crash. Watch
- 15:57closely. I trigger the default and safe
- 15:59scripts simultaneously and the terminal
- 16:02completely crashes. ZSH segmentation
- 16:05fault. This is raw cyber security.
- 16:08Sometimes, the scripts within Nmap have
- 16:10memory management conflicts with the
- 16:12operating system when querying specific
- 16:13targets. When your tools break, [music]
- 16:15you don't panic. You drop the unstable
- 16:17script and move to the next vector.
- 16:20Command 35, hitting Windows where it
- 16:22hurts. When you are auditing a corporate
- 16:24environment, the SMB protocol is usually
- 16:27your gold mine. Instead of just guessing
- 16:29the OS, we run the SMB OS discovery
- 16:32script. In exactly 2.69 seconds, Nmap
- 16:36reaches directly into the Windows 10
- 16:37machine and pulls out the exact
- 16:39operating system details over the
- 16:40network.
- 16:41>> [music]
- 16:41>> If a system administrator left SMB
- 16:43exposed, they just gave us the blueprint
- 16:45to their machine.
- 16:48Command 36.
- 16:50>> [music]
- 16:50>> Now that we know it's Windows, we throw
- 16:51every known SMB vulnerability script at
- 16:53it using the wildcard SMB-VULN asterisk.
- 16:57This checks for devastating flaws like
- 16:59MS10-061.
- 17:01But, look at the result taking 7.75
- 17:03seconds. Could not negotiate a
- 17:05connection. Failed to receive bytes.
- 17:07What does this mean? The Windows 10
- 17:09firewall or patching system actively
- 17:11rejected the malicious payload
- 17:13negotiation. The defense held up. We
- 17:15have to find another way in.
- 17:18Command 37, reading the web without
- 17:20opening a browser. If you visit a
- 17:22target's IP in Google Chrome, you leave
- 17:24browser fingerprints in their access
- 17:26logs. We don't want that. We target port
- 17:2880 using the HTTP-title script. In just
- 17:322.20 seconds, Nmap quietly grabs the
- 17:35hidden webpage title, returning
- 17:36Metasploitable 2 Linux. We now know
- 17:39exactly what web application framework
- 17:41is running without ever visiting the
- 17:42site.
- 17:44Command 38, web administrators often
- 17:47think hiding a folder makes it secure.
- 17:49Let's prove them wrong. We use the
- 17:51HTTP-enum script to blindly brute force
- 17:54hidden directories [music] on the web
- 17:55server. In just 4.97 seconds, Nmap
- 17:58exposes critical unlinked folders. Look
- 18:01at the terminal. /phpmyadmin/,
- 18:04/doc/, and /tikiwiki/
- 18:07are sitting right there. We just mapped
- 18:09the web server's internal admin
- 18:10structure without a single click.
- 18:13Command 39, testing the front doors.
- 18:16File Transfer Protocol on port 21 is
- 18:18notorious for misconfigurations. The
- 18:21FTP-anon script checks the most common
- 18:23one. Look at the output. Anonymous FTP
- 18:25login allowed.
- 18:26>> [music]
- 18:27>> The server is literally letting anyone
- 18:28log in without a password. In a
- 18:30real-world scenario, this is where you
- 18:32drop a reverse shell or extract
- 18:34sensitive company data. Command 40, the
- 18:36brute force assault. If there are no
- 18:38easy misconfigurations, we force our way
- 18:40in. We launch a relentless SSH brute
- 18:43attack against the Ubuntu system. Look
- 18:45at the terminal. This is automated
- 18:47intrusion in real time. Nmap is firing
- 18:49hundreds of login combinations per
- 18:51minute. Root, root, admin, admin, user,
- 18:54password. It is actively battering the
- 18:56SSH port, testing the strength of the
- 18:58target's password policy.
- 19:05Command 41, moving to the back end.
- 19:08Databases are the crown jewels of any
- 19:10network. We aim at port 3,306
- 19:13and run my SQL {dash} info in a
- 19:16lightning fast 2.14 seconds. We don't
- 19:18just see that my SQL is open. We pull
- 19:21the exact 5.0.51
- 19:23{a-3} Ubuntu 5 version, its
- 19:25capabilities, and most dangerously, we
- 19:27expose its cryptographic salt. We are
- 19:29gathering the puzzle pieces needed to
- 19:31break their encryption. Command 42, the
- 19:34holy grail. We drop the hammer. We run
- 19:36the legendary double script vault.
- 19:38Notice how this scan takes much longer,
- 19:40nearly 5 and 1/2 minutes. It is
- 19:42aggressively testing the system against
- 19:44a massive database of known exploits.
- 19:46And look at the screen bleed red. The
- 19:48scan rips the target apart, revealing
- 19:50the infamous vsftpd version 2.3.4
- 19:53backdoor, the SSL poodle information
- 19:56leak, and CCS injection. It even found a
- 19:58trojan unreal IRCD backdoor. This
- 20:01machine is completely compromised.
- 20:03Command 43, Nmap is not just a scanner,
- 20:06it is a weapon. Finding a hole is one
- 20:08thing, proving it can be breached is
- 20:09another. By running the exploit script,
- 20:12we command Nmap to actively test the
- 20:13attack vectors it just found. In 42
- 20:16seconds, it verifies the vsftpd backdoor
- 20:19and attempts to establish a foothold. We
- 20:21have crossed the line from passive
- 20:22reconnaissance to active exploitation.
- 20:25Command 44, the raw reality of hacking.
- 20:28Watch closely. I try to run the not
- 20:30intrusive scripts against our Ubuntu
- 20:31target and boom, the terminal completely
- 20:34crashes, throwing a ZSH segmentation
- 20:36fault. This is unfiltered cybersecurity.
- 20:39Sometimes, complex script loads cause
- 20:41memory management failures between Nmap
- 20:43and your operating system. When your
- 20:44tools break in the field, you don't
- 20:46panic. You adapt, drop the unstable
- 20:48script, and keep moving.
- 20:52Command 45, the human error. I command
- 20:55Nmap [music] to execute a highly
- 20:57targeted brute force attack using my own
- 20:59custom dictionaries. The result, error
- 21:01parsing username list users.txt, no such
- 21:04file or directory. I failed to prepare
- 21:06my payload files before launching the
- 21:07attack. The scanner is an unforgiving
- 21:09machine. It demands absolute precision.
- 21:12Always prep your workspace.
- 21:14Command 46, the privilege block. I try
- 21:17to update the Nmap vulnerability
- 21:18database to get the latest scripts by
- 21:20typing double-script-updatedb.
- 21:23The system fires back, permission
- 21:25denied. Why? Because modifying the core
- 21:27security database requires root
- 21:29privileges. You cannot bypass local
- 21:31security policies without using sudo.
- 21:33It's a reminder that even the attacker
- 21:35must follow the rules of their own
- 21:36operating system.
- 21:39Command 47, advanced evasion tactics.
- 21:42How do we bypass a strict intrusion
- 21:44detection system? We shatter our
- 21:46footprint. The dash f flag fragments our
- 21:49IP packets into tiny 8-byte pieces.
- 21:52When these broken fragments hit the
- 21:53firewall, it becomes incredibly hard for
- 21:55defensive filters to assemble and read
- 21:57the malicious signature. In 2.82
- 21:59seconds, we slip right through the net.
- 22:01Command 48, total control over the
- 22:04network layer. To be stealthier than
- 22:06standard fragmentation, we use
- 22:08double-mtu-24.
- 22:10This manually forces the maximum
- 22:12transmission unit to just 24 bytes. The
- 22:15result [music] is a highly customized
- 22:16and unusual packet stream, and Windows
- 22:1910's deep packet inspection is
- 22:20completely blinded by the weird traffic.
- 22:22We retrieve the open ports in just 2.64
- 22:25seconds. Command 49, smoke and mirrors.
- 22:28If you don't want the admin to block
- 22:30your IP, you mask it. [music] We use the
- 22:32dash drnd:10
- 22:34flag. This incredible feature hides our
- 22:36real scan behind 10 randomly generated
- 22:39fake IP addresses. When the Ubuntu
- 22:41server's security logs check who's
- 22:42scanning them, they see a chaotic flood
- 22:44of 11 different IP addresses, making it
- 22:47nearly impossible to pinpoint the real
- 22:49attacker. Command 50, framing the
- 22:51innocent. Random IPs are good, but
- 22:53specific decoys are [music] better. We
- 22:55tell Nmap to make the scan look like
- 22:57it's coming from the Windows machine,
- 22:58the Ubuntu machine, and our real IP
- 23:01labeled as me all at the same time. The
- 23:04Metasploitable system thinks its own
- 23:05trusted network neighbors are attacking
- 23:07it. This is how you weaponize internal
- 23:09[music] trust.
- 23:11Command 51, the total spoofing attempt.
- 23:14We try to completely fake our source IP
- 23:16using the dash S flag, making it look
- 23:18like the Windows machine is doing the
- 23:20scan alone. But Nmap throws a critical
- 23:22warning, "Failed to determine route."
- 23:24This is a vital networking lesson. You
- 23:26cannot perfectly spoof an IP address if
- 23:29your machine's routing table isn't
- 23:30explicitly configured to handle the
- 23:32return traffic for the deception. The
- 23:34packet can be faked, but the network
- 23:36still needs a route back. Command 52,
- 23:38disguising the attack vector. Firewalls
- 23:41are paranoid, but they often blindly
- 23:43trust certain types of traffic like DNS.
- 23:46By using {dash} {dash} source port 53,
- 23:49we manipulate our packets so the
- 23:50firewall thinks our invasive scan is
- 23:52just harmless domain name system
- 23:54traffic. The security rules let us right
- 23:56in, and we map the target in just 2.64
- 23:59seconds. Command 53, breaking the
- 24:01signatures. Advanced firewalls know what
- 24:03a standard Nmap packet looks like based
- 24:05on its exact size. So, we change the
- 24:08size.
- 24:08>> [music]
- 24:09>> After a quick typo correction in the
- 24:10terminal, we use {dash} {dash} data
- 24:12length 25. This injects 25 bytes of
- 24:15random garbage data into every packet.
- 24:17The firewall's signature database no
- 24:19longer recognizes our traffic, and we
- 24:21bypass the alarm systems. Command 54,
- 24:23scrambling the radar. When you scan an
- 24:25entire subnet, going sequentially from
- 24:27IP.1 to 255 can trigger automated
- 24:30defense systems almost instantly
- 24:32>> [music]
- 24:32>> because the traffic looks artificial. We
- 24:34use {dash} {dash} randomize hosts to
- 24:36scramble the scanning order across 256
- 24:39IP addresses. Instead of moving in a
- 24:41predictable sequence, the scan sweeps
- 24:43across the network in a completely
- 24:44unpredictable, chaotic pattern, making
- 24:46it much harder for sequential detection
- 24:48algorithms to identify the scanning
- 24:50pattern.
- 24:52Command 55, probing the armor. At At
- 24:55local network layer, your MAC address is
- 24:57your true identity. We try to spoof it
- 24:59to an unknown vendor using {dash} {dash}
- 25:02{spoof} {dash} {MAC} zero, but look at
- 25:04the result. Host seems down. The Windows
- 25:06firewall or the network switch caught
- 25:08the unusual MAC address and dropped our
- 25:10connection. This is an important
- 25:12security lesson. True security systems
- 25:15don't just watch IP addresses, they
- 25:17watch the hardware, too. Command 56,
- 25:19testing packet integrity. We send
- 25:22intentionally corrupted packets using
- 25:24{dash} {dash} bad sum. If a system
- 25:26replies to a packet with a bad checksum,
- 25:28it can reveal that the traffic isn't
- 25:29being properly filtered, but our target
- 25:31ignores all 1,000 ports returning
- 25:34filtered. That tells us something
- 25:35important. A security device is sitting
- 25:37in front of the target inspecting the
- 25:39traffic before it reaches the host.
- 25:41Every packet is being checked and
- 25:43anything that fails the integrity check
- 25:44is dropped.
- 25:46Command 57, mapping the rules. The
- 25:49{dash} {SA} TCP ACK scan isn't meant to
- 25:52find open ports. It's designed to map
- 25:55out firewall rule sets. By sending an
- 25:57acknowledgement packet out of nowhere,
- 25:58we wait to see what the firewall does.
- 26:00Does it drop the packet or does it send
- 26:02a reset? In our test, all 1,000 ports
- 26:05are reported as unfiltered on the
- 26:06Windows machine. That gives us critical
- 26:08intelligence. The firewall is not
- 26:10actively blocking our specific IP range.
- 26:12The rules are mapped. Now we know where
- 26:15the barrier isn't.
- 26:17Command 58, the ultimate stealth
- 26:19sequence begins. We send a null scan
- 26:22using {dash} {SN} with absolutely zero
- 26:24TCP flags set. It's an unusual packet,
- 26:27one that shouldn't normally exist.
- 26:29Windows drops it, but the Linux-based
- 26:30Ubuntu machine reacts differently.
- 26:32[music]
- 26:33It returns an open or filtered response
- 26:35for our target ports. We are exploiting
- 26:37a fundamental difference in how
- 26:38operating systems handle unexpected
- 26:40protocol traffic. Same packet, different
- 26:43operating system, different response.
- 26:45Command 59, the infamous Xmas scan.
- 26:49If zero flags didn't work, what about
- 26:51all of them? We use {dash} sx. This sets
- 26:55the fin, psh, and [music] urg flags
- 26:58simultaneously, lighting up the packet
- 27:00like a Christmas tree. This chaotic
- 27:02packet is designed to bypass standard,
- 27:04poorly configured router firewalls,
- 27:06especially those that only look for syn
- 27:08packets. Different flags, different
- 27:10packet, different detection challenge.
- 27:13Command 60. For our final command, we
- 27:15execute the ghost protocol, {dash} t0,
- 27:17the paranoid timing template. Look at
- 27:19the terminal. I hit space, but it's
- 27:21completely frozen at 0.00%
- 27:24done. Nmap is now waiting 5 full minutes
- 27:26between sending every single packet. The
- 27:28goal, to minimize detection by intrusion
- 27:30detection systems. A full scan like this
- 27:32could take weeks to finish. So, we're
- 27:34pulling the plug here. And that's
- 27:35command 60, exactly 27 minutes.
- 27:3960 practical, [music] raw, and sometimes
- 27:42broken commands executed in a live lab.
- 27:45You saw firsthand that real
- 27:47cybersecurity isn't a movie.
- 27:49Files go missing, syntax errors happen,
- 27:52scripts crash, and firewalls fight back.
- 27:55The true skill lies in how you
- 27:56troubleshoot, and how you adapt when
- 27:58those defenses fight back.
- 28:01So, which of these 60 commands was your
- 28:03favorite? And which one are you going to
- 28:05test in your own lab? Let me know in the
- 28:08comments below. If this operation
- 28:10upgraded your arsenal, hit the like
- 28:11button and subscribe to Sentinel. Keep
- 28:14your defenses strong, and I'll see you
- 28:16in the next operation.
About this transcript
This page contains the full transcript of Master Nmap in 27 Minutes: 60 Commands Every Hacker Needs by HackLab by CyberSentinel, generated from the public captions YouTube serves with the video. The transcript has 4,552 words across 764 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.