Latest / CyberCode Academy / Course 34 - Cybersecurity Kill Chain | Episode 1: Reconnaissance and Footprinting Fundamentals
Transcript
- 0:00Speaker 1: So I want you to imagine just for a second
- 0:02Speaker 1: that you're planning this highly sophisticated bank heist.
- 0:05Speaker 2: Okay, a bank heist. I like where this is going, right, But.
- 0:10Speaker 1: You wouldn't just throw on a ski mask, walk right
- 0:13Speaker 1: through the front doors at high noon and like, hope
- 0:15Speaker 1: you can figure out the vault mechanism on the fly.
- 0:17Speaker 2: No, definitely not. That's how you get caught immediately exactly.
- 0:21Speaker 1: A professional operates entirely differently. If you're serious about this,
- 0:25Speaker 1: you spend weeks sitting in some rented apartment across the street.
- 0:28Speaker 1: You log the exact shift changes.
- 0:30Speaker 2: Of the guards, right, gathering intelligence yep.
- 0:33Speaker 1: You use a telephoto lens to identify the manufacturer of
- 0:38Speaker 1: the security cameras, mapping out all their blind spots. You
- 0:41Speaker 1: figure out which branch manager holds the master keys. You
- 0:45Speaker 1: know what route they take to commute home.
- 0:47Speaker 2: In the physical world, we call that casing the joint.
- 0:49Speaker 1: Yeah, But in the digital threat landscape, this is called reconnaissance,
- 0:54Speaker 1: and that's our mission for today's deep dive.
- 0:56Speaker 2: It really is the absolute foundation of any targeted cyber attack.
- 1:00Speaker 2: It represents step one of what we call the cyber
- 1:03Speaker 2: kill chain.
- 1:03Speaker 1: Right, the kill chain.
- 1:04Speaker 2: Yeah, and you know a surprising number of organizations they
- 1:08Speaker 2: focus all their defensive energy on the later stages, like
- 1:11Speaker 2: trying to catch the malware execution or the data expltration.
- 1:15Speaker 1: When the alarms are actually ringing exactly.
- 1:18Speaker 2: But every subsequent phase of a targeted attack, I mean,
- 1:21Speaker 2: the weaponization, the payload, the delivery mechanism, the exploitation, all
- 1:25Speaker 2: of that relies entirely on the intel gathered during this
- 1:28Speaker 2: initial reconnaissance phase.
- 1:30Speaker 1: So if you mess up the recon the whole attack
- 1:32Speaker 1: falls apart.
- 1:33Speaker 2: Pretty much. Flawed intelligence here basically guarantees a failed exploit
- 1:37Speaker 2: later on.
- 1:38Speaker 1: Wow. Okay, so today we are going to walk you
- 1:40Speaker 1: step by step through exactly how an attacker builds this
- 1:44Speaker 1: terrifyingly accurate profile of a target environment. And this all
- 1:49Speaker 1: happens before a single piece of malicious code is ever
- 1:51Speaker 1: even compiled. It's all about prep work, exactly. So I
- 1:54Speaker 1: want you to just rely entirely on the theater of
- 1:57Speaker 1: the mind for this picture yourself looking over the show,
- 2:00Speaker 1: this master hacker, watching their keyboard, looking at the terminal screens,
- 2:04Speaker 1: and just following the logic of what they're doing.
- 2:06Speaker 2: And the best way to conceptualize this whole process is
- 2:08Speaker 2: to divide it up into two distinct operational modes. So
- 2:12Speaker 2: we have passive reconnaissance and active.
- 2:14Speaker 1: Reconnaissance active and active, okay, right.
- 2:16Speaker 2: An attacker's operational security really depends on understanding the boundary
- 2:20Speaker 2: between those two. And honestly, the vast majority of an
- 2:23Speaker 2: engagement is spent entirely in the passive phase, which I.
- 2:28Speaker 1: Mean that makes total sense from an evasion standpoint, right, Yeah,
- 2:32Speaker 1: because in passive reconnaissance, the target company has absolutely zero
- 2:35Speaker 1: idea that they're being watched, not at all, because the
- 2:38Speaker 1: attacker is just looking at publicly available information on the Internet.
- 2:41Speaker 1: They're scraping open source intelligence, querying third party databases.
- 2:46Speaker 2: Yep, exactly.
- 2:46Speaker 1: So since there's no direct interaction with the target's actual servers,
- 2:51Speaker 1: there's no security alerts being triggered. You can just take
- 2:53Speaker 1: your time here, maybe spend months mapping things out right.
- 2:57Speaker 2: You're invisible. But contrast that with active reconnois that involves
- 3:01Speaker 2: physically interacting with the target systems.
- 3:04Speaker 1: Like actually touching their servers.
- 3:06Speaker 2: Yes, and this is the pivot point where risk is
- 3:09Speaker 2: suddenly introduced because the moment an attacker sends a probe
- 3:13Speaker 2: to a perimeter firewall, or they you know, scan an
- 3:17Speaker 2: IP block. They generate logs.
- 3:20Speaker 1: And the target might notice.
- 3:21Speaker 2: Exactly, the target company's security operations center might notice that
- 3:25Speaker 2: anomaly and say, hey, someone is interacting with our systems.
- 3:29Speaker 2: Let's investigate.
- 3:30Speaker 1: Okay, So to go back to our physical heightst analogy
- 3:32Speaker 1: for a second. Passive recon is like looking at a
- 3:35Speaker 1: restaurant's menu online and just reading their yell reviews. Great analogy, right,
- 3:39Speaker 1: But active recon that's like physically walking up to the
- 3:42Speaker 1: restaurant at three am, yeah, and jiggling the back door
- 3:45Speaker 1: handle to see if it's unlocked.
- 3:47Speaker 2: Spot on. And because jiggling that handle is inherently noisy
- 3:50Speaker 2: and risky, attackers are going to exhaust every single passive
- 3:54Speaker 2: tool they have before they ever send a packet to
- 3:57Speaker 2: the target.
- 3:57Speaker 1: They want to ring every drop of data out of
- 4:00Speaker 1: the digital paper trail first.
- 4:01Speaker 2: Exactly, They start by building a footprint of the target.
- 4:05Speaker 1: So let's walk through what that footprinting looks like on
- 4:07Speaker 1: our imaginary terminal screen. Where do they usually start?
- 4:10Speaker 2: So the initial thread is usually just a basic who's
- 4:14Speaker 2: who's whore? Right? You type the target's web address like
- 4:18Speaker 2: their primary company site into a who search. Instantly, the
- 4:22Speaker 2: screen populates with all this registration data. You see when
- 4:26Speaker 2: the site was created, when it was last updated. Oh wow,
- 4:29Speaker 2: And crucially, you often see the actual contact names and
- 4:32Speaker 2: email addresses for the web administrators or system admins.
- 4:36Speaker 1: Wait, really, companies just leave that out there.
- 4:38Speaker 2: You'd be surprised. Smart organizations they pay for domain privacy
- 4:42Speaker 2: to hide that, but a staggering number of enterprise domains
- 4:46Speaker 2: still expose the raw contact info of their IT staff.
- 4:50Speaker 1: And that's basically striking gold for a hacker.
- 4:52Speaker 2: Right. Oh, absolutely, it accelerates the entire campaign. In any network,
- 4:56Speaker 2: system administrators are the whales. They're the high value target.
- 5:00Speaker 2: It's because they operate with root privileges. They have the
- 5:02Speaker 2: master keys, so if an attacker can identify the specific
- 5:06Speaker 2: person holding those keys, they don't even need to attack
- 5:08Speaker 2: a hardened firewall. They just need to compromise that one
- 5:11Speaker 2: person's laptop.
- 5:12Speaker 1: Man. That's wild. But knowing the adwin's name doesn't really
- 5:17Speaker 1: give you the technical map of the network, right No,
- 5:19Speaker 1: it doesn't. So to map the infrastructure, you have to
- 5:22Speaker 1: query the DNS, the domain name system, and that's where
- 5:26Speaker 1: an NS lookup comes in.
- 5:27Speaker 2: Right name server lookup.
- 5:29Speaker 1: Yeah, you aren't touching the target's actual server here, You're
- 5:33Speaker 1: just asking the Internet's phone book to translate the target's
- 5:36Speaker 1: domain name into actionable IP addresses, which also reveals like
- 5:41Speaker 1: what country those servers are.
- 5:42Speaker 2: Hosted in, exactly, it shows where their infrastructure physically lives.
- 5:46Speaker 2: But you know this is actually where amateur attackers often
- 5:49Speaker 2: make a huge mistake. Oh how so, Well, they run
- 5:53Speaker 2: that NS lookup, they get an IP address, and they assume, Hey,
- 5:55Speaker 2: that's the final destination server. That's my target.
- 5:58Speaker 1: Wait if I run the lookup and get the IP,
- 6:00Speaker 1: isn't that all I need? Why keep searching?
- 6:02Speaker 2: Because that first IP you get is almost never the
- 6:05Speaker 2: actual internal application server for a modern company. You're probably
- 6:09Speaker 2: just hitting a cloud based web application firewall or an
- 6:13Speaker 2: edgeload balance like a middlement. Exactly. You've essentially just found
- 6:16Speaker 2: the digital receptionist. The edge node is designed to absorb
- 6:20Speaker 2: traffic and hide the real back end infrastructure.
- 6:22Speaker 1: Ah okay, so how do you get past the receptionist?
- 6:25Speaker 2: An attacker takes those IP ranges they just found and
- 6:29Speaker 2: feeds them into specialized search engines platforms like Senses or Showdan.
- 6:33Speaker 1: Okay, I've heard of showdan and it's like Google for hackers.
- 6:36Speaker 2: Right, pretty much, These search engines constantly scan the entire Internet,
- 6:39Speaker 2: looking at every connected device. You plug in your target's IPS,
- 6:43Speaker 2: and your screen just floods with highly specific data.
- 6:46Speaker 1: You're not just seeing that the IP is online, right, right,
- 6:48Speaker 1: You're seeing the routing data, the server locations, right.
- 6:51Speaker 2: You see the open ports, the TLS encryption versions. You
- 6:55Speaker 2: even see the specific web technologies the target is running
- 6:58Speaker 2: on the back end, like it might tell you they're
- 7:00Speaker 2: running a specific version of Ruby on rails.
- 7:03Speaker 1: Wow. And you can do this recursively, right, Like, take
- 7:07Speaker 1: every new IP you find in showdan and search it
- 7:09Speaker 1: again to build this massive.
- 7:11Speaker 2: Map exactly because you often uncover these hidden sublings or
- 7:14Speaker 2: staging servers that the company forgot they even left online.
- 7:18Speaker 2: They were never meant to.
- 7:19Speaker 1: Be accessed directly, right shadow it. That is terrifying. But
- 7:24Speaker 1: servers and IP addresses, that's only half the target, isn't it.
- 7:27Speaker 2: Yeah, that's just the hardware the other half, and honestly,
- 7:30Speaker 2: often the weakest link is the humans running those servers, the.
- 7:35Speaker 1: Human element, because we leave digital footprints everywhere. Let's talk
- 7:38Speaker 1: about the professional footprint first LinkedIn.
- 7:41Speaker 2: Oh LinkedIn is a hackers dream. Security teams think of
- 7:44Speaker 2: it as a networking tool, but attackers view a standard
- 7:48Speaker 2: resume as literally a blueprint of the company's internal network.
- 7:52Speaker 1: Wait, really, so, by just trying to get recruited on LinkedIn,
- 7:55Speaker 1: I'm basically handing a hacker a shopping list of my
- 7:58Speaker 1: company's vulnerabilities.
- 8:00Speaker 2: Absolutely are think about it. An IT worker wants a promotion,
- 8:03Speaker 2: so they boast on LinkedIn that they just got certified
- 8:06Speaker 2: in say specific Cisco router models or Brocade switches or
- 8:11Speaker 2: red Hat Linux.
- 8:12Speaker 1: Right. They want to look good.
- 8:13Speaker 2: But they just told the attacker exactly what firewall, routers
- 8:17Speaker 2: and operating systems their company uses on the back end.
- 8:20Speaker 2: Oh Man, Right, So if a zero day vulnerability comes
- 8:23Speaker 2: out for that specific Cisco firewall, the hacker doesn't have
- 8:27Speaker 2: to guess. They know exactly where to strike.
- 8:30Speaker 1: That is so true. And then it gets even more personal,
- 8:32Speaker 1: doesn't it. Attackers pivot from LinkedIn to platforms like Facebook
- 8:36Speaker 1: or Instagram.
- 8:37Speaker 2: They do. They're looking for personal hobbies to craft the
- 8:41Speaker 2: absolute perfect spearfishing email.
- 8:43Speaker 1: Because if an admin posts all these photos about let's say.
- 8:46Speaker 2: Scuba diving, right, the attacker takes note of that They
- 8:48Speaker 2: don't send a generic reset your password spam email. They
- 8:53Speaker 2: send a highly targeted message like, hey, the great barrier
- 8:56Speaker 2: REEF is dying. Click here for the best travel deals before.
- 8:59Speaker 1: It's gone, and the admin panics or gets excited, clicks
- 9:02Speaker 1: the link, and boom, the network is compromised, all because
- 9:05Speaker 1: of a hobby.
- 9:06Speaker 2: Exactly. It's pure social engineering. And there's one more footprint
- 9:09Speaker 2: we have to talk about here. It's disgusting but highly effective.
- 9:12Speaker 1: Let me guess the physical footprint. Dumpster diving.
- 9:15Speaker 2: Dumpster diving.
- 9:16Speaker 1: Yes, I mean it sounds like something from an eighties movie.
- 9:19Speaker 1: Does that actually still work?
- 9:20Speaker 2: You have no idea. Companies throw away insane amounts of
- 9:23Speaker 2: sensitive data into the garbage without shredding it first.
- 9:27Speaker 1: What kind of stuff are they finding in the trash?
- 9:29Speaker 2: Oh, hardware manuals with handwritten passwords in the margins, printed
- 9:33Speaker 2: out network diagrams, baseline technical configurations. Attackers literally jump into
- 9:39Speaker 2: the commercial dumpster behind the building and find the keys
- 9:41Speaker 2: to the kingdom.
- 9:42Speaker 1: That is wow. Okay, So at this point the attacker
- 9:46Speaker 1: has exhausted every public database, They've mapped the hardware via
- 9:50Speaker 1: LinkedIn resumes, They've dug through.
- 9:52Speaker 2: The trash, the passive phase is complete, right, so.
- 9:55Speaker 1: Now it's time to actually test those defenses. This is
- 9:59Speaker 1: where we make contact. We're moving to active reconnaissance exactly.
- 10:02Speaker 2: Passive recon gives you the theory, it tells you what
- 10:05Speaker 2: might be there, but active recon gives you the reality.
- 10:08Speaker 2: You have to touch the server to verify what is
- 10:11Speaker 2: actually misconfigured.
- 10:12Speaker 1: Right now, So step by step on the terminal, the
- 10:15Speaker 1: attacker finally interacts with the server, They might run a
- 10:17Speaker 1: tool like endmap.
- 10:19Speaker 2: Yes, en map is the industry standard.
- 10:21Speaker 1: So conceptually visualizing this on say a safe public test site,
- 10:27Speaker 1: the attacker types in the command and the tool starts
- 10:29Speaker 1: sending packets to the target server.
- 10:31Speaker 2: Right, And it's not just checking if the server's online.
- 10:34Speaker 2: ENMAP does this thing called aggressive OS guessing.
- 10:37Speaker 1: Operating system guessing. Yeah, how does that work. It's not
- 10:40Speaker 1: like you can just log in and ask the server
- 10:42Speaker 1: what OLDESSE it's run?
- 10:42Speaker 2: No, no, But the tool guesses based on exactly how
- 10:45Speaker 2: the server replies to the packets. Because different operating systems
- 10:49Speaker 2: like Windows versus Linux, they build their network packets slightly differently.
- 10:53Speaker 2: Oh okay, so ENMP sends a malformed packet, sees how
- 10:57Speaker 2: the server handles the error and says aha. Based on
- 11:00Speaker 2: this exact response, this target is running a specific version
- 11:04Speaker 2: of a Linux kernel.
- 11:06Speaker 1: That is wild, so that terminal screen lights up. The
- 11:09Speaker 1: attacker knows the OS and they start finding the unlocked
- 11:12Speaker 1: doors the open ports.
- 11:13Speaker 2: Yes, port stanning is huge here.
- 11:15Speaker 1: Right, Support eighty might be open for regular web traffic,
- 11:18Speaker 1: Port four forty three for secure web exactly. Well, what
- 11:21Speaker 1: if they see Port twenty two is open?
- 11:22Speaker 2: Port twenty two is SSH secure shell? If an attacker
- 11:26Speaker 2: sees that, they know there's remote administrative access available, and
- 11:31Speaker 2: even better for them, what if they see an open
- 11:33Speaker 2: FTP port or a VNC port for remote desktop control?
- 11:37Speaker 1: Right, that tells them there's a chance for insecure remote access.
- 11:40Speaker 1: Maybe it's guarded by just a default password.
- 11:42Speaker 2: Exactly, it's a massive target.
- 11:44Speaker 1: Well wait, I have to ask if active recon is
- 11:46Speaker 1: so noisy as we said earlier and can trigger a
- 11:49Speaker 1: company's security alarms, why do attackers risk doing this deep
- 11:53Speaker 1: port scanning?
- 11:54Speaker 2: Well because they have to know. Like I said, passive
- 11:57Speaker 2: gives you the theory, Active gives you the reality. If
- 12:00Speaker 2: you want to deploy a complex exploit, you need to
- 12:02Speaker 2: verify exactly which ports are currently left wide open.
- 12:05Speaker 1: So it sets the stage for the next phase, delivery
- 12:08Speaker 1: and weaponization.
- 12:09Speaker 2: Precisely, they validate their intel so they don't fire blanks
- 12:12Speaker 2: when the real attack starts.
- 12:13Speaker 1: Man, that's a lot to take in, Okay. So to
- 12:16Speaker 1: wrap this up and really reinforce what we've learned today,
- 12:18Speaker 1: I want to run a quick interactive pop quiz for you,
- 12:22Speaker 1: the listener. Let's see how much you absorbed.
- 12:24Speaker 2: Oh nice, put them on the spot exactly.
- 12:26Speaker 1: Question one, what is the main purpose of reconnaissance?
- 12:30Speaker 2: We'll give them a second right.
- 12:31Speaker 1: The answer is to gather as much information as possible
- 12:34Speaker 1: to build the foundation of a targeted attack. It's casing
- 12:38Speaker 1: the joint perfect Question two, true or false? Both a
- 12:42Speaker 1: ping and an NS lookup are forms of passive reconnaissance.
- 12:46Speaker 2: Think about the door handle.
- 12:48Speaker 1: The answer is false, and as lookup queries the public DNS,
- 12:52Speaker 1: So that's passive. But a ping interacts directly with the
- 12:54Speaker 1: target server, making it active reconnaissance. On and finally, question three,
- 13:00Speaker 1: how does posting a professional certification on social media help
- 13:03Speaker 1: an adversary?
- 13:04Speaker 2: This is the scary one, it really is.
- 13:07Speaker 1: And the answer it reveals the exact hardware or software
- 13:11Speaker 1: your company utilizes. Handing the hacker a blueprint of your network.
- 13:14Speaker 2: Excellent review and you know, all this knowledge gathered in
- 13:17Speaker 2: the recon step that is exactly what fuels the next
- 13:20Speaker 2: phase of the kill chain right.
- 13:21Speaker 1: Which we'll cover in the future. But we want to
- 13:23Speaker 1: leave you with a chilling thought to mole over before
- 13:25Speaker 1: we go.
- 13:26Speaker 2: Yeah, before you log off today, I want you to
- 13:28Speaker 2: take a hard look at your own professional profile online.
- 13:32Speaker 2: Just look at your LinkedIn or your resume. If a
- 13:34Speaker 2: hacker read it right now, what locked doors in your company?
- 13:38Speaker 2: Did you just hand them the keys to Ooh that.
- 13:41Speaker 1: Is a terrifying thought. Well, that's all the time we
- 13:43Speaker 1: have for this deep dive. Stay vigilant out there, everyone,