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
- Leonardo da Vincis incredible studies of human anatomy still dont get the recognition they deserve - The Conversation - February 3rd, 2025 [February 3rd, 2025]
- The anatomy of a transfer as told by those who make a deal happen - The Athletic - The Athletic - February 3rd, 2025 [February 3rd, 2025]
- Nvidia plunge on DeepSeek news illustrates the anatomy of a bubble bursting - Axios - February 3rd, 2025 [February 3rd, 2025]
- How Sarah Drew Turned Her 'Grey's Anatomy' Firing Into a Teachable Moment for Her Kids (Exclusive) - Entertainment Tonight - February 3rd, 2025 [February 3rd, 2025]
- Anatomy of a retraction: When cleaning up the literature takes six years - Retraction Watch - February 3rd, 2025 [February 3rd, 2025]
- 2024s Most-Streamed Series Revealed: Bluey, Greys Anatomy, Family Guy and More - Variety - February 3rd, 2025 [February 3rd, 2025]
- Sarah Drew Explains How Her Son Micah, 13, Helped Her Get Over the 'Pain' of Leaving Grey's Anatomy - PEOPLE - February 3rd, 2025 [February 3rd, 2025]
- Who is Henry in Grey's Anatomy? - Soap Central - February 3rd, 2025 [February 3rd, 2025]
- Who is the Director of Grey's Anatomy? - Soap Central - February 3rd, 2025 [February 3rd, 2025]
- Is Grey's Anatomy over? - Soap Central - February 3rd, 2025 [February 3rd, 2025]
- Grey's Anatomy Beaten by Beloved Animated Series as 2024's Most-Streamed TV Show - CBR - February 3rd, 2025 [February 3rd, 2025]
- Here's When Grey's Anatomy Will Return In 2025 (Confirmed) - The Direct - January 23rd, 2025 [January 23rd, 2025]
- 10 Greys Anatomy Episodes to Revisit While We Wait for Season 21 to Return - Shondaland.com - January 23rd, 2025 [January 23rd, 2025]
- Charlies Beat: Learning the Anatomy of a Song - Madison Courier - January 23rd, 2025 [January 23rd, 2025]
- Anatomy of a Thriller: The Story of UMass 3OT Win Over Fordham - A10Talk - January 23rd, 2025 [January 23rd, 2025]
- Anatomy of a Wrestler: What Makes J'den Cox a Powerhouse on the Matt? - Olympics - January 23rd, 2025 [January 23rd, 2025]
- Former Grey's Anatomy writer Elisabeth Finch, who faked cancer, slammed for soliciting donations during L.A. fires - Entertainment Weekly News - January 23rd, 2025 [January 23rd, 2025]
- Bitwig Connect 4/12, audio/MIDI interface makes a bridge between software and external gear - Synth Anatomy - January 23rd, 2025 [January 23rd, 2025]
- Anatomy of a fall: How Bangladesh's local government was left crippled - The Business Standard - January 23rd, 2025 [January 23rd, 2025]
- Meredith's Grey's Anatomy Season 21 Dilemma Exposed 1 Original Character's Overlooked Flaw - Screen Rant - January 23rd, 2025 [January 23rd, 2025]
- KV331 Audio Synthmaster 3, new update 3.1.1 with drum part layer and more for NAMM 2025 - Synth Anatomy - January 23rd, 2025 [January 23rd, 2025]
- Greys Anatomy writer who faked cancer accused of new scam - NJ.com - January 23rd, 2025 [January 23rd, 2025]
- Former Grey's Anatomy writer slammed for soliciting donations during LA fires - Daily Express US - January 23rd, 2025 [January 23rd, 2025]
- Melbourne Instruments will showcase a motorized MIDI controller at NAMM 2025 - Synth Anatomy - January 23rd, 2025 [January 23rd, 2025]
- Achieve 17/20 On This Anatomy Quiz And Prove You're No Skeletal Simpleton - BuzzFeed - January 1st, 2025 [January 1st, 2025]
- Insane MRI images: How one couple redefined anatomy with science - New Zealand Herald - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy Season 21 Bringing Back 1 Forgotten Doctor Can Give A Proper Ending To An Unfair Plot - Screen Rant - January 1st, 2025 [January 1st, 2025]
- ABC's Big Thursday Night Change Hasn't Been Good For Grey's Anatomy, So What Does The Ratings Dip Mean For 2025? - CinemaBlend - January 1st, 2025 [January 1st, 2025]
- The complex anatomy of the bronchial arteries: a meta-analysis with potential implications for thoracic surgery and hemoptysis treatment - Nature.com - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy Is Throwing Back To Derek And Meredith's First Meeting To Celebrate The New Year, And I'm McDreaming Of How It All Began - CinemaBlend - January 1st, 2025 [January 1st, 2025]
- Jim Harbaugh provides anatomy lesson during preview of cold-weather New England game - Awful Announcing - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy Season 21 Nailed The Darkest Reality Of Working At Grey Sloan - Screen Rant - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy Is 1 Step Closer to Landing an Owen Hunt Replacement Thanks to a Star Who Left the Show 7 Years Ago - CBR - January 1st, 2025 [January 1st, 2025]
- 'Grey's Anatomy' Stars Share Mystery Drone Theories - Newsweek - January 1st, 2025 [January 1st, 2025]
- Yasuda's Grey's Anatomy Ending Revealed Just How Badly The Show Has Wasted 1 Major Character Return - Screen Rant - January 1st, 2025 [January 1st, 2025]
- The anatomy of a scoring run for the ages - Peachtree Hoops - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy's Biggest 2024 Exit Is The Worst I've Felt Since George's Death 15 Year Ago - Screen Rant - January 1st, 2025 [January 1st, 2025]
- 'Grey's Anatomy' Star Jesse Williams And His Ex-Wife Ordered To Mediate Their Custody Battle - Yahoo Entertainment - January 1st, 2025 [January 1st, 2025]
- Grey's Anatomy Star Addresses Potential Return Future After Quietly Exiting The Series 7 Years Ago - Screen Rant - December 23rd, 2024 [December 23rd, 2024]
- Martin Henderson Would Return To Greys Anatomy If There Is Really Clear Plan For Nathan - Deadline - December 23rd, 2024 [December 23rd, 2024]
- Anatomy of the Bank Runs in March 2023 - Liberty Street Economics - - December 23rd, 2024 [December 23rd, 2024]
- The Room Next Door | Anatomy of a Scene - The New York Times - December 23rd, 2024 [December 23rd, 2024]
- Greys Anatomy Star Adelaide Kane on Jules Heartbreak, Breaking Down Her Icy Exterior, and Whats to Come for the Rest of the Season - Shondaland.com - December 23rd, 2024 [December 23rd, 2024]
- 'Grey's Anatomy' Star Reveals Show Storyline That 'Stuck With' Her - Newsweek - December 23rd, 2024 [December 23rd, 2024]
- Greys Anatomy Cast Changes Amid Mid-Season Finale Revealed: 3 Actors Left the Show, But Multiple Stars Recently Joined! - Just Jared - December 23rd, 2024 [December 23rd, 2024]
- Anatomy Raises $19 Million Series A to Scale Their AI Healthcare Lockbox - Business Wire - December 23rd, 2024 [December 23rd, 2024]
- Virgin River Star Martin Henderson Is Open to Returning to Greys Anatomy - TV Insider - December 23rd, 2024 [December 23rd, 2024]
- Katherine Heigl handles unfiltered anatomy talk with Poise - Campaign US - December 23rd, 2024 [December 23rd, 2024]
- 'Grey's Anatomy' Star Reveals Surprising 'Rule' on Set - Newsweek - December 23rd, 2024 [December 23rd, 2024]
- Katherine Heigl references 'Grey's Anatomy' in new ad for taboo product - Newsweek - December 23rd, 2024 [December 23rd, 2024]
- Katherine Heigl cracks Greys Anatomy joke in bladder leak ad: I used to be a doctor - New York Post - December 23rd, 2024 [December 23rd, 2024]
- Virgin River Star Martin Henderson Is Open to Returning to Greys Anatomy - Black Hills Pioneer - December 23rd, 2024 [December 23rd, 2024]
- FBI recordings show the anatomy of an alleged Chinatown corruption scheme - WBEZ Chicago - December 23rd, 2024 [December 23rd, 2024]
- Anatomy of a comeback: Arkansas State rallies from 25 down to beat UAB - KSL.com - December 23rd, 2024 [December 23rd, 2024]
- Anatomy of a comeback: Arkansas State rallies from 25 down to beat UAB - News-Herald.com - December 23rd, 2024 [December 23rd, 2024]
- Virgin River Star Martin Henderson Is Open to Returning to Greys Anatomy - News-Daily.com - December 23rd, 2024 [December 23rd, 2024]
- What Happened with ISU and Bannock County Lab Money? Anatomy of a Malfeasance? - Idaho Freedom - November 28th, 2024 [November 28th, 2024]
- Midori Francis On Her Greys Anatomy Exit, The Scene That Made Her Break Character & If She Would Come Back - Deadline - November 28th, 2024 [November 28th, 2024]
- Grey's Anatomy star Kevin McKidd praises co-stars and crew for their support after the death of his father - Daily Mail - November 28th, 2024 [November 28th, 2024]
- The Ineffable Beauty of Grief on Greys Anatomy - Shondaland.com - November 28th, 2024 [November 28th, 2024]
- Mika's Emotional Grey's Anatomy Exit & Potential Future Addressed By Star" "For Mika, It Would Be Triggering" - Screen Rant - November 28th, 2024 [November 28th, 2024]
- Greys Anatomy Says a Heartbreaking Goodbye to Yasuda but Who Got Shot? - TheWrap - November 28th, 2024 [November 28th, 2024]
- The anatomy of a college football rivalry: What makes a heated feud? - FanSided - November 28th, 2024 [November 28th, 2024]
- Greys Anatomy Recap: Stayin Alive - Vulture - November 28th, 2024 [November 28th, 2024]
- 'Grey's Anatomy': Sophia Bush Returns, a Big Loss Brings New Perspective and 1 Doctor's Life Hangs in the Balance - PEOPLE - November 28th, 2024 [November 28th, 2024]
- Functional anatomy of the subthalamic nucleus and the pathophysiology of cardinal features of Parkinsons disease unraveled by focused ultrasound... - November 28th, 2024 [November 28th, 2024]
- Grey's Anatomy: Sophia Bush Returns, a Big Loss Brings New Perspective and 1 Doctor's Life Hangs in the Balance - Yahoo Entertainment - November 28th, 2024 [November 28th, 2024]
- Your Official Greys Anatomy Recap: The Mid-Season Finale! - Shondaland.com - November 28th, 2024 [November 28th, 2024]
- What Happened To Mika In Grey's Anatomy Season 21, Episode 8? Midori Francis's Exit Explained - Screen Rant - November 28th, 2024 [November 28th, 2024]
- On Set: Greys Anatomy Stars Share a Moment Theyll Never Forget - Shondaland.com - November 28th, 2024 [November 28th, 2024]
- Revealing the larval anatomy of the hoverfly Sphaerophoria rueppellii (Wiedemann, 1820) (Diptera, Syrphidae) using micro-computed tomography -... - November 28th, 2024 [November 28th, 2024]
- Jessica Capshaw and Camilla Luddington on worst 'Grey's Anatomy' guest star: 'Yelled at everyone' - Yahoo Entertainment - November 28th, 2024 [November 28th, 2024]
- Anatomy of the Browns final defensive stop in win over Steelers - cleveland.com - November 28th, 2024 [November 28th, 2024]
- Best Medical TV Shows of All Time: ER, Greys Anatomy and More - Us Weekly - November 28th, 2024 [November 28th, 2024]
- Midori Francis Would Be Delighted To Return to Greys Anatomy but For Mika Itd Be Triggering - www.autostraddle.com - November 28th, 2024 [November 28th, 2024]
- 'Grey's Anatomy' Star Says Writing for Show Was 'Bad Idea''Fit of Anxiety' - Newsweek - November 28th, 2024 [November 28th, 2024]
- This Greys Anatomy Teaser Might Have Accidentally Confirmed A Key Characters Fate - Bustle - November 28th, 2024 [November 28th, 2024]
- 'It Would Be Triggering': Grey's Anatomy Star Opens Up on Series Exit and Potential Return - CBR - November 28th, 2024 [November 28th, 2024]
- Evaluating Text-to-Image Generated Photorealistic Images of Human Anatomy - Cureus - November 28th, 2024 [November 28th, 2024]
- Ruling party lawmaker proposes a bill to address shortage of cadavers, anatomy teachers - KBR - November 28th, 2024 [November 28th, 2024]