Latest / CyberCode Academy / Course 35 - Footprinting and Reconnaissance | Episode 1: Methodology, OSINT Tools, and Lab Setup
Transcript
- 0:00Speaker 1: Picture the scene. It's midnight, the room is dark, illuminated
- 0:04Speaker 1: only by the glow of three massive monitors, and you
- 0:08Speaker 1: know some strategically placed neon led strips.
- 0:11Speaker 2: Oh, of course you gotta have the neon, right, it's mandatory.
- 0:15Speaker 1: So a hacker in a dark hoodie is furiously mashing
- 0:18Speaker 1: the keyboard. Techno music is blaring in the background, A
- 0:22Speaker 1: giant red access denied graphic flashes on the screen. But
- 0:25Speaker 1: then with a few more rapid fire keystrokes and a
- 0:27Speaker 1: triumphant smirk, it turns green. I'm in they whisper.
- 0:31Speaker 2: Ah, Yes, the classic trope.
- 0:34Speaker 1: Okay, let's unpack this, because that right there is the
- 0:37Speaker 1: absolute pinnacle of the Hollywood hacking fantasy. But if you
- 0:40Speaker 1: were to walk into a professional penetration tester's office today,
- 0:44Speaker 1: there is no techno music, yah, clay not. There's no
- 0:46Speaker 1: frantic typing. There is mostly just patients, a lot of
- 0:49Speaker 1: documentation and methodology that is terrifyingly methodical.
- 0:53Speaker 2: Yeah, it's I mean, it's night and day from the movies.
- 0:56Speaker 2: Real ethical hacking is a highly structured process. If you
- 0:59Speaker 2: were shadowing a real penetration tester, you wouldn't see them
- 1:02Speaker 2: hammering out code to like crack Firewall in thirty seconds.
- 1:06Speaker 1: You'd probably just see them reading.
- 1:07Speaker 2: Right, yeah, exactly. You'd see them meticulously combing through data,
- 1:11Speaker 2: reading API documentation, just moving through a really strict logical sequence.
- 1:16Speaker 2: The reality of compromising a system is far more subtle
- 1:19Speaker 2: and honestly a lot more interesting than just mashing a keyboard.
- 1:23Speaker 1: And that is our mission for this deep dive. We're
- 1:25Speaker 1: stripping away the cinematic fiction to look at the actual
- 1:28Speaker 1: mechanics of penetration testing. For you, listening, We're going to
- 1:32Speaker 1: step through how professionals truly operate, how they use open
- 1:35Speaker 1: source intelligence or ocent to map out a target completely invisibly,
- 1:40Speaker 1: and finally, how you can build a safe legal sandbox
- 1:43Speaker 1: at home to test these concepts yourself.
- 1:45Speaker 2: Which is the perfect place to start because grasping this
- 1:48Speaker 2: methodology isn't just a guide on how systems break. It's
- 1:51Speaker 2: an inverse look at how to defend your own infrastructure.
- 1:54Speaker 2: You know, you really have to understand how an adversary
- 1:56Speaker 2: views your network before you can secure it.
- 1:58Speaker 1: Absolutely. To kick this off, I want to drop you,
- 2:01Speaker 1: the listener, into a scenario. Imagine you are Sarah. You're
- 2:04Speaker 1: a professional penetration tester, Let's see, you just got hired
- 2:07Speaker 1: by a massive corporation, will call them Smith LLC to
- 2:10Speaker 1: test the security of their web servers. Okay, good setup.
- 2:13Speaker 1: So what is your very first move? Are you firing
- 2:18Speaker 1: up end map to scan their open ports? Are you
- 2:22Speaker 1: running a vulnerability scanner? Or are you booting up John
- 2:25Speaker 1: the Ripper to crack their passwords?
- 2:26Speaker 2: Well, see, it's the ultimate trick question, because the instinct
- 2:30Speaker 2: is always to grab a technical tool immediately. But the
- 2:33Speaker 2: real first move. You don't touch a keyboard for anything
- 2:36Speaker 2: other than drafting legal documents.
- 2:38Speaker 1: Wait, really, legal documents?
- 2:40Speaker 2: Yeah, your very first step is scooping and defining the
- 2:43Speaker 2: rules of engagement. What's fascinating here is that a massive
- 2:46Speaker 2: chunk of a hacker's time is actually just doing paperwork
- 2:49Speaker 2: and sitting in meetings with legal teams to sign NDA's.
- 2:52Speaker 1: So we're talking about sitting in boardrooms before doing any
- 2:54Speaker 1: actual hacking. Why is the paperwork such an absolute bottleneck?
- 2:58Speaker 2: Well, think about the stakes of what you're about to do.
- 3:01Speaker 2: Touching an IP address, even just sending a specialized packet
- 3:04Speaker 2: to see how a server responds, that can literally land
- 3:07Speaker 2: you in jail if you don't have explicit written authorization.
- 3:11Speaker 1: Wow, just sending a packet.
- 3:13Speaker 2: Oh yeah, it's a federal crime. Penetration testing is legally
- 3:17Speaker 2: sanctioned attacking. So client needs very wildly right. Some might
- 3:22Speaker 2: want exactly one specific IP address tested, while others will
- 3:25Speaker 2: just say, hey, pretend you're a criminal and break into
- 3:29Speaker 2: anything you can.
- 3:30Speaker 1: It's kind of like a home security audit. Right. You
- 3:31Speaker 1: don't just show up on day one and kick the
- 3:33Speaker 1: client's front door down, right, exactly. You sit down, you
- 3:36Speaker 1: sign a contract, and you agree on exactly which doors
- 3:39Speaker 1: you're allowed to check, and maybe they say the back
- 3:43Speaker 1: window is strictly off limits.
- 3:44Speaker 2: That's a perfect analogy because if Smith LLC hires you,
- 3:48Speaker 2: their legal team has to define exactly what is in bounds.
- 3:52Speaker 2: If your automated scanner accidentally hits their internal payroll database,
- 3:57Speaker 2: which is out of scope and takes it offline, you
- 4:00Speaker 2: weren't just getting fired. You could be facing criminal charges.
- 4:03Speaker 1: Okay, so the legal fence is built, You have your
- 4:05Speaker 1: rules of engagement, you know exactly which IP ranges you
- 4:07Speaker 1: are allowed to target. But you can't just throw malware
- 4:11Speaker 1: at an IP address if you don't even know what
- 4:12Speaker 1: operating system it's running, right.
- 4:14Speaker 2: No, No, definitely not.
- 4:15Speaker 1: So how do you map the target without them noticing
- 4:17Speaker 1: you're looking?
- 4:18Speaker 2: So that transitions us right into the bigger picture. The
- 4:20Speaker 2: full methodology follows a strict chain. It goes scoping than
- 4:24Speaker 2: footprinting and reconnaissance, scanning and enumeration, discovering vulnerabilities, gaining access,
- 4:29Speaker 2: maintaining access, and finally covering tracks.
- 4:32Speaker 1: Okay, so a full step by step pipeline.
- 4:35Speaker 2: Exactly, and before touching the target you have to gather intel.
- 4:38Speaker 2: That's the foot printing phase. And crucially we start with
- 4:42Speaker 2: passive foot printing.
- 4:43Speaker 1: Passive meaning we are completely hands off, like we are
- 4:46Speaker 1: not interacting with Smith LLC's servers in any way.
- 4:50Speaker 2: Correct. The difference is huge the moment you send a
- 4:53Speaker 2: packet directly to their server, which is active foot printing.
- 4:56Speaker 2: There firewalls log your IP address. Passive foot printing is
- 5:00Speaker 2: totally hands off, kind of like a Google search. We
- 5:03Speaker 2: rely entirely on open source intelligence or ocent ocin.
- 5:07Speaker 1: So what are we actually looking for when we gather this.
- 5:09Speaker 2: We're scraping publicly available data about a target to build
- 5:12Speaker 2: a profile. We want to find registered domain names, physical locations,
- 5:17Speaker 2: employee email formats, stuff like that.
- 5:19Speaker 1: So what does this all mean for the actual tools
- 5:21Speaker 1: we use. Because you hear a lot of names thrown
- 5:23Speaker 1: around like endmap. People love endmap.
- 5:27Speaker 2: Oh, I'm so glad you brought that up, because here's
- 5:29Speaker 2: a quick warning on enmap. It is brilliant, but it
- 5:32Speaker 2: belongs in the scanning phase, not foot.
- 5:35Speaker 1: Printing, because it touches the target exactly.
- 5:37Speaker 2: It actively touches the target. If you use endmap, now
- 5:40Speaker 2: you failed. You're no longer invisible. You're lighting up their
- 5:43Speaker 2: security logs.
- 5:44Speaker 1: Okay, keep endmap in the holster. So what do we
- 5:47Speaker 1: use for the visible work. Let's say I want to
- 5:49Speaker 1: find out who physically owns the domain for Smith LLC.
- 5:53Speaker 2: You start with the foundational layer of the Internet. Use
- 5:56Speaker 2: a tool like who which queries database is managed by?
- 5:59Speaker 2: I can when a company registers a domain, they have
- 6:02Speaker 2: to provide contact information and.
- 6:04Speaker 1: What kind of data is who actually give you?
- 6:05Speaker 2: Oh? A ton physical addresses, phone numbers, emails of the
- 6:09Speaker 2: IT admins and even fax numbers sometimes.
- 6:12Speaker 1: Wait, fax numbers? Who is still using fax machines in
- 6:16Speaker 1: this day and age.
- 6:16Speaker 2: You would be shocked.
- 6:17Speaker 1: That's wild. It is amazing how much corporate data is
- 6:20Speaker 1: just completely public out there.
- 6:22Speaker 2: It really is and for the actual hardware, like finding
- 6:25Speaker 2: the physical devices connected to their network. We use a
- 6:28Speaker 2: tool called showdan.
- 6:29Speaker 1: Showdan how is that different from like just googling something?
- 6:33Speaker 2: So showd in is essentially the hacker search engine. Google
- 6:36Speaker 2: indexes websites, right, showdown indexes Internet connected devices. It's constantly
- 6:41Speaker 2: scanning the Internet for vulnerable devices like home routers or
- 6:44Speaker 2: webcams or industrial control systems.
- 6:47Speaker 1: So showdown already did the noisy scanning months ago, and
- 6:50Speaker 1: I'm just looking at their notes precisely.
- 6:53Speaker 2: You might search showd in and discover an employee has
- 6:55Speaker 2: an insecure webcam pointing right at their desk.
- 6:58Speaker 1: Oh wow, it's terrifying. But okay, as we pull all
- 7:02Speaker 1: this data emails from who's webcams, from showdyan, how do
- 7:06Speaker 1: we organize it? I feel like I just have a
- 7:08Speaker 1: massive missy spreadsheet.
- 7:09Speaker 2: Yeah, nobody wants that. That's where a tool like Maltago
- 7:11Speaker 2: comes in. It's a graphical link analysis tool. You drop
- 7:14Speaker 2: a single piece of data a node into the center,
- 7:17Speaker 2: say and admin's email. Maltago creates this sprawling visual map
- 7:22Speaker 2: of the target and all their digital connections.
- 7:24Speaker 1: So it just automatically branches out.
- 7:26Speaker 2: Yep, it reaches out to public databases, and suddenly that
- 7:30Speaker 2: one email branches into a Twitter account, a leaked password,
- 7:34Speaker 2: a personal blog.
- 7:35Speaker 1: It's like the digital version of a detective's corkboard with
- 7:38Speaker 1: the red string exactly.
- 7:40Speaker 2: Now, what if you want to look at their actual
- 7:42Speaker 2: website code? For that? Professionals use tools like ht track
- 7:45Speaker 2: to mirror the website or recong to map out social
- 7:49Speaker 2: media footprints.
- 7:50Speaker 1: Wait, I got to push back on ht track. If
- 7:52Speaker 1: I download a massive copy of Smith LLC's website, isn't
- 7:55Speaker 1: that super noisy? Wouldn't their security teams see me scraping
- 7:59Speaker 1: their entire That.
- 8:00Speaker 2: Is a fantastic point. If you just use the default settings, Yes,
- 8:04Speaker 2: their firewall will block you instantly. But you adjust the tool.
- 8:08Speaker 2: You can figure ht track to throttle its speed so
- 8:11Speaker 2: it adds random delays.
- 8:12Speaker 1: Huh, So you make it look slower, right, and.
- 8:15Speaker 2: You also smooth your user agent to look like a
- 8:17Speaker 2: standard web browser. To the server, it just looks like
- 8:20Speaker 2: a slightly slow human clicking around over a few days.
- 8:23Speaker 1: That is so sneaky. Okay, what about Google dorking because
- 8:26Speaker 1: when people hear that, they just think it means googling
- 8:28Speaker 1: a company's name.
- 8:29Speaker 2: Oh, it's way more than regular googling. It's using specific
- 8:33Speaker 2: commands to force Google to reveal sensitive hidden.
- 8:36Speaker 1: Files, like what kind of commands.
- 8:38Speaker 2: For example, you use the site colon operator to target
- 8:41Speaker 2: a specific domain, and then file type colon and V.
- 8:44Speaker 1: And V like environment files.
- 8:46Speaker 2: Exactly in web development. Those files often contain hard coded
- 8:50Speaker 2: database passwords and apikeys. They're never supposed to be public.
- 8:53Speaker 1: But Google index them by accident.
- 8:55Speaker 2: Yep, and Google dorking just asks Google to hand them
- 8:59Speaker 2: right over.
- 8:59Speaker 1: Wow. Wow. Okay, Here's where it gets really interesting. Because
- 9:03Speaker 1: we've done the scoping, we've done the invisible footprinting, we
- 9:06Speaker 1: have our visual map. How do we actually strike the target?
- 9:09Speaker 2: So we move to scanning and specifically finding vulnerabilities. Let's
- 9:14Speaker 2: say you want to interact with their open ports. You
- 9:16Speaker 2: use a technique called banner grabbing.
- 9:19Speaker 1: How does banner grabbing work? Mechanically?
- 9:21Speaker 2: You intentionally send unexpected traffic, like you might use a
- 9:24Speaker 2: tool called telnet and send a telnet command to an
- 9:27Speaker 2: IP address on port eighty, which is normally for HTTP
- 9:30Speaker 2: web traffic.
- 9:30Speaker 1: So you're sending the wrong type of message to the
- 9:32Speaker 1: webport right.
- 9:34Speaker 2: And the web server gets confused and triggers an error message,
- 9:38Speaker 2: but that error message might say error apatche web server
- 9:42Speaker 2: version two point four point four nine cannot process this ooh, So.
- 9:46Speaker 1: It just reveals its exact software version instantly.
- 9:50Speaker 2: And if that version is outdated, it gives the hacker
- 9:52Speaker 2: a known vulnerability to exploit.
- 9:54Speaker 1: That is brilliant. But what if their external servers are
- 9:57Speaker 1: totally locked down? What if there are novel more abilities
- 10:00Speaker 1: from the outside.
- 10:01Speaker 2: Then you pivot to gaining access through the human element.
- 10:03Speaker 2: A classic real world tactic is the malicious USB drop.
- 10:08Speaker 1: The thumb drive in the parking lot trick.
- 10:09Speaker 2: Yes, a hacker drops an infected USB drive in the
- 10:13Speaker 2: company parking lot and employee picks it up, plugs it
- 10:16Speaker 2: into their computer to watch, you know, a funny cat
- 10:18Speaker 2: video and silently downloads malware.
- 10:21Speaker 1: And that gets around the firewall.
- 10:22Speaker 2: Completely because the malware opens a reverse shell. It reaches
- 10:26Speaker 2: out to the hacker. Firewalls block and coming traffic, but
- 10:29Speaker 2: they generally allow outgoing traffic so employees can use the Internet.
- 10:33Speaker 1: I am blown away by the psychological manipulation of that.
- 10:36Speaker 1: They carry the attack right through the front.
- 10:37Speaker 2: Door exactly, and once they're in they have to maintain access.
- 10:41Speaker 2: They do this by dropping what's called a rootkit.
- 10:44Speaker 1: A rootkit, Yeah, it.
- 10:45Speaker 2: Modifies the core of the operating system so the hacker
- 10:48Speaker 2: can stay inside the system invisibly. It lies to the
- 10:51Speaker 2: anti virus software and survives reboots.
- 10:54Speaker 1: Okay. In the final phase is covering tracks. I assume
- 10:57Speaker 1: that doesn't just mean hitting delete on the security logs,
- 11:01Speaker 1: because completely empty logs would immediately look suspicious to network defenders.
- 11:05Speaker 2: Right spot on. Empty logs are a massive red flag.
- 11:09Speaker 2: It's a brilliant little detail. It is actually better to
- 11:12Speaker 2: corrupt the system logs rather than delete them. Corrupt them
- 11:15Speaker 2: how you use encryption or offuscation to scramble just the
- 11:19Speaker 2: specific entries related to your attack, leaving the rest of
- 11:22Speaker 2: the normal traffic intact. It provides a false sense of security.
- 11:25Speaker 1: That is just wild. Okay. So for the listener who
- 11:28Speaker 1: is hearing all this and wants to try these tools,
- 11:30Speaker 1: how do they build their own sandbox to practice without
- 11:32Speaker 1: accidentally breaking the law and going to jail.
- 11:35Speaker 2: You have to build a safe virtual environment, and you
- 11:37Speaker 2: do that using virtual box and Collie Linux.
- 11:40Speaker 1: Virtual box is this software that lets you run a
- 11:42Speaker 1: computer inside your computer.
- 11:44Speaker 2: Right, yes, But a really important note, you need to
- 11:47Speaker 2: download the platform package and the extension pack for virtual
- 11:50Speaker 2: Box or it won't work properly with things like USB drives.
- 11:54Speaker 1: Good tip, and then Collie Linux goes inside it exactly.
- 11:57Speaker 2: Kali Linux is a dedicated hacking operation system managed by
- 12:01Speaker 2: Offensive Security. Just be aware it's a massive four gigabyte download,
- 12:05Speaker 2: so it can take like twenty or thirty minutes to grab.
- 12:08Speaker 1: Since you mentioned eventsive security, I want some industry tea here.
- 12:11Speaker 2: Huge Offensive Security runs the OSCP certification. In the industry,
- 12:16Speaker 2: that SERT is deeply respected. It's viewed as a really
- 12:19Speaker 2: solid entry to intermediate tier for pen testing because it's
- 12:23Speaker 2: completely practical. You actually have to hack into simulated machines.
- 12:27Speaker 1: Gotcha. So what's the flip side? What SERTs aren't respected?
- 12:30Speaker 2: Well? SERTs like the CECH Certified Ethical Hacker or pentist
- 12:33Speaker 2: plus are often viewed by industry professionals as just above
- 12:37Speaker 2: the script kitty level script kit, yeah, meaning you kind
- 12:39Speaker 2: of know a little bit. You can answer multiple choice questions,
- 12:42Speaker 2: but you don't fully understand what you're doing mechanically.
- 12:45Speaker 1: I love this candid peak into the hacker hierarchy.
- 12:48Speaker 2: It's very real. You have to be able to actually
- 12:51Speaker 2: apply the skills, not just memorized terms.
- 12:54Speaker 1: All right, well, we have covered an immense amount of
- 12:56Speaker 1: ground today. Let's do a quick review question for you,
- 12:59Speaker 1: the listener, to reinforce this journey. Think back on everything
- 13:03Speaker 1: we discussed. If a hacker successfully executes a phishing attack
- 13:07Speaker 1: against a target, what phase of the methodology is that.
- 13:10Speaker 2: Oh, that's a really good one to test the concepts.
- 13:13Speaker 1: Right, So the answer is gaining access, because while fishing
- 13:18Speaker 1: definitely involves social engineering, the ultimate goal achieved by stealing
- 13:22Speaker 1: that password is getting inside the.
- 13:24Speaker 2: Network exactly, you bypass the perimeter.
- 13:26Speaker 1: So to sign off, we want to leave you with
- 13:28Speaker 1: a provocative final thought. We just learned how much publicly
- 13:32Speaker 1: available data can be scraped to build a visual map
- 13:35Speaker 1: of a massive corporation.
- 13:36Speaker 2: Right, so, bring that concept back to your personal life.
- 13:40Speaker 2: If an ethical hacker turned tools like Maltago Showdan and
- 13:44Speaker 2: Googled dorking on you, right now, what kind of digital
- 13:47Speaker 2: footprint have you unknowingly left behind for them to find?
- 13:51Speaker 1: Oh? Man, that's going to keep some people awake tonight.
- 13:54Speaker 2: It's a sobering exercise, for sure, it really is.
- 13:57Speaker 1: Well, the Hollywood hacking might be fiction, but the data
- 13:59Speaker 1: you leave behind is very real. Thanks for taking this
- 14:02Speaker 1: deep dive with us.