Latest / CyberCode Academy / Course 27 - Hacking Web Applications, Penetration Testing, CTF | Episode 12: Introduction to Banner Grabbing and Service Fingerprinting
Transcript
- 0:00Speaker 1: Imagine for a moment that you are standing on a
- 0:03Speaker 1: front porch. You haven't knocked, you haven't rung the doorbell
- 0:06Speaker 1: or anything. You are simply standing on the welcome mat,
- 0:09Speaker 1: just tying your shoe, right mining your own business exactly.
- 0:13Speaker 1: But before you even stand up or raise your hand,
- 0:16Speaker 1: the door just shouts at you through the wood. It screams, uh, hello,
- 0:20Speaker 1: I am a solid oak door model four hundred, installed
- 0:24Speaker 1: in two thousand and eight. The dead bolt is a
- 0:26Speaker 1: Quickset Series five, and the alarm system inside is a
- 0:30Speaker 1: Honeywell Vista twenty P with firmware version three point one.
- 0:34Speaker 2: I mean, that would be a completely terrible security system,
- 0:38Speaker 2: the worst, and honestly, it'd be incredibly convenient for anyone
- 0:41Speaker 2: trying to break in. You wouldn't even need to pick
- 0:43Speaker 2: the lock or guess the setup. You just look up
- 0:46Speaker 2: the manual for that specific Honeywell model.
- 0:48Speaker 1: Right in the physical world, that sounds completely insane. You
- 0:51Speaker 1: would never just hand over the blueprints to your security
- 0:53Speaker 1: system to a stranger standing on your porch. But in
- 0:55Speaker 1: the digital world this happens constantly. I mean every single second.
- 1:00Speaker 1: It's like this digital handshake where one side grips your
- 1:04Speaker 1: hand and immediately blurts out their security number in medical
- 1:08Speaker 1: history before you've even managed to say hello.
- 1:11Speaker 2: It really is a massive issue, and it's actually one
- 1:14Speaker 2: of the most common oversights in network configuration. That phenomenon
- 1:18Speaker 2: is exactly what we are unpacking in this deep dive.
- 1:21Speaker 2: It's technically known as banner grabbing, though you will often
- 1:24Speaker 2: hear it referred to as service fingerprinting.
- 1:27Speaker 1: Service fingerprinting. It sounds a bit like forensic science, and honestly,
- 1:31Speaker 1: based on the sources we've got today, it's not far off.
- 1:33Speaker 2: No, it's really not so.
- 1:35Speaker 1: Welcome to the deep dive. We've got a great stack
- 1:37Speaker 1: of technical documentation, man pages and security guides today, and
- 1:41Speaker 1: we are officially opening up the TOOLKIP. What is our
- 1:44Speaker 1: main mission for this session.
- 1:45Speaker 2: Well, we aren't just doing high level theory today. We
- 1:48Speaker 2: are going to look at the actual command line mechanics,
- 1:51Speaker 2: the specific flags, the syntax, the exact inputs that attackers
- 1:55Speaker 2: and defenders use to figure out exactly what code is
- 1:58Speaker 2: running on a server.
- 1:59Speaker 1: Because if you want to secure the house, you really
- 2:02Speaker 1: need to know what the house is screaming out to
- 2:03Speaker 1: the entire neighborhood exactly. Let's start with the basics, but
- 2:06Speaker 1: let's get specific. When we say banner grabbing, define the banner.
- 2:11Speaker 1: For us, in a strict networking context, what are we
- 2:15Speaker 1: actually grabbing?
- 2:16Speaker 2: A banner is essentially the initial text message sent from
- 2:19Speaker 2: a host, so that's the server or device you were
- 2:22Speaker 2: connecting to. It sends this text back to the client,
- 2:25Speaker 2: usually triggering the exact moment the connection is established.
- 2:29Speaker 1: Okay, This tech.
- 2:30Speaker 2: String contains info about the service running on that specific port,
- 2:35Speaker 2: and crucially, it almost always contains the specific version numbers
- 2:39Speaker 2: of that software.
- 2:40Speaker 1: And often the operating system underneath it. Right.
- 2:42Speaker 2: Frequently, yeah, it might tell you it's running the Apache
- 2:45Speaker 2: Web server, but it will also casually slip in that
- 2:47Speaker 2: it's sitting on top of a Buntu, Linux or CentOS.
- 2:50Speaker 2: So simply by grabbing this text, you build a detailed
- 2:54Speaker 2: profile of your target without ever launching a single exploit.
- 2:57Speaker 1: You're just listening to the greeting.
- 2:59Speaker 2: You're just listening.
- 3:00Speaker 1: Now. The sources we're analyzing distinguish between two main methodologies here.
- 3:05Speaker 1: There's active and passive. I think a lot of people
- 3:08Speaker 1: assume any kind of network recon is always active, but
- 3:11Speaker 1: break down the difference.
- 3:12Speaker 2: For us, it really comes down to visibility and risk.
- 3:16Speaker 2: Active banner grabbing is what we are mostly focusing on
- 3:18Speaker 2: today because it involves the actual tools in our command
- 3:22Speaker 2: line toolkit. This is where you the user craft specific
- 3:26Speaker 2: network packets and send them directly to the target.
- 3:28Speaker 1: You are physically knocking on the door.
- 3:30Speaker 2: You are shaking the hand yes.
- 3:32Speaker 1: Which means you are leaving fingerprints exactly.
- 3:34Speaker 2: You are in their firewall logs. If the target has
- 3:37Speaker 2: an intrusion detection system and IDs, you likely just lit
- 3:41Speaker 2: up their dashboard.
- 3:42Speaker 1: So what's the alternative?
- 3:43Speaker 2: Compare that to passive banner grabbing. Passive means you are
- 3:46Speaker 2: collecting data about the target without your IP address ever
- 3:50Speaker 2: touching their server.
- 3:51Speaker 1: Wait, so how do you get the banner if you
- 3:52Speaker 1: never actually connect to them?
- 3:54Speaker 2: You use intermediaries. The sources point to things like search
- 3:57Speaker 2: engine caches, so looking at an old version of the
- 4:00Speaker 2: site stored by Google or bing or if you're already
- 4:03Speaker 2: on a network, say you're sitting in a coffee shop,
- 4:05Speaker 2: you might be sniffing traffic using a tool like wire shark.
- 4:08Speaker 2: Right packet sniffing, Yeah, you're analyzing data packets that are
- 4:12Speaker 2: already flowing between the server and someone else entirely you're
- 4:16Speaker 2: reading the mail, not right in it.
- 4:18Speaker 1: That's incredibly smart. It's much safer, but I imagine it's
- 4:21Speaker 1: probably slower and maybe less up to date than just
- 4:24Speaker 1: asking the server directly.
- 4:25Speaker 2: Definitely, which is why for this deep dive we are
- 4:28Speaker 2: zeroing in on the active.
- 4:29Speaker 1: Toolkit, and the sources provide a really thorough laundry list
- 4:33Speaker 1: of utilities for this, ranging from standard Linux commands all
- 4:37Speaker 1: the way to heavy duty security scanners.
- 4:39Speaker 2: We've got a great lineup to step through today. We're
- 4:42Speaker 2: going to cover curl, racket, telnet, netcat nikto en map,
- 4:47Speaker 2: and finally BURP suite.
- 4:49Speaker 1: Let's start with what security folks call the living off
- 4:52Speaker 1: the land tools. These are utilities that are likely already
- 4:55Speaker 1: installed on any Linux or maco ass system. You don't
- 4:58Speaker 1: need to be a hacker to use them. Developers use
- 5:00Speaker 1: them every single day. Let's talk about curl.
- 5:02Speaker 2: Curl is ubiquitous. It is a command line tool for
- 5:05Speaker 2: transferring data with URLs. Most people use it to test
- 5:08Speaker 2: an API or just download a file, but with the
- 5:11Speaker 2: right flags, it becomes a powerful reconnaissance tool.
- 5:14Speaker 1: The sources highlight two specific flags to turn curl into
- 5:17Speaker 1: a banner grabber. That's dash s and dash capital I
- 5:21Speaker 1: walk us through the syntax. If I'm sitting at my terminal,
- 5:24Speaker 1: why do I need those specific letters?
- 5:26Speaker 2: Okay? So normally, if you just run curl against a website,
- 5:30Speaker 2: it dumps the raw HTML. The entire page source just
- 5:33Speaker 2: vomits onto your terminal. It's messy, it scrolls for pages,
- 5:36Speaker 2: and it's practically impossible to read right, just a wall
- 5:39Speaker 2: of code exactly. So the first flag dash S stands
- 5:42Speaker 2: for silent. It suppresses the progress meter and all the
- 5:45Speaker 2: air messages. It essentially cleans up your workspace so you
- 5:47Speaker 2: only see the raw data you want.
- 5:49Speaker 1: Okay, So dashes gets rid of the noise. What about
- 5:52Speaker 1: the capital dashie, that is.
- 5:53Speaker 2: The money flag right there? Capital dash I tells Curl
- 5:56Speaker 2: to fetch only the headers. It makes a head request
- 5:58Speaker 2: instead of a standard jet request.
- 6:01Speaker 1: So we aren't asking for the website content at all.
- 6:03Speaker 2: No, we are asking for the metadata about the website.
- 6:06Speaker 2: That header section is exactly where the banner lives.
- 6:09Speaker 1: So the command you'd type is curl space S space
- 6:12Speaker 1: dash capital I space and then the target URL and
- 6:16Speaker 1: the documentation we reviewed. What does that output actually look like?
- 6:20Speaker 2: It returns a very clean, concise block of text. You'll
- 6:23Speaker 2: see the HTTP status code first, something like two hundred OK.
- 6:27Speaker 2: But right below that you'll see a line that.
- 6:29Speaker 1: Starts with server And what does the example show?
- 6:31Speaker 2: In the example from the source, it explicitly says server
- 6:34Speaker 2: apatche two point two point eight U boom two.
- 6:38Speaker 1: Wow. That is incredibly specific. It didn't just say web server.
- 6:41Speaker 1: It gave us the vendor, which is a patche, the
- 6:43Speaker 1: exact version two point two point eight, and the operating
- 6:46Speaker 1: system uboom two.
- 6:47Speaker 2: And for a security professional or an attacker, that version
- 6:50Speaker 2: number two point two point eight is the single most
- 6:53Speaker 2: important piece of data on that screen. We will get
- 6:55Speaker 2: to exactly why that is in minute, but just knowing
- 6:57Speaker 2: that number changes the entire dynamic of an engagement.
- 7:00Speaker 1: Now, Curl has a cousin that often gets overlooked, which
- 7:03Speaker 1: is reget.
- 7:04Speaker 2: Right. We get is primarily a file downloader, literally web get,
- 7:09Speaker 2: but if you find yourself on a compromise system or
- 7:11Speaker 2: a really constrained environment that just doesn't have Curl installed,
- 7:15Speaker 2: reget is almost always there as reliable backup.
- 7:18Speaker 1: And is this syntax similar.
- 7:20Speaker 2: It's very close, but the flags are different, which definitely
- 7:23Speaker 2: trips people up for reget. The source suggests using reget
- 7:27Speaker 2: space dash Q space dash capital s.
- 7:30Speaker 1: Okay, let me guess the dash q is for quiet exactly.
- 7:34Speaker 2: It's the same as the silent flag and curl, but
- 7:37Speaker 2: here the capital dash s is what prints the server
- 7:40Speaker 2: headers to your terminal.
- 7:41Speaker 1: It's always good to have redundancy. If one tool is missing,
- 7:44Speaker 1: just pivot and use the other.
- 7:45Speaker 2: Absolutely.
- 7:46Speaker 1: Now, let's move down the network sack a little bit.
- 7:48Speaker 1: Curl and regate are speaking HTDP. They are built to
- 7:51Speaker 1: be web tools. But what if we want to get
- 7:53Speaker 1: more raw? What do we want to strip away all
- 7:55Speaker 1: the protocol niceties that brings us to telnet telling.
- 7:59Speaker 2: It is definitely a bit of a dinosaur. It is
- 8:01Speaker 2: an ancient remote administration protocol that sends everything in plaintext,
- 8:05Speaker 2: no encryption at all. Zero. No one should be using
- 8:09Speaker 2: it to actually manage servers anymore because it is wildly insecure.
- 8:12Speaker 2: Your passwords literally go across the wire in clear text.
- 8:15Speaker 2: But for banner grabbing it's fantastic.
- 8:18Speaker 1: Why is a dinosaur tool useful for modern recon.
- 8:21Speaker 2: Because it creates a raw TCP connection. It doesn't try
- 8:25Speaker 2: to be smart, it doesn't format things. It just opens
- 8:28Speaker 2: a pipe directly to a port. The sources do emphasize
- 8:31Speaker 2: that you might actually have to install it. These days,
- 8:33Speaker 2: you'd use something like pseudo app to installed Talnet because
- 8:36Speaker 2: it's been removed as a default on most modern Linux distributions.
- 8:39Speaker 1: So how does a telnet banner grab actually differ from
- 8:42Speaker 1: using curl. Let's use the example of an FTP server.
- 8:45Speaker 2: From the text Okay, so FTP, or a file transfer protocol,
- 8:48Speaker 2: usually lives on port twenty one. If you go to
- 8:51Speaker 2: your terminal and run telnet space your target IP address
- 8:54Speaker 2: space twenty one, you aren't sending a web request. You
- 8:56Speaker 2: are just connecting the pipe. And FTP is a very chatty.
- 8:59Speaker 1: Protocol, chad, how like it talks first.
- 9:01Speaker 2: Exactly, the server speaks first. You don't even have to
- 9:04Speaker 2: type anything. The absolute second the connection opens, the server responds.
- 9:08Speaker 2: The example in our sources shows the output instantly reading
- 9:11Speaker 2: two twenty vs FTPD two point three point four.
- 9:14Speaker 1: It just blurts it right out immediately.
- 9:16Speaker 2: That two twenty is just a standard FTP status code
- 9:19Speaker 2: saying I'm ready, And the text right next to it
- 9:22Speaker 2: in the parentheses is the software openly bragging about its
- 9:25Speaker 2: exact version.
- 9:27Speaker 1: Now doing this on port eighty, the webport is a
- 9:30Speaker 1: little trickier with tailnet, isn't it. A web server is
- 9:32Speaker 1: usually polite. It waits for you to ask for a page.
- 9:35Speaker 1: It won't just say hello the way an FTP server does.
- 9:37Speaker 2: Correct. If you tell that to port eighty, your terminal
- 9:40Speaker 2: cursor will just sit there blinking at you. The server
- 9:43Speaker 2: is waiting for you to make a request, so you
- 9:45Speaker 2: have to manually type out what your web browser usually
- 9:48Speaker 2: sends invisibly behind the scenes.
- 9:50Speaker 1: The source material calls this the HTTP.
- 9:53Speaker 2: Trick, right, So you sit at that blinking cursor and
- 9:55Speaker 2: you type headspace forward slash space http slash one point zero,
- 10:00Speaker 2: and you hit enter twice.
- 10:02Speaker 1: You're manually writing the header request.
- 10:04Speaker 2: You are you're speaking the language of the Internet by hand.
- 10:06Speaker 2: You're telling the server give me the headers. That's the
- 10:08Speaker 2: head part for the root directory. That's a slash, and
- 10:11Speaker 2: I am speaking HTTP version one point zero.
- 10:14Speaker 1: It really demystifies how the Internet works. We think of
- 10:17Speaker 1: Chrome or safari as these magic portals, but they're really
- 10:20Speaker 1: just sending these basic text commands really fast, and if
- 10:23Speaker 1: you know the language, you can just type it yourself.
- 10:24Speaker 2: Exactly, and the moment you hit enter twice, the server
- 10:27Speaker 2: replies with that exact same server Apatchy two point two
- 10:31Speaker 2: point eight line we saw earlier. When we use curl,
- 10:33Speaker 2: it proves that curl is just automating what you can
- 10:36Speaker 2: do manually with a raw connection.
- 10:37Speaker 1: So telnet is the highly manual approach. But there is
- 10:41Speaker 1: a more modern, scriptable version of this raw connection idea.
- 10:44Speaker 1: The Swiss Army Knife of Networking netcat or simply.
- 10:48Speaker 2: Nc netcat is essential. It reads and writes data across
- 10:52Speaker 2: network connections using ether, TCP, or UDP. It's much more
- 10:55Speaker 2: flexible than telnet and it's designed specifically to be a
- 10:58Speaker 2: back end tool.
- 10:59Speaker 1: The man syntax is beautifully simple. It's just nd space
- 11:02Speaker 1: the IP address based the port number, but the source
- 11:05Speaker 1: mentions a specific flag to make it useful for banner grabbing.
- 11:08Speaker 2: Dash V verbose mode computers are naturally lazy. They don't
- 11:12Speaker 2: like to report details if they don't have to. The
- 11:14Speaker 2: dash V flag forces netcat to tell you exactly what
- 11:17Speaker 2: is happening under the hood during that connection handshake.
- 11:20Speaker 1: So if we run m dash fee against that same
- 11:22Speaker 1: FTP port.
- 11:23Speaker 2: You get the connection success message printed out and then bam,
- 11:26Speaker 2: the banner v SFTPD two point three point four. It
- 11:31Speaker 2: captures the exact same data as telnet, but in a
- 11:34Speaker 2: cleaner way.
- 11:35Speaker 1: And can you do the HTTP manual typing trick with
- 11:38Speaker 1: netcat as well?
- 11:39Speaker 2: Absolutely, it works the exact same way. You connect to
- 11:41Speaker 2: Port eighty, type your head request, hit enter twice, and
- 11:44Speaker 2: you get the banner. The real value of netcat over
- 11:47Speaker 2: telnet is that netcat is easily scriptable. You can pipe
- 11:50Speaker 2: text into it and pipe output out of it, making
- 11:52Speaker 2: it super easy to integrate into automated workflows or larger
- 11:55Speaker 2: Bash scripts.
- 11:56Speaker 1: Speaking of automation, let's lead the manual tools behind. I
- 12:00Speaker 1: am a security auditor and I have to scan five
- 12:02Speaker 1: hundred servers. I am absolutely not going to sit there
- 12:05Speaker 1: typing head slash HTTP into a terminal window five hundred times. Yeah,
- 12:09Speaker 1: you'd go crazy, right, I'm going to use a dedicated scanner.
- 12:12Speaker 1: The sources introduce Nixo.
- 12:14Speaker 2: Nikto, often spelled nikto. It's a highly specialized vulnerability scanner
- 12:20Speaker 2: specifically built for web servers. Unlike netcat, which is just
- 12:23Speaker 2: a general networking tool that connects to anything, nickto knows
- 12:26Speaker 2: exactly what a web server looks like and more importantly,
- 12:29Speaker 2: where the bodies are buried.
- 12:31Speaker 1: How does the usage differ.
- 12:32Speaker 2: At the command line, it's a bit more structured. You
- 12:34Speaker 2: use the H flag to specify the host and noticing
- 12:38Speaker 2: the documentation we have, you usually need to specify the
- 12:41Speaker 2: protocol typing out HTTT or HTTPS right before the IP address.
- 12:46Speaker 2: Then it goes off and runs a very comprehensive set of.
- 12:48Speaker 1: Tests, and the output you get back as much richer.
- 12:50Speaker 2: Oh definitely. It doesn't just grab the banner, It actively
- 12:53Speaker 2: analyzes it. It looks for default files left on the server,
- 12:57Speaker 2: outdating components, known configuration mistake, but for our purpose today,
- 13:01Speaker 2: it confirms the banner data. The example output clearly lists
- 13:05Speaker 2: server apatche two point two point eight, so it's a
- 13:07Speaker 2: validation of what we found manually, plus a whole lot
- 13:10Speaker 2: of extra context.
- 13:11Speaker 1: Now we have to talk about the heavy hitter in
- 13:12Speaker 1: the room, the absolute industry standard, Yeah.
- 13:15Speaker 2: NMP, the Network mapper. If you work an IT or
- 13:19Speaker 2: cybersecurity in any capacity, you know NMAP. It is designed
- 13:23Speaker 2: to scan large networks rapidly and accurately. It's the standard
- 13:28Speaker 2: for a very good reason.
- 13:29Speaker 1: But here is the critical thing from our sources. The
- 13:32Speaker 1: n MAP scams usually just tell you if a port
- 13:35Speaker 1: is open or closed. They don't automatically grab the banner.
- 13:38Speaker 1: There is a specific magic flag the sources highlight just
- 13:42Speaker 1: for this purpose.
- 13:43Speaker 2: Yes, that would be SV lowercase S, capital V.
- 13:47Speaker 1: Break that down for us, The d S.
- 13:49Speaker 2: Stands for scan and the capital of V stands for
- 13:51Speaker 2: a version. Without this specific flag, nmap just guesses the
- 13:55Speaker 2: service based purely on the port number.
- 13:57Speaker 1: So it sees port eighty and just assumes, oh, that's HTTP, right.
- 14:00Speaker 2: It sees port twenty one and blindly assumes that must
- 14:02Speaker 2: be FTP. It doesn't actually check, but when you add
- 14:05Speaker 2: s fee, nmap actively interrogates the port. It sends a
- 14:08Speaker 2: complex series of probes to see exactly how the service respond.
- 14:11Speaker 1: It's basically poking the bear to see what kind of
- 14:13Speaker 1: noise it makes.
- 14:14Speaker 2: Precisely, it creates a behavioral fingerprint, and the output it
- 14:18Speaker 2: gives you is beautiful. The source shows this incredibly clean table.
- 14:22Speaker 2: Column one is the port, Calumn two is the state
- 14:25Speaker 2: which usually says open, and column three is the version.
- 14:28Speaker 2: There it is right there on the table, a patche
- 14:30Speaker 2: HTTPD two point two point eight VSFTPD two point three
- 14:34Speaker 2: point four. It gathers everything we just did manually with
- 14:37Speaker 2: all those other tools, across hundreds of ports in a
- 14:40Speaker 2: single command.
- 14:41Speaker 1: So if NMP is that good, why even bother with
- 14:44Speaker 1: the other tools? Why not just default the end map
- 14:45Speaker 1: for everything?
- 14:47Speaker 2: Because NMAP is allowed, it is very aggressive. It generates
- 14:50Speaker 2: a massive amount of network traffic. Often a firewall or
- 14:53Speaker 2: an IDs will instantly block an end map scan because
- 14:56Speaker 2: it behaves exactly like an attack, because well, it is
- 14:59Speaker 2: the first stage of one but a simple CURL request
- 15:02Speaker 2: that just looks like normal everyday web traffic. Sometimes you
- 15:05Speaker 2: need a scalpel, not a slidchhammer.
- 15:06Speaker 1: That makes total sense. That context of your engagement dictates
- 15:09Speaker 1: the tool. Now, the final tool on our list moves
- 15:11Speaker 1: us away from the command line entirely and into a
- 15:14Speaker 1: graphical user interface at gu burp Suite.
- 15:17Speaker 2: Burpsuite is widely considered the gold standard for web application
- 15:20Speaker 2: security testing. It operates completely differently. It acts as a proxy.
- 15:25Speaker 2: It essentially sits right in the middle between your web
- 15:27Speaker 2: browser and the Internet, intercepting every single packet that goes
- 15:31Speaker 2: back and forth.
- 15:32Speaker 1: So you aren't actually typing commands. You are just browsing
- 15:34Speaker 1: a website normally, and burp is freezing time in the background.
- 15:38Speaker 2: Exactly. You click a link to load a page, Burp
- 15:42Speaker 2: hits pause on the request. It lets you inspect the
- 15:45Speaker 2: raw data before it goes out to the server, and
- 15:47Speaker 2: then it pauses the server's reply before it renders in
- 15:50Speaker 2: your browner. The source suggests looking specifically at the response
- 15:54Speaker 2: tab in the software, you can see the raw HTTP
- 15:57Speaker 2: headers laid out visually, line by line.
- 16:00Speaker 1: The example in our notes shows a completely different server.
- 16:02Speaker 1: This time. We aren't looking at a patchy anymore.
- 16:05Speaker 2: Right In this burp suite example, the header clearly says
- 16:08Speaker 2: server Microsoft is ten point zero, So instantly we know
- 16:12Speaker 2: we are dealing with a Windows server running Internet Information
- 16:15Speaker 2: Services version ten.
- 16:16Speaker 1: But Burp catches something else in that same response, doesn't it.
- 16:19Speaker 1: The source calls it information leakage. It does.
- 16:22Speaker 2: There's a totally separate extra header in the response that
- 16:25Speaker 2: says x powered by ASP dot net, and right below
- 16:28Speaker 2: that it gives the exact framework version, ASP dot Net
- 16:31Speaker 2: version four point zero point three.
- 16:33Speaker 1: So from one single page load intercepted by Burp, we
- 16:36Speaker 1: now have the underlying OS, the specific webserver software, and
- 16:39Speaker 1: the application framework version.
- 16:41Speaker 2: We are building a very high resolution, multi layered picture
- 16:45Speaker 2: of this target.
- 16:46Speaker 1: Okay, so we've collected all these digital baseball cards. We
- 16:48Speaker 1: have a patchy two point two point eight, we have
- 16:51Speaker 1: VSFTPD two point three point four, we have is ten
- 16:54Speaker 1: point zero. Why does any of this actually matter? Why
- 16:58Speaker 1: go through all this trouble with command line and proxies
- 17:01Speaker 1: just to get a version number?
- 17:02Speaker 2: This is the ultimate? So what moment of the whole process?
- 17:05Speaker 2: We aren't just collecting numbers for fun, We are doing
- 17:07Speaker 2: target selection.
- 17:08Speaker 1: Explain that relationship for the listener, the direct link between
- 17:10Speaker 1: that version number and the actual security risk.
- 17:13Speaker 2: In cybersecurity, vulnerabilities are mapped directly to specific software versions.
- 17:17Speaker 2: Code changes over time. Right, bugs get introduced in one
- 17:21Speaker 2: version and hopefully patched in the next. When a security
- 17:24Speaker 2: researcher finds a whole they publish a CVE that's a
- 17:27Speaker 2: common vulnerability as an exposures.
- 17:29Speaker 1: Record, Right, the official catalog of flaws.
- 17:32Speaker 2: Exactly, and that record will say something like this specific
- 17:35Speaker 2: memory leak only works on a patche version's two point
- 17:37Speaker 2: two point zero through two point two point nine.
- 17:40Speaker 1: I see. So if I am an attacker and my
- 17:42Speaker 1: banner crab reveals a patchy two point two point.
- 17:45Speaker 2: Eight, you just go to a public vulnerability database. You
- 17:48Speaker 2: type in a patchy two point two point eight, and
- 17:49Speaker 2: the database effectively hands you a menu it says, here
- 17:52Speaker 2: are the five known documented ways to break into this
- 17:55Speaker 2: exact server.
- 17:56Speaker 1: It turns generic blind hack attempt into a laser guided
- 17:59Speaker 1: MYSILS exactly.
- 18:01Speaker 2: Take that VSFTPD two point three point four example that
- 18:04Speaker 2: kept popping up in all our command line sources. That
- 18:06Speaker 2: is a legendary version number in the security world. Why
- 18:09Speaker 2: is that one specifically legendary because that specific version had
- 18:13Speaker 2: a malicious backdoor conentiled right into the original source code.
- 18:17Speaker 2: It wasn't an accidental bug. It was intentional sabotage by
- 18:21Speaker 2: someone who compromised the download server. If you run a
- 18:24Speaker 2: banner grab and you see VSFTPD two point three point four,
- 18:29Speaker 2: there is a trivial, widely available script you can run
- 18:32Speaker 2: that gives you instant root level control of that system.
- 18:35Speaker 1: That is terrifying.
- 18:36Speaker 2: And the only way you know that massive vulnerability even
- 18:39Speaker 2: exists on the target is because the banner politely told
- 18:42Speaker 2: you hello, I am version two point three point four.
- 18:45Speaker 1: So the banner, this polite digital greeting is actually a
- 18:48Speaker 1: critical vulnerability in itself. If you haven't patched your.
- 18:51Speaker 2: System, it's essentially a self destruct button. You're handing to
- 18:54Speaker 2: anyone who asks. This is exactly why the reconnaissance phase
- 18:57Speaker 2: is so critical. You cannot defend a network if you
- 18:59Speaker 2: do not know what it is broadcasting to the world,
- 19:02Speaker 2: and an attacker cannot attack a network efficiently without knowing
- 19:05Speaker 2: what software to target.
- 19:06Speaker 1: It really highlights the absolute importance of patching. If you
- 19:10Speaker 1: are running ten year old software, you are basically broadcasting
- 19:13Speaker 1: your negligence to the entire Internet twenty four to seven.
- 19:15Speaker 2: Or even just practicing good configuration management. Maybe your systems
- 19:20Speaker 2: actually are patched, but you should still configure your server
- 19:23Speaker 2: to lie to lie. Yeah, you can change the banner.
- 19:26Speaker 2: You can configure your patching service of the vanner just
- 19:28Speaker 2: says server unknown, or you can feed it a fake
- 19:32Speaker 2: version number. Don't give the attacker free accurate intelligence.
- 19:37Speaker 1: That's a great point obfuscation, make them work for it exactly.
- 19:41Speaker 2: Security through obscurity isn't a total solution on its own,
- 19:44Speaker 2: but it definitely helps slow them down.
- 19:46Speaker 1: All right, let's wrap this up with a quick review
- 19:47Speaker 1: of the Arsenal Week cover today, so it really sticks. Sure.
- 19:51Speaker 2: We started with the built in web clients that was CURL,
- 19:54Speaker 2: using dh S for a silent and dash capital I
- 19:57Speaker 2: for headers and reget using dash que for quiet and
- 20:01Speaker 2: dash capital s for superheaders.
- 20:02Speaker 1: Then we went raw with telnet and netcat opening direct
- 20:06Speaker 1: TCP connections to ports to just sit and watch for
- 20:09Speaker 1: that initial handshake message.
- 20:11Speaker 2: We covered nikto for specialized web vulnerability scanning and deep
- 20:14Speaker 2: banner analysis, and.
- 20:15Speaker 1: The big one end map using that magic da SV
- 20:18Speaker 1: flag to automate version detection across thousands of ports at once.
- 20:23Speaker 2: And finally burp suite for visual inspection of HTTP headers
- 20:28Speaker 2: letting us find that extra information leakage like the xpowered
- 20:31Speaker 2: by tags a.
- 20:32Speaker 1: Really solid versatile toolkit. So for you listening our student today,
- 20:36Speaker 1: it is officially lab time. What is the mission for
- 20:40Speaker 1: them to take away from this?
- 20:42Speaker 2: The mission is verification. I want you actually try this,
- 20:45Speaker 2: fire up your terminal. But and I really cannot stress
- 20:48Speaker 2: this enough. Do not scan random websites or servers that
- 20:51Speaker 2: you do not personally own. That is illegal in many jurisdictions.
- 20:55Speaker 1: Stick to your own gear, a virtual machine you spun up,
- 20:58Speaker 1: your home router or a low server you have explicit
- 21:01Speaker 1: permission to.
- 21:01Speaker 2: Test exactly, keep it legal. Use curlh I on your
- 21:05Speaker 2: own router. Use n map sv against a local VM.
- 21:10Speaker 2: See if the banners match across the different tools, do
- 21:12Speaker 2: they tell the same story?
- 21:13Speaker 1: And Task two. Once you get that version number.
- 21:15Speaker 2: Then apply what we talked about. Do the research. If
- 21:18Speaker 2: you find you are running a service version from three
- 21:20Speaker 2: years ago, google it, search vulnerabilities for and then your
- 21:24Speaker 2: software version. See what pops up on the databases.
- 21:26Speaker 1: It's a very sobering exercise.
- 21:27Speaker 2: The first time you do it, it completely changes your perspective.
- 21:30Speaker 2: You stop seeing web pages and you start seeing potential
- 21:33Speaker 2: entry points everywhere.
- 21:34Speaker 1: That wraps up our deep dive into banner grabbing. It
- 21:37Speaker 1: seems like such a small detail, just a single line
- 21:40Speaker 1: of text and a header, but it really is the
- 21:42Speaker 1: loose thread that can unravel the whole sweater.
- 21:44Speaker 2: Absolutely, it is exactly where the attack begins.
- 21:48Speaker 1: Before we go, I want to leave you with one
- 21:50Speaker 1: final thought to explore on your own. We talked about
- 21:54Speaker 1: configuring your server to lie to hide its version, but
- 21:57Speaker 1: what if you took it a step further. What if
- 22:00Speaker 1: that outdated, highly vulnerable banner you just grabbed isn't a
- 22:04Speaker 1: sloppy admin at all.
- 22:05Speaker 2: Oh, that's interesting.
- 22:06Speaker 1: What if it's a honeypot, a fake server perfectly designed
- 22:09Speaker 1: to look weak waiting to see exactly who tries to
- 22:12Speaker 1: launch an exploit against version two point three point four.
- 22:16Speaker 1: In the digital world, sometimes the easy targets are just
- 22:19Speaker 1: traps waiting to be sprung. Think about how you'd verify
- 22:23Speaker 1: if the banner you're reading is actually telling the truth.
- 22:25Speaker 1: Still curious, We'll see you in the next deep dive.