Latest / CyberCode Academy / Course 42 - Mobile Malware Analysis Fundamentals | Episode 9: Mastering Basic Static Analysis for Mobile Malware
Transcript
- 0:00Speaker 1: Imagine just for a second that you are a digital detective.
- 0:03Speaker 2: Oh, I love a good hypothetical.
- 0:05Speaker 1: Right, So you're sitting at your desk and you've just
- 0:08Speaker 1: intercepted this highly suspicious mobile app. On the surface, it
- 0:12Speaker 1: looks completely benign, like a flashlight app, maybe exactly a
- 0:15Speaker 1: flashlight app, or a simple puzzle game or a PDF reader.
- 0:19Speaker 1: But your telemetry, you know, maybe some alarming network alerts,
- 0:24Speaker 1: is telling you it's actually malware. It's a digital trojan horse, which.
- 0:29Speaker 2: Is always a fun moment for an analyst.
- 0:31Speaker 1: Yeah, a real great start to the day. So here's
- 0:35Speaker 1: the immediate problem. How do you pull this thing apart
- 0:37Speaker 1: to see what it's really doing without accidentally triggering.
- 0:40Speaker 2: It, Because if you just run it, you're in trouble.
- 0:43Speaker 1: Exactly if you run it, if you execute that code,
- 0:46Speaker 1: you might unleash the exact peload you are trying to study.
- 0:49Speaker 2: Yeah, it's basically the cybersecurity equivalent of examining like an
- 0:54Speaker 2: unexploded piece of ordinance.
- 0:55Speaker 1: Oh, that's a good way to put it, right.
- 0:57Speaker 2: Because you can't just start snipping wires or applying electric
- 1:00Speaker 2: current to see what happens. You have to X ray
- 1:02Speaker 2: the casing swab the outside for chemical signatures and map
- 1:06Speaker 2: out the firing circuits entirely from the outside looking in.
- 1:09Speaker 1: You have to understand the architecture of the threat before
- 1:12Speaker 1: you ever let it execute.
- 1:13Speaker 2: Exactly.
- 1:14Speaker 1: Okay, let's unpack this because that is exactly our mission
- 1:18Speaker 1: for this deep dive. We are exploring the foundational methodologies
- 1:22Speaker 1: of basic static analysis for mogule malware.
- 1:26Speaker 2: The foundational stuff, right, We're.
- 1:27Speaker 1: Going to walk you through how to examine both iOS
- 1:30Speaker 1: and Android architectures. You know, the structural files that act
- 1:33Speaker 1: as their blueprints, and we'll get into the precise tools
- 1:36Speaker 1: used to decode their capabilities, all while the code remains
- 1:40Speaker 1: entirely at rest in a secure environment.
- 1:42Speaker 2: And you know that concept of the code being at rest,
- 1:45Speaker 2: that's really the defining characteristic of static.
- 1:48Speaker 1: Analysis, right as opposed to dynamic analysis.
- 1:51Speaker 2: Exactly. We are not observing behavior in a sandbox. We
- 1:55Speaker 2: are analyzing the underlying structure, the dependencies, and the logic
- 1:59Speaker 2: that's actually banked into the binary itself.
- 2:02Speaker 1: We're dissecting the anatomy of the app to understand the
- 2:05Speaker 1: author's intent spot on.
- 2:06Speaker 2: We want to see what they were planning before they
- 2:08Speaker 2: even get to do it.
- 2:09Speaker 1: But we need to talk about strategy before tactics always
- 2:13Speaker 1: because my instinct, and I think the instinct of a
- 2:15Speaker 1: lot of people, especially students or self taught learners, when
- 2:18Speaker 1: they first get a suspicious file would be to just
- 2:21Speaker 1: immediately throw it into a disassembler or a decompiler.
- 2:24Speaker 2: Oh yeah, just dive right in, right, just start.
- 2:26Speaker 1: Tearing through the long first engineering. The assembly code is
- 2:33Speaker 1: using trap, isn't it.
- 2:34Speaker 2: It is an incredibly common trap, and honestly, it's a
- 2:37Speaker 2: massive drain on your resources. How So, well, if you
- 2:40Speaker 2: dive straight into raw hexadecimal data or assembly instructions without
- 2:45Speaker 2: any broader context, you will almost certainly lose the forest
- 2:49Speaker 2: for the trees. It's just too much data, way too much.
- 2:52Speaker 2: The overall static analysis process requires strict operational discipline. Before
- 2:58Speaker 2: you even look at a specific files internal code, you
- 3:01Speaker 2: need to execute step one, which is identifying and searching
- 3:05Speaker 2: the application through cryptographic hashing.
- 3:08Speaker 1: Hashing. Okay, so instead of looking at the code itself,
- 3:11Speaker 1: we are running the entire file through a mathematical algorithm,
- 3:15Speaker 1: right like SAHA two fifty six or MD five right
- 3:17Speaker 1: to generate a fixed length string of characters. It's like
- 3:20Speaker 1: a unique digital fingerprint. For that exact file.
- 3:23Speaker 2: Precisely, you generate that hash, and then you consult global
- 3:26Speaker 2: threat intelligence resources and databases before you ever touch a
- 3:29Speaker 2: specialized local analysis.
- 3:31Speaker 1: Tool like virus Total or other malware repositories.
- 3:34Speaker 2: Exactly, you are checking to see if the broader cybersecurity
- 3:37Speaker 2: community has already encountered, analyzed, and mapped out this specific fingerprint.
- 3:42Speaker 1: But uh, let me push back on that process for
- 3:44Speaker 1: a second. Sure, if we have the malicious app right
- 3:46Speaker 1: in front of us, isn't looking up the hash online
- 3:49Speaker 1: essentially just while outsourcing the work? Yeah, Like it feels
- 3:53Speaker 1: a bit like reading the summary instead of the book.
- 3:55Speaker 1: Shouldn't we just reverse engineer at ourselves to guarantee we
- 3:58Speaker 1: really understand it?
- 3:59Speaker 2: I mean, that's a fair question, but it fundamentally misunderstands
- 4:03Speaker 2: the economy of time in incident response and malware.
- 4:08Speaker 1: Analysis, because time is money.
- 4:10Speaker 2: Time is your most precious commodity. Researching a hash isn't outsourcing,
- 4:15Speaker 2: It is vital triage. I mean, if a global intelligence
- 4:19Speaker 2: database tells you that this specific SAHA two five six
- 4:22Speaker 2: hash belongs to a known, well documented banking trojan, well
- 4:27Speaker 2: you've just saved yourself potentially days of reverse engineering.
- 4:30Speaker 1: Right, because knowledge is most valuable when it's applied efficiently.
- 4:33Speaker 1: You don't get bonus points for rediscovering a wheel that
- 4:36Speaker 1: someone documented three years ago.
- 4:38Speaker 2: Exactly. Redoing work that the community has already mapped out
- 4:42Speaker 2: actively slows down your ability to protect your environment. And
- 4:45Speaker 2: this leads to the most crucial part of the entire
- 4:47Speaker 2: analysis process, which is setting firm objectives based on that
- 4:51Speaker 2: initial intelligence.
- 4:52Speaker 1: Okay, so narrowing the scope, right.
- 4:54Speaker 2: If the hash tells you it is a known SMS
- 4:57Speaker 2: stealing trojan, your objective is shifts. You weren't trying to
- 5:01Speaker 2: answer what is this anymore?
- 5:03Speaker 1: Your objective becomes highly targeted exactly.
- 5:06Speaker 2: It becomes what command and control servers is this specific
- 5:09Speaker 2: variant waking out to and how is it persisting on
- 5:12Speaker 2: my network? Having those firm objectives prevents you from just
- 5:15Speaker 2: drowning in a sea of irrelevant data.
- 5:17Speaker 1: That makes perfect sense. The hash dictates the mission. But uh,
- 5:21Speaker 1: let's look at the alternative scenario, A fun scenario, right.
- 5:24Speaker 1: We run the hash, we query the databases, and we
- 5:26Speaker 1: get zero hits.
- 5:27Speaker 2: Nothing.
- 5:28Speaker 1: It's a completely novel threat. The Internet has no idea
- 5:31Speaker 1: what this file is. We're flying blind, which means we
- 5:33Speaker 1: have to do the heavy lifting ourselves. So let's start
- 5:36Speaker 1: with the Apple ecosystem.
- 5:38Speaker 2: Okay, iOS, Right.
- 5:39Speaker 1: We are looking at a suspected malicious iOS application. So
- 5:44Speaker 1: picture you open your terminal or your file explorer. Where
- 5:47Speaker 1: do we even begin looking?
- 5:49Speaker 2: Well, the very first thing you need to realize is
- 5:50Speaker 2: that an iOS app isn't just one monolithic file whatch
- 5:54Speaker 2: you download from the app store, you know, an IPA file.
- 5:57Speaker 2: It's essentially just a specialized zip the archive.
- 6:00Speaker 1: So it's a container.
- 6:02Speaker 2: Yeah, it's a package. It's a bundle of different resources, images,
- 6:06Speaker 2: configuration files, and of course compiled code. Our very first
- 6:09Speaker 2: objective is to find the actual engine of the app,
- 6:13Speaker 2: the core executable file.
- 6:15Speaker 1: So if I just unzip that archive, I'm going to
- 6:18Speaker 1: see a directory structure in front of me. And I
- 6:21Speaker 1: know one of the main folders inside an iOS app
- 6:24Speaker 1: bundle is called the payload directory.
- 6:26Speaker 2: Yep, the payload directory.
- 6:28Speaker 1: And naturally payloads sounds exactly like what a maur analyst
- 6:31Speaker 1: would want to look at. Is the executable just sitting
- 6:33Speaker 1: right in there?
- 6:34Speaker 2: I mean, it is inside that directory structure eventually, but
- 6:37Speaker 2: you have to know exactly what you are looking for.
- 6:40Speaker 2: The payload directory contains the application wrapper, but it is
- 6:43Speaker 2: not the executable itself.
- 6:45Speaker 1: Okay, so where do people go wrong here?
- 6:47Speaker 2: You'll see people guessing At this stage. They start poking
- 6:49Speaker 2: around looking for configuration files to point them in the
- 6:51Speaker 2: right direction. They might look for a file called, say,
- 6:54Speaker 2: settings dot plist or application dot plists, assuming those have
- 6:57Speaker 2: the architecture map, but they don't. Usually those files don't
- 7:00Speaker 2: even exist, or if they do, they definitely don't contain
- 7:04Speaker 2: the core metadata we actually need.
- 7:06Speaker 1: So it's like wandering around a cargo ship just looking
- 7:08Speaker 1: into random crates. We need a document that tells us
- 7:11Speaker 1: exactly what is on board.
- 7:13Speaker 2: That is a perfect analogy, and for an iOS app,
- 7:16Speaker 2: that authoritative document, the ship's manifest is a file called infodt.
- 7:21Speaker 1: Plist infodot plist. Okay, so this is a property list file,
- 7:26Speaker 1: an XML based file that Apple uses to store configuration data.
- 7:30Speaker 2: Correct. The infodot plist is the foundational map of the application.
- 7:34Speaker 2: It declares the app's bundle identifier, its version number, the
- 7:37Speaker 2: permissions it requires, and the executable And most importantly for
- 7:41Speaker 2: our purposes, yes, it contains the exact literal name of
- 7:45Speaker 2: the core executable binary. It removes all the guesswork completely.
- 7:48Speaker 1: Okay, So we check the infodoplist our ship's manifest and
- 7:52Speaker 1: we find the exact name of the core Maco binary file,
- 7:55Speaker 1: you know, the actual compiled engine of the app.
- 7:57Speaker 2: Right.
- 7:57Speaker 1: Once we isolate that binary, how do we look inside
- 7:59Speaker 1: it without actually running it? Because we need to extract
- 8:02Speaker 1: its structural blueprint?
- 8:03Speaker 2: Right, yes, we want to see how the developer organize
- 8:06Speaker 2: the code itself. Now, in the Apple ecosystem, apps are
- 8:11Speaker 2: historically written in Objective C or Swift, okay, and because
- 8:14Speaker 2: of how these languages operate, particularly Objective C, a massive
- 8:18Speaker 2: amount of structural metadata is actually left behind inside the
- 8:22Speaker 2: compiled binary.
- 8:23Speaker 1: Like what kind of metadata?
- 8:25Speaker 2: The names of the classes, the properties, the methods. And
- 8:28Speaker 2: we can extract all this metadata by dumping the iOS classes.
- 8:32Speaker 1: So we are essentially looking at the nouns and verbs
- 8:36Speaker 1: the developer used to build the app exactly. So if
- 8:38Speaker 1: we see a class named I don't know, data exfiltrator
- 8:41Speaker 1: or a method called upload contacts.
- 8:43Speaker 2: To server, then that is a massive red flag.
- 8:45Speaker 1: Right, So what tools do we actually use to extract
- 8:48Speaker 1: those blueprints?
- 8:49Speaker 2: We rely on highly specific command line tools designed to
- 8:52Speaker 2: parse the Maco binary format. The standard tools for this
- 8:55Speaker 2: job are class dump, a variant called class dump Z,
- 8:59Speaker 2: and a remarkably utility built into the Mac os environment
- 9:02Speaker 2: called O tool.
- 9:03Speaker 1: Class dump and O tool. And I assume because we
- 9:05Speaker 1: are working in the command line, we're dealing with a
- 9:07Speaker 1: fairly unforgiving environment.
- 9:09Speaker 2: Oh, incredibly unforgiving. The command line only executes exactly what
- 9:14Speaker 2: you instruct it to.
- 9:15Speaker 1: No ring for typos, none.
- 9:17Speaker 2: You have to know the precise tools that actually exist.
- 9:20Speaker 2: For instance, you might hear rumors on forums about a
- 9:24Speaker 2: tool called class dump pro sounds fancy, it sounds like
- 9:27Speaker 2: a premium, highly effective utility, right, but it does not exist.
- 9:32Speaker 1: Wait, really, it's just a myth, just a myth.
- 9:34Speaker 2: There's a legacy tool called class dump, say, but for modern,
- 9:38Speaker 2: reliable static analysis standard class dump and O tool are
- 9:42Speaker 2: the primary instruments you will use to pull those class structures.
- 9:46Speaker 1: Okay, here is where it gets really interesting to me.
- 9:48Speaker 1: We've mapped out the internal structures, you know, the classes
- 9:51Speaker 1: and methods. But apps don't operate in a vacuum.
- 9:54Speaker 2: No they don't.
- 9:55Speaker 1: A malicious app needs to connect to the internet, it
- 9:57Speaker 1: needs to access the file system. Maybe it needs to
- 10:00Speaker 1: read the devices cryptography libraries. How do we see what
- 10:03Speaker 1: external resources the app is reaching out to.
- 10:06Speaker 2: To understand an app's true capabilities, we have to examine
- 10:09Speaker 2: its dynamic libraries.
- 10:10Speaker 1: The libraries right.
- 10:12Speaker 2: Libraries are pre written foundational chunks of code provided by Apple.
- 10:16Speaker 2: So an app doesn't write its own code from scratch
- 10:18Speaker 2: to turn on the camera, it just links to Apple's
- 10:22Speaker 2: existing camera librarries.
- 10:23Speaker 1: Okay, so if we are analyzing, say a simple offline
- 10:28Speaker 1: calculator app.
- 10:29Speaker 2: And we discover it is linking to networking libraries, cryptography frameworks,
- 10:33Speaker 2: and contact list APIs.
- 10:35Speaker 1: Then we immediately know its capabilities do not match its
- 10:38Speaker 1: disguise purpose. It's a fake calculator exactly. So how do
- 10:41Speaker 1: we actually expose those library connections? Are they just listed
- 10:44Speaker 1: in a plain text file somewhere.
- 10:46Speaker 2: No, They're not that obvious. They are embedded within the
- 10:49Speaker 2: load commands of the MACO binary header.
- 10:51Speaker 1: Okay.
- 10:51Speaker 2: When the Apple operating system launches an app, the loader
- 10:54Speaker 2: reads these specific commands to know which dynamic libraries it
- 10:58Speaker 2: needs to pull into memory. Read these load commands ourselves.
- 11:01Speaker 2: We use otool again, but we must use a very
- 11:04Speaker 2: specific flag, which is a capital L. The exact command
- 11:08Speaker 2: you type in is o tool space dash capital.
- 11:10Speaker 1: L ownual dash capital L, and I imagine the capitalization
- 11:13Speaker 1: is non negotiable.
- 11:15Speaker 2: Absolutely non negotiable. This is where understanding the mechanism of
- 11:18Speaker 2: the tool is vital.
- 11:20Speaker 1: What happens if you get it wrong?
- 11:22Speaker 2: If you type a lowercase L, the tool doesn't even
- 11:25Speaker 2: recognize the command. If you use a lowercase A, you
- 11:29Speaker 2: are instructing O tool to look at a completely different
- 11:32Speaker 2: data section within the binary.
- 11:34Speaker 1: And what if you forget the flag completely.
- 11:36Speaker 2: If you just run a tool without specifying the library flag,
- 11:40Speaker 2: you might end up dumping the raw simple table that
- 11:42Speaker 2: will just flood your terminal with a massive, unintelligible wall
- 11:45Speaker 2: of text that tells you absolutely nothing about the app's
- 11:48Speaker 2: high level capabilities. Wow, okay, yeah, you specifically want to
- 11:51Speaker 2: parse the load commands for dynamic libraries, you need O
- 11:54Speaker 2: tool dash capital L.
- 11:56Speaker 1: So if I'm visualizing this entire iOS process step by step,
- 12:00Speaker 1: the infodop plist is the ship's manifest that tells us
- 12:03Speaker 1: exactly which container holds the core binary, and running O
- 12:07Speaker 1: tool dash capital L is like swabbing that container for
- 12:09Speaker 1: chemical residue, revealing all the invisible connections it has to
- 12:12Speaker 1: the outside world. Based on the tools packed inside.
- 12:15Speaker 2: That is an excellent way to conceptualize it. You are
- 12:18Speaker 2: letting the architecture betray the app's true intentions.
- 12:21Speaker 1: Right, So we have cracked open the Apple ecosystem, but
- 12:25Speaker 1: mobile malware is a multi front war. What happens when
- 12:29Speaker 1: our digital suspect is an Android.
- 12:32Speaker 2: App a whole different ballgame.
- 12:33Speaker 1: Because Apple uses a tightly controlled, compiled C family architecture,
- 12:38Speaker 1: but Android is a completely different paradigm. It's fundamentally built
- 12:42Speaker 1: on Java and operates in a much more open ecosystem.
- 12:46Speaker 1: I assume our analytical approach has to shift entirely.
- 12:50Speaker 2: Entirely the underlying architecture dictates the tools. Android apps don't
- 12:54Speaker 2: use plust files and they definitely don't use Moco binaries.
- 12:57Speaker 2: An Android app is packaged as an EPKA file.
- 13:00Speaker 1: An Android package file, which, much like the IOSIPA, is
- 13:03Speaker 1: basically just to specialize ZP archive.
- 13:06Speaker 2: Exactly. It is a ZP or archive containing the apps, resources, certificates,
- 13:10Speaker 2: and the compiled code. But here's the critical difference. If
- 13:13Speaker 2: you just natively unzip an APK using standard archive software,
- 13:17Speaker 2: you cannot read the context. Why, because the core code
- 13:19Speaker 2: is compiled into delvic executable format. A dox file. Furthermore,
- 13:24Speaker 2: the essential configuration files, which look like standard XML, are
- 13:28Speaker 2: actually compiled into a binary XML format to save space,
- 13:32Speaker 2: so if you open them in a text editor, it
- 13:34Speaker 2: just looks like complete gibberish.
- 13:35Speaker 1: So we can't just unzip it. We have to actively
- 13:37Speaker 1: decode it back into a human readable state. How do
- 13:40Speaker 1: we reverse that process?
- 13:42Speaker 2: We use a dedicated, powerful utility called app tool.
- 13:45Speaker 1: App tool.
- 13:46Speaker 2: Yes, apptool is specifically designed to parse those delvic executable
- 13:50Speaker 2: files and translate them into smally, which is a human
- 13:53Speaker 2: readable assembly like syntax.
- 13:55Speaker 1: Okay, that sounds super useful.
- 13:57Speaker 2: It is, and more importantly, for our initial triage, it
- 14:00Speaker 2: decodes those binary XML files back into standard READABLEXML.
- 14:04Speaker 1: So aptool essentially rebuilds the original project directory exactly as
- 14:08Speaker 1: the developer saw it on their screen exactly. How do
- 14:11Speaker 1: we invoke that? In the command line?
- 14:13Speaker 2: The precise instruction to decode and APK is aptool space
- 14:16Speaker 2: D followed by another space, and then the name of
- 14:18Speaker 2: your file. The adult simply stands for decode.
- 14:21Speaker 1: Ap tool dfile. It sounds simple enough, but given what
- 14:25Speaker 1: we know about command line syntax, I'm guessing there's a
- 14:28Speaker 1: nuance here that trips people up. Usually, when we pass
- 14:31Speaker 1: a flag to a command line tool, like we did
- 14:34Speaker 1: with otool dash L, we use.
- 14:36Speaker 2: A dash and that is exactly where the analytical friction occurs.
- 14:39Speaker 2: I knew it because standard POSEX syntax conditions us to
- 14:43Speaker 2: use dashes. Analysts instinctively want to type aptool space dash
- 14:48Speaker 2: d space.
- 14:48Speaker 1: File right muscle memory exactly.
- 14:51Speaker 2: Or they might think they need to list the contents
- 14:53Speaker 2: first and try a non existent flag like dash L.
- 14:56Speaker 2: But aptool operates differently. If you include that dash before
- 15:00Speaker 2: or the d the tool will fail. It just won't run,
- 15:02Speaker 2: It won't decode Dalvic bytcode, and won't rebuild the XML.
- 15:05Speaker 2: Your analysis stops cold. It requires deliberate exactness. It's just
- 15:09Speaker 2: apptool space, D space the file name, no dashes.
- 15:14Speaker 1: It is a stark reminder that we are interacting with
- 15:16Speaker 1: raw programmatic logic, not a user friendly graphical interface for sure. Okay,
- 15:22Speaker 1: so we've been precise. We successfully typed app tool D,
- 15:27Speaker 1: the APKs decoded, the Dalvik bytecode is translated, and the
- 15:31Speaker 1: binary XML is now readable text. Where is our target?
- 15:36Speaker 1: What is the Android equivalent to apple'sinfo dot plust.
- 15:40Speaker 2: Your primary target? The absolute gold mine for Android static
- 15:43Speaker 2: analysis is a file called the Android Manifest dot XXML.
- 15:47Speaker 1: The Android manifest, it sounds authoritative.
- 15:49Speaker 2: It is the master control document for the application. Because
- 15:53Speaker 2: Android operates on a sandbox model where apps are isolated
- 15:56Speaker 2: from each other, and app must explicitly declare its required
- 15:59Speaker 2: permissions and its internal components to the operating system. Okay,
- 16:02Speaker 2: so if an app wants to access the Internet, read
- 16:04Speaker 2: your contacts, or sent text messages, it must be stated
- 16:06Speaker 2: in the manifest.
- 16:07Speaker 1: So we open Theanroid manifest dot xml and we start
- 16:10Speaker 1: hunting for malicious behavior. What exactly does a malicious capability
- 16:14Speaker 1: look like in this file?
- 16:16Speaker 2: To understand that, you have to understand how Android apps communicate.
- 16:18Speaker 2: They use an inner process communication system. Basically, if an
- 16:21Speaker 2: app wants to do something, or if it wants to
- 16:22Speaker 2: react to a system event, it uses an object called
- 16:25Speaker 2: an intent.
- 16:26Speaker 1: And intent So rather than directly hooking into the phone's
- 16:29Speaker 1: SMS database and app essentially yells into the operating systems room,
- 16:34Speaker 1: I intend to send a message or who has a
- 16:36Speaker 1: new text message?
- 16:37Speaker 2: That is exactly how it works, and to listen for
- 16:40Speaker 2: those specific announcements, the app declares a specific field in
- 16:44Speaker 2: the manifest called an intent filter. The intent filter tells
- 16:47Speaker 2: the Android OS, hey, wake my app up when this
- 16:51Speaker 2: specific event happens.
- 16:52Speaker 1: So, let's say our initial hash research suggested this malware
- 16:55Speaker 1: was a premium SMS toll fraud.
- 16:57Speaker 2: Trojan uh, the kind that silently sent text messages to
- 17:01Speaker 2: premium numbers to join your bank account.
- 17:02Speaker 1: Exactly. So we decode the APK, we open the Android
- 17:05Speaker 1: manifest dot XML, and we start scanning.
- 17:08Speaker 2: And if you scan that manifest and find an intent
- 17:11Speaker 2: filter configured to listen for say Android dot Provider, dot
- 17:14Speaker 2: telepany dot SMS underscore received.
- 17:16Speaker 1: Then you have just verified a core capability of the malware.
- 17:19Speaker 2: You are looking at an intent shelter designed to intercept
- 17:22Speaker 2: incoming text messages. If you are analyzing a simple offline
- 17:25Speaker 2: notepad app and its manifest contains an intent filter aggressively
- 17:29Speaker 2: monitoring your SMS traffic, well you have found the smoking gun.
- 17:33Speaker 1: The structural fingerprint matches the suspected crime, and we proved
- 17:36Speaker 1: it without ever executing a single line of malicious code.
- 17:40Speaker 2: That's the beauty of it.
- 17:41Speaker 1: We just looked at the app's own stated intentions inside
- 17:44Speaker 1: its manifest and caught it red handed.
- 17:46Speaker 2: That is the true power of basic static analysis. You
- 17:50Speaker 2: are reading the thread actor's architectural blueprint.
- 17:53Speaker 1: Let's take a breath and connect all these dots. Because
- 17:55Speaker 1: we have covered a tremendous amount of ground across two
- 17:58Speaker 1: entirely different operating systems, we definitely have. We started with
- 18:02Speaker 1: the vital strategic phase, you know, using cryptographic hashes to
- 18:07Speaker 1: querry global intelligence databases. We establish what we are dealing
- 18:11Speaker 1: with before we ever touch a tool, allowing us to
- 18:14Speaker 1: set highly targeted analytical objectives.
- 18:17Speaker 2: Because context is everything in malware analysis exactly.
- 18:20Speaker 1: Then we tackled the closed ecosystem of Apple. We learned
- 18:23Speaker 1: that bypassing the generic payload directory and zeroing in on
- 18:27Speaker 1: the info dot plist the ship's manifest is how we
- 18:30Speaker 1: find the true name of the muco executable. We explored
- 18:33Speaker 1: how dumping classes reveals the internal logic, and how parsing
- 18:38Speaker 1: the load commands with O tool dash capital l exposes
- 18:41Speaker 1: the dynamic libraries the app relies on.
- 18:43Speaker 2: And then we shifted paradigms to Android's Java based architecture.
- 18:47Speaker 1: Right we discuss why you can't just natively unzipin APK,
- 18:51Speaker 1: but must decode the dolvic bytecode and binary XML using
- 18:54Speaker 1: app toold relying on precise syntax with no dashes.
- 18:58Speaker 2: Crucial point.
- 19:00Speaker 1: We explored how the Android manifest dot xml serves as
- 19:03Speaker 1: the master controlled document where malicious capabilities are openly declared
- 19:07Speaker 1: through interprocess communication mechanisms, specifically the intent filters.
- 19:11Speaker 2: It is a robust foundational methodology. If you grasp the
- 19:15Speaker 2: mechanics behind these specific files and these specific tools, you
- 19:18Speaker 2: possess the structural keys to demystify the vast majority of
- 19:22Speaker 2: mobile malware.
- 19:23Speaker 1: And I want you to think about how you would
- 19:24Speaker 1: approach a brand new, highly suspicious file landing on your
- 19:28Speaker 1: desk right now. Let's do a quick mental check. Oh
- 19:30Speaker 1: pop quiz, just a quick review exercise to lock this in.
- 19:33Speaker 1: If you have an iOS app and an Android app
- 19:36Speaker 1: in front of you, and you need to find the
- 19:38Speaker 1: iOS executable's name and the Android app's messaging actions, which
- 19:43Speaker 1: specific file do you check for Apple and which specific
- 19:46Speaker 1: field do you look for an Android?
- 19:48Speaker 2: Give them a sake to think about it. Got it?
- 19:50Speaker 1: For Apple you open the info dot plist and for
- 19:53Speaker 1: Android you scan the manifest for the intent filter. You
- 19:56Speaker 1: wouldn't just blindly throw the app into a decompiler and
- 19:59Speaker 1: drown an assembly code. You now have a systematic process
- 20:03Speaker 1: for tearing down a digital threat from the outside in.
- 20:05Speaker 2: It is a critical capability. But as we conclude this
- 20:08Speaker 2: deep dive, I'm going to leave you with a final
- 20:10Speaker 2: thought to mull over.
- 20:11Speaker 1: Oh lay it on us.
- 20:12Speaker 2: We have just explored how basic static analysis relies on
- 20:16Speaker 2: reading these structural blueprints, the plists, the libraries, the manifest.
- 20:20Speaker 2: We can see all this clearly because the operating systems
- 20:23Speaker 2: require these files to function. But cybersecurity is a perpetual
- 20:27Speaker 2: arms race. Thread actors know exactly how otool and apt
- 20:30Speaker 2: tool work. Of course they do so if they know
- 20:32Speaker 2: we are scanning their manifests and library dependencies. What kinds
- 20:36Speaker 2: of complex obfuscation and dynamic packing architectures are they actively
- 20:41Speaker 2: inventing right now? How do you statically analyze a malicious
- 20:45Speaker 2: payload that heavily encrypts its own manifest, only decrypting its
- 20:49Speaker 2: true intent the precise millisecond it is executed in memory.
- 20:53Speaker 1: Oh wow, that is a fascinating and terrifying question. The
- 20:56Speaker 1: blueprints we rely on are constantly being written in disappearing
- 20:59Speaker 1: ink pretty much. It just proves why. Understanding the fundamental architecture,
- 21:03Speaker 1: you know the why and the how is so much
- 21:05Speaker 1: more important than just memorizing a list of command line tools.
- 21:08Speaker 1: The tools will evolve, but the logical methodology remains. Stay curious,
- 21:12Speaker 1: keep analyzing, and we will catch you on the next
- 21:14Speaker 1: deep dive.