Recently at EFFs Threat Lab, weve been focusing a lot on the Android malware ecosystem and providing tools for its analysis. Weve noticed lot of samples of Android malware in the tor-hydra family have surfaced, masquerading as banking apps to lure unsuspecting customers into installing them. In this post, we will take an example of one such sample and analyze it using open-source tools available to anyone.
The sample well be looking at was first seen on March 1st, 2022. This particular malware presents itself as the banking app for BAWAG, a prominent financial institution in Austria. Upon first run, the app prompts the user to give accessibility services permission to the app. The accessibility services permission grants an app broad access to read the screen and mimic user interaction. Upon granting the permission, the app backgrounds itself. Any attempt by the user to uninstall the app is prevented by the app interrupting and closing the uninstall dialogues. Attempting to open the app again also failsnothing happens.
The Android app manifest file contains a list of permissions, activities, and services that an app provides. If an activity is not listed in the app manifest, the app cant launch that activity. Using an Android static analysis tool like jadx or apktool we can take a look at the manifest XML. The malware apps manifest asks for a wide range of permissions, including the ability to read and send SMS messages (a common way for malware to propagate), request installation and deletion of packages, read contacts, initiate calls, and request the aforementioned accessibility service. In addition, a number of classes are referenced which are not defined anywhere in our jadx-reversed code:
The fact that the manifest references activities, services and receivers it wants to be run without defining them is the first indication that we are dealing with an Android dropper.
An Android dropper is malware which obfuscates its behavior by hiding its payload and only decoding and loading the code it needs at runtime. As Ahmet Bilal Can explains, this makes it harder for AV and security researchers to detect the malware by including reflection, obfuscation, code-flow flattening and trash codes to make [the] unpacking process stealthy. While stealthy, the steps the malware takes to hide itself can still be detected and subverted with a little help from the dynamic instrumentation toolkit Frida. Frida is able to inject itself into the control-flow of a running app, introducing its own code. This can be helpful to detect typical methods malware uses to disguise itself and load the underlying payload. In this case, we can use a short script to detect that Java classes are being loaded dynamically:
Running this code, we get
Our missing classes are indeed being loaded dynamically!
Previous iterations of tor-hydra malware dynamically loaded a dex file (an Android Dalvik executable file), which could be seen with adb logcat, and used the syscall unlink to delete that file, which would be seen in an strace call. For this app, we can use the command
to see the syscalls in real time. We did not observe unlink being used in this sample, so this iteration was doing something different. Java provides a method in java.io.File called delete, which will not trigger the unlink syscall. Using this script, we can detect when that method is used, alert us of the file it attempted to delete, and make it a non-operation:
The first few files deleted are of interest:
Once we issue an adb pull to download the base.apk.gjGyTF81.88g file from the device, we can use jadx again to determine that this includes the missing class definitions referenced in the manifest.
Looking into these files, there is a string obfuscation method that appears thousands of times throughout the code, unaltered from instance to instance:
Wherever we see a call which looks like $(166, 217, 28670) in the code, it refers to this function and uses the $ variable in the same scope to return a string. We can use a Java sandbox like this one to define the locally-scoped $ variable, the $ method, and print out the decoded string.
In sources/com/ombththz/ufqsuqx/bot/network/TorConnectionHelper.java we see a method which looks like a promising lead called loadAdminUrl. Decoding the $(556, 664, 4277) call, we get a base64-encoded onion address:
This address is available over the Tor network, and contains a base64-encoded URL which references the command and control (C&C) server, the server from which the malware operator issues commands. The author of this post reached out to the Tor Project on March 7th informing them of this C&C server. On app bootstrap, the Tor network is connected to by code lifted from Orbot in order to discover the C&C server, and then the Tor connection is promptly dropped. When first doing this investigation, the domain referenced yuuzzlllaa.xyz, but this has since changed to zhgggga.in. We can see a login page for the C&C server administrator when accessed:
One of the main features of the Tor network is censorship-resistance. If you can access the Tor network, you can access information and websites that cannot easily be taken down because of the way the network is architected. This is a good thing for dissidents in censorship regimes or whistleblowers trying to get privileged information to reporters: the services they rely on will be available even if their adversaries dont want them to be. This is a double-sided coin, thoughin this case malware is also able to direct victims devices to C&C servers in a way that cant be taken down. There is no way to have one without the other and keep the integrity of the network intact. In this case, the clearnet domain yuuzzlllaa.xyz was presumably taken down after being reported and then the malware operator spun up another domain at zhgggga.in without much interruption of the malware command and control. In these cases, reporting malicious C&C domains seems like a game of whack-a-mole: as soon as you take one down, the next pops up.
In the file com/ombththz/ufqsuqx/bot/DexTools.java we see an interesting method, run(), which loads a stage-2 payload from the admin C&C url path /payload. This is a dex file which can be decoded by jadx to an app ID of com.fbdevs.payload. Unfortunately for the sake of our analysis, this file contains mostly uninteresting and non-malicious code.
Looking at the om/ombththz/ufqsuqx/bot/components/ path, many of the components seem to be inherited directly from the Android BianLian malware, an excellent analysis of which can be found here. One of the components not included in this previous iteration is under the socks5 path, which opens a proxy server to a specified host in order to receive commands and launch attacks. All the components are activated and controlled by the C&C server through a Firebase Cloud Messaging (FCM) connection, allowing messages targeting specific devices.
Despite relatively state-of-the-art techniques employed to thwart analysis, a few powerful publicly accessible open-source tools were used to interrupt the control flow and reverse engineer this sample. More complex malware will detect hardware profiles and be able to determine that it is being run in an emulator, and change its behavior to further hide its core functionality. Still others will deploy malicious code in deeper stage payloads in an attempt to further bury its true behavior. However, this sample shows how a few simple steps can be taken to peel those layers back to eventually discover the control flow of a new class of malware. Moving forward, other samples in this class can be analyzed in much the same way to track changes in the ecosystem and how malware developers are responding to attempts to mitigate their effectiveness.
Analyzing malware and tracing its evolution is important for fighting back against it. Not only does it result in better signatures for anti-virus software to use and protect users, it helps us understand what protections are necessary on the operating-system level and guides platform security recommendations. Sometimes, it can lead to C&C servers being shut down and the targets of the botnets gaining some much-needed reprieve. And lastly, it gives users insight into what software is running on their devices so they can take control back.
Read the original:
Anatomy of an Android Malware Dropper - EFF
- Greys Anatomy Star Jake Borelli on Levi Schmitts Exit and Almost Refusing His Coming Out Storyline: I Wasnt Ready to Talk About It on a Global Level -... - November 20th, 2024 [November 20th, 2024]
- All Of Grey's Anatomy's Chief Of Surgery, Ranked - Screen Rant - November 20th, 2024 [November 20th, 2024]
- Anatomy of a franchise-killing decision: The day the Giants chose Daniel Jones over Saquon Barkley - Yahoo Sports - November 20th, 2024 [November 20th, 2024]
- Greys Anatomy Star Jake Borelli Loved How Levis Inspiring Exit Unfolded in Season 21 - TheWrap - November 20th, 2024 [November 20th, 2024]
- The beauty of Greys Anatomy - The Central Trend - November 20th, 2024 [November 20th, 2024]
- Greys Anatomy: Jake Borelli Shares Thoughts on Returning to Medical Drama - PopCulture.com - November 20th, 2024 [November 20th, 2024]
- Jake Borelli Talks Greys Anatomy, Coming Out, and Stepping Away From His Iconic LGBTQ Role - GLAAD - November 20th, 2024 [November 20th, 2024]
- 'Grey's Anatomy': Mika's Fate Is Revealed, Schmitt Takes a Leap of Faith and Teddy Gets a Second Chance - PEOPLE - November 20th, 2024 [November 20th, 2024]
- The real story behind the Greys Anatomy scammer in Anatomy of Lies - Now To Love - November 20th, 2024 [November 20th, 2024]
- Anatomy of a Scam: Crypto Scams - AMAC Official Website - Join and Explore the Benefits - November 20th, 2024 [November 20th, 2024]
- Sophia Bush Teases Her Greys Anatomy Return, And I Cant Wait To See What It Means For Teddy And Owen - CinemaBlend - November 20th, 2024 [November 20th, 2024]
- The Sucker Punch on 'Grey's Anatomy' Had Nothing To Do with the Character Exit - Pajiba Entertainment News - November 20th, 2024 [November 20th, 2024]
- Jake Borelli Reveals Greys Anatomy Plot He Almost Refused to Film - Just Jared - November 20th, 2024 [November 20th, 2024]
- Greys Anatomy Sneak Peek: Mikas Colleagues Rally Around Her But Is It Already Too Late? (Exclusive) - TVLine - November 20th, 2024 [November 20th, 2024]
- 'Raising a Glass to Him': Departing Grey's Anatomy Actor Gets Heartfelt Farewell From Co-Star - CBR - November 20th, 2024 [November 20th, 2024]
- Anatomy of Lies on 7Bravo and 7plus new docuseries - TV Central - November 20th, 2024 [November 20th, 2024]
- Greys Anatomy Starts Schmitt & Yasuda Goodbyes With Expected Career Move & Shocking Twist - Deadline - November 12th, 2024 [November 12th, 2024]
- Sophia Bush on Kissing Kim Raver in Her 'Grey's Anatomy' Debut (Exclusive) - Entertainment Tonight - November 12th, 2024 [November 12th, 2024]
- Sophia Bush Kissed a Girl on Greys Anatomy and I Liked It - www.autostraddle.com - November 12th, 2024 [November 12th, 2024]
- Will Trent', The Rookie', 9-1-1', Grey's Anatomy', More Get Midseason Premiere Dates At ABC - MSN - November 12th, 2024 [November 12th, 2024]
- Mika's Car Crash Breaks A Grey's Anatomy Exit Trend For The Worse - Screen Rant - November 12th, 2024 [November 12th, 2024]
- 8 Major Life Lessons We Learned From Levi Schmitt of Greys Anatomy - Shondaland.com - November 12th, 2024 [November 12th, 2024]
- Anatomy of a Video Impression: Navigating Cross-Platform Ad Metrics - IAB - November 12th, 2024 [November 12th, 2024]
- Sophia Bushs Role on Greys Anatomy Revealed - Hollywood Reporter - November 12th, 2024 [November 12th, 2024]
- Greys Anatomy Sets the Stage for Schmitts Exit and Tragedy for Yasuda - TheWrap - November 12th, 2024 [November 12th, 2024]
- Why Oh, Mary! Has Broadway In Stitches: The Anatomy Of A Hit Comedy - Forbes - November 12th, 2024 [November 12th, 2024]
- Revisiting Mika Yasudas Powerful and All Too Real Burnout Storyline on Greys Anatomy - Shondaland.com - November 12th, 2024 [November 12th, 2024]
- Grey's Anatomy Recap: Sophia Bush's Cass Arrives, Kisses Teddy Altman - Us Weekly - November 12th, 2024 [November 12th, 2024]
- Will Trent, The Rookie, 9-1-1, Greys Anatomy, The Conners Final Season & More Get Midseason Premiere Dates At ABC - Deadline - November 12th, 2024 [November 12th, 2024]
- Greys Anatomy Is Back Tonight But the End is Near as Audience is Vanishing - Showbiz411 - November 12th, 2024 [November 12th, 2024]
- Why Owen Hunt's Sister Was Recast in Grey's Anatomy - CBR - November 12th, 2024 [November 12th, 2024]
- Anatomy of Building Environments in the 21st Century - Part 2 // Design with purpose and forethought - Buro Happold - November 12th, 2024 [November 12th, 2024]
- Greys Anatomy: Heres a First Look at Sophia Bushs New Character, Dr. Cass Beckman - Glamour - November 12th, 2024 [November 12th, 2024]
- Digital Anatomy Table Revolutionizes Learning for Physician Assistant Students - Rochester Institute of Technology - November 12th, 2024 [November 12th, 2024]
- Anatomy of three Trump elections: How Americans shifted in 2024 vs. 2020 and 2016 - CNN - November 12th, 2024 [November 12th, 2024]
- It Looks Like Those Greys Anatomy Exits Are Finally Happening, And That Big Cliffhanger Has Me Worried About Mika - CinemaBlend - November 12th, 2024 [November 12th, 2024]
- 'Grey's Anatomy' Alum Eric Dane, 51, Spotted on Dinner Outing With Aspiring Actress, 27 - Yahoo Entertainment - November 12th, 2024 [November 12th, 2024]
- Theater/Arts: Mira Costa shifts to the profound with Anatomy of Gray production - Daily Breeze - November 12th, 2024 [November 12th, 2024]
- Meredith Grey's Relationship History: A Complete Guide to the Grey's Anatomy Lead's Love Life From Season 1 to Now - PEOPLE - November 12th, 2024 [November 12th, 2024]
- This Dark Grey's Anatomy Theory Will Make You Question Everything About the Last 20 Seasons - CBR - November 12th, 2024 [November 12th, 2024]
- David Lynch Illustrating Anatomy of a Fall' Book - Jordan Ruimy - November 12th, 2024 [November 12th, 2024]
- The Scorecard: The Anatomy of a Swing State Harris vs. Trump - 1290 WJNO - November 12th, 2024 [November 12th, 2024]
- 'Grey's Anatomy' Star Kevin McKidd Announces the Death of His Father: 'Grateful for the Years of Love and Laughter' - PEOPLE - October 26th, 2024 [October 26th, 2024]
- Invisible anatomy in the fruit fly uterus: New discoveries could have implications for fertility and pest control - Phys.org - October 26th, 2024 [October 26th, 2024]
- Scott Speedman explains how he gets in trouble on Grey's Anatomy set - Digital Spy - October 26th, 2024 [October 26th, 2024]
- 'One Tree Hill' Fans Won't Believe Which Star Is Heading to 'Grey's Anatomy' Season 21 - Good Housekeeping - October 26th, 2024 [October 26th, 2024]
- Anatomy of Lies Duo on Greys Ex-Writer Elisabeth Finch: 'More to Story' - Hollywood Reporter - October 26th, 2024 [October 26th, 2024]
- Grey's Anatomy Just Confirmed Schmitt's Exit Storyline Can Be His Best Happily Ever After - Screen Rant - October 26th, 2024 [October 26th, 2024]
- The Anatomy and Aftermath of a PWHL Trade - The Hockey News - October 26th, 2024 [October 26th, 2024]
- Greys Anatomy Tackles Voter Responsibility in Last Episode Before 2024 Election - TheWrap - October 26th, 2024 [October 26th, 2024]
- 'Grey's Anatomy': Jo Snaps on Link When His Primary Concern About Expecting Twins Is Getting a Minivan (Exclusive) - PEOPLE - October 26th, 2024 [October 26th, 2024]
- Camilla Luddington Has One Wish For Her Greys Anatomy Pregnancy, And Im Not Sure I Agree - CinemaBlend - October 26th, 2024 [October 26th, 2024]
- How Vanessa Parise Brought the Classic Greys Anatomy Magic to the Screen - Shondaland.com - October 26th, 2024 [October 26th, 2024]
- Trump speech turns bizarre with praise for Arnold Palmers anatomy and profanity for Harris - Fortune - October 26th, 2024 [October 26th, 2024]
- Anatomy of a Bad Trip: On the Less-Than-Magical Side of Magic Mushrooms - Literary Hub - October 26th, 2024 [October 26th, 2024]
- Deconstructing Art: Anatomy of a Killer Clown - Hollywood Reporter - October 26th, 2024 [October 26th, 2024]
- Greys Anatomy actor Kevin McKidd is mourning death of his dad - Yahoo New Zealand News - October 26th, 2024 [October 26th, 2024]
- Jason George On Returning to 'Grey's Anatomy' and Memorable Moments On Screen - EBONY - October 26th, 2024 [October 26th, 2024]
- Sarah Drew Clears Up Her Viral 'Grey's Anatomy' Firing Comments - Us Weekly - October 26th, 2024 [October 26th, 2024]
- Is Patrick Dempsey Returning For Scream 7? Heres The Latest From The Greys Anatomy Alum - CinemaBlend - October 26th, 2024 [October 26th, 2024]
- Every Grey's Anatomy Doctor Who's Been Fired (& Why) - CBR - October 26th, 2024 [October 26th, 2024]
- Greys Anatomy Cast Shares Behind-The-Scenes Look on Set, Reflect on Shows 21-Year-Run & Impact on Fans - Hollywood Reporter - October 13th, 2024 [October 13th, 2024]
- Greys Anatomy Fans Are Both Angry And Hopeful After That Carina Name-Drop, And Im Conflicted About What It Could Mean - CinemaBlend - October 13th, 2024 [October 13th, 2024]
- Grey's Anatomy Season 21's Amelia Story Honored 1 Of Derek Shepherd's Best Case From 15 Years Ago - Screen Rant - October 13th, 2024 [October 13th, 2024]
- Grey's Anatomy's Jason George Teases Ben and Bailey's Big Hurdle - Us Weekly - October 13th, 2024 [October 13th, 2024]
- Greys Anatomy Season 21 Casts New Recurring Character, Connection To Main Character Revealed - Screen Rant - October 13th, 2024 [October 13th, 2024]
- Jason George Compares Grey's Anatomy Return to 'Coming Back to Your Parents' House' But with 'New Faces' (Exclusive) - PEOPLE - October 13th, 2024 [October 13th, 2024]
- Grey's Anatomy Season 21 Reveals How 1 Major Character Exit Will Happen (& It Follows A Horrible Trend) - Screen Rant - October 13th, 2024 [October 13th, 2024]
- 'Grey's Anatomy': Catherine's Secret Is Revealed, Meredith and Richard Face Off and Ben Stands Up for Himself - PEOPLE - October 13th, 2024 [October 13th, 2024]
- Review: 'Anatomy of Lies' Reveals the Depths of Elisabeth Finch, a Very Nasty Scammer - Pajiba Entertainment News - October 13th, 2024 [October 13th, 2024]
- 'Grey's Anatomy' recap: Catherine's life is on the line in a liver-centric episode - Entertainment Weekly News - October 13th, 2024 [October 13th, 2024]
- Greys Anatomy Season 21: Check out episode schedule, where to watch and cast - The Economic Times - October 13th, 2024 [October 13th, 2024]
- The anatomy of 3 videos alleging that many non-citizens are registered to vote in U.S. elections - UW Center for an Informed Public - October 13th, 2024 [October 13th, 2024]
- Out of the Line of Fire: Station 19 Star Jason George on Returning to Greys Anatomy - Shondaland.com - October 13th, 2024 [October 13th, 2024]
- The Anatomy of a Swing State Harris vs. Trump October 11th - 1290 WJNO - October 13th, 2024 [October 13th, 2024]
- Anatomy of a Recession: The case for economic reacceleration | Franklin Templeton - Beyond Bulls & Bears - October 13th, 2024 [October 13th, 2024]
- Greys Anatomy Round Table: Blues Pointless Arc, the Doomed Mika/Jules Ship & Problematic Catherine - Seithikkural - October 13th, 2024 [October 13th, 2024]
- Deceitful Love review: Grey's Anatomy hunk keeps everyone guessing in lusty age-gap mystery - RadioTimes - October 13th, 2024 [October 13th, 2024]
- Greys Anatomy Boss on More Ellen Pompeo and Pushing Boundaries in Season 21 - Hollywood Reporter - October 2nd, 2024 [October 2nd, 2024]
- Greys Anatomy Star Camilla Luddington on Sticking With the Show for 13 Seasons, Jos Pregnancy and Alex Choosing Izzie - Variety - October 2nd, 2024 [October 2nd, 2024]