Latest / CyberSecurity Summary / Ultimate Penetration Testing with Nmap: Master Cybersecurity Assessments for Network Security, Monitoring, and Scanning Using Nmap
Transcript
- 0:00Speaker 1: Okay, let's unpack this. Have you ever picked up a
- 0:02Speaker 1: tool that seems straightforward at first glance, like a simple
- 0:05Speaker 1: multi tool, only to discover it can well build an
- 0:09Speaker 1: entire house or maybe even a city.
- 0:10Speaker 2: Uh huh.
- 0:11Speaker 1: Well, today we're taking a deep dive into end map,
- 0:14Speaker 1: a tool in cybersecurity that's far more powerful than most realize.
- 0:18Speaker 1: It's often misunderstood as just a basic port scanner, but
- 0:22Speaker 1: it's truly a precision instrument for gaining profound insight into
- 0:27Speaker 1: systems and networks.
- 0:28Speaker 2: It's remarkable, isn't it. And map has been around since
- 0:30Speaker 2: nineteen ninety seven. That's like even before Google was a
- 0:33Speaker 2: household name.
- 0:34Speaker 1: Wow. Yeah.
- 0:35Speaker 2: Yet its continuous evolution, driven by constant updates and community contributions,
- 0:40Speaker 2: keeps it incredibly relevant and capable.
- 0:43Speaker 1: So what's our goal today?
- 0:44Speaker 2: Our mission today is to cut through the noise and
- 0:46Speaker 2: give you a real shortcut to understanding end map's core functions.
- 0:50Speaker 2: It's absolutely crucial role in a cybersecurity career, and importantly,
- 0:54Speaker 2: how it's ethically and legally applied in real world scenarios.
- 0:58Speaker 1: And we've drawn some incredibly insights from a fantastic source
- 1:02Speaker 1: ultimate penetration testing with enmap, which is hot off the
- 1:06Speaker 1: presses from March twenty twenty four.
- 1:08Speaker 2: Very current.
- 1:09Speaker 1: Yeah, so this deep dive is custom tailored for you,
- 1:12Speaker 1: whether you're just curious or maybe prepping for a critical
- 1:15Speaker 1: meeting in the world of offensive security. We'll explore surprising facts,
- 1:20Speaker 1: real world anecdotes, and give you those aha moments about
- 1:24Speaker 1: a tool that genuinely elevates cybersecurity assessments. Let's start right
- 1:28Speaker 1: where the magic happens. Many people hear enmap and immediately
- 1:32Speaker 1: think port scanner the default thought, and while that's its
- 1:36Speaker 1: fundamental core, saying endmap is just a port scanner is
- 1:39Speaker 1: kind of like saying a master chef only knows how.
- 1:41Speaker 2: To boil water, exactly, a huge oversimplification. Sure, you can
- 1:45Speaker 2: use it for a simple scan, but in the right hands,
- 1:47Speaker 2: it becomes this incredibly versatile instrument, and the foundation of
- 1:51Speaker 2: Enmap's depth, what allows it to be that precision instrument
- 1:53Speaker 2: you mentioned truly begins with a solid understanding of basic
- 1:57Speaker 2: network elements, things like ports and protocol.
- 2:00Speaker 1: The fundamentals.
- 2:01Speaker 2: Absolutely, as you know any experience network pro knows, ports
- 2:05Speaker 2: are virtual anchor points that services us to process network traffic.
- 2:09Speaker 2: We're talking over sixty five thousand potential ports primarily using
- 2:13Speaker 2: either TCP Transmission Control Protocol or UDP User Data gram Protocol,
- 2:18Speaker 2: and the distinction, particularly PCP's essential three way handshake s
- 2:22Speaker 2: y n s y m ack ack is crucial.
- 2:24Speaker 1: Why is that?
- 2:25Speaker 2: Well, if that handshake gets interrupted, maybe by a firewall,
- 2:29Speaker 2: the connection just isn't established. Simple as that. Familiar TCP
- 2:32Speaker 2: ports like eighty for HTTP and four forty three for
- 2:35Speaker 2: HTTPS are classic examples everyone knows.
- 2:38Speaker 1: So how does this foundational knowledge translate when we actually
- 2:41Speaker 1: put endmap to work. Our source material uses the public
- 2:44Speaker 1: scan m dot nmap dot org target to illustrate this really.
- 2:47Speaker 2: Well, yeah, that's a great test bed.
- 2:49Speaker 1: A simple default scan just ENMP scan me dot nmap
- 2:52Speaker 1: dot org immediately reveals a wealth of information. You'll see
- 2:55Speaker 1: not just open ports like twenty two, nine nine, twenty
- 2:57Speaker 1: nine and uh three one three three classic hacker port right,
- 3:01Speaker 1: but also filtered ones like twenty five, eighty and five
- 3:03Speaker 1: four to thirty one at the top one thousand common boards.
- 3:05Speaker 2: End map scans by default, and the output it even
- 3:08Speaker 2: classifies six distinct port states open, closed, filtered, unfiltered, open
- 3:13Speaker 2: filtered and.
- 3:14Speaker 1: Closed filtered and filtered usually means.
- 3:16Speaker 2: Filtered often hints at a firewalls, presence blocking or dropping
- 3:20Speaker 2: the probes. Okay, now here's where nmp's true power begins
- 3:24Speaker 2: to reveal itself. By adding what are called flags or options,
- 3:28Speaker 2: you dramatically expand its capabilities flags.
- 3:31Speaker 1: Right like command line switches exactly.
- 3:33Speaker 2: Consider the atch a flag. You can think of it
- 3:35Speaker 2: as a for all, it tells nmap to go dupe
- 3:38Speaker 2: on scan m dot nmap dot org. For instance, it
- 3:40Speaker 2: can uncover the operating system like Ubuntu Linux and precise
- 3:44Speaker 2: service versions such as open SSAH six point six point
- 3:47Speaker 2: one and a patchy two point four point seven. You
- 3:50Speaker 2: might even notice Port eighty shift from filtered to open
- 3:52Speaker 2: as nmap gathers more info.
- 3:54Speaker 1: Ah, so it gets smarter as it goes sort of yeah.
- 3:57Speaker 2: Or for surgical precision, nash svvp T twenty two targets
- 4:01Speaker 2: just port twenty two for service versioning while providing verbose
- 4:04Speaker 2: output telling you exactly what it's doing.
- 4:06Speaker 1: Got it?
- 4:06Speaker 2: And for immediate vulnerability insights the script vulners dot NSS flag.
- 4:12Speaker 2: This one's amazing. It can pull a list of known
- 4:16Speaker 2: vulnerabilities for a specific version like OpenSSH six point six
- 4:20Speaker 2: point one P one directly from the vulners dot org database,
- 4:24Speaker 2: complete with CBS scores.
- 4:26Speaker 1: Wow. So it goes from scanner to vulnerability assessment tool
- 4:30Speaker 1: just like that.
- 4:30Speaker 2: Precisely it transforms.
- 4:32Speaker 1: That's a lot of options, right, But the core insight
- 4:34Speaker 1: here isn't just knowing these flags individually, but understanding how
- 4:38Speaker 1: their strategic combination transforms en map exactly. It's about the synergy.
- 4:42Speaker 1: It moves from just a scanner into this sophisticated diagnostic tool,
- 4:46Speaker 1: letting you tailor your reconnaissance for almost any scenario. And
- 4:49Speaker 1: the good news is you don't have to memorize every
- 4:51Speaker 1: single flag. End map itself has built in help with
- 4:54Speaker 1: the aashlag always useful or the man map command in Linux,
- 4:56Speaker 1: and of course the full documentation is always online at
- 4:59Speaker 1: ndmap dot org.
- 5:00Speaker 2: Yep, the website's indispensable.
- 5:01Speaker 1: The power, as the book really highlights, comes from combining
- 5:05Speaker 1: these flags strategically, moving beyond individual features to truly amplified capabilities.
- 5:11Speaker 1: So if n map sounds this powerful, you might be wondering, Okay,
- 5:14Speaker 1: how does it really fit into a cybersecurity career? The
- 5:17Speaker 1: field is, well, it's incredibly vast. Oh yeah, huge from
- 5:22Speaker 1: deep cryptography to proactive thread hunting. Many aspiring professionals try
- 5:26Speaker 1: to be open to anything you know, focusing on roles
- 5:29Speaker 1: like SoC analysts, GRC, and pen testing all at once.
- 5:33Speaker 1: The scattergun approach right, but that often leads to knowledge
- 5:36Speaker 1: that's as they say, a mile wide and an inch
- 5:38Speaker 1: deep very common. What's far more effective is gaining a
- 5:41Speaker 1: solid baseline than truly deep diving into a particular area specialize,
- 5:46Speaker 1: which leads.
- 5:46Speaker 2: To an important question, where exactly does end map fit
- 5:50Speaker 2: into that specialized deep dive. It's a foundational tool. It
- 5:53Speaker 2: shows up on baseline SERTs like CompTIA Security Plus and
- 5:57Speaker 2: more specialized ones like penthest plus and Certified Epic Hacker
- 6:00Speaker 2: CEH for hands on exams like EJPC or OSCP. You'll
- 6:04Speaker 2: absolutely rely on it for critical reconnaissance, so.
- 6:07Speaker 1: It's unavoidable for offensive security roles pretty much.
- 6:10Speaker 2: NMAP is most applicable to network penetration tests, purple teaming,
- 6:14Speaker 2: and red teaming. Instead of a generic answer like oh,
- 6:17Speaker 2: i'd scan ports and analyzed services, with NMAP, you'll learn
- 6:20Speaker 2: to confidently articulate a much more nuanced.
- 6:23Speaker 1: Approach like what give us an example.
- 6:25Speaker 2: Like saying i'd begin mapping the attack surface by enumerting
- 6:28Speaker 2: ports and services with a custom end map scan designed
- 6:32Speaker 2: to minimize network noise, maybe using packet fragmentation and reduce speed,
- 6:37Speaker 2: scanning only the local subnet first and definitely avoiding the
- 6:40Speaker 2: gateway initially. I'd then output that to an XML file
- 6:44Speaker 2: for import into Legion for a graphical view.
- 6:47Speaker 1: Okay, that sounds like someone who knows what they're doing exactly.
- 6:50Speaker 2: That immediately signals a much higher degree of knowledge to
- 6:53Speaker 2: anyone listening.
- 6:53Speaker 1: That's a powerful example of real world application. How do
- 6:57Speaker 1: you in a real engagement and balance that minimize network
- 7:02Speaker 1: noise approach with the client's desire for comprehensive coverage. Are
- 7:07Speaker 1: the trade offs you often have to explain?
- 7:09Speaker 2: Oh, definitely, it's all about communication. Really. You balance it
- 7:13Speaker 2: by setting clear expectations upfront in the rules of engagement,
- 7:16Speaker 2: the row y right the contract, and through regular check
- 7:19Speaker 2: ins during the test. You explain that a stealthier scan
- 7:23Speaker 2: might not find every single open port on day one,
- 7:25Speaker 2: but it greatly reduces the risk of detection by the
- 7:28Speaker 2: blue team and allows for a more prolonged, potentially more
- 7:32Speaker 2: effective engagement.
- 7:33Speaker 1: So it's a time versus stealth calculation.
- 7:36Speaker 2: Often, Yeah, it's a conversation you have with the client
- 7:38Speaker 2: based on their goals. So having covered the indispensable technical
- 7:42Speaker 2: aspects of end MAP and its role in a career,
- 7:45Speaker 2: a crucial layer we absolutely must add now is the
- 7:48Speaker 2: ethical and legal framework that governs its use.
- 7:51Speaker 1: That's a critical point. MAP performs active reconnaissance. It's establishing
- 7:56Speaker 1: direct connections with targets, right, It's knocking on the door,
- 7:59Speaker 1: which means you must have explicit permission from the system owner,
- 8:02Speaker 1: no exceptions none.
- 8:04Speaker 2: Compare this to passive reconnaissance like using shodand on io,
- 8:07Speaker 2: which queries archived publicly available information without any direct connection
- 8:11Speaker 2: to the target system itself.
- 8:13Speaker 1: Ah okay, so showed in is like looking at public records,
- 8:16Speaker 1: en MAP is like trying the doorknob.
- 8:18Speaker 2: That's a decent analogy. Yeah, this distinction is absolutely crucial
- 8:22Speaker 2: for legal and professional use. Ethically, on a broader scale,
- 8:25Speaker 2: this means you also carry a profound ethical responsibility as
- 8:28Speaker 2: a penetration tester. One of the cardinal rules is to
- 8:31Speaker 2: avoid impacting the CIA triad, confidentiality, integrity, and crucially here
- 8:37Speaker 2: availability ACA triad.
- 8:39Speaker 1: Right. Yeah, the core tenets.
- 8:41Speaker 2: Well, n MAP itself rarely causes major service disruption on
- 8:44Speaker 2: its own. Aggressive scanning using unsafe arguments or maybe untested scripts,
- 8:49Speaker 2: especially when aimed at fragile legacy systems, oh boy, can
- 8:53Speaker 2: very realistically impact the availability of systems. Taking down production
- 8:57Speaker 2: systems is not only a very bad day for you,
- 8:59Speaker 2: but it can have serious consequences.
- 9:01Speaker 1: For your client career, limiting potentially potentially.
- 9:03Speaker 2: Yes, So, understanding precisely what your scans are doing and
- 9:07Speaker 2: how they're doing it is ter amount. You need to
- 9:09Speaker 2: know your tool to truly.
- 9:11Speaker 1: Unlock end maps capabilities. In security assessments, it's crucial we
- 9:15Speaker 1: clarify the distinct roles of say, automated vulnerability scans versus
- 9:19Speaker 1: a nuanced penetration test. These terms get mixed up all
- 9:23Speaker 1: the time, constantly. Yeah. The vulnerability scanner, like NESSUS or
- 9:27Speaker 1: OpenVAS is primarily a tool for enumerting systems, identifying CPE
- 9:33Speaker 1: Common Platform.
- 9:34Speaker 2: Enumeration standardized names for software and hardware right.
- 9:38Speaker 1: And then automating the search for cvees, common vulnerabilities and exposures.
- 9:42Speaker 1: They're fantastic for recurring checks, but they are inherently prone
- 9:46Speaker 1: to false positives and false negatives.
- 9:48Speaker 2: What makes this particularly compelling is that many commercial and
- 9:51Speaker 2: even open source vulnerability scanners actually leverage end map under
- 9:55Speaker 2: the hood to gather that initial CPE information.
- 9:58Speaker 1: Oh interesting, So endmap is often part of the engine.
- 10:01Speaker 2: Often yeah for our purposes though. Penetration test is a
- 10:04Speaker 2: highly involved, intricate process, using both automated and manual techniques,
- 10:08Speaker 2: often from a black box.
- 10:09Speaker 1: Perspective, meaning you start with zero knowledge.
- 10:12Speaker 2: Pretty much no prior knowledge of the client's organization beyond
- 10:15Speaker 2: the scope defined in the Rules of Engagement the ROWE.
- 10:18Speaker 2: The ultimate goal is to simulate a sophisticated malicious actor
- 10:22Speaker 2: actively trying to avoid detection and achieve specific objectives.
- 10:27Speaker 1: To achieve this kind of deep simulation, pent testers follow
- 10:30Speaker 1: industry recognized frameworks, don't they.
- 10:32Speaker 2: Yes, absolutely, We'll be mapping end map techniques to both
- 10:36Speaker 2: the IMEI r RK framework, specifically the reconnaissance tactic and
- 10:41Speaker 2: active scanning techniques like IP blocks, vulnerability scanning, and wordless stanning,
- 10:47Speaker 2: and also the Lockheed Martin cyber kill chain, which illustrates
- 10:50Speaker 2: the logical progression of an advanced persistent threat and apt
- 10:54Speaker 2: from reconnaissance all the way to actions on objectives.
- 10:57Speaker 1: Got IT frameworks provide structure.
- 10:59Speaker 2: Exactly, and this naturally leads us to the more advanced
- 11:02Speaker 2: forms of security assessments red teaming and purple teaming.
- 11:06Speaker 1: Okay, break those down.
- 11:07Speaker 2: Red teaming is essentially an advanced pentist where restrictions are
- 11:10Speaker 2: significantly reduced and the Blue team the defenders, are actively
- 11:14Speaker 2: trying to detect, block, and contain the Red team the attackers,
- 11:18Speaker 2: so it's a live fire exercise pretty much. The goal
- 11:21Speaker 2: here isn't just finding vulnerabilities, but assessing the holistic maturity
- 11:25Speaker 2: of the client's security program, from user awareness training right
- 11:29Speaker 2: through to incident response.
- 11:30Speaker 1: Capabilities and purple teaming.
- 11:32Speaker 2: Purple teaming, in contrast, involves close collaboration between red and
- 11:36Speaker 2: blue teams, often in real time. The goal is to
- 11:39Speaker 2: identify precisely what the blue team can.
- 11:42Speaker 1: Detect h working together to improve detection exactly.
- 11:45Speaker 2: N MAP is immensely helpful here because its versatility allows
- 11:48Speaker 2: for crafting numerous scenarios and generating indicators of compromise IOCs
- 11:53Speaker 2: to test detection thresholds. For example, you could start with
- 11:56Speaker 2: an obvious noisy scan right and progressively add obfuscation techniques
- 12:02Speaker 2: until detection is bypassed. This allows the blue team to
- 12:05Speaker 2: adjust their IDs, their eder or firewall settings. Accordingly, it's
- 12:09Speaker 2: a calibration exercise.
- 12:10Speaker 1: Given that NMAP is an active scanner and fundamentally requires permission,
- 12:15Speaker 1: Where do you safely practice these powerful techniques? You can't
- 12:18Speaker 1: just scan.
- 12:18Speaker 2: Google definitely not the answer, as the book clearly highlights,
- 12:22Speaker 2: is a lab environment. It's absolutely essential for true hands
- 12:26Speaker 2: on experience and learning. You need a safe.
- 12:28Speaker 1: Sandbox, makes sense, how do you set one up well?
- 12:31Speaker 2: A robust lab environment can be set up for surprisingly
- 12:34Speaker 2: little to no cost. We highly recommend nd MAP installed
- 12:38Speaker 2: on both Windows and Collie.
- 12:39Speaker 1: Linux Collie the Pen Testing District YEP.
- 12:42Speaker 2: Using virtual box or VMware to host your virtual machines.
- 12:46Speaker 2: You'll also want additional tools like zenmap, the graphical front
- 12:49Speaker 2: end for endmap, and Legion, which often come pre installed
- 12:53Speaker 2: on modern Collie versions.
- 12:54Speaker 1: And what do you scan in the lab?
- 12:55Speaker 2: For targets? You can use intentionally vulnerable virtual machine images.
- 12:59Speaker 2: Vulne hub is a great resource for this, things like
- 13:01Speaker 2: the planets Earth and Mercury. Or you could even set
- 13:04Speaker 2: up a Windows Server twenty twenty two VM and install
- 13:07Speaker 2: applications like Jenkins and open source Automation Server commonly seen
- 13:11Speaker 2: in enterprise pentists.
- 13:12Speaker 1: Okay, so download enmap virtual box, Collie some vulnerable vms exactly.
- 13:18Speaker 2: You can figure Collie in virtual box, give it enough
- 13:20Speaker 2: memory at least four GB recommended, and create a GNAT
- 13:24Speaker 2: network maybe call it NMAP lab, so your vms can
- 13:27Speaker 2: talk to each other but are isolated from.
- 13:28Speaker 1: Your main network, right, isolation is key.
- 13:31Speaker 2: Then you can use a simple end map scan like
- 13:33Speaker 2: nmap natat five ten point zero point two point zero
- 13:36Speaker 2: two four to discover the IP addresses of your vulnerable
- 13:39Speaker 2: vms on that lab subnet.
- 13:41Speaker 1: And you can take it further. Oh yeah, to.
- 13:43Speaker 2: Truly take your lab to the next level. You can
- 13:45Speaker 2: even install open source security products like Wazoo. It's a
- 13:49Speaker 2: free SIME and XDR solutions.
- 13:51Speaker 1: SIME and XDR security monitoring tools.
- 13:53Speaker 2: Right security, incident and event management, and extended detection and response.
- 13:58Speaker 2: This lets you visualize engage the level of obfuscation during
- 14:01Speaker 2: your advanced scanning tech seeks. You're effectively learning Blue team
- 14:05Speaker 2: and Purple team skills at the same time.
- 14:07Speaker 1: Wow, so you can see your own scans from the
- 14:09Speaker 1: defender's perspective precisely.
- 14:11Speaker 2: The source truly emphasizes that while seeing demonstrations is helpful,
- 14:14Speaker 2: the most valuable learning comes from doing, making mistakes, troubleshooting,
- 14:18Speaker 2: forcing yourself to dig deeper in your own lab environment.
- 14:21Speaker 1: That trial and error.
- 14:22Speaker 2: Absolutely, that hands on practice, as the author experienced firsthand,
- 14:28Speaker 2: solidifies your understanding far more efficiently than just reading about it.
- 14:31Speaker 1: Understanding an organization's attack surface is absolutely core to security.
- 14:35Speaker 1: This defines it as the set of points on the
- 14:37Speaker 1: boundary of a system where an attacker can try to enter,
- 14:41Speaker 1: cause an effect on, or extract data basically all the
- 14:43Speaker 1: ways in Yeah, think of your own home, not just
- 14:46Speaker 1: doors and windows, but maybe a remote garage door opener
- 14:50Speaker 1: in your car, or that baby monitor you just bought
- 14:52Speaker 1: that might have a hidden security flaw.
- 14:54Speaker 2: Uh oh personal story.
- 14:55Speaker 1: Yeah, it was a real aha moment for me when
- 14:58Speaker 1: I realized my own new baby uditor had an ancient
- 15:01Speaker 1: telnet port wide open, an unauthenticated, unencrypted protocol from the seventies.
- 15:07Speaker 2: Wow on a new device.
- 15:09Speaker 1: On new device. It just goes to show how easily
- 15:12Speaker 1: these overlooked points can become a critical attack surface even
- 15:14Speaker 1: in our own homes.
- 15:15Speaker 2: And organizations face this on a much much grander scale,
- 15:18Speaker 2: especially complex or rapidly growing ones. For a pen tester,
- 15:23Speaker 2: truly grasping the attack surface is critical before you decide
- 15:26Speaker 2: how to attack. For defenders, it's essential to know every
- 15:30Speaker 2: possible attack point to properly deploy security.
- 15:33Speaker 1: Controls external versus internal.
- 15:35Speaker 2: Yeah. In external testing you're mapping from outside the network websites, VPNs,
- 15:40Speaker 2: things exposed to the Internet. In internal testing, you're looking
- 15:44Speaker 2: for what's reachable once you've already gained some initial access
- 15:47Speaker 2: inside the network.
- 15:48Speaker 1: And how does that process usually start?
- 15:50Speaker 2: It often starts with passive reconnaissance using tools like OASAMASS
- 15:54Speaker 2: or checking certificate transparency logs via CRT dot SHA. For
- 15:58Speaker 2: subdomain enumeration, you gather potential targets, consolidate them, and then
- 16:03Speaker 2: you move to en map for the active mapping part.
- 16:05Speaker 1: Okay, now let's get into the n MAP flags that
- 16:08Speaker 1: specifically help you map an attack surface. We've touched on some,
- 16:11Speaker 1: but let's list the key ones for basic analysis, the
- 16:13Speaker 1: ones you'll use like day in and day out sound good. First,
- 16:17Speaker 1: sv service Version Detection.
- 16:18Speaker 2: CRUCIAL tells you what is running and which version. Not
- 16:21Speaker 2: just that poor eighty is open, but is it a
- 16:23Speaker 2: patchy two point four point seven or Genix one point
- 16:26Speaker 2: one eight?
- 16:27Speaker 1: That version number is key next A the all in
- 16:30Speaker 1: one scan.
- 16:31Speaker 2: Yeah OS detection service version ing. It's slower, but very
- 16:34Speaker 2: comprehensive for that initial reconnaissance phase.
- 16:37Speaker 1: Nice T for timing right T.
- 16:38Speaker 2: Zero is paranoid slowest T five's insane. Fastest default is
- 16:42Speaker 2: T three. You absolutely need to adjust this for balancing
- 16:45Speaker 2: speed and stealth. AERE adds more detail to the output,
- 16:49Speaker 2: essential for troubleshooting and just understanding what end map is
- 16:52Speaker 2: actually doing under the hood. ASOX for XML output non negotiable,
- 16:56Speaker 2: really essential for importing into other analysis tools like zenmap
- 17:00Speaker 2: or Legion. Always always save your scan results.
- 17:04Speaker 1: Nice to specify ports yeah, nice.
- 17:06Speaker 2: P eighty or arrange nice P eighty to OFF four
- 17:08Speaker 2: to forty three or a list nas P eighty thy
- 17:11Speaker 2: four hundred and forty three. NAS is useful for a
- 17:13Speaker 2: quick scan of the top one hundred ports or all
- 17:15Speaker 2: norts if you really need to check everything all sixty five,
- 17:18Speaker 2: five hundred and thirty five and have a lot of time.
- 17:21Speaker 1: ACU for UDP scanning.
- 17:23Speaker 2: Often overlooked, but critical services like DNSS and m P
- 17:26Speaker 2: and VPN protocols run on UDP. You'll miss things if
- 17:28Speaker 2: you only scan TCP. Very handy filter shows only open ports,
- 17:32Speaker 2: cuts through the noise of closed or filtered ports, lets
- 17:34Speaker 2: you focus on potential.
- 17:35Speaker 1: Entry point, and finally, reason this one's great for troubleshooting.
- 17:38Speaker 2: Reveals why NMAP reported a port status in g sinec
- 17:42Speaker 2: reset super helpful for understanding filtered ports and firewall behavior.
- 17:46Speaker 1: Okay, so those are the building blocks.
- 17:48Speaker 2: Exactly, and combining these flags is truly where the power
- 17:51Speaker 2: comes alive. An initial scan might look something like and
- 17:54Speaker 2: mapbattgc to open B twenty one million, twenty two million,
- 17:58Speaker 2: twenty five million, eighty billion, one one hundred and ten billion,
- 18:00Speaker 2: one hundred and seventy nine billion, one hundred seventy nine million,
- 18:03Speaker 2: four hundred forty three million, eight hundred and forty three
- 18:06Speaker 2: at GBA eight hundred and four hundred and forty three
- 18:08Speaker 2: deshil targets dot t xtox results one dot xml break
- 18:13Speaker 2: that down. Okay, so al targets dot tixt to read
- 18:15Speaker 2: target ips from a file and desh ox results one
- 18:18Speaker 2: dot xml to save the output.
- 18:20Speaker 1: Makes sense and when you find vulnerabilities right.
- 18:22Speaker 2: When identifying vulnerabilities, remember context is key. A high severity
- 18:26Speaker 2: CVE with no known public exploit and no SISEKEV observations.
- 18:31Speaker 3: keV known exploited vulnerabilities Exactly that CVE might be less
- 18:35Speaker 3: valuable in a timebound PENTICS than a moderate severity one
- 18:38Speaker 3: with readily available proof of concept exploits.
- 18:41Speaker 1: That you can actually use, so focus on demonstrable impact precisely.
- 18:45Speaker 2: The critical insight here is that the true value for
- 18:47Speaker 2: a pentester lies in assessing the real world exploitable impact
- 18:51Speaker 2: of a vulnerability within that specific client context, not just
- 18:56Speaker 2: its theoretical CVSS score. The book has a case study
- 18:59Speaker 2: on this, right yeah compelling one about a small financial
- 19:02Speaker 2: services business. They used simple, regularly scheduled endmap scans to
- 19:06Speaker 2: continuously monitor their attack surface. They gained crucial insight without
- 19:11Speaker 2: a huge budget, proving end maps immense value even for
- 19:14Speaker 2: smaller organizations.
- 19:15Speaker 1: Once you've mapped that attack surface, turning raw information into
- 19:19Speaker 1: actionable intelligence, the next step is identifying legitimate vulnerabilities that
- 19:23Speaker 1: can actually be exploited.
- 19:25Speaker 2: Right the refinement stage.
- 19:26Speaker 1: Think of it like a military intelligence cycle, planning, collection, processing, analysis,
- 19:31Speaker 1: and dissemination a good analogy.
- 19:34Speaker 2: This refinement often starts with common Platform Enumeration or CPE,
- 19:38Speaker 2: that standardized way of encoding it product names maintained by NIST.
- 19:42Speaker 1: How does endmap find CPEs.
- 19:44Speaker 2: Endmap tries to identify them by analyzing things like ICMP
- 19:48Speaker 2: time to live values, TCP initial sequence number sampling, service banners,
- 19:53Speaker 2: and headers. Then it queries its internal databases.
- 19:56Speaker 1: But you mentioned it a caveat.
- 19:58Speaker 2: Yeah, a crucial one. MP is isn't always one hundred
- 20:00Speaker 2: percent accurate on specific versions or patch levels. Always try
- 20:04Speaker 2: to verify with another tool or a manual check if possible.
- 20:07Speaker 1: Okay. Once CPE is established, you look for cvees, correct.
- 20:11Speaker 2: Common vulnerabilities and exposures those common identifiers for specific security weaknesses.
- 20:16Speaker 2: And while the Common Vulnerability scoring system CVSS scores vulnerabilities
- 20:21Speaker 2: from zero to ten, it lacks that crucial context we.
- 20:23Speaker 1: Talked about, right, the impact context.
- 20:25Speaker 2: A Cisco IOSXE remote code execution and an IP based
- 20:29Speaker 2: camera password disclosure could both have a nine point eight
- 20:32Speaker 2: CVSS score, but their real world impact for a specific
- 20:35Speaker 2: organization can differ drastically. Practical exploitability often trumps.
- 20:40Speaker 1: The raw score, and this is precisely where the n
- 20:42Speaker 1: MAP Scripting Engine or NSE truly shines.
- 20:44Speaker 2: Oh yeah, the NC is arguably nmec's most powerful feature
- 20:48Speaker 2: written in Lua. Right yep, written in LUA. It enables
- 20:51Speaker 2: customs scripts for deeper enumeration, vulnerability identification, and sometimes even exploitation.
- 20:57Speaker 2: You use it with the straightforward script flag.
- 20:59Speaker 1: Like the vulnerm example.
- 21:01Speaker 2: Earlier exactly Vulners dot nts queries, the vulners dot com
- 21:04Speaker 2: API for associated vulnerabilities and CVSS scores. It classifies itself
- 21:09Speaker 2: as vulne safe and external. NSC scripts fall into fourteen
- 21:14Speaker 2: distinct categories, which really help you organize and select them.
- 21:17Speaker 1: Fourteen categories.
- 21:19Speaker 2: Likely well, you've got things like author for authentication checks,
- 21:22Speaker 2: broadcasts for network discovery, brute for brute forcing, use that
- 21:26Speaker 2: one very carefully, huh, exploit for active exploitation attempts, and
- 21:31Speaker 2: critically safe, which is your absolute go to for professional
- 21:34Speaker 2: engagements because they're designed not to disrupt systems. Safe safe
- 21:38Speaker 2: is very good. They also have types like pre rule,
- 21:41Speaker 2: host service and postural, indicating exactly when they run during
- 21:45Speaker 2: a scan sequence.
- 21:46Speaker 1: Beyond the basics, those intermediate inmat flags give you even
- 21:49Speaker 1: more nuanced control.
- 21:51Speaker 2: Right definitely, script and script help are obviously essential for
- 21:54Speaker 2: using the NSESE effectively.
- 21:55Speaker 1: Makes sense.
- 21:56Speaker 2: Then you have SNS, which conducts a quickping sweep just
- 21:59Speaker 2: for host discovery is the host up, while dash ENAPN
- 22:02Speaker 2: disables host discovery. Why disabling crucial in environments that block
- 22:07Speaker 2: ICMP pings or actively detect them as reconnaissance. If you
- 22:11Speaker 2: know the hosts are likely up or ping is blocked,
- 22:13Speaker 2: dash MPN tells n map to just assume their up
- 22:16Speaker 2: and try scanning ports anyway.
- 22:18Speaker 1: Got it? What about port selection s.
- 22:20Speaker 2: FF scans the top one hundred ports quickly. Top ports
- 22:23Speaker 2: hashtag lets you specify any number like topports twenty five
- 22:27Speaker 2: hundred for a decent balance of speed and.
- 22:28Speaker 1: Coverage and version detection intensity right.
- 22:31Speaker 2: Version intensity hashtag goes from zero to nine. Default is seven.
- 22:34Speaker 2: Higher numbers mean more probes, more aggressive fingerprinting. There are
- 22:38Speaker 2: aliases like version light which is two, or version all
- 22:40Speaker 2: which is nine.
- 22:41Speaker 1: And where do you often find the most useful vulnerabilities?
- 22:44Speaker 1: Is it always cvees?
- 22:46Speaker 2: Often?
- 22:46Speaker 1: No?
- 22:46Speaker 2: We find tons of issues from simple misconfigurations like default
- 22:50Speaker 2: credentials left unchanged or SMB signing not being enabled on
- 22:53Speaker 2: Windows shares.
- 22:54Speaker 1: Easy fixes, big impact, huge impact.
- 22:57Speaker 2: Also inherently flawed protocols like telnet or ip IV two
- 23:00Speaker 2: running on UDP port six twenty three, m qtt on
- 23:03Speaker 2: eighteen eighty three. These are often wide open and of
- 23:06Speaker 2: course technical debt outdated systems like old Windows Server twenty
- 23:09Speaker 2: twelve R two, or maybe an old Jenkins instance on
- 23:12Speaker 2: port eighty eighty, which you can sometimes find with the
- 23:14Speaker 2: broadcast Jenkins Discover dot NEDSA script.
- 23:17Speaker 1: So while enmap isn't a direct replacement for commercial vulnerability scanners.
- 23:21Speaker 2: Like NESSUS, No, it's not designed for that scale or
- 23:24Speaker 2: reporting depth.
- 23:24Speaker 1: It's absolutely excellent for stealth or when other tools simply
- 23:27Speaker 1: aren't an option, maybe in a very restricted.
- 23:29Speaker 2: Environment exactly, you can combine flags cleverly like NMP, dash
- 23:32Speaker 2: PN topports five hundred, DASH two dash sv version all
- 23:35Speaker 2: script vulner dot NSA, dashile targets, dot t XT, doshox results,
- 23:39Speaker 2: dot XML.
- 23:40Speaker 1: Let's see no peng scan top five hundred ports, slow speed,
- 23:43Speaker 1: aggressive version scanning, run vulner script, use a target list
- 23:47Speaker 1: saved XML.
- 23:48Speaker 2: Yep, that's a pretty thorough yet moderately paced vulnerability focused scan.
- 23:52Speaker 2: And the book details a real world internal and external
- 23:54Speaker 2: pentist where NMAP was used as staggering nineteen times nineteen times. Yeah,
- 23:59Speaker 2: it was critical mapping the external attack surface, pinpointing WordPress,
- 24:03Speaker 2: plug and vulnerabilities. Finding those outdated Windows servers. Internally, it
- 24:08Speaker 2: helped uncover default credentials and vulnerable Cisco smart install services.
- 24:12Speaker 1: Ooh smart install.
- 24:14Speaker 2: Yeah, that provided access to configuration files containing hashed admin
- 24:17Speaker 2: passwords that were later cracked offline. It truly highlights NMAP
- 24:21Speaker 2: as a critical foundation for even the most complex exploitation chains.
- 24:25Speaker 1: Okay, here's where the real challenge often begins. Yeah, imagine
- 24:28Speaker 1: pen testing a very large enterprise network, say eight subnets
- 24:34Speaker 1: sixteen million plus ips. Yeah, spending even a second on
- 24:38Speaker 1: each would take you what a year and a half roughly?
- 24:40Speaker 2: Yeah, it's infeasible. This is a classic challenge often unmet
- 24:44Speaker 2: in basic training, but it's absolutely crucial in real world,
- 24:48Speaker 2: large scale engagements.
- 24:49Speaker 1: How do you tackle that scale well?
- 24:50Speaker 2: On a broader scale? Mastering large networks fundamentally requires understanding
- 24:54Speaker 2: subnetting and CIDR notation twenty four to sixteen eight. You
- 24:58Speaker 2: simply can't stand everything at once. You start with black
- 25:00Speaker 2: box subnit discovery. Instead of trying to scan all sixty
- 25:04Speaker 2: five thousand ips in a sixteen, you strategically ping sweep
- 25:07Speaker 2: only the likely gateways, typically the point one or point
- 25:11Speaker 2: twenty five to four address of each potential twenty four
- 25:14Speaker 2: subnet within that larger.
- 25:15Speaker 1: Range AH target thro routers.
- 25:17Speaker 2: First exactly like en map, nashi sen ten type one,
- 25:20Speaker 2: put back two five five point one ten, pint Mezzera
- 25:21Speaker 2: two five five point two five four. You can even
- 25:23Speaker 2: pipe this through standard Linux commands like AWK or g
- 25:26Speaker 2: rep to get a clean list of only the live
- 25:28Speaker 2: gateway ips.
- 25:29Speaker 1: So you drastically reduce the initial target space dramatically.
- 25:32Speaker 2: You reduce your targets from a sprawling sixteen to the
- 25:35Speaker 2: equivalent of just scanning two twenty fours worth of potential gateways,
- 25:39Speaker 2: much more manageable.
- 25:40Speaker 1: That's a brilliant way to narrow down the playing field.
- 25:42Speaker 1: So once you have that refined list of live gateways,
- 25:45Speaker 1: what's your next move for identifying those quick wins, the
- 25:47Speaker 1: easily exploitable systems.
- 25:49Speaker 2: Precisely, once you have that refined list, you pivot to
- 25:51Speaker 2: scanning those specific live hosts for the low hanging fruit,
- 25:55Speaker 2: things like Cisco smart install on TCP port four to
- 25:57Speaker 2: seven eighty six, Java RMI on Penning ninety nine, or
- 26:00Speaker 2: maybe ipmiv two on UDP six twenty three.
- 26:02Speaker 1: High impact targets.
- 26:03Speaker 2: Often, yeah would use commands like nmap, dmpt fourshil live
- 26:07Speaker 2: hoost dot txtp for seven eight six opendsh ox smart
- 26:10Speaker 2: install scan dot XML.
- 26:12Speaker 1: Okay, dage PN because we know they're alive. Nag at
- 26:15Speaker 1: four for speed.
- 26:16Speaker 2: Right, optimizing for time when every minute counts on a
- 26:19Speaker 2: large engagement target port four seven eight six, show only open,
- 26:23Speaker 2: save the results.
- 26:25Speaker 1: Optimizing scans for speed in massive environments sounds like a
- 26:28Speaker 1: real skill, extending far beyond just the NAGET flags. What
- 26:32Speaker 1: other parameters do you reach for when you really need
- 26:35Speaker 1: to push endmps limits on speed and what are the
- 26:37Speaker 1: trade offs?
- 26:38Speaker 2: It's definitely an art. Yeah, you have to go beyond
- 26:40Speaker 2: just nag T. Consider min host group to tell nmap
- 26:43Speaker 2: to scan numerous hosts simultaneously in parallel. Maybe two hundred
- 26:47Speaker 2: and fifty six for scanning twenty four groups, or you
- 26:49Speaker 2: can push it up to twenty forty eight for larger
- 26:52Speaker 2: chunks if the network can handle it.
- 26:53Speaker 1: Okay, parallel scanning.
- 26:54Speaker 2: What else then, initial DART timeout and max sert timeout
- 26:58Speaker 2: specified in milliseconds. Please control how long end map waits
- 27:01Speaker 2: for a probe response. Tuning these down can crucially speed
- 27:04Speaker 2: up scans on slow or high latency networks. Fewer retries
- 27:08Speaker 2: too exactly max retries. The default is ten. You can
- 27:11Speaker 2: reduce that maybe to three or five for faster scans,
- 27:14Speaker 2: especially if you're willing to trede a little potential accuracy
- 27:16Speaker 2: for speed.
- 27:17Speaker 1: You might miss a packet okay in timeouts.
- 27:19Speaker 2: Host timeout specified in minutes. Usually this ensures end map
- 27:23Speaker 2: doesn't get stuck indefinitely on a single unresponsive host, which
- 27:26Speaker 2: can happen, and things like defeat ARTHT rate limit or
- 27:29Speaker 2: defeated comp rate limit can try to overcome host rate limiting.
- 27:33Speaker 1: Ah when hosts try to slow you down.
- 27:35Speaker 2: Right, but using those often comes at the cost of accuracy,
- 27:39Speaker 2: and the difference between AMICT four aggressive and m Q
- 27:43Speaker 2: five insane is particularly significant. M five is extremely aggressive.
- 27:48Speaker 2: It sets things like max retries two and a short
- 27:50Speaker 2: host timeout fifteen meter. It often sacrifices accuracy for raw
- 27:54Speaker 2: speed and.
- 27:55Speaker 1: The biggest risk of being too aggressive you.
- 27:57Speaker 2: Might miss critical open services because packets got dropped, or worse,
- 28:01Speaker 2: you could cause an unintended denial of service by overwhelming
- 28:04Speaker 2: a host or network device. That's a very bad outcome.
- 28:07Speaker 1: And that's exactly what the book highlights with a real
- 28:09Speaker 1: world scenario, isn't it.
- 28:10Speaker 2: It does a pentester found their initial super aggressive scan,
- 28:13Speaker 2: even with custom high speed parameters, was simply too much
- 28:17Speaker 2: for a client's large, perhaps fragile network. It resulted in
- 28:20Speaker 2: inaccurate data and a lot of wasted time and frustration.
- 28:23Speaker 1: So what do they learn?
- 28:24Speaker 2: They learned that T four was actually the optimal setting
- 28:27Speaker 2: for that specific environment, rather than blindly defaulting to T five.
- 28:31Speaker 2: It taught them a valuable lesson. The same optimized scans
- 28:36Speaker 2: cannot be used during every pentist. Each environment is different.
- 28:39Speaker 1: That really underscores that understanding how these tools work beyond
- 28:43Speaker 1: just a checklist.
- 28:44Speaker 2: Is paramount absolutely overly aggressive scan and can violate the
- 28:48Speaker 2: rules of engagement by impacting network availability, So finding that
- 28:51Speaker 2: precise balance for each unique situation is always key.
- 28:55Speaker 1: Well in Map's command line interface is incredibly powerful, Dealing
- 28:59Speaker 1: with the sheer data ill uge of data it can generate,
- 29:02Speaker 1: especially from large engagements, can quickly become overwhelming. Just staring
- 29:06Speaker 1: at text outputs, oh yeah, it can be a lot.
- 29:08Speaker 1: This is precisely where graphical user interfaces GUIs step in
- 29:12Speaker 1: to provide clarity and efficiency. We're talking about Zenmap primarily
- 29:16Speaker 1: for Windows in mac os and Legion, which comes pre
- 29:19Speaker 1: installed on Kelle Linux.
- 29:20Speaker 2: These GUIs provide crucial context and significantly ease the analytical burden. Zenmap,
- 29:26Speaker 2: for example, lets you launch custom end map scans using
- 29:28Speaker 2: pre configured profiles or by grafting your own bespoke ones
- 29:32Speaker 2: right in the interface.
- 29:33Speaker 1: And it helps with results massively.
- 29:36Speaker 2: You can import existing and map XML scan results and
- 29:39Speaker 2: organize them intuitively by host, port, or service. That's indispensable
- 29:43Speaker 2: for quickly parsing vast amounts of data. You can even
- 29:46Speaker 2: compare multiple stand files side by side to troubleshoot issues
- 29:50Speaker 2: or track changes over time. It's truly indispensable for speeding
- 29:54Speaker 2: up data analysis, and.
- 29:55Speaker 1: Legion takes that concept a powerful step further, doesn't it.
- 29:58Speaker 2: It does. While it also let's you launch an import
- 30:01Speaker 2: endmap scans, its real differentiator is its semi automated framework.
- 30:06Speaker 2: Imagine identifying a web server running on port eighty okay,
- 30:09Speaker 2: and then with just a click in Legion automatically taking
- 30:13Speaker 2: screenshots of the web page or launching other specialized tools
- 30:16Speaker 2: like Nikto for web vulnerability scanning against that host.
- 30:19Speaker 1: Wow. So it connects tools together.
- 30:21Speaker 2: Yeah, Legion integrates dozens of common open source pen testing
- 30:24Speaker 2: tools and hundreds of scripts. Making it a highly versable
- 30:27Speaker 2: asset in any pen tester's arsenal. It helps automate the
- 30:30Speaker 2: follow up actions.
- 30:31Speaker 1: That sounds powerful. How customizable is it?
- 30:34Speaker 2: What's particularly compelling about Legion is its high degree of customization.
- 30:37Speaker 2: Through its configuration file Legion dot com, you can modify
- 30:41Speaker 2: scheduler settings to define automatic actions when certain conditions are met.
- 30:45Speaker 2: For example, if it finds an open FTP port, automatically
- 30:48Speaker 2: attempt to fault logins, though you'd be very careful enabling
- 30:52Speaker 2: things like that in a stealth engagement right could be noisy,
- 30:54Speaker 2: very You can also define stage end map settings with
- 30:58Speaker 2: custom port scans, stages tailored for different scope sizes.
- 31:01Speaker 1: Age is like different levels of intensity exactly.
- 31:03Speaker 2: You could have small scope a super thorough option, eventually
- 31:07Speaker 2: standing all TCTEDP ports running vulners dot n SE at
- 31:10Speaker 2: the end. Very noisy and slow, but comprehensive for maybe
- 31:14Speaker 2: a single twenty four medium scope. This reduces ports to
- 31:18Speaker 2: maybe just over ten thousand common TCP and a few
- 31:20Speaker 2: key UDP ports, A reasonable choice for a few twenty
- 31:24Speaker 2: four subnets, especially if you can let it run overnight.
- 31:27Speaker 2: Large scope highly optimized with only specific, commonly interesting ports
- 31:31Speaker 2: for identifying those quick wins we talked about, perfectly suited
- 31:34Speaker 2: for massive sixteen or eight subnets where speed is absolutely paramount.
- 31:37Speaker 1: That level of customization lets you really tailor legion for
- 31:41Speaker 1: efficient strategic analysis totally.
- 31:44Speaker 2: The ability to chain conditions, tools and actions provides a
- 31:48Speaker 2: remarkably flexible semi autonomous pin testing framework.
- 31:52Speaker 1: Now, let's talk about being truly stealthy. Evading detection by
- 31:56Speaker 1: security products, IDs, IPS, EDRs.
- 32:00Speaker 2: The blue team's arsenal.
- 32:02Speaker 1: Right, when it comes to evading them, it's far more
- 32:04Speaker 1: an art form than a precise science, and n map's
- 32:07Speaker 1: default behaviors surprisingly can often be detrimental to staying under
- 32:12Speaker 1: the radar.
- 32:13Speaker 2: This raises an important question, what exactly are those n
- 32:16Speaker 2: MAP defaults that we need to be aware of. Many
- 32:18Speaker 2: pentesters still think SSS, the s yn scan or stealth
- 32:22Speaker 2: scan makes n MAP inherently stealthy.
- 32:24Speaker 1: Because it doesn't complete the TCP handchake.
- 32:26Speaker 2: Right, But it's been an end map's default behavior for
- 32:29Speaker 2: privileged users for a long long time, and security products
- 32:32Speaker 2: are now incredibly well trained to detect that specific pattern.
- 32:35Speaker 1: Ah, So stealth isn't so stealthy anymore.
- 32:37Speaker 2: Not by itself. No Furthermore, n MAP scans hosts in
- 32:40Speaker 2: predictable ascending numerical order by default ten moist vera zero
- 32:44Speaker 2: point one than ten onever en point two, et cetera.
- 32:47Speaker 2: It has fixed packet size is typically forty bytes for
- 32:49Speaker 2: a SYM packet, and static time to live values usually
- 32:52Speaker 2: sixty four, and that default T three speed is actually
- 32:55Speaker 2: quite fast. All of these predictable patterns contribute to easy
- 32:58Speaker 2: detection by modern secure systems looking for scanning behavior.
- 33:01Speaker 1: Thankfully, you have immense power to manipulate these. What are
- 33:04Speaker 1: some of those advanced flags that allow for significant obfuscation.
- 33:08Speaker 1: You've got quite a toolkit. Advanced flags for obfuscation include
- 33:11Speaker 1: out shaft. This fragments the packets into smaller pieces, making
- 33:15Speaker 1: them harder for some simple fear walls or IDs to
- 33:18Speaker 1: reassemble and inspect data. Length appends random data to the
- 33:21Speaker 1: end of packets, adding entropy and making signature based detection harder.
- 33:25Speaker 1: Exclude ports and exclude host Simply avoid specific targets or
- 33:29Speaker 1: ports that you know are heavily monitored or sensitive. Discovery
- 33:33Speaker 1: ignores can sometimes help with firewalls that spoof RST responses
- 33:37Speaker 1: to make all ports appear closed. DASH RPN, again crucial
- 33:41Speaker 1: for disabling the initial ICMP ping when it's blocked or
- 33:45Speaker 1: likely to be detected. H D decoy scanning. This spoofs
- 33:49Speaker 1: your source IP address with other random or specified IP
- 33:51Speaker 1: to try and hide your true location in the noise.
- 33:54Speaker 1: Use this one with extreme caution, though it can be
- 33:56Speaker 1: very risky, might cause issues, and attribution becomes complex. Okay,
- 33:59Speaker 1: that DECOYL one sounds tricky, So how do you combine
- 34:02Speaker 1: the others for a truly stealthy approach? Give us an
- 34:04Speaker 1: example of a good obfuscated scan some best practices for
- 34:07Speaker 1: evading those Blue Team detections.
- 34:09Speaker 2: Combining these is absolutely key. A basic obfuscated scan might
- 34:13Speaker 2: look like n map dash data like five randomized house
- 34:15Speaker 2: ten point zero point zero two four, just fragmenting, adding
- 34:18Speaker 2: a little data and randomizing.
- 34:20Speaker 1: The target word other than the default Definitely.
- 34:22Speaker 2: For greater stealth, adds speed throttling, host discovery, disabling and
- 34:26Speaker 2: maybe port exclusions end map dash up dattling five randomized hosts,
- 34:29Speaker 2: dash of T two dash PN exclude ports twenty two million,
- 34:32Speaker 2: one hundred thirty nine thousand, four hundred and forty five
- 34:35Speaker 2: ten tons zero point two twenty five four okay, T.
- 34:38Speaker 1: Two speed no paying, avoiding SSH and SMB ports right,
- 34:41Speaker 1: and you.
- 34:42Speaker 2: Might add host timeout and retry limits for better accuracy
- 34:44Speaker 2: on slower or less reliable networks, and map bashit dattling
- 34:47Speaker 2: five randomized hosts such as T two jush PN, exclude
- 34:49Speaker 2: ports twenty million, one hundred thirty one thousand, four hundred
- 34:51Speaker 2: and forty five, host timeout five meters max retrice three.
- 34:54Speaker 1: So what are the core best practices to keep in
- 34:56Speaker 1: mind to consistently try and avoid blue team detection?
- 34:59Speaker 2: Here are some essential practices. Avoid scanning gateways often point
- 35:03Speaker 2: one or point two five y five early on, as
- 35:05Speaker 2: they are typically heavily monitored. Deprioritize highly sensitive ports like
- 35:09Speaker 2: SSH twenty two and SMBE nine four forty five initially
- 35:13Speaker 2: as alerts on these are common. Never scan the same
- 35:16Speaker 2: endpoint repeatedly within a short timeframe, mix it up. Avoid
- 35:19Speaker 2: NSC scripts that attempt default logins off some brute scripts,
- 35:23Speaker 2: as these are often highly detectable and generate immediate alerts.
- 35:26Speaker 2: Throttle your scan speeds significantly to stay below the noise
- 35:29Speaker 2: floor T two or even T one or T zero.
- 35:32Speaker 2: Ensure both your packets signature size data and scan heuristics
- 35:36Speaker 2: timing order, have sufficient entropy make them varied and less predictable,
- 35:40Speaker 2: And critically, always start reconnaissance on your local subnet first
- 35:43Speaker 2: if possible, to avoid triggering IDAs or firewalls on gateways
- 35:47Speaker 2: before you've even reached your intended target network segment.
- 35:50Speaker 1: That's incredibly practical advice, and the book has a purple
- 35:52Speaker 1: teening case study that perfectly illustrates this, showing how detection
- 35:55Speaker 1: can be bypassed up by step absolutely.
- 35:58Speaker 2: The case study starts with a default end map scan
- 36:00Speaker 2: on a local subnet, which immediately triggered detection from a
- 36:03Speaker 2: security product sensor identified using.
- 36:05Speaker 1: Net discovery cut red handed YEP.
- 36:08Speaker 2: Then by sequentially adding opuscation techniques first natas T two,
- 36:12Speaker 2: then randomized hosts NASHPN dash effor fragmentation data length five
- 36:17Speaker 2: and even a slightly modified anastool.
- 36:19Speaker 1: Fifty eight YTTL fifty eight just to.
- 36:21Speaker 2: Be different from the default sixty four makes the packets
- 36:24Speaker 2: look less standard, and eventually, by also excluding port twenty two,
- 36:28Speaker 2: SSH detection was successfully evaded. This iterative process allowed the
- 36:32Speaker 2: blue team to see exactly which techniques worked and fine
- 36:35Speaker 2: tune their sensor rules in real time.
- 36:37Speaker 1: That's prople teaming in action.
- 36:38Speaker 2: Exactly, and another powerful example from the book is a
- 36:41Speaker 2: red teaming engagement against a bank. Initial access was gained
- 36:44Speaker 2: through vishing social engineering over the phone impersonating an IT
- 36:47Speaker 2: provider classic that led to remote access and exfiltration of
- 36:51Speaker 2: VPN credentials. N MAP was then used with extreme stealth,
- 36:54Speaker 2: using a command very similar to the one we discussed
- 36:56Speaker 2: en map NAST two two randomized host stashed PN stropene
- 36:59Speaker 2: data length five national fifty eight pas P twenty one million,
- 37:02Speaker 2: twenty five twenty one million, twenty five million, twenty five million,
- 37:05Speaker 2: eighty million, four hundred forty three million, eight hundred eighty million,
- 37:09Speaker 2: eight hundred and forty three thousand, four hundred and seven
- 37:10Speaker 2: eighty six open ten end point two twenty five.
- 37:13Speaker 1: Four, targeting specific ports low and slow right to.
- 37:16Speaker 2: Find an outdated Cisco Catalyst switch with smart install still
- 37:19Speaker 2: open on port forty seven eighty six. This yielded hashed
- 37:23Speaker 2: admin credentials from the config file and critical network configurations.
- 37:27Speaker 2: Even though the red team was eventually detected later. N
- 37:30Speaker 2: MAP was absolutely critical in mapping the internal network for
- 37:33Speaker 2: this major compromise, demonstrating its foundational role even in highly
- 37:37Speaker 2: sensitive advanced operations.
- 37:39Speaker 1: The n MAP Scripting Engine NSESE can keep coming back
- 37:43Speaker 1: to it. It's truly en Map's most powerful and customizable feature,
- 37:47Speaker 1: isn't it?
- 37:48Speaker 2: It really is. It allows you to invoke incredibly creative
- 37:51Speaker 2: and powerful additional functionality, all written in that flexible Lewis scripting.
- 37:55Speaker 1: Language, and those fourteen distinct categories of NSC scripts offer
- 37:58Speaker 1: incredible versatility for almost any scenario. Can you recap some
- 38:02Speaker 1: key ones.
- 38:02Speaker 2: Sure you've got off? For authentication related tecks? Broadcasts for
- 38:06Speaker 2: discovering systems on the local network like broadcast Jenkins discover
- 38:10Speaker 2: brute force techniques again, handle with extreme care. Default are
- 38:14Speaker 2: the common generally safe scripts run with aven S C
- 38:17Speaker 2: ORVA flags. Discovery focuses on active reconnaissance and specific information
- 38:22Speaker 2: gathering like the SEMM share script. DOS are scripts that
- 38:27Speaker 2: can cause denial of service. Definitely avoid these in production.
- 38:30Speaker 2: Destinly exploit actively attempts to exploit known vulnerabilities like shell
- 38:35Speaker 2: shock or MS seventeen zero ten. External scripts query external
- 38:40Speaker 2: data sources like our friend vulners dot NSA fuzzer sends
- 38:44Speaker 2: unexpected or randomized packets. Though honestly, NMP isn't the best
- 38:48Speaker 2: tool for heavy fuzzing malware tries to detect systems infected
- 38:51Speaker 2: by malware. Vone checks for specific vulnerabilities without attempting exploitation.
- 38:56Speaker 1: Vones exploit important distinction Crucial.
- 38:58Speaker 2: Intrusive scripts have a high price probability of crashing systems
- 39:01Speaker 2: or disrupting services. Avoid those in production. Two sayer design
- 39:05Speaker 2: not to exploit or crash systems, making them your absolute
- 39:08Speaker 2: go to for professional engagements. And finally, version scripts are
- 39:11Speaker 2: related to enhancing service versioning and.
- 39:13Speaker 1: They run into different times yep.
- 39:15Speaker 2: They operate in distinct phases. Pre rule runs before any
- 39:18Speaker 2: scanning starts. Host runs once per target host service. The
- 39:22Speaker 2: most common type runs against specific services discovered on ports,
- 39:26Speaker 2: and postol runs after all targets have been scanned.
- 39:29Speaker 1: Using these scripts sounds pretty intuitive. The primary flag is
- 39:33Speaker 1: just script right it is.
- 39:34Speaker 2: You can specify scripts by their file name like script
- 39:37Speaker 2: smbsho S, dush discovery dot NSA, or by category like
- 39:42Speaker 2: script discovery.
- 39:43Speaker 1: Can you combine categories Yes.
- 39:44Speaker 2: For example, script as runs all scripts whose names start
- 39:48Speaker 2: with N, but cautions some of those can be aggressive.
- 39:50Speaker 2: Or for more refined control, you could do script safe
- 39:53Speaker 2: and not sim to run all scripts in the safe
- 39:55Speaker 2: category except the SMB. Once clever and forcing a script,
- 39:59Speaker 2: you can force a script to run even if NMP
- 40:02Speaker 2: thinks the target doesn't meet its usual conditions by prefixing
- 40:04Speaker 2: the script name with a plus up and for fine
- 40:07Speaker 2: tune control over script behavior. Script dogs lets you pass
- 40:10Speaker 2: arguments directly to scripts like script ars, user admin pass,
- 40:13Speaker 2: welcome one, two three. For attempting authenticated enumeration with certain scripts,
- 40:18Speaker 2: again use with extreme care and only when authorized.
- 40:21Speaker 1: Where do these scripts live? Can you add your own?
- 40:23Speaker 2: You can locate all the default scripts and Collie Linux
- 40:26Speaker 2: under usher and map scripts, and crucially yes, you can
- 40:29Speaker 2: easily add community created scripts often found on GitHub by
- 40:32Speaker 2: simply downloading them and copying the dot ss file into that.
- 40:35Speaker 1: Directory, so you can extend ENDMPS capabilities easily.
- 40:39Speaker 2: Very easily. For instance, the book mentions checking for a
- 40:42Speaker 2: specific implant related to CVE twenty twenty three, twenty one
- 40:46Speaker 2: ninety eight in Cisco IOSE, a simple custom lewiscript could
- 40:50Speaker 2: be written to define an action function. This function might
- 40:54Speaker 2: just construct a CURL command to target a specific URL
- 40:56Speaker 2: on the device like https, dot target, tip, webu loogout confirmed,
- 41:00Speaker 2: dot HTML, dot log and hash one and then print
- 41:03Speaker 2: the result to see if the implant responds.
- 41:05Speaker 1: That sounds surprisingly simple to implement.
- 41:07Speaker 2: It often is. The simplicity of Lua and the NSC
- 41:10Speaker 2: framework makes it a great way to automate niche checks
- 41:12Speaker 2: or look for specific indicators of compromise directly within your
- 41:15Speaker 2: end map scans.
- 41:17Speaker 1: As we start to wrap up this deep dive, it's
- 41:19Speaker 1: really vital to discuss the dos and don'ts of using
- 41:22Speaker 1: nmap professionally because the technical hacking part is only one
- 41:26Speaker 1: piece of the puzzle, right.
- 41:27Speaker 2: Oh, absolutely, communication ethics and truly understanding client objectives are
- 41:32Speaker 2: just as crucial, if not sometimes more so than the
- 41:35Speaker 2: technical skills.
- 41:36Speaker 1: So how do you tailor your endmap approach based on
- 41:39Speaker 1: the client?
- 41:40Speaker 2: Well, every client and engagement is distinct. You need to
- 41:43Speaker 2: identify the right scan at the right time. For example,
- 41:47Speaker 2: consider a compliance driven client who's had negative experiences with
- 41:50Speaker 2: pentists before. Let's call them.
- 41:52Speaker 1: Client A okay, nervous client.
- 41:54Speaker 2: Right your paramount focus, there is no negative impact. You'd
- 41:57Speaker 2: lean heavily on slow scan speeds T one zero, strictly
- 42:01Speaker 2: avoid any intrusive or potentially disruptive scripts, limit network noise aggressively,
- 42:07Speaker 2: and perhaps even customize the report to specifically emphasize your
- 42:11Speaker 2: meticulous care for preserving their CIA triad makes sense.
- 42:14Speaker 1: What about a different scenario.
- 42:15Speaker 2: Say Client B wants you to validate their network segmentation controls.
- 42:19Speaker 1: Okay, testing internal boundaries there, you.
- 42:21Speaker 2: Might more aggressively test bypassing those controls using stealthy n
- 42:26Speaker 2: MAP scans combined with evasion techniques, and you'd likely communicate
- 42:31Speaker 2: in near real time with the client if you successfully
- 42:34Speaker 2: access a sensitive network segment you shouldn't have reached.
- 42:37Speaker 1: And the mature client For Client.
- 42:39Speaker 2: C maybe a mature organization that conducts frequent pentists, You'll
- 42:43Speaker 2: likely need more complex, in depth scans using advanced NSEC
- 42:47Speaker 2: scripts or techniques to uncover novel or deeply hidden issues.
- 42:50Speaker 2: You'll need to balance that depth with optimized speed to
- 42:53Speaker 2: cover the scope and meticulously document your entire process because
- 42:56Speaker 2: they'll scrutinize it. It's all about tailoring your approach to
- 43:00Speaker 2: the client's maturity and.
- 43:01Speaker 1: Objectives beyond just tailoring the scan type. What are the
- 43:04Speaker 1: absolute key considerations to avoid negatively impacting client systems during
- 43:09Speaker 1: any engagement? It sounds like there are some cardinal rules.
- 43:12Speaker 2: There are, and they're pretty much non negotiable for professionals. First,
- 43:16Speaker 2: once you fingerprint a system or service, understand how it
- 43:19Speaker 2: works fundamentally before you start poking at it or trying
- 43:22Speaker 2: to exploit it. For example, the book mentions old pure
- 43:25Speaker 2: FTPD versions having a maximum connection limit. If you just
- 43:29Speaker 2: keep hammering it with connections without closing them properly, you
- 43:32Speaker 2: could easily cause a denial of service.
- 43:34Speaker 1: Know the target before you shoot exactly.
- 43:36Speaker 2: Second, always try to understand the criticality of the systems
- 43:39Speaker 2: you're targeting. A Windows two thousand and three server might
- 43:42Speaker 2: be full of known exploits, but if it's running some
- 43:45Speaker 2: ancient business critical.
- 43:46Speaker 1: Process, don't touch it without explicit permission.
- 43:49Speaker 2: Precisely, it might be far too risky to scan aggressively,
- 43:52Speaker 2: let alone exploit without very explicit, careful permission and maybe
- 43:56Speaker 2: scheduling it for an off hours window. Third, if you're
- 43:59Speaker 2: ever in doubt about a system or a potential action,
- 44:02Speaker 2: ask for clarification from your client's point of contact. That
- 44:06Speaker 2: little bit of extra context can prevent major unforeseen disruptions communication. Again, always, fourth,
- 44:12Speaker 2: clarify upfront if any systems have specific day or time
- 44:16Speaker 2: restrictions for stanning, you don't want to be running heavy
- 44:19Speaker 2: scans during their peak business hours or critical processing windows.
- 44:23Speaker 1: Goodpoint and fifth, and this is a huge.
- 44:26Speaker 2: One we mentioned with labs. Never test something completely new,
- 44:30Speaker 2: like a brand new script or technique you just found
- 44:33Speaker 2: for the very first time, in a live client environment.
- 44:36Speaker 2: Always always test it in your lab first to understand
- 44:40Speaker 2: its behavior and potential.
- 44:41Speaker 1: Impact lab first.
- 44:42Speaker 2: Always always, finally, know when to move on to another target.
- 44:47Speaker 2: Pentists are time bound engagements. Don't get tunnel vision and
- 44:50Speaker 2: let frustration lead you to overly aggressive or unsafe scans
- 44:54Speaker 2: on a single difficult target that just won't crack. Move on,
- 44:58Speaker 2: cover more ground.
- 44:59Speaker 1: That's such p practical, clearly experienced driven advice, and it
- 45:03Speaker 1: ties right back to the importance of continuous communication throughout
- 45:07Speaker 1: an engagement, doesn't it.
- 45:08Speaker 2: It absolutely does. Surprises and cybersecurity consulting are rarely good surprises.
- 45:13Speaker 2: Effective communication with clients through regular status updates, maybe quick
- 45:16Speaker 2: daily emails a weekly call.
- 45:18Speaker 1: Is essential was that achieve.
- 45:20Speaker 2: It keeps them fully aware of your progress, reassures them
- 45:22Speaker 2: you're working, allows you to call out major findings in
- 45:25Speaker 2: near real time so they can start remediation planning, and
- 45:29Speaker 2: provides vital opportunities for you to ask those clarification questions.
- 45:32Speaker 1: We talked about makes sense. Are there standard touch points?
- 45:35Speaker 2: Setting milestones like notifying them at twenty five percent, fifty
- 45:39Speaker 2: percent and seventy five percent project completion is a good practice,
- 45:43Speaker 2: and definitely establish a protocol for immediate notification for any
- 45:47Speaker 2: critical or high severity findings. Ultimately, your goal should be
- 45:51Speaker 2: to help the client genuinely improve their security posture, not
- 45:55Speaker 2: just to win the engagement by finding flaws. It's collaborative.
- 45:59Speaker 1: So what is this that's all mean for you the listener?
- 46:01Speaker 1: We've just taken a really deep dive into endmap, haven't we,
- 46:04Speaker 1: from its fundamental port scanning functions all the way to
- 46:07Speaker 1: its advanced capabilities in vulnerability identification, evasion techniques and even
- 46:12Speaker 1: customs scripting with the NSE.
- 46:13Speaker 2: Yeah, we covered a lot of ground.
- 46:15Speaker 1: You've seen how this single, albeit complex tool is foundational
- 46:18Speaker 1: for critical roles in penetration testing, red teaming and purple teaming,
- 46:23Speaker 1: and why those ethical and legal considerations are absolutely paramount.
- 46:27Speaker 2: And on a broader scale, end maps versatility and power
- 46:30Speaker 2: are truly limited only by your creativity and crucially, your
- 46:34Speaker 2: deep understanding of how it actually works under the hood. Right,
- 46:38Speaker 2: It's not about mechanically following a checklist of commands, but
- 46:41Speaker 2: about grasping the why and the how behind your scanning actions.
- 46:46Speaker 2: The compelling anecdotes and real world examples from our source
- 46:49Speaker 2: material really bring this to life, highlighting the profound impact
- 46:53Speaker 2: of strategic informed use.
- 46:56Speaker 1: You now have hopefully a solid foundation to explore further.
- 47:00Speaker 1: I genuinely encourage you to set up your own lab
- 47:03Speaker 1: environment just like we discussed, and start experimenting safely with
- 47:06Speaker 1: these flags and scripts. Get your hands dirty.
- 47:09Speaker 2: That's where the real learning happens.
- 47:11Speaker 1: What stands out to you about end Map's potential Now
- 47:14Speaker 1: that we've pulled back some of the layers, how could
- 47:16Speaker 1: you apply these techniques, maybe just to better understand the
- 47:18Speaker 1: security posture of your own home network or perhaps your
- 47:22Speaker 1: workplace network, always remembering those crucial ethical and legal boundaries of.
- 47:26Speaker 2: Course, permission first. The joy of discovery, that Aha moment
- 47:31Speaker 2: is profoundly found in that hands on practice. Continue to learn,
- 47:35Speaker 2: always question assumptions, and make an effort to consider multiple perspectives,
- 47:39Speaker 2: the attackers the defenders. Critical thinking is truly essential in
- 47:43Speaker 2: this field, especially with the overload of information out there,
- 47:46Speaker 2: and end map is an incredible tool to sharken that
- 47:48Speaker 2: exact skill.
- 47:49Speaker 1: This has been another deep dive into the fascinating and
- 47:52Speaker 1: sometimes complex world of cybersecurity. We hope you feel more
- 47:56Speaker 1: informed and more importantly equipped to continue your own learning
- 47:59Speaker 1: journey until next time, Keep exploring, keep questioning, and keep
- 48:03Speaker 1: making those Aha moments.