Latest / CyberCode Academy / Course 12 - Maltego Advanced Course | Episode 2: Maltego Infrastructure Entities, Transforms, and Footprinting Techniques
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. Today, we are putting
- 0:03Speaker 1: on our digital detective hats. We're diving right into the
- 0:06Speaker 1: foundational layer of digital investigation, which is, how do you
- 0:10Speaker 1: systematically map the entire public facing infrastructure of a huge
- 0:15Speaker 1: organization starting with just one name.
- 0:18Speaker 2: That really is the core emission, isn't it. We're essentially
- 0:20Speaker 2: trying to give you a shortcut, a way to understand
- 0:23Speaker 2: the complex geography of the Internet, a kind of map.
- 0:27Speaker 2: Exactly if you work in cybersecurity, network architecture, or even
- 0:31Speaker 2: corporate intelligence, you absolutely have to understand this idea of
- 0:35Speaker 2: an infrastructure footprint. Okay, so today we're going to unpack
- 0:38Speaker 2: the essential building blocks, the data entities, and the practical
- 0:42Speaker 2: tools are what we call transforms that you use to
- 0:45Speaker 2: create that complete map.
- 0:47Speaker 1: And the goal here is I assume efficiency and just
- 0:50Speaker 1: being thorough. We start with one tiny thing like a
- 0:53Speaker 1: company's domain name, right, and we need a reliable system
- 0:57Speaker 1: to get from that to a whole picture of their owner,
- 1:00Speaker 1: their network ranges, every system they run. So before we
- 1:03Speaker 1: connect the dots, we have to define the dots themselves.
- 1:06Speaker 1: What are the say, five fundamental pieces of digital information,
- 1:10Speaker 1: the core entities that hold this whole map together.
- 1:12Speaker 2: Okay, so we have to start with naming conventions. The
- 1:15Speaker 2: first and most critical pair are the domain and the
- 1:18Speaker 2: DNS name.
- 1:19Speaker 1: Okay. This distinction is crucial because I think in everyday
- 1:22Speaker 1: conversation we just use them interchangeably. So help us draw
- 1:25Speaker 1: a clear line here.
- 1:26Speaker 2: Think of it this way. The domain is the conceptual thing.
- 1:29Speaker 2: It's the name your organization, markets and registers like examplecorp
- 1:34Speaker 2: dot com, the brand, the brand exactly. The DNS name
- 1:38Speaker 2: is the name of an actual functional system, a specific
- 1:42Speaker 2: endpoint on the network that you can assign an IP
- 1:44Speaker 2: address to.
- 1:45Speaker 1: AH. So the domain can be a DNS name, but
- 1:48Speaker 1: not all DNS names are domains.
- 1:50Speaker 2: You've got it. You might have thousands of other DNS
- 1:52Speaker 2: names like mail dot examplecorp dot com or FTP dot
- 1:56Speaker 2: examplecorp dot com, so.
- 1:57Speaker 1: All the specific systems running behind that. That makes sense.
- 2:01Speaker 1: And you mentioned there are three specific types of DNS
- 2:03Speaker 1: names we really need to track.
- 2:04Speaker 2: Yes, the standard website of course, but critically the NS records,
- 2:08Speaker 2: which are the name servers and the MX records for
- 2:11Speaker 2: mail exchange. Those records really define how the domain works
- 2:15Speaker 2: and where it's traffic goes.
- 2:17Speaker 1: And once we move from those human readable names to
- 2:20Speaker 1: actual network traffic, we hit the big one.
- 2:22Speaker 2: We arrive at the IPv four address. This is truly
- 2:26Speaker 2: the pivotal node in any investigation.
- 2:28Speaker 1: Why is the IP addressed such an anchor.
- 2:30Speaker 2: Point Because it's the common ground. It is the central
- 2:34Speaker 2: piece of evidence. In a digital investigation graph, you might
- 2:37Speaker 2: find multiple DNS names, different websites, different services that all
- 2:42Speaker 2: resolve to the very same IP address.
- 2:44Speaker 1: Even in shared environments like cloud Flare.
- 2:47Speaker 2: Even then, that IPA address is still owned and managed
- 2:50Speaker 2: by a single entity, and that's recorded somewhere. So the
- 2:53Speaker 2: investigator's core job is finding that owner.
- 2:56Speaker 1: So an IP can tell you if two people work
- 2:58Speaker 1: for the same company they just use the.
- 3:00Speaker 2: Same ISP, or even just share the same VPN exit node.
- 3:03Speaker 2: That one single point can just explode your investigation in
- 3:07Speaker 2: all these different directions.
- 3:08Speaker 1: Okay, So if the IP addresses like the individual street address,
- 3:11Speaker 1: how do we efficiently group those together to see the
- 3:13Speaker 1: whole neighborhood.
- 3:14Speaker 2: That's where we introduce the net block. This represents a
- 3:17Speaker 2: continuous range of IP addresses, usually owned or leased by
- 3:21Speaker 2: a single lard organization, and.
- 3:23Speaker 1: Its value is really visual, isn't it.
- 3:25Speaker 2: Oh, it's enormous. You might find fifty IP addresses that
- 3:28Speaker 2: seem totally unrelated. One's a website, one's a mail server,
- 3:31Speaker 2: another's some test environment, and.
- 3:33Speaker 1: They're scattered all over the place.
- 3:35Speaker 2: Scattered everywhere. The netblock just snaps them all together. It
- 3:38Speaker 2: brings clarity by showing they all belong to one range,
- 3:41Speaker 2: one network owner.
- 3:42Speaker 1: And finally that brings us to the entity that defines
- 3:45Speaker 1: how all this traffic flows across the.
- 3:47Speaker 2: Globe, the autonomous system or AS entity. It's identified by
- 3:51Speaker 2: its unique Autonomous system number or ASSN.
- 3:55Speaker 1: This sounds pretty technical.
- 3:56Speaker 2: It is, but you don't need to be a routing engineer.
- 3:58Speaker 2: It's all about how massive organizations, corporations ISPs can figure
- 4:03Speaker 2: how traffic gets routed across the Internet backbone. The key
- 4:06Speaker 2: insight is this, looking up the ASN for an IP
- 4:10Speaker 2: address is often the most reliable way to get ownership info.
- 4:13Speaker 1: More reliable than say a whois registry entry.
- 4:17Speaker 2: Much more because for the Internet to work, these routing
- 4:20Speaker 2: protocols require clean, definitive organizational boundaries. If your routing is messy,
- 4:26Speaker 2: your network just breaks ah.
- 4:29Speaker 1: So the data has to be accurate for things to function.
- 4:32Speaker 2: Exactly that operational need for precision means the ownership data
- 4:36Speaker 2: tied to an ASN is usually far more accurate than
- 4:39Speaker 2: what you might find in some regional IP registry database,
- 4:42Speaker 2: which can be out of date or even have spelling errors.
- 4:45Speaker 1: Excellent, So we have our five core building blocks. Let's
- 4:48Speaker 1: quickly touch on the secondary entities, the sort of digital
- 4:51Speaker 1: breadcrumbs that can lead to a breakthrough, Starting with the
- 4:54Speaker 1: email address.
- 4:55Speaker 2: The email address is still fundamental. It's often tied to
- 4:58Speaker 2: domain registration, sure, but it's also a key starting point
- 5:01Speaker 2: for any person of interest investigation. It links all this
- 5:04Speaker 2: corporate infrastructure back to an actual human.
- 5:07Speaker 1: Even with throwaway accounts being so common.
- 5:09Speaker 2: Even then, it's a connection.
- 5:11Speaker 1: Then we have the more technical details, port and service.
- 5:13Speaker 2: A port, you know, TCP or UDP, is just a number.
- 5:16Speaker 2: It tells you what a server can do. Is it
- 5:18Speaker 2: set up for a remote desktop SSH a website?
- 5:22Speaker 1: In the service?
- 5:22Speaker 2: The service is more specific. It includes the port and
- 5:25Speaker 2: the header information that comes back. These are usually the
- 5:27Speaker 2: result of an investigation, not where you start.
- 5:30Speaker 1: And why do we care so much about that specific
- 5:32Speaker 1: header info which you call the banner?
- 5:35Speaker 2: Because the banner gives you critical details about their technology.
- 5:38Speaker 1: Stack.
- 5:38Speaker 2: It's the HTTP or FTP header that can tell you
- 5:41Speaker 2: the server type, content type, and crucially for cybersecurity, the
- 5:46Speaker 2: exact version number of the software APATCHE two point four
- 5:50Speaker 2: point one for instance.
- 5:52Speaker 1: And knowing the version lets you immediately check for known
- 5:54Speaker 1: vulnerabilities precisely. Okay, speaking of breadcrumbs, tracking codes seems surprised.
- 6:00Speaker 1: Basically important for linking things that don't seem connected.
- 6:02Speaker 2: They are fantastic clues. I mean, imagine two websites. They
- 6:05Speaker 2: look completely different, different domains hosted in different countries even right,
- 6:10Speaker 2: But if they both share the exact same Google Analytics ID,
- 6:13Speaker 2: that is a very powerful indicator that they are managed
- 6:16Speaker 2: by the same organization. It connects footprints that a simple
- 6:19Speaker 2: DNS lookup would never find.
- 6:21Speaker 1: Okay, we've defined our entities are nouns. Let's talk about
- 6:25Speaker 1: the verbs that connect them, the transforms. If we start
- 6:29Speaker 1: with just a domain, how do we efficiently find all
- 6:32Speaker 1: the associated DNS names.
- 6:34Speaker 2: We use two speeds, basically quick lookups and thorough lookups.
- 6:38Speaker 2: The quick method is fast, but it's incomplete. It usually
- 6:41Speaker 2: just checks for the common www prefix.
- 6:44Speaker 1: So for a real footprint you need the thorough approach.
- 6:47Speaker 1: You have to and how do you get that level
- 6:48Speaker 1: of thoroughness.
- 6:49Speaker 2: We leverage search engine APIs. You can run a transform
- 6:52Speaker 2: that uses a search engine to find every single website
- 6:55Speaker 2: that it knows about that ends with your target domain name.
- 6:58Speaker 2: It casts a huge net, pulling.
- 6:59Speaker 1: Out old microsites, test pages, all the.
- 7:01Speaker 2: Stuff the organization probably forgot about.
- 7:04Speaker 1: And then we get to the historic data, which you
- 7:06Speaker 1: mentioned is critical for investigators passive DNS.
- 7:09Speaker 2: Passive DNS is non negotiable for finding infrastructure. It's not
- 7:14Speaker 2: a live query. It's a massive archive, a database like
- 7:18Speaker 2: roebex that records historical DNS lookups.
- 7:20Speaker 1: So it's like a history of book of the Internet.
- 7:22Speaker 2: A very detailed one. When a transform queries this archive,
- 7:26Speaker 2: it can return DNS names that were associated with the
- 7:29Speaker 2: domain years ago. This is invaluable for finding forgotten or
- 7:33Speaker 2: decommissioned systems.
- 7:34Speaker 1: And we can even filter it.
- 7:36Speaker 2: Oh yeah, you can filter for interesting variants like names
- 7:39Speaker 2: that contain VPN or webmail.
- 7:41Speaker 1: That feels like finding an old, dusty blueprint for a
- 7:44Speaker 1: building that was remodeled five years ago. What about technical
- 7:47Speaker 1: lookups that can reveal, say, vendor relationships.
- 7:51Speaker 2: For that, we need two specific transforms. First, the start
- 7:55Speaker 2: of authority or soa lookup that gives you the primary
- 7:58Speaker 2: name server and usually an email address for whoever manages
- 8:02Speaker 2: the zone, and second second, the Center Policy Framework or
- 8:05Speaker 2: SPF lookup. This is huge. The SPF record lists all
- 8:08Speaker 2: the DNS names and ips that are authorized to send
- 8:11Speaker 2: email for that organization.
- 8:12Speaker 1: Which instantly reveals third party services they use.
- 8:15Speaker 2: Instantly, you'll see if they use sendrid for marketing or
- 8:18Speaker 2: a Google workspace for their internal mail. It broadens the
- 8:21Speaker 2: footprint immensely.
- 8:22Speaker 1: So now we have this giant list of DNS names,
- 8:24Speaker 1: both current and historic. The next step feels pretty straightforward.
- 8:29Speaker 2: It is the transform is simply to IP address. By definition,
- 8:34Speaker 2: every valid DNS name, website MX record, NS record can
- 8:38Speaker 2: be resolved to at least one current IP address. This
- 8:42Speaker 2: is the bridge from names to the raw network.
- 8:45Speaker 1: And now we have a big scatterplot of IP addresses.
- 8:48Speaker 1: It's time to pivot and cluster them into those crucial
- 8:50Speaker 1: net blocks. How do we make that jump right?
- 8:53Speaker 2: The whole investigation relies on the principle that big organization's
- 8:57Speaker 2: own big contiguous blocks of addresses. We have four main
- 9:01Speaker 2: ways to generate those net blocks. One method uses historic
- 9:05Speaker 2: DNS data. If an IP was used as a name
- 9:07Speaker 2: server in the past. That suggests it's part of a
- 9:09Speaker 2: stable important block. Another uses routing information how the IP
- 9:13Speaker 2: is advertised. That can be quick, but sometimes the blocks
- 9:16Speaker 2: are too big or too small.
- 9:17Speaker 1: What's the most definitive method?
- 9:18Speaker 2: Checking the whois registries directly ARN in North America, RIPE
- 9:23Speaker 2: in Europe. If a corporation like Nike registraate its IP
- 9:26Speaker 2: allocation correctly, the registry will give you a big, undeniable range.
- 9:30Speaker 1: In the fourth method, the natural boundaries guess sounds like
- 9:32Speaker 1: a practical starting point.
- 9:33Speaker 2: It's highly effective. It's just a reasonable guess based on
- 9:36Speaker 2: how address base is usually allocated. The default is to
- 9:40Speaker 2: group by two hundred and fifty six addresses, where only
- 9:43Speaker 2: the last number changes a twenty four range, and for
- 9:45Speaker 2: most companies, that's a pretty strong starting point, a very
- 9:48Speaker 2: strong starting point. It clusters related systems really neatly, and
- 9:51Speaker 2: you can always validate the ownership later with the ASN.
- 9:54Speaker 1: And once we have that validated netblock, we pivot straight
- 9:57Speaker 1: to the owner YEP.
- 9:58Speaker 2: We run to as number on the net block and
- 10:00Speaker 2: then to company owner on that ASN. This is the
- 10:03Speaker 2: moment of confirmation.
- 10:05Speaker 1: And that data is solid because, as you said, the
- 10:08Speaker 1: Internet's routing depends on it.
- 10:09Speaker 2: It's one of the strongest proofs of ownership you can get.
- 10:12Speaker 1: This brings us to a key distinction understanding the difference
- 10:15Speaker 1: between current live data and historic data. The contrast between
- 10:19Speaker 1: reverse DNS and passive DNS.
- 10:21Speaker 2: Right, So, forward DNS is named to IP that standard.
- 10:24Speaker 2: We use passive DNS for historic IP to name lookups.
- 10:28Speaker 2: It's based on observation, so we usually visualize those links
- 10:31Speaker 2: with dotted lines.
- 10:32Speaker 1: As a reminder that the data might be.
- 10:33Speaker 2: Old exactly it might not be active anymore. And reverse
- 10:36Speaker 2: DNS that uses PTR or pointer records. This is current
- 10:41Speaker 2: live information that the organization sets intentionally, often for things
- 10:45Speaker 2: like anti spam. It's them telling the world these names
- 10:49Speaker 2: are currently associated with this IP.
- 10:52Speaker 1: So because it's current and intentional, we link those with
- 10:55Speaker 1: solid lines.
- 10:56Speaker 2: Solid lines, and this is a critical point. If you
- 10:59Speaker 2: query a single IP, you might get twenty historic names
- 11:02Speaker 2: from passive dns, but only one or two solid, verifiable
- 11:06Speaker 2: current names from reverse dns. The quality is totally different.
- 11:10Speaker 1: Okay, let's put this all together. Let's walk through a
- 11:12Speaker 1: level one footprint the core manual process, and let's use
- 11:15Speaker 1: a hypothetical big target, something like CIA dot gov.
- 11:19Speaker 2: Perfect, So we start with that domain entity. Step one
- 11:21Speaker 2: we run discovery. We do the quick website check, the
- 11:24Speaker 2: thorough search engine look up for everything ending in CIA
- 11:26Speaker 2: dot gov, and critically, the passive DNS lookout.
- 11:29Speaker 1: And now we have a huge list of potential DNS.
- 11:32Speaker 2: Names, hundreds, maybe both current and historic resolution. We take
- 11:36Speaker 2: that entire list and resolve them all to their current
- 11:38Speaker 2: IP addresses. We see which old names are dead ends
- 11:41Speaker 2: and which current ones map to a fresh set of IPS.
- 11:44Speaker 1: And step three is where the magic happens. We take
- 11:46Speaker 1: those newly resolved IPS, which are just scattered all over
- 11:49Speaker 1: our graph, and we run the to net block using
- 11:53Speaker 1: natural boundaries transform.
- 11:54Speaker 2: Yes, this is the discovery moment. Suddenly you see this
- 11:57Speaker 2: massive clustering effect. Some of those IPS will just snap
- 12:01Speaker 2: together into one or two defined blocks like one ninety
- 12:04Speaker 2: eight point eighty one point one two nine dot x, and.
- 12:07Speaker 1: That concentration immediately confirms their core internal network.
- 12:11Speaker 2: It does the few IPS that don't cluster, they're usually
- 12:14Speaker 2: third party services like CDNs or external email gateways.
- 12:18Speaker 1: And step four is the final confirmation.
- 12:20Speaker 2: We select that main central netblock, get the as number
- 12:23Speaker 2: and look up the company owner. We confirm the ASNSA
- 12:26Speaker 2: seven to forty six is directly associated with them. That
- 12:29Speaker 2: confirms not just the ips, but who's responsible for routing
- 12:32Speaker 2: that network.
- 12:33Speaker 1: And with that one process, we've defined the absolute verifiable
- 12:36Speaker 1: core of their network. Now we can use that to pivot.
- 12:39Speaker 1: Let's say we want to answer a totally different question,
- 12:41Speaker 1: like which Wikipedia pages have been edited from this network.
- 12:45Speaker 2: This shows the value of doing the footprinting. First. We
- 12:48Speaker 2: take that confirmed netblock, expand it to all two hundred
- 12:50Speaker 2: and fifty six individual IP addresses it contains, and then
- 12:54Speaker 2: run a very specific transform on that whole list to
- 12:58Speaker 2: Wikipedia page edits. By defining the perimeter first, we can
- 13:02Speaker 2: ask these hyper specific questions about behavior from inside that boundary.
- 13:06Speaker 1: That is incredibly powerful, right, But for a really massive organization,
- 13:10Speaker 1: that manual level one process sounds tedious. This is where
- 13:14Speaker 1: automation these machines come in.
- 13:17Speaker 2: A machine is just an automated script that runs that
- 13:19Speaker 2: whole level one process for you. If you run on
- 13:21Speaker 2: a huge domain like LinkedIn dot com, the graph is enormous,
- 13:25Speaker 2: thousands of entities.
- 13:26Speaker 1: How does an analyst even begin to manage that sheer volume?
- 13:29Speaker 1: Of data.
- 13:30Speaker 2: You need powerful analysis techniques. You use an organic graph
- 13:34Speaker 2: layout to help cluster things Visually. You can size the
- 13:37Speaker 2: entities by how many links they have, so the most
- 13:39Speaker 2: important NetBlocks just pop.
- 13:40Speaker 1: Out AGA and lots of filtering.
- 13:42Speaker 2: I imagine heavy, heavy use of bookmarking and filtering. You
- 13:46Speaker 2: might bookmark all your confirmed net blocks and red their
- 13:49Speaker 2: company names in purple, and then just delete everything that
- 13:52Speaker 2: isn't connected to those critical bookmarks. It turns chaos into
- 13:55Speaker 2: a focused investigation.
- 13:57Speaker 1: And they're even higher level footprints for when level one
- 14:00Speaker 1: isn't quite thorough enough.
- 14:02Speaker 2: Yeah, we call them L two and L three. They
- 14:04Speaker 2: increase the search breadth, but they also bring in more noise.
- 14:08Speaker 2: So to manage that, they often have interactive prompts.
- 14:11Speaker 1: So the machine will pause and ask you.
- 14:13Speaker 2: A question exactly. An L two machine might find twenty
- 14:16Speaker 2: historic MX records and pause to ask you, the investigator,
- 14:20Speaker 2: which of these are actually relevant before it continues.
- 14:23Speaker 1: And what's the big difference with L three.
- 14:25Speaker 2: L three is all about advanced pivoting using that live
- 14:28Speaker 2: solid line data we talked about. Once it finds the
- 14:31Speaker 2: core net blocks, the L three machine performs a reverse
- 14:34Speaker 2: DNS look up on every single IP address in those ranges.
- 14:37Speaker 1: Wow.
- 14:37Speaker 2: Why because of the initial forward lookups only found the
- 14:40Speaker 2: public names. By checking every single IP backwards from IP
- 14:45Speaker 2: to name, L three can uncover non public names, internal
- 14:48Speaker 2: staging servers, test environments, things only visible via their PTR records.
- 14:53Speaker 1: And for the really huge multinational targets, there's the footprint
- 14:57Speaker 1: Excel tool.
- 14:58Speaker 2: That is the nuclear option. It's incredibly time consuming, it
- 15:01Speaker 2: can take hours and it needs a lot of computing power.
- 15:05Speaker 2: It's designed for exhaustive detail, focusing on name, server and
- 15:09Speaker 2: SPF records to find the absolute broadest IP range is possible.
- 15:13Speaker 2: And then it does those massive reverse lookups across everything.
- 15:17Speaker 1: For when you need every obscure internal server that ever existed.
- 15:20Speaker 2: That's what it's for.
- 15:21Speaker 1: This has been really a complete practical tour of the
- 15:23Speaker 1: infrastructure landscape. We've defined the core entities, domain, IP net
- 15:27Speaker 1: block as man and seeing how transforms let us pivot
- 15:31Speaker 1: between them.
- 15:32Speaker 2: You know, the biggest takeaway for any analyst should be this.
- 15:35Speaker 2: The investigation isn't just about collecting data. It's about understanding
- 15:38Speaker 2: the function of each of these pieces and mastering the
- 15:40Speaker 2: art of pivoting.
- 15:41Speaker 1: That ability to move seamlessly from name to IP and
- 15:45Speaker 1: then backwards from IP to name or to historic data.
- 15:48Speaker 2: That's the definition of success in this field.
- 15:50Speaker 1: Absolutely. The graph only becomes powerful when you know how
- 15:54Speaker 1: to use that IP address as a shared node to
- 15:57Speaker 1: pivot in totally unexpected ways. So here's a final thought
- 16:01Speaker 1: for you, Tom moll over. If you start an investigation
- 16:04Speaker 1: with an email address you found on an old, historic
- 16:06Speaker 1: passive DNS record, how could you use that context pivoting
- 16:11Speaker 1: through ips and NetBlocks to see if that old domain
- 16:13Speaker 1: owner is secretly connected to a brand new, unlisted organization
- 16:17Speaker 1: you didn't even know you were looking for.
- 16:19Speaker 2: Connecting the old footprint to the new. That is the
- 16:21Speaker 2: power of digital persistence.
- 16:23Speaker 1: Indeed, thank you for joining us on this deep dive
- 16:25Speaker 1: into infrastructure footprinting. We will catch you next time.