Latest / CyberCode Academy / Course 42 - Mobile Malware Analysis Fundamentals | Episode 8: Static Analysis of Android Banking Trojans
Transcript
- 0:00Speaker 1: You probably have like fifty or sixty apps on your
- 0:03Speaker 1: phone right now, right, I mean you trust them to
- 0:06Speaker 1: play your music, or track your workouts, maybe even act
- 0:10Speaker 1: as a level for hanging a picture frame. You tap,
- 0:12Speaker 1: the icon does the thing, and you just go about
- 0:14Speaker 1: your day. But what if one of those apps is
- 0:18Speaker 1: silently waiting for you to go to sleep, just so
- 0:20Speaker 1: it can wake up, read through your private text messages
- 0:23Speaker 1: and beam them to a server halfway across the world.
- 0:26Speaker 2: And the scary part is on the surface, that app
- 0:30Speaker 2: looks and behaves exactly like a harmless calculator or a
- 0:34Speaker 2: weather widget. The malicious behavior is buried deep in.
- 0:38Speaker 1: The architecture, totally hidden from the average user.
- 0:41Speaker 2: Exactly, It's completely hidden.
- 0:42Speaker 1: Well, welcome to this deep dive today. We are putting
- 0:45Speaker 1: you in the shoes of a cybersecurity analyst. Your objective
- 0:48Speaker 1: is to learn how to literally tear apart a suspicious
- 0:51Speaker 1: Android application and uncover its hidden secrets.
- 0:55Speaker 2: Yeah, we are exploring the philosophy and really the nuts
- 0:58Speaker 2: and bolts of what the industry calls basic static analysis.
- 1:01Speaker 1: And I think when people hear phrases like reverse engineering malware,
- 1:05Speaker 1: they tend to picture chaotic screens filled with scrolling green.
- 1:11Speaker 2: Text like something out of a hacker movie.
- 1:13Speaker 1: Right, exactly matrix style, but the reality is much more accessible.
- 1:17Speaker 1: It's an entirely logical, methodical process of just peeling back layers.
- 1:22Speaker 2: It really is. We are basically looking at the blueprint
- 1:25Speaker 2: of a house to see where the trapdoors are without
- 1:27Speaker 2: actually having to step inside.
- 1:28Speaker 1: Right. And for anyone who has looked at malware on
- 1:31Speaker 1: other platforms, like maybe you've studied how a desktop trojan
- 1:35Speaker 1: works or iOS vulnerabilities, the underlying philosophy here on Android
- 1:40Speaker 1: is I mean, it's fundamentally the same.
- 1:41Speaker 2: Oh, for sure, the core concepts of infection they don't
- 1:44Speaker 2: really change when we switch platforms. The bad guys they
- 1:48Speaker 2: still rely on social engineering to trick you into downloading
- 1:51Speaker 2: something you shouldn't, right.
- 1:52Speaker 1: The classic fishing tactics.
- 1:54Speaker 2: Exactly. They still compromise third party app stores, or they
- 1:57Speaker 2: specifically target users who have, you know, remove the built
- 2:01Speaker 2: in security protections from their.
- 2:02Speaker 1: Devices jail broken phones and stuff.
- 2:04Speaker 2: Yeah, exactly. Our overarching goal as analysts remains constant here,
- 2:09Speaker 2: which is to uncover the true functionality of the program.
- 2:11Speaker 1: Okay, so before we tear into the code itself, we
- 2:15Speaker 1: have to secure our starting point, we have to know
- 2:17Speaker 1: exactly what we are holding, right, Yes, absolutely, so this
- 2:20Speaker 1: is the very first layer of analysis, identifying the APK file.
- 2:24Speaker 2: Right because when you download an Android app, the file
- 2:27Speaker 2: you are actually pulling onto your device is an APK,
- 2:30Speaker 2: which stands for Android Package. Okay, Now, in spatic analysis,
- 2:34Speaker 2: our absolute first item of business is to identify this
- 2:39Speaker 2: specific APK without running it. We're strictly observing from a
- 2:43Speaker 2: safe distance here.
- 2:44Speaker 1: I would assume we can't just rely on the file
- 2:46Speaker 1: name though, right, Like a hacker isn't going to name
- 2:48Speaker 1: their file steal your bank passwords dot at K, definitely not.
- 2:51Speaker 1: We'll name it something innocuous like I don't know, angrybirds
- 2:54Speaker 1: dot AC or system update dot app.
- 2:57Speaker 2: Yeah, filenames are completely meaningless and malware analysis you just
- 3:00Speaker 2: can't trust them.
- 3:00Speaker 1: So what do we do instead?
- 3:02Speaker 2: Instead, we generate a unique digital fingerprint for the file
- 3:06Speaker 2: using a process called hashing.
- 3:08Speaker 1: Hashing okay, yeah, you.
- 3:09Speaker 2: Take the entire contents of that APK file and you
- 3:12Speaker 2: pass it through a mathematical algorithm. This algorithm basically crunches
- 3:17Speaker 2: all the data and spits out a fixed length string
- 3:20Speaker 2: of letters and numbers, Meaning.
- 3:23Speaker 1: If a maur author takes a known malicious app and
- 3:26Speaker 1: changes absolutely nothing except like the color of one pixel
- 3:30Speaker 1: in the app icon.
- 3:31Speaker 2: That minor tweak completely alters the resulting hash.
- 3:34Speaker 1: Wow, just one pixel.
- 3:35Speaker 2: Just one pixel. Yeah, but if the file is truly identical,
- 3:38Speaker 2: the hash will always be identical.
- 3:40Speaker 1: Okay, that makes sense.
- 3:41Speaker 2: And once you generate that unique fingerprint, you can cross
- 3:44Speaker 2: reference it against massive global databases that track malicious software.
- 3:48Speaker 1: It's basically similar to booking a suspect at a police precinct.
- 3:52Speaker 2: That's a great way to think about it.
- 3:53Speaker 1: Yeah, Like, before you take them into an interrogation room
- 3:56Speaker 1: and try to figure out their whole life story, you
- 3:58Speaker 1: run their fingerprints. You want to see if the global
- 4:01Speaker 1: cybersecurity community already has a rap sheet on this exact file.
- 4:05Speaker 2: Exactly, if a thousand other security researchers have already flagged
- 4:09Speaker 2: this exact fingerprint as a banking trojan, well your investigation
- 4:13Speaker 2: just got incredibly focused.
- 4:15Speaker 1: You already know what you're dealing with.
- 4:16Speaker 2: You know exactly what you're dealing with.
- 4:18Speaker 1: Yeah, Okay, so the fingerprint tells us if the community
- 4:21Speaker 1: already knows this is a bad file. But what if
- 4:24Speaker 1: it's like a brand new strain, right, a zero day
- 4:27Speaker 1: or something, customer, Yeah, what if the fingerprint comes back
- 4:31Speaker 1: totally clean and there's no record of it anywhere.
- 4:33Speaker 2: That is when we have to crack open the safe.
- 4:36Speaker 2: We have to look at the apps ID and see
- 4:38Speaker 2: what it's demanding from the phone.
- 4:39Speaker 1: Which brings us to decoding the Android manifest.
- 4:43Speaker 2: Right, and to understand the manifest, you really have to
- 4:45Speaker 2: understand what an APK file actually is.
- 4:48Speaker 1: It's not just a single magic file, right, No, not
- 4:51Speaker 1: at all.
- 4:51Speaker 2: It's essentially just a specialized ZIP file. It is a
- 4:55Speaker 2: container holding a bunch of other folders, images, and code
- 4:59Speaker 2: that base make up the app.
- 5:01Speaker 1: But I'm guessing you can't just unzip it like a
- 5:03Speaker 1: normal folder on your desktop and start reading the instructions.
- 5:07Speaker 2: I mean, you can unzip it, but you won't be
- 5:08Speaker 2: able to read much because when the developer finished writing
- 5:12Speaker 2: the app, they had to compile it. Ah, they translated
- 5:15Speaker 2: it from human readable text into a binary format that
- 5:19Speaker 2: a machine can process really fast.
- 5:20Speaker 1: So it basically becomes unreadable machine logic exactly.
- 5:24Speaker 2: And sitting right inside that zip container is the absolute
- 5:28Speaker 2: most critical file we need, which is called Android Manifest
- 5:31Speaker 2: dot xml. The manifest, Yeah, You can think of the
- 5:35Speaker 2: manifest as the absolute rulebook for the application. But to
- 5:39Speaker 2: read it, we have to run the APK through a
- 5:41Speaker 2: specialized decoding tool.
- 5:43Speaker 1: Because right now it's just binary gibberish. So we use
- 5:46Speaker 1: a simple command line tool aptly called APK tool I believe,
- 5:51Speaker 1: to essentially reverse that binary compilation.
- 5:53Speaker 2: Yep. APK tool is the industry standard for this.
- 5:56Speaker 1: We point the tool at the APK and it translates
- 5:58Speaker 1: that binary gibbrash back into a plane readable text file,
- 6:02Speaker 1: and then we can just open it up in any
- 6:04Speaker 1: basic text editor.
- 6:05Speaker 2: Right exactly. And when you open that newly readable Android Manifest,
- 6:09Speaker 2: you are scanning for a few specific structural pillars.
- 6:12Speaker 1: Okay, what's the first one.
- 6:13Speaker 2: The first is the manifest package element. This is the
- 6:15Speaker 2: official Java name for the application. It's usually styled backwards
- 6:19Speaker 2: like a flipped web domain.
- 6:20Speaker 1: Oh right, so it might read something like comm dot
- 6:24Speaker 1: Google dot Android dot YouTube.
- 6:27Speaker 2: Precisely. That's the app's formal government name basically.
- 6:31Speaker 1: But that's usually different from what the user sees on
- 6:33Speaker 1: their screen, right.
- 6:34Speaker 2: Very different. Yeah, the user sees the Android colon label.
- 6:37Speaker 2: That is the shiny, super cool flashlight title displayed on
- 6:40Speaker 2: the home screen. Gotcha, So comparing the official package name
- 6:43Speaker 2: to the public label is actually your first chance to
- 6:46Speaker 2: spot a discrepancy.
- 6:48Speaker 1: Oh, I see where this is going.
- 6:49Speaker 2: Yeah, a package name that looks like randomized gibberish underneath
- 6:52Speaker 2: a highly polished label is an immediate indicator that something
- 6:56Speaker 2: is wrong.
- 6:57Speaker 1: Okay, so label and package name it's next in the manifest.
- 7:01Speaker 2: Then we move further down into something called intent filters.
- 7:04Speaker 1: Intent filters, Yeah.
- 7:06Speaker 2: These describe how the app interacts with other applications on
- 7:09Speaker 2: the phone. They basically define the app's ability to send
- 7:12Speaker 2: or receive messages from the system itself.
- 7:15Speaker 1: So like, if an app wants to be notified when
- 7:18Speaker 1: the phone finishes booting up or when a text message arrives,
- 7:21Speaker 1: it uses an intent filter.
- 7:23Speaker 2: Exactly, it has to register that intent.
- 7:25Speaker 1: Wait, hold on an intent filter. Yeah, if I'm building
- 7:28Speaker 1: a highly malicious, sneaky app, I'm definitely not going to
- 7:32Speaker 1: openly declare my intentions to the operating system.
- 7:34Speaker 2: You think so, right?
- 7:35Speaker 1: Yeah, Like, why would a malware author out themselves like that?
- 7:39Speaker 1: That feels like giving the police your itinerary before committing
- 7:42Speaker 1: a crime.
- 7:42Speaker 2: It does, But it comes down to the core philosophy
- 7:45Speaker 2: of Android's security architecture. Android is heavily.
- 7:49Speaker 1: Sandboxed sandbox meaning isolated exactly.
- 7:54Speaker 2: Unlike older desktop operating systems, where a program might have
- 7:58Speaker 2: free reign over the whole computer once it's running, Android
- 8:02Speaker 2: draws strict, isolated boundaries around every single app.
- 8:05Speaker 1: Ah, so it's basically a structural hostage situation.
- 8:09Speaker 2: That's a good way to put it.
- 8:10Speaker 1: The malware physically cannot function outside of its sandbox unless
- 8:13Speaker 1: it explicitly asks the operating system to open a specific
- 8:17Speaker 1: door exactly.
- 8:18Speaker 2: The operating system forces the app to declare those intents
- 8:21Speaker 2: in the manifest. If the app tries to intercept the
- 8:24Speaker 2: text message without declaring the intent to do so, the
- 8:26Speaker 2: Android system simply blocks the action.
- 8:28Speaker 1: It just hits a wall.
- 8:30Speaker 2: Yep. The malware author has absolutely no choice. They have
- 8:33Speaker 2: to declare their intentions to make the app work at all,
- 8:36Speaker 2: which provides us with a really clear trail of breadcrumbs.
- 8:39Speaker 1: Which perfectly sets up the absolute gold mine of the manifest.
- 8:43Speaker 1: The use is permissions tags.
- 8:45Speaker 2: Oh yeah, the permissions are everything.
- 8:47Speaker 1: Like when you install an app and your phone pops
- 8:49Speaker 1: up a warning asking allow this app to access your camera.
- 8:54Speaker 1: That is, the operating system reading the manifest's permission demands.
- 8:58Speaker 2: Exactly, and analysing these permissions is where critical thinking becomes
- 9:02Speaker 2: your best analytical tool. Context is everything.
- 9:05Speaker 1: Here, how so give me an example.
- 9:08Speaker 2: Well, let's say you are analyzing a video player application.
- 9:11Speaker 2: If you see a permission tag requesting access to the Internet, well,
- 9:15Speaker 2: that aligns with its function.
- 9:16Speaker 1: Right, it needs to stream video from a server exactly.
- 9:19Speaker 2: But if you scroll down the manifests of that same
- 9:21Speaker 2: video player and you see a permission tag demanding access
- 9:25Speaker 2: to read your SMS text messages.
- 9:27Speaker 1: Or permission to silently record audio from my microphone.
- 9:30Speaker 2: Yeah, right, the alarm bells start ringing immediately. A video
- 9:34Speaker 2: player has absolutely zero legitimate functional need to read your
- 9:39Speaker 2: private texts.
- 9:40Speaker 1: So you've spotted a massive anomaly just from the context
- 9:42Speaker 1: you have.
- 9:43Speaker 2: And the beauty of this phase of static analysis is
- 9:46Speaker 2: that the manifest gives you that insight instantly.
- 9:49Speaker 1: You haven't even looked at a single line of the
- 9:52Speaker 1: app's internal logic.
- 9:53Speaker 2: Yet, not one line, but you already know it has
- 9:56Speaker 2: malicious capabilities based purely on what it's asking permission to do.
- 10:00Speaker 1: That is wild. Okay. So the manifest gives us the demands.
- 10:02Speaker 1: It tell us what the application wants to do. But
- 10:04Speaker 1: to figure out exactly how it's utilizing those permissions, we
- 10:07Speaker 1: have to look deeper.
- 10:08Speaker 2: We do. We need to look at the actual brain
- 10:10Speaker 2: in the.
- 10:11Speaker 1: App, which brings us to translating the blueprint moving from
- 10:14Speaker 1: DX to Java right.
- 10:16Speaker 2: Because knowing an app has the ability to read your
- 10:18Speaker 2: text messages is vital context. But seeing the specific lines
- 10:23Speaker 2: of code that actually steal the text message, bundle it
- 10:26Speaker 2: up and email it to a hacker server that is
- 10:29Speaker 2: the definitive proof.
- 10:30Speaker 1: And getting to that code requires understanding how Android apps
- 10:33Speaker 1: are actually built.
- 10:34Speaker 2: It does.
- 10:34Speaker 1: I imagine a phone's processor doesn't really want to read bulky,
- 10:38Speaker 1: human written Java code right like it's dealing with battery constraints,
- 10:43Speaker 1: memory limits. It needs something stripped down and optimized.
- 10:46Speaker 2: That is the exact reason for the compilation journey. A
- 10:50Speaker 2: developer writes the app in standard Java source code, the
- 10:53Speaker 2: system compiles that into Java by code okay, but for
- 10:56Speaker 2: androids specifically, it goes through a second compilation phase in
- 11:00Speaker 2: to what is called Delvic bytecode.
- 11:01Speaker 1: AH, resulting in files with a dot dex extension which
- 11:05Speaker 1: stands for Delvik executable.
- 11:06Speaker 2: You got it, and these the AX files are hyper
- 11:09Speaker 2: optimized for the physical constraints of a mobile device. They
- 11:12Speaker 2: execute incredibly fast.
- 11:13Speaker 1: But the trade off for that speed is human readability.
- 11:16Speaker 2: Exactly. If you try to open a dot dex file
- 11:19Speaker 2: in a text editor, it looks like raw chaotic assembly language.
- 11:23Speaker 2: It is virtually impossible to just sit down and read
- 11:25Speaker 2: Dalvic bytecode to understand an app's complex logic.
- 11:28Speaker 1: So we have the instructions, but they are written in
- 11:30Speaker 1: a hyper fast, completely unreadable shorthand. Pretty much, we need
- 11:35Speaker 1: a way to translate that shorthand back into something we
- 11:38Speaker 1: can actually analyze.
- 11:39Speaker 2: And because Dalvic bytecode and Java bytecode share similar underlying structures,
- 11:44Speaker 2: we could use translation tools to reverse that compilation process.
- 11:48Speaker 2: So nice analysts frequently use a command line utility called
- 11:51Speaker 2: dex two jar, and just as the name implies, it
- 11:54Speaker 2: takes that unreadable Delvic executable file and converts it back
- 11:58Speaker 2: into a standard Java art archive or a dot jar file.
- 12:02Speaker 1: So to trace this journey, the developer wrote the original
- 12:04Speaker 1: book in English, meaning Java. The compilation process translated it
- 12:09Speaker 1: into a super condensed shorthand so the phone could read
- 12:11Speaker 1: it instantly, which is the dx file exactly. And now
- 12:14Speaker 1: we are using a tool to translate that shorthand back
- 12:17Speaker 1: into English, so we can actually read the plot.
- 12:19Speaker 2: That is a perfect analogy. And from there you open
- 12:22Speaker 2: that converted Java file in a decompiler.
- 12:24Speaker 1: A decompiler like Jdguy.
- 12:26Speaker 2: Yeah, Jdgui is a classic, widely used tool in the
- 12:30Speaker 2: industry that displays this converted code. It gives you what
- 12:33Speaker 2: we call Java pseudo source code.
- 12:34Speaker 1: Pseudo source code meaning it's not perfect right.
- 12:38Speaker 2: It might not look exactly character for character, like with
- 12:41Speaker 2: the developer typed on their keyboard, but the logic, the variables,
- 12:45Speaker 2: and the flow, they're entirely readable.
- 12:47Speaker 1: Now I know there are also premium, professional grade decompilers
- 12:51Speaker 1: out there that are so powerful they can interpret the
- 12:55Speaker 1: DX files directly, skipping that conversion step entirely. Oh yeah,
- 12:59Speaker 1: But regardless of the tool you use, you eventually get
- 13:02Speaker 1: the code open on your screen. And I have to
- 13:04Speaker 1: imagine this is where people just get totally overwhelmed.
- 13:07Speaker 2: It can be overwhelming.
- 13:08Speaker 1: Yeah, Like you are suddenly staring at hundreds of different files,
- 13:12Speaker 1: folders and functions. Where do you even begin.
- 13:16Speaker 2: Well, the secret is you never just start reading code
- 13:18Speaker 2: from the top line downwards. You rely on a strategy
- 13:21Speaker 2: called forward engineering.
- 13:23Speaker 1: Forward engineering how does that work?
- 13:24Speaker 2: You go back to the Android manifest file, the rule
- 13:26Speaker 2: book we decoded earlier.
- 13:27Speaker 1: Oh, you go back to find the starting line exactly.
- 13:30Speaker 2: Yeah. The manifest explicitly tells the Android operating system, when
- 13:34Speaker 2: the user taps the app icon on their screen, launch
- 13:38Speaker 2: this specific.
- 13:39Speaker 1: Class first, the main activity.
- 13:41Speaker 2: Yes, the main activity. You find the name of that
- 13:43Speaker 2: main activity in the manifest. Then you locate that exact
- 13:47Speaker 2: class in your decompiled code.
- 13:48Speaker 1: And then you just start reading from there.
- 13:50Speaker 2: You start reading from that launch point, and you follow
- 13:53Speaker 2: the logic forward. You track what methods it calls, what
- 13:56Speaker 2: background services it triggers, and you just trace the execution
- 13:59Speaker 2: path step by step.
- 14:00Speaker 1: Okay, let's move from theory into application. Here. To really
- 14:04Speaker 1: solidify this knowledge, we need to put you the listener
- 14:08Speaker 1: in the driver's seat for a hypothetical lab scenario. Let's
- 14:11Speaker 1: dissect a real world threat.
- 14:13Speaker 2: I love it. Let's do it.
- 14:14Speaker 1: Imagine we boot up a secure, isolated Linux environment. We
- 14:18Speaker 1: are handed a suspicious file named malwareto dot app pack.
- 14:22Speaker 1: Our intelligence briefing suggests this specific file has been targeting
- 14:26Speaker 1: banking customers in Korea. Okay, Hi says, very, and we
- 14:29Speaker 1: are going to tear it apart using only the basic
- 14:32Speaker 1: static analysis tools we've just discussed.
- 14:34Speaker 2: All right, so step one, we need to decode the
- 14:36Speaker 2: manifest to see what we are dealing with. We run
- 14:38Speaker 2: our decoding tool on malware two dot app and we
- 14:41Speaker 2: open the resulting Android manifest dot xml file.
- 14:45Speaker 1: And as we scan through that XML text, we are
- 14:48Speaker 1: looking for the label right the public facing name of.
- 14:51Speaker 2: The app exactly. Scanning the intent filters, we find the
- 14:54Speaker 2: main activity and right above it.
- 14:56Speaker 1: Is the label what It just points to a string
- 14:58Speaker 1: of text in the app's resource right.
- 15:00Speaker 2: Which is common. So we track that down. We find
- 15:03Speaker 2: the Korean characters, run them through a translator, and it
- 15:05Speaker 2: translates to smart banking.
- 15:07Speaker 1: Smart banking. Okay, so the disguise is established. The user
- 15:11Speaker 1: genuinely believes they are downloading a secure barking application.
- 15:15Speaker 2: Which means we need to evaluate the threat level. So
- 15:18Speaker 2: we scroll down to the permission section of that same manifest.
- 15:22Speaker 1: And we immediately hit a wall of massive red flags.
- 15:25Speaker 2: I'm guessing it's asking for a lot.
- 15:27Speaker 1: Oh yeah, this supposedly secure banking app is requesting the
- 15:30Speaker 1: ability to read SMS messages, write SMS messages, receive them,
- 15:35Speaker 1: and send them. Wow, it is also requesting permission to
- 15:38Speaker 1: install and delete other packages on the phone.
- 15:41Speaker 2: That is huge. Taking a step back to look at
- 15:43Speaker 2: the broader context, why would a banking app need the
- 15:46Speaker 2: ability to completely hijack your text messaging system.
- 15:50Speaker 1: It's hunting for two factor authentication codes, isn't it? Almost
- 15:54Speaker 1: certainly like when your actual bank texts you a secure
- 15:57Speaker 1: log in code. This smelware wants the ability to intercept
- 16:01Speaker 1: that text, read the code, and hide the message so
- 16:03Speaker 1: your phone never even buzzes.
- 16:05Speaker 2: Exactly. You have deduced the malicious capability entirely from the manifest,
- 16:11Speaker 2: But a deduction isn't proof.
- 16:13Speaker 1: We need the smoking gun.
- 16:14Speaker 2: Right We need to find the specific code executing that interception.
- 16:18Speaker 1: So looking back at the manifest alongside the main activity,
- 16:22Speaker 1: we spot another class declared with a highly suspicious name,
- 16:26Speaker 1: deaf SIMS receiver.
- 16:27Speaker 2: That is our target right there. Yeah, So we take
- 16:29Speaker 2: the optimized classes dot dex file from the APK, run
- 16:33Speaker 2: it through our converter to get a readable job archive,
- 16:35Speaker 2: and we open it up in our decompiler and boom.
- 16:37Speaker 1: We see the entire tree of the apps code. We
- 16:40Speaker 1: can bypass the main activity for now and click directly
- 16:43Speaker 1: into the SEMs receiver class we found in the manifest.
- 16:45Speaker 2: And what reveals itself in that pseudo source code, It's.
- 16:47Speaker 1: All sitting right there in plain sight. We can actually
- 16:50Speaker 1: read the methods using the phone's telephony manager to profile
- 16:54Speaker 1: the device. It is actively pulling the simcard number, it
- 16:58Speaker 1: is hooking into the incoming SEMES stream, and right in
- 17:01Speaker 1: the middle of the interception logic, sitting there like a
- 17:04Speaker 1: glowing neon sign is a hard coded web address.
- 17:07Speaker 2: And there it is, you found the command and control server.
- 17:11Speaker 1: The code is actively taking those intercepted text messages, packaging
- 17:15Speaker 1: them up and attempting to send them out over the
- 17:18Speaker 1: Internet to a urlbanking one dot catcat.
- 17:21Speaker 2: Dot net, catcat dot net.
- 17:22Speaker 1: Yeah, now, catcat dot net does not sound like a secure,
- 17:26Speaker 1: federally ensured financial institution to me.
- 17:28Speaker 2: No, it definitely does not. But it absolutely validates the
- 17:31Speaker 2: suspicion we had during the permissions phase.
- 17:34Speaker 1: It perfectly ties it together. The manifest showed us the
- 17:37Speaker 1: demand I want to read your texts, and the decompiled
- 17:40Speaker 1: code revealed the true intention to intercept two factor authentication,
- 17:44Speaker 1: profile your simcard and secretly upload your private data to
- 17:48Speaker 1: a shady server and the.
- 17:49Speaker 2: Most amazing part. We uncovered all of that without ever
- 17:52Speaker 2: risking the execution of the malware.
- 17:54Speaker 1: We never let it run on a real phone.
- 17:56Speaker 2: We never let it run, we never let it connect
- 17:58Speaker 2: to the internet. We mapped out its prime attack vector
- 18:01Speaker 2: and identified its command server solely by reading the blueprints.
- 18:05Speaker 1: That is just incredible.
- 18:06Speaker 2: It is a deeply empowering process once you understand the
- 18:09Speaker 2: sequence of the tools.
- 18:10Speaker 1: So synthesizing this entire journey for you, the listener, You
- 18:14Speaker 1: start from a safe distance by generating a unique hash
- 18:17Speaker 1: to see if the global community recognizes the threat right
- 18:21Speaker 1: then if you need to go deeper, you decode the
- 18:23Speaker 1: binary Android manifest to read the app's rule book, spotting
- 18:27Speaker 1: dangerous permissions and locating the main launch.
- 18:29Speaker 2: Points exactly and knowing what the app demands. You then
- 18:33Speaker 2: trace the source code. You take the highly optimized Delvick
- 18:37Speaker 2: executable files, translate them back into readable Java, and open
- 18:41Speaker 2: them in a decompiler.
- 18:42Speaker 1: You just follow the breadcrumbs from the manifest directly into
- 18:45Speaker 1: the code to uncover the smoking gun. It is a literal,
- 18:49Speaker 1: step by step roadmap for tearing apart malicious software. It
- 18:52Speaker 1: really is, which brings us to a final review exercise
- 18:55Speaker 1: for you, the listener. Let's test what you've learned today
- 18:58Speaker 1: with a really quick scenario.
- 19:00Speaker 2: All right, imagine you are performing basic static analysis on
- 19:03Speaker 2: a simple everyday flashlight application. You decode the APK, you
- 19:08Speaker 2: open the Android manifest file, and you scroll down to
- 19:11Speaker 2: the permission section. Okay, based on the philosophy we discussed today,
- 19:15Speaker 2: what is one specific permission that should immediately make you
- 19:19Speaker 2: sound the alarm?
- 19:21Speaker 1: Think about the context of the app. If you said
- 19:24Speaker 1: the ability to read or send SMS messages, or access
- 19:28Speaker 1: your microphone or read your context, you are spot on.
- 19:31Speaker 2: Absolutely.
- 19:31Speaker 1: A flashlight just needs access to the camera, flash hardware,
- 19:34Speaker 1: and like maybe a basic waylock to keep the screen on.
- 19:38Speaker 1: Anything beyond that is a massive indicator of compromise.
- 19:41Speaker 2: If you caught that, you are officially thinking like a
- 19:43Speaker 2: reverse engineer. Awesome, but you know we can't let you
- 19:46Speaker 2: leave without a broader concept to chew on. Today we
- 19:50Speaker 2: saw how incredibly effective static analysis is when the code
- 19:53Speaker 2: is cleanly translated and readable.
- 19:55Speaker 1: Right. I mean, we literally found the SMIMS receiver class
- 19:57Speaker 1: because it was conveniently named SMIMS receiver exactly.
- 20:01Speaker 2: But the malware authors know we have these decompilation tools.
- 20:04Speaker 2: They know we are reading their blueprints.
- 20:06Speaker 1: So what happens when the attackers intentionally scramble their code?
- 20:10Speaker 2: Right? What happens when they use obfuscation techniques, so that
- 20:14Speaker 2: when you decompile the app, instead of seeing clearly named
- 20:18Speaker 2: variables and logical flow, you just see meaningless, randomly generated
- 20:23Speaker 2: characters that look like complete gibberish.
- 20:26Speaker 1: Oh wow, so the blueprint is essentially blurt out. You
- 20:29Speaker 1: can't trace the logic because the words just don't make
- 20:32Speaker 1: sense anymore.
- 20:32Speaker 2: That is precisely where basic static analysis hits a brick wall.
- 20:37Speaker 2: And when that happens, how do you figure out what
- 20:39Speaker 2: the app does? If you can't read this chematic That
- 20:41Speaker 2: sounds like a nightmare. It is, and that is where
- 20:44Speaker 2: analysts are forced to pivot into dynamic analysis. You have
- 20:48Speaker 2: to create a heavily armored, isolated environment and actually execute
- 20:52Speaker 2: the malware to see what happens when it runs.
- 20:53Speaker 1: You essentially have to let the malicious app wake up
- 20:56Speaker 1: and start acting out its programming just so you can
- 20:58Speaker 1: observe its behavior in real time.
- 21:00Speaker 2: Exactly. It's a completely different ballgame, man.
- 21:02Speaker 1: It's a fascinating escalation in the cat and mouse game
- 21:05Speaker 1: of cybersecurity well, keep your eyes open, check the permissions
- 21:09Speaker 1: on your own device, and never ever trust a simple
- 21:11Speaker 1: widget that demands to read your private messages.