How to Circumvent and Beat the Ransomware in Android Operating System—A Case Study of Locker.CB!tr
Abstract
:1. Introduction
- Our approach is to provide the ransomware mitigation solution once it hits the victim, while most of the works in this area deal with detection or prevention against ransomware.
- We provide a procedure for recovering the infected mobile device based on the analysis and impersonation of the communication between the ransomware instance of the terminal and its C&C server.
- We accomplish the reconstruction of the communication patterns and exchanged data formats between the ransomware instance and its C&C server.
- We provide a method to dynamically replace the IP address of the original C&C server with our own. This leads to impersonating the ransomware C&C server and gaining full control over the ransomware instance of the infected mobile device.
- We develop a C&C server implementation that may communicate with the ransomware instance and order it to decrypt the file system and unlock the terminal screen after a ransomware attack.
2. Defense from Ransomware: Analysis of Existing Solutions
2.1. Methods for Detecting Ransomware
2.2. Methods for Preventing Ransomware
2.3. Methods for Mitigating Ransomware
3. A method to Mitigate the Ransomware—The Case Study of Locker.CB!tr
3.1. Overview of Locker.CB!tr
3.2. Methodology and Materials
- Enjarify—a tool similar to “dex2jar”. It converts Dalvik bytecode to Java bytecode so that further analysis can be based on Java decompilers, e.g., CFR, Fernflower.
- Apktool—it is an open-source software that allows the conversion of application resources such as binary XML into plain text, as well as decompiling the executable code of the Dalvik machine into an intermediate format called smali.
- ByteCodeViewer—it is a multifunctional software that also serves as a decompiler, editor, and even debugger. The main advantage of this tool is the ability to divide the view of the decompiled class into many parts and use different decompilers on each part. It allows us to compare the performance and effectiveness of different decompilers and choose the best one in a given case. Currently supported decompilers are Procyon, CFR, JD-GUI, FernFlower, Krakatau, and JADX. Besides that, it also allows the display of the content of Smali files or Java bytecode.
- Frida—a set of tools for dynamic code manipulation that allows for injecting fragments of JavaScript code or own libraries into native applications on Windows, Mac OS, iOS, and Android. More specifically, this tool provides the ability to analyze the behavior of the program at runtime by injecting code into the target process.
3.3. Analysis of Locker.CB!tr Ransomware Operation
3.4. Details of Defeating Locker.CB!tr Ransomware
- name—a name of the device model (Android in the case shown in Figure 8);
- imei—International Mobile Equipment Identifier (with a value of 358240051111110 in the case shown in Figure 8);
- client_version—the number of client (ransomware) version (with a value of 1.03 in the case shown in Figure 8);
- id—an identifier of the device (with a value of 90f1efbc800cc949 in the case shown in Figure 8);
- android_version—the version of Android OS on the infected terminal (with a value of 5.0.2 in the case shown in Figure 8);
- phone_number—a telephone number of the terminal (with a value of +15555215554 encoded as %2B15555215554 in the case shown in Figure 8).
4. Testing and Discussing the Effectiveness of the Proposed Solution
4.1. Validation Tests
4.2. Effectiveness of the Proposed Solution
- The usage of asymmetric cryptographic key pairs generated on a C&C server side to encrypt the file system on the victim’s device: This is a good way to eliminate potential interference by an infected person or a security researcher who will try to decrypt the compromised files. Encryption with a locally stored public key is a good solution for the ransomware creator because a possible finding of the public key in the decompiled code does not impact the risk level of discovering the private key, which is necessary to decrypt the files. The only downside to this approach is that it requires an Internet connection. Otherwise, the private key needed to decrypt the files will not reach the infected device.
- The implementation of communication at the TCP socket layer instead of using HTTP protocol: HTTP protocol is standardized and commonly known, so the arrangement and methods of encoding the transferred elements are known, e.g., the way of transferring parameters in GET requests using application/x-www-form-urlencoded encoding. Therefore, after intercepting the communication between the ransomware and its C&C server, it is easier to analyze the captured HTTP messages and understand the format and data transfer methods, thus accessing the transferred content. In the case of data transfer via a pure TCP connection, a ransomware creator independently determines the format, the location, and the method of encoding the data. Additionally, they can use encryption for all these data except the TCP header. The essence of this approach is that it is very difficult to access the content of the intercepted messages because the method of locating individual elements and their encoding (i.e., the meaning of individual bytes and the determination of the size and boundaries of individual elements) is not generally known and must be discovered, which may significantly complicate countering ransomware attacks. Such protection does not prevent the reproduction of the communication pattern between the ransomware and its C&C server, but it makes it significantly more difficult.
- Encrypting the communication between the ransomware on the infected terminal and its C&C server: Instead of standard cryptographic protocols, one can consider the usage of one’s own encryption algorithm, e.g., the dynamic xor function of all incoming and outgoing bytes. The advantage of this solution would be the key changes over time after each use and the lack of knowledge of the algorithm itself, which would make it significantly more difficult to take control of the ransomware. If the communication was encrypted using standard cryptographic protocols, the static keys could be discovered by a security researcher after successfully decompiling the code. In addition to the decompilation, recovering dynamic keys requires recreating functions that change the dynamic key, and these could be well obfuscated.
- The use of obfuscation not only makes the decompilation process more difficult but also works against antiviruses that mostly rely on scanning known signatures.
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Acronyms
ADB | Android Debug Bridge |
AES | Advanced Encryption Standard |
API | Application Programming Interface |
APK | Android Package Kit |
AVD | Android Virtual Device |
C&C | Command and Control |
DGAs | Domain Generation Algorithms |
DEX | Dalvik Executable |
FSM | Finite State Machine |
HTTP | HyperText Transfer Protocol |
IDE | Integrated Development Environment |
JAR | Java ARchive |
JSON | JavaScript Object Notation |
MFA | Multi-Factor Authentication |
MIMEs | Multipurpose Internet Mail Extensions |
ML | Machine Learning |
OS | Operating System |
SBOM | Software Bill of Materials |
SD card | Secure Digital card |
SMS | Short Message Service |
TCP | Transmission Control Protocol |
URL | Uniform Resource Locator |
XML | Extended Markup Language |
References
- Richardson, R.; North, M. Ransomware: Evolution, mitigation and prevention. Int. Manag. Rev. 2017, 13, 10–21. [Google Scholar]
- Meland, P.H.; Bayoumy, Y.F.F.; Sindre, G. The Ransomware-as-a-Service economy within the darknet. Comput. Secur. 2020, 92, 101762. [Google Scholar] [CrossRef]
- Reshmi, T.R. Information security breaches due to ransomware attacks—A systematic literature review. Int. J. Inf. Manag. Data Insights 2021, 1, 100013. [Google Scholar] [CrossRef]
- Beaman, C.; Barkworth, A.; Akande, T.D.; Hakak, S.; Khan, M.K. Ransomware: Recent advances, analysis, challenges and future research directions. Comput. Secur. 2021, 111, 102490. [Google Scholar] [CrossRef] [PubMed]
- Taheri, L.; Kadir, A.F.A.; Lashkari, A.H. Extensible android malware detection and family classification using network-flows and API-calls. In Proceedings of the International Carnahan Conference on Security Technology, Chennai, India, 1–3 October 2019; pp. 1–8. [Google Scholar]
- Ko, J.; Jo, J.; Kim, D.; Choi, S.; Kwak, J. Real time android ransomware detection by analyzed android applications. In Proceedings of the International Conference on Electronics, Information, and Communication, Auckland, New Zealand, 22–25 January 2019; pp. 1–5. [Google Scholar]
- Andronio, N.; Zanero, S.; Maggi, F. HelDroid: Dissecting and detecting mobile ransomware. In Proceedings of the International Symposium on Recent Advances in Intrusion Detection, Kyoto, Japan, 2–4 November 2015; pp. 382–404. [Google Scholar]
- Abdullah, Z.; Muhadi, F.W.; Saudi, M.M.; Hamid, I.R.A.; Foozy, C.F.M. Android Ransomware Detection Based on Dynamic Obtained Features; Ghazali, R., Nawi, N., Deris, M., Abawajy, J., Eds.; Recent Advances on Soft Computing and Data Mining. SCDM 2020. Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2019; Volume 978. [Google Scholar] [CrossRef]
- Scalas, M.; Maiorca, D.; Mercaldo, F.; Visaggio, C.A.; Martinelli, F.; Giacinto, G. On the effectiveness of system API-related information for Android ransomware detection. Comput. Secur. 2019, 86, 168–182. [Google Scholar] [CrossRef]
- Mercaldo, F.; Nardone, V.; Santone, A.; Visaggio, C.A. Ransomware steals your phone. Formal methods rescue it. In Proceedings of the International Conference on Formal Techniques for Distributed Objects, Components, and Systems, Heraklion, Greece, 6–9 June 2016; pp. 212–221. [Google Scholar]
- Milner, R. Communication and Concurrency; PHI Series in Computer Science; Prentice Hall: Upper Saddle River, NJ, USA, 1989. [Google Scholar]
- Ramesh, G.; Menen, A. Automated dynamic approach for detecting ransomware using finite-state machine. Decis. Support Syst. 2020, 138, 113400. [Google Scholar] [CrossRef]
- Continella, A.; Guagnelli, A.; Zingaro, G.; De Pasquale, G.; Barenghi, A.; Zanero, S.; Maggi, F. ShieldFS: A self-healing, ransomware-aware filesystem. In Proceedings of the 32nd Annual Conference on Computer Security Applications (ACSAC ’16), Los Angeles, CA USA, 5–8 December 2016; Association for Computing Machinery: New York, NY, USA, 2016; pp. 336–347. [Google Scholar] [CrossRef]
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.antivirus (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.avast.android.mobilesecurity (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.bitdefender.security (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.symantec.mobilesecurity (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.trendmicro.tmmspersonal (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=ransomware.defender (accessed on 23 May 2024).
- Google Play. Available online: https://play.google.com/store/apps/details?id=com.checkpoint.zonealarm.mobilesecurity (accessed on 23 May 2024).
- Virustotal. Available online: https://www.virustotal.com (accessed on 18 May 2024).
- Kolodenker, E.; Koch, W.; Stringhini, G.; Egele, M. PayBreak: Defense against cryptographic ransomware. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, Abu Dhabi, United Arab Emirates, 2–6 April 2017; ACM: New York, NY, USA; pp. 599–611. [Google Scholar]
- Cabaj, K.; Mazurczyk, W. Using software-defined networking for ransomware mitigation: The case of cryptowall. IEEE Netw. 2016, 30, 14–20. [Google Scholar] [CrossRef]
- Suarez-Tangil, G.; Dash, S.K.; Ahmadi, M.; Kinder, J.; Giacinto, G.; Cavallaro, L. Droidsieve: Fast and accurate classification of obfuscated android malware. In Proceedings of the Seventh ACM on Conference on Data and Application Security and Privacy, Scottsdale, AZ, USA, 22–24 March 2017; ACM: New York, NY, USA, 2017; pp. 309–320. [Google Scholar]
- Fayi, S.Y. What Petya/NotPetya ransomware is and what its remidiations are. In Information Technology-New Generations; Springer: Cham, Switzerland, 2018; pp. 93–100. [Google Scholar]
- Caviglione, L. Trends and challenges in network covert channels countermeasures. Appl. Sci. 2021, 11, 1641. [Google Scholar] [CrossRef]
- Shah, A.; Rathod, D.M.; Mehta, Y. A comparative study of Covert Channel attacks in Android with different parameters and detection tools. Int. J. Electron. Secur. Digit. Forensics 2024, 16, 304–316. [Google Scholar] [CrossRef]
- Hafiz, N.; Briliyant, O.; Priambodo, D.; Hasbi, M.; Siswanti, S. Remote Penetration Testing with Telegram Bot. J. RESTI (Rekayasa Sist. dan Teknol. Informasi) 2023, 7, 705–714. [Google Scholar] [CrossRef]
- Yuste, J.; Pastrana, S. Avaddon ransomware: An in-depth analysis and decryption of infected systems. Comput. Secur. 2021, 109, 102388. [Google Scholar] [CrossRef]
- Bajpai, P.; Enbody, R. Attacking Key Management in Ransomware. IT Prof. 2020, 22, 21–27. [Google Scholar] [CrossRef]
- Kim, G.; Kang, S.; Baek, S.; Kim, K.; Kim, J. A Method for Decrypting Data Infected with Rhysida Ransomware. arXiv 2024, arXiv:2402.06440. [Google Scholar] [CrossRef]
- Martín, A.; Hernandez-Castro, J.; Camacho, D. An in-depth study of the jisut family of Android ransomware. IEEE Access 2018, 6, 57205–57218. [Google Scholar] [CrossRef]
- Fraud Risk Suite—ThreatFabric. Available online: https://www.threatfabric.com/blogs/blackrock_the_trojan_that_wanted_to_get_them_all (accessed on 23 May 2024).
- BleepingComputer: Cybersecurity, Technology News and Support. Available online: https://www.bleepingcomputer.com/news/security/android-malware-escobar-steals-your-google-authenticator-mfa-codes/ (accessed on 23 May 2024).
- Fraud Risk Suite—ThreatFabric. Available online: https://www.threatfabric.com/blogs/sova-new-trojan-with-fowl-intentions (accessed on 23 May 2024).
- Cleafy: Online Fraud Management and Prevention Solution. Available online: https://www.cleafy.com/cleafy-labs/nexus-a-new-android-botnet (accessed on 23 May 2024).
- Kharraz, A.; Robertson, W.; Balzarotti, D.; Bilge, L.; Kirda, E. Cutting the gordian knot: A look under the hood of ransomware attacks. In Proceedings of the International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment, Milan, Italy, 9–10 July 2015; Springer: Berlin/Heidelberg, Germany, 2015; pp. 3–24. [Google Scholar]
- Threat Encyclopedia. Available online: https://www.fortiguard.com/encyclopedia/virus/6733993 (accessed on 27 April 2024).
- Oz, H.; Aris, A.; Levi, A.; Uluagac, S. A Survey on Ransomware: Evolution, Taxonomy, and Defense Solutions. ACM Comput. Surv. 2022, 54, 1–37. [Google Scholar] [CrossRef]
- Aresu, M.; Ariu, D.; Ahmadi, M.; Maiorca, D.; Giacinto, G. Clustering android malware families by http traffic. In Proceedings of the 2015 10th International Conference on Malicious and Unwanted Software (MALWARE), Fajardo, PR, USA, 20–22 October 2015; pp. 128–135. [Google Scholar] [CrossRef]
- Android Developers. Available online: https://developer.android.com/studio/command-line/adb (accessed on 27 April 2024).
- Fan, W.; Zhao, L.; Wang, J.; Chen, Y.; Wu, F.; Liu, Y. FamDroid: Learning-Based Android Malware Family Classification Using Static Analysis. arXiv 2021, arXiv:2101.03965. [Google Scholar] [CrossRef]
- Lim, B. Android Tapjacking Vulnerability. arXiv 2015, arXiv:1507.08694. [Google Scholar] [CrossRef]
- Gómez Hernández, J.A.; García Teodoro, P.; Magán Carrión, R.; Rodríguez Gómez, R. Crypto-Ransomware: A Revision of the State of the Art, Advances and Challenges. Electronics 2023, 12, 4494. [Google Scholar] [CrossRef]
- McIntosh, T.; Kayes, A.S.M.; Chen, Y.P.P.; Ng, A.; Watters, P. Ransomware Mitigation in the Modern Era: A Comprehensive Review, Research Challenges, and Future Directions. ACM Comput. Surv. 2021, 54, 1–36. [Google Scholar] [CrossRef]
Specific URL Element | Name of Implementing Class | Meaning |
---|---|---|
/eaction/ | CommandConfirmRequest | Confirmation of the previous command completion |
/gac/ | CommandRequest | Request for the next command |
/sc/ | ContactsRequest | List of contacts read from the infected terminal |
/pha/ | DeviceDataRequest | Information about the infected terminal |
/cpm/ | PaymentRequest | Information about the payment (ransom) |
/scs/ | ReceivedSmsRequest | Information about the SMS captured at the infected terminal (content and delivery information) |
/ssms/ | SmsRequest | List of SMSes read from the infected terminal |
/gfsf/ | SmsToSendRequest | Request for data to send an SMS from the infected terminal (SMS destination address and content) |
/gt | UserAddressRequest | Request for information about the country, city, and IP address of the infected terminal |
/logsms/ | SuccessCountRequest | Information about the number of SMSes successfully sent from the infected terminal |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Drabent, K.; Janowski, R.; Mongay Batalla, J. How to Circumvent and Beat the Ransomware in Android Operating System—A Case Study of Locker.CB!tr. Electronics 2024, 13, 2212. https://doi.org/10.3390/electronics13112212
Drabent K, Janowski R, Mongay Batalla J. How to Circumvent and Beat the Ransomware in Android Operating System—A Case Study of Locker.CB!tr. Electronics. 2024; 13(11):2212. https://doi.org/10.3390/electronics13112212
Chicago/Turabian StyleDrabent, Kornel, Robert Janowski, and Jordi Mongay Batalla. 2024. "How to Circumvent and Beat the Ransomware in Android Operating System—A Case Study of Locker.CB!tr" Electronics 13, no. 11: 2212. https://doi.org/10.3390/electronics13112212
APA StyleDrabent, K., Janowski, R., & Mongay Batalla, J. (2024). How to Circumvent and Beat the Ransomware in Android Operating System—A Case Study of Locker.CB!tr. Electronics, 13(11), 2212. https://doi.org/10.3390/electronics13112212