Next Article in Journal
VAT-SNet: A Convolutional Music-Separation Network Based on Vocal and Accompaniment Time-Domain Features
Previous Article in Journal
DL-MDF-OH2: Optimized Deep Learning-Based Monkeypox Diagnostic Framework Using the Metaheuristic Harris Hawks Optimizer Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Towards Obfuscation Resilient Feature Design for Android Malware Detection-KTSODroid

Department of Computer Science, Bahria University, Islamabad 44000, Pakistan
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(24), 4079; https://doi.org/10.3390/electronics11244079
Submission received: 31 October 2022 / Revised: 18 November 2022 / Accepted: 21 November 2022 / Published: 8 December 2022

Abstract

:
The widespread use of obfuscation techniques in malware creation is a challenging problem for detection systems. Obfuscation is also being applied in applications of an Android platform for changing the signature of known applications and hiding the semantics of suspicious new applications. Obfuscation significantly affects static analysis schemes as the structure of the application is not a true representative of its behavior or is totally incomprehensible in case of encryption. The design of obfuscation independent schemes for malware detection and categorization is a critical task in designing malware detection schemes. The focus of this study is to find and evaluate features that are representative of the application’s behavior as well as independent of most obfuscation techniques. It has been found that memory-based features extracted from kernel task structure contain much information about the working of the application and are not affected by obfuscation schemes as they model the run time behavior of the application. In this study, an application’s profile is generated from the kernel task structure of the process in memory. All extracted features of the kernel task structure are thoroughly analyzed for their significance in classification. The proposed system is then tested for different obfuscation schemes in order to determine the effectiveness against malicious obfuscated applications. The results reveal that the proposed solution is able to detect the obfuscated malicious applications accurately.

1. Introduction

Recent advances in mobile technologies have revolutionized the smart phone industry. The ability of smart phones to process powerful applications have made them the preference of users over laptops and desktops. Consequently, the number of smart phone users are increasing at a very fast pace. Six billion smart phone subscribers were reported in July 2021 (https://www.statista.com/statistics/330695/number-of-smartphone-users-worldwide/, accessed on 25 October 2022). The key to the revolution of the smart phone industry lies greatly in the development of modern and efficient operating systems. Various operating systems have been developed over the years such as Android, Symbian, Apple iOS, Blackberry OS, Windows OS, etc. Among these, Android by Google is the most popular one. Android holds a large share of 72.8 percent in the smart phone industry (https://gs.statcounter.com/os-market-share/mobile/worldwide, accessed on 25 October 2022). The wide scale usage of Android has made the application developers create a large number of applications for the platform. These applications are available on the official Google Play store and other third party stores. These applications benefit the users in their daily routine tasks and are also a source of entertainment. However, malicious program developers take advantage of the high popularity and usage of the Android platform and have developed a significantly large number of applications with malicious functions. The app stores contain many applications that have been characterized as Adware, Trojans, Spyware, and Ransomware by anti virus engines [1]. Initially, malware mitigation systems worked by generating signatures of known malicious applications. However, signature-based schemes require human expertise and manual update of signature data bases [2]. To overcome this problem, machine learning based schemes are being used for generating behavior patterns of applications [3,4,5]. In these schemes, an application is analyzed and features related to malicious activity are inspected. A classification system is later trained for these features and a new application is predicted by using them.
The performance of machine learning based schemes is highly dependent on the nature of features selected for analysis [6]. In case of malware detection, two kinds of features can be used for analysis; static and dynamic. Static features are extracted by analyzing the structure of an application without executing it [7], whereas dynamic features are extracted by running the application in a controlled environment and recording features that represent the run time activity of the applications. In order to deceive the machine learning schemes based on static features, malware developers use obfuscation techniques [8]. Obfuscation refers to changing the structure of the code in a way so that the original semantics are camouflaged [9]. Many obfuscations techniques are available, which perform applications structure transformation in order to change the signature or conceal the malicious behavior. Common obfuscation schemes include Class Encryption, String Encryption, Reflection, Control Flow Modifications, and Junk Code Insertions [10].
A noticeable rise in the usage of obfuscation techniques for malware generation has been observed recently [11]. Owing to the rise in the usage of obfuscation in malware generation, the design of obfuscation resilient solutions for malicious application detection is inevitable. Dynamic analysis schemes are more robust in handling the obfuscation effects as they can capture the run time activity [12]. Regarding the different ways of dynamic analysis, memory-based solutions have gained significant popularity due to their ability to model the masked behavior of applications [13,14,15]. This study proposes a memory-based scheme for Android malware detection. The proposed scheme is a dynamic analysis technique that runs the application in a sandbox environment and captures the kernel task structure for the application under analysis. A kernel task structure is generated for each running process by the Android operating system and contains important information related to the running application. The information includes memory management details, process credentials handling, files access information, and scheduling information. Formally, the information in the kernel task structure can be divided into nine categories, namely; task_state, mem_info, scheduling_info, signal_info, process_credentials, I/O_statistics, openfile_info, CPU_specific_state, and others. The proposed system parses these nine categories of Kernel task structure for extraction of the features. All categories are thoroughly analyzed for their significance in malware detection, and the set of the most significant features is reported. Our work is unique as it is the first work to examine the features present in nine categories of kernel task structure for their significance in Android malware detection. Additionally, the final feature set is tested against four obfuscation schemes in order to evaluate the resilience of the system against obfuscation. It has been found that the run time analysis of applications from the kernel task structure of memory helps to generate a behavior profile, which is independent of the changes made in the application by using obfuscation. Overall, the contributions of the study are listed below:
  • An obfuscation resilient feature set for Android malware categorization is proposed;
  • The Kernel Task Structure from process memory is analyzed for nine categories up to a depth of six levels for extraction of the features. To the best of our knowledge, this is the most in-depth extraction of features related to kernel task structure in the domain of Android malware detection. Previous studies have analyzed five categories for a depth of three;
  • An important contribution is the evaluation of the effectiveness of proposed features against four obfuscation techniques; Class encryption, Reflection, String Encryption, and Junk Code insertion.
The rest of the paper is organized as follows: details of the kernel task structure are discussed in Section 2. Section 3 presents the related work. The proposed methodology for feature extraction and selection is presented in Section 4. The results for the proposed methodology are reported in Section 5, and finally the conclusion is presented in Section 6.

2. Overview of Kernel Task Structure

The kernel of the Android operating system stores the list of all running processes in a doubly linked list. Each element in the list is the process descriptor of a certain process, also called its task struct. Kernel task structure is a large structure containing the process management information required by the kernel (https://elixir.bootlin.com/linux/v4.2/source/include/linux/sched.h#L1344, accessed on 25 October 2022). KTSODroid utilizes the information in this structure for generating features for modeling the behavior of malicious applications. The amount of information in the kernel task structure is huge, however some important information related to application behavior has been selected by KTSOdroid for analysis. This information includes process identification number (pid), name of process, different process states, CPU scheduling information, memory management information, memory limits, I/O statistics, accounting information, signal related information, process ownership information, and information related to opened files and network sockets. Overall, this information is grouped into different categories based on the semantic similarities. These categories are briefly described below:
(i)
task_struct: It includes information related to the state of the process such as exit code and process execution domain;
(ii)
mem_info: It is the process memory descriptor and includes information such as the major and minor page faults, heap address of the process, start and end address of code segment and start and end address of data segment;
(iii)
scheduling_info: It describes the information related to process scheduling such as priority of the process, scheduling state, scheduling policy, execution time, waiting time, snapshot of user, and system CPU time;
(iv)
I/O_statistics: It describes block I/O delay and I/O statistics such as number of byte read, number of read system call, and number of write system calls;
(v)
openfiles_info: It contains information of opened files related to the process such as maximum number of file descriptor and opened file descriptor;
(vi)
CPU_speficic_state: It describes the CPU state of the process, which includes different register states and fault info;
(vii)
signal_info: It describes information about the signal sources, the signal handler, and timers related to the process;
(viii)
process_credentials: It defines the security context of the process. It includes information such as ownership and process capabilities;
(ix)
Others: This includes miscellaneous information about the process such as the age of the process and tracer information.

3. Related Work

Obfuscation refers to changing the structure of code so that the semantics of code are concealed from analysts. It has been stated by Ref. [16] that modern anti-malware tools are unable to detect obfuscated malicious applications; therefore, analyzing obfuscation is a key challenge in malware detection. Many studies such as Refs. [16,17,18] have estimated the effect of obfuscation on the detection accuracy of anti malware products. It has been stated by Ref. [10] that the performance of anti-malware tools is downgraded by a significant percentage when the samples are obfuscated. Suarez et al. [19] highlighted that the rate of obfuscation in Android applications is approaching that of desktop applications. Many commercial and academic tools that facilitate obfuscation for Android applications are now available. These facts clearly highlight that obfuscation is a growing threat and needs to be addressed with new and effective methods. The failure of signature-based schemes against obfuscated malware has compelled the designers of detection systems to formulate machine learning-based solutions. In case of machine learning solutions, two kinds of features can be used; static and dynamic. Static features are extracted by analyzing the application structure without running it. These features include permissions, intents, API calls in the code, and opcode sequences [20,21,22]. Static features are most effected by obfuscation as most obfuscation techniques camouflage the structure in a way that semantics of behavior are hidden by code inspection schemes. It is pertinent to highlight that some applications do not store their malicious payload in application code and it is rather loaded at run-time. In such cases, the static features of API calls and opcode sequences do not contain relevant information about malicious activity [23]. Similarly, obfuscation techniques such as class encryption completely encrypt the class structure and hence code-based static features cannot be accessed. In contrast to static analysis schemes, dynamic analysis schemes are better able to model the run time behavior of applications [24,25]. Many sources of dynamic analysis features can be used for feature extraction such as network, battery usage, API calls, and memory [26]. Among these, memory-based features have shown promising results specifically in minimizing the effects of obfuscation [27,28]. The proposed scheme has focused on the design of features from kernel task structure of memory; therefore, in this section, the schemes based on memory-based features for Android malware classification are discussed.
Refs. [27,29] extracted memory dumps from a data set of malicious applications and used them as images for creating a classification system based on the differences in images. However, the complete memory dump contains a number of other processes as well and the analysis is not specific to the application under evaluation.
Refs. [14,30,31] proposed malware detection schemes using process meta data features. The information in the kernel task structure of memory is used for the extraction of process meta data features. The kernel task structure is analyzed up to a maximum of three levels for five categories of features. However, four other categories can also be explored and the depth of structure traversal can be increased for feature extraction.
Memory-based features are used by Keyes et al. [5] for the classification of an application into 12 distinct categories. Memory features include PssTotal, PssClean, SharedDirty, PrivateDirty, SharedClean, PrivateClean, SwapPssDirty, HeapSize, HeapAlloc, AppContexts, Activities, Assets, AssetManagers, ProxyBinders, ParcelMemory, ParcelCount, DeathRecipients, OpenSSLSockets, and WebViews. These features are used in combination with API and network-based features. Random Forest has been used for classification. The memory-based features used by this study are representative of an entire memory structure. The features are not specific to the process under analysis.
The authors in Ref. [32] have extracted memory images using LIME and have extracted the use of libraries for a process. The library usage is analyzed with yarascan to find if some malicious library is loaded. The study is not conducted for a data set. A few samples are analyzed with the proposed technique. The proposed approach is rule-based and uses yara rules for identifying the malicious behavior. This makes the approach a rule-based approach and is subject to the problem of constant rule updates. A summary of the related work is presented in Table 1.

4. KTSODroid-Proposed Methodology

The rise in the use of obfuscation in malware creation is a serious threat for malware detection systems. In order to device an obfuscation resilient solution, this study proposes the use of memory-based features for malware identification. KTSODroid is a framework that uses process specific attributes from the kernel task structure of Android for the identification of malware. These features represent the run time behavior of application and are therefore resilient against obfuscation. The overall framework, shown in Figure 1, is comprised of four major processes; memory dump extraction, feature extraction from kernel task structure, feature selection, and classification. All of them are described in detail in this section.

4.1. Memory Dump Extraction Process

KTSODroid is a memory-based detection system, therefore, the first process involves the generation of memory dump. For this purpose, the Android application under analysis is installed and run in an emulator environment. The application is installed using adb (Android Debug Bridge) and random events are generated on the application using Monkey, in order to trigger its working. Monkey is an application testing utility and has been used by a number of studies for generating random events on the application for dynamic analysis [33,34,35]. In order to ascertain the capturing of malicious activity, KTSODroid extracts more than one memory dump. The first memory dump is extracted just after the execution of the application and three other dumps are generated after 150, 1500, and 4000 Monkey events, respectively. The number of Monkey events are selected randomly and the maximum number is set to 4000, as it has been reported by [33] that 4000 events is enough for capturing the utilities of an application. This process results in the generation of four interaction-based memory dumps, which are later utilized for the extraction of features.

4.2. Feature Extraction Process

As KTSODroid is designed to work on features of the kernel task structure of memory, therefore, after dump acquisition, each memory dump is traversed for the extraction of nine categories of kernel task structure. The pid of the application under analysis is used for this purpose as each application has unique task_struct in memory. All nine categories of task_state, mem_info, scheduling_info, signal_info, process_credentials, I/O_statistics, openfile_info, CPU_specific_state, and others are extracted. These categories contain direct features along with some structures. The structures are further traversed up to a depth of six levels for th extraction of features. A total of 526 features from all categories are extracted and stored in a csv file. The total number of attributes against each category is described in Table 2. The overall process of feature extraction is shown in Algorithm 1.
Algorithm 1 Algorithm used by KTSODroid for feature extraction
1:
procedureMemory Dump Extraction
2:
    MemoryImages = []
3:
    Monkey-events = [500,1500,400]
4:
    Load Custom kernel into AVD
5:
    while  a p k L i s t is e m p t y  do
6:
        Install the application using a d b i n s t a l l
7:
        Execute the application using M o n k e y
8:
        if  E x e c u t i o n s u c c e s s f u l = = T r u e  then
9:
             Capture First snapshot
10:
           for  i = 1 to 3 do
11:
               Launch event using adb shell m o n k e y -p <packagename> -v monkey-event[i]
12:
               Insert Loadable kernel module using adb shell i n s m o d ← lime.ko
13:
               Transfer the memory snapshot across network using tcp
14:
               Store in MemoryImages using n e t c a t l o c a l h o s t 4444 > r a m . l i m e
15:
           end for
16:
        else
17:
           Store the application with non-compatible applications
18:
        end if
19:
    end while
20:
end procedure
21:
procedureFeature Extraction
22:
    while  M e m o r y D u m p R e p o s i t o r y is e m p t y  do
23:
        Analyze the dump with volatility
24:
        Find pid against package-name
25:
        if  p i d n u l l  then
26:
           Extract kernel task info against pid
27:
           Store in csv file
28:
           Label for each category
29:
        end if
30:
    end while
31:
end procedure

4.3. Feature Selection

The feature extraction process generates a large number of features. It is important to find the effective features as all features in the feature set may not be significant for malware classification. Feature selection helps in reducing the complexity of a model and reducing over-fitting [36]. It helps in identifying the features that add noise to the classification system and are a cause of low performance [37]. In order to find the set of significant features, a two-step approach is followed by this study. The first step analyzes all features for finding the features, where the value remains the same for all output classes. Such features are referred to as constant features and are removed from the feature set as they have no influence on the prediction of the output class. The second step focuses on non-constant features and finds Information Gain values against all features. Different thresholds for information gain are utilized and a final set of effective features is presented. The details of both approaches is discussed in the subsections below.

4.3.1. Evaluating Constant Features for Feature Selection

The features for which the values of data samples remain the same for all output classes are called Constant features. These features do not add any value to the classification system and can be regarded as ineffective features. Therefore, they should be removed from the feature set. As constant features have no variability in values, therefore the statistical measure of variance can be used for finding such features. Variance can be calculated for a feature by using Equation (1). Variance measures the distance of all values in a feature from the mean value of the feature. If the values of a feature are diverse, variance is high and low otherwise. A zero value of variance indicates that there is no variation in the values of the feature. In this study, all features are evaluated using variance and the ones with zero variance are recorded. Such features are referred to as constant features.
s N = 1 N i = 1 N x i x ¯ 2
where:
x i is the i t h value of feature;
x i x ¯ 2 is the squared distance of the i t h value from mean;
N is the total number of samples in the data set.
All constant features are removed from the feature set and the remaining features will now be gauged for their significance by calculating their information gain values against the output class.

4.3.2. Information Gain for Feature Selection

Information gain is a measure that helps to estimate the information, a feature provides about the output class [38]. It determines the dependency between a feature and the output. If a feature is influential in determining the output, the value of information gain is high. Its value will be low for less influential features and zero for independent features [39]. Information gain can be calculated by using Equation (2). The value of information gain is calculated for all features selected after constant elimination.
I ( X ; Y ) = H ( X ) H ( X | Y )
where:
H ( X ) is the entropy of X (feature);
H ( X | Y ) is the conditional entropy of X given Y.
In order to select features based on information gain, a threshold needs to be determined. All features with information gain values, equal to greater than the threshold will be selected in the final feature set. The threshold value needs to be estimated, as there is no fixed value for it. In this study, we have used information gain as a wrapper-based feature selection procedure, where the value is selected by measuring the performance. In order to select features that are important for classification, a threshold estimation approach is used. The threshold is tested for different values, starting from 0.0. The threshold is increased by 0.1 and the performance of the filtered feature set is evaluated. The increase in threshold values is stopped when there is no change in performance or the performance starts decreasing. The threshold at which the value for classification is highest is chosen for the selection of the final features.

4.4. Classification Method

After the selection of the most effective features from the extracted feature set, the final feature set is used for classification. KTSODroid uses random forest for classification as it is the most recommended classifier for malware categorization by a number of studies [40,41,42]. Random Forest is an ensemble of decision trees and works on the basis of voting on the result from each tree. The rule-based nature of malware classification problem makes Random Forest an obvious choice for this problem. Random forest is also known to have low bias as the trees are fully grown and un-purged.
The detailed methodology of the proposed scheme is shown in Figure 2.

5. Experiments and Results

In this section, the results of the proposed methodology are discussed. The data sets used for this study include AndrooZoo for malicious applications and CICMalDroid 2020 for benign applications. The experiments are run for 800 malicious and 800 benign applications. Each applications is executed in the Android emulator and random events are generated on the application using Monkey. As mentioned earlier, four memory dumps are recorded against an application, therefore the number of records in the data set are 6400. Each record contains 526 features belonging to the 9 categories of the kernel task structure. The large set of features extracted from the kernel task structure are analyzed using variance and information gain for feature selection. This section reports the results of feature selection and classification on the final feature set. The trained classifier is finally tested against four obfuscated schemes and it is demonstrated that the extracted features are independent to the obfuscation applied on the samples.

5.1. Feature Selection

Since a rich set of features is extracted by the feature extraction process, a two-step feature selection process is applied for selecting effective features. The results of both steps are presented in the subsequent subsections.

5.1.1. Constant Feature Elimination

Constant features are the ones that have the same values for all output classes. In order to find constant features, variance has been calculated against all features in the data set. If the value of variance is zero for a feature, it is grouped into the set of constant features and is removed from the set of effective features. Out of 526 extracted features, 241 features are found to be constant in nature. These features are removed from the set of effective features. The remaining set of 285 features is passed to the next phase of feature selection, i.e., for calculating the information gain score.

5.1.2. Information Gain for Feature Selection

Information gain is calculated for all non-constant features selected by the previous phase. The value of information gain reflects the influence of the feature on the prediction of the output. In order to select features important for classification, a threshold estimation approach is used. The features are selected at different values of information gain by measuring the performance measure against the selected features. Table 3 shows the results against different threshold values.
It can be observed that initially the threshold value is set to 0.0 and at each step the value is increased by 0.1. The increase in value is stopped when the performance starts degrading. It can be seen that the best performance is achieved at an IG threshold of 0.4 and the performance degrades when increasing the value of the threshold. Therefore, the features at a threshold value of 0.4 are reported as the final selected features. Figure 3 shows the information gain scores of the selected features. There are a total of 28 features and all of the them have significant values for the information score. These features belong to mem_info, process_credentials and signal_info categories of the kernel task structure. These features represent the final feature set and will now be used for classification.

5.2. Classification

Features selected using information gain are now evaluated for a different number of tress in Random Forest in order to report the best configuration for maximum performance. The performance at a different number of trees is shown in Figure 4.
It can be observed that the reduced feature set is able to classify the applications with high performance. The number of trees in Random Forest also affect the performance of the classification system. A different number of trees is tested and it is observed that maximum performance is achieved for nine trees.
The performance is estimated using the F1-Score, which in turn is dependent on precision and recall. The formulas are shown in Equations (3)–(5). Precision is the ratio of the correctly predicted positive observations (TP) to the total predicted positive observations (TP + FP). Recall is the ratio of correctly predicted true positives (TP) to the total number of observations in a class (TP + FN). F1-score is the weighted average of precision and recall and is considered a better estimator for performance as compared to accuracy because it considers the cost of both false positives and false negatives for performance estimation.
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 = 2 P r e c i s i o n R e c a l l P r e c i s i o n + R e c a l l = 2 T P 2 T P + F P + F N
The final results of classification are shown in Table 4.

5.3. Testing on Obfuscated Applications

The proposed system is now tested for obfuscated applications. The following obfuscation schemes have been tested by the study.
  • Android Manifest Transformation: Changes in the Manifest file by inserting permissions or intents for bypassing signature-based detection schemes ([10]);
  • Junk code insertion: Adding some code into the application that does not effect the working of an application ([10]);
  • String encryption: Strings in classes.dex file are encrypted to bypass products that look for suspicious strings ([43]);
  • Control-flow manipulation: Control flow modifications include adding branch and iterative statements. This changes the control flow of an application ([44]);
  • Reflection: Reflective calls allow programs to change their behavior at run time ([45]);
  • Class Encryption: This is the most powerful obfuscation technique, where the complete code or part of the code is encrypted ([46]).
In this study, PRAGuard data set (https://pralab.diee.unica.it/en/AndroidPRAGuardDataset, accessed on 25 October 2022) has been used for samples against Class Encryption, Reflection, and Android Manifest Transformation. DashO (https://www.preemptive.com/products/dasho/features, accessed on 25 October 2022) has been used for obfuscating applications for Control-flow manipulation. Obfuscapk (https://github.com/ClaudiuGeorgiu/Obfuscapk, accessed on 25 October 2022) has been used for generating samples against Junk code insertion. The result against different obfuscated samples has been shown in Table 5.
It can be seen that the system is able to classify obfuscated applications. These results highlight the resilience of memory-based features against obfuscation techniques.

6. Conclusions and Future Work

The presence of obfuscated malicious applications for the Android platform has made dynamic analysis-based solutions replace static analysis solutions. This study has proposed a dynamic analysis-based malware detection system that extracts volatile memory-based artifacts for malicious Android application detection. The kernel task structure of memory was traversed for nine categories, six levels deep for the exploration of features. A large number of process-specific features were extracted, which were then thoroughly analyzed to find the most significant features. The proposed system is able to classify malicious applications with high performance. The system was also tested for different obfuscation techniques and it was observed that the features designed from memory were able to model the behavior of obfuscated applications.
In the future, we propose to test the effectiveness of the features for categorizing the application into their respective classes such as Adware, Trojans, and Spyware, etc. We also propose to formulate the environment of the experiment in a way to handle malicious applications, which stop executing themselves in a sandbox.

Author Contributions

Conceptualization, S.K., F.B.H. and M.G.; methodology, S.K. and F.B.H.; software, S.K.; validation, S.K.; formal analysis, S.K. and F.B.H.; investigation, S.K.; resources, S.K., F.B.H. and M.G.; data curation, S.K.; writing—original draft preparation, S.K.; writing—review and editing, S.K., F.B.H. and M.G.; visualization, S.K. and F.B.H.; supervision, F.B.H.; project administration, F.B.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data set used by the study can be found at: https://github.com/saneehaAmir/KTSDroid.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chen, W.; Helu, X.; Jin, C.; Zhang, M.; Lu, H.; Sun, Y.; Tian, Z. Advanced persistent threat organization identification based on software gene of malware. Trans. Emerg. Telecommun. Technol. 2020, 31, e3884. [Google Scholar] [CrossRef]
  2. Afonso, V.M.; de Amorim, M.F.; Grégio, A.R.A.; Junquera, G.B.; de Geus, P.L. Identifying Android malware using dynamically obtained features. J. Comput. Virol. Hacking Tech. 2015, 11, 9–17. [Google Scholar] [CrossRef]
  3. Şahin, D.Ö.; Kural, O.E.; Akleylek, S.; Kılıç, E. Permission-based Android malware analysis by using dimension reduction with PCA and LDA. J. Inf. Secur. Appl. 2021, 63, 102995. [Google Scholar] [CrossRef]
  4. Tang, J.; Zhao, H. AmandaSystem: A new framework for static and dynamic Android malware analysis. J. Intell. Fuzzy Syst. 2022, 43, 1–15. [Google Scholar] [CrossRef]
  5. Keyes, D.S.; Li, B.; Kaur, G.; Lashkari, A.H.; Gagnon, F.; Massicotte, F. EntropLyzer: Android Malware Classification and Characterization Using Entropy Analysis of Dynamic Characteristics. In Proceedings of the 2021 Reconciling Data Analytics, Automation, Privacy, and Security: A Big Data Challenge (RDAAPS), Hamilton, ON, Canada, 18–19 May 2021; pp. 1–12. [Google Scholar]
  6. Li, S.; Zhang, Q.; Wu, X.; Han, W.; Tian, Z. Attribution classification method of APT malware in IoT using machine learning techniques. Secur. Commun. Netw. 2021, 2021, 9396141. [Google Scholar] [CrossRef]
  7. Alani, M.M.; Awad, A.I. Paired: An explainable lightweight android malware detection system. IEEE Access 2022, 10, 73214–73228. [Google Scholar] [CrossRef]
  8. Greengard, S. Hidden malware ratchets up cybersecurity risks. Commun. ACM 2022, 65, 16–18. [Google Scholar] [CrossRef]
  9. Ding, Y.; Zhang, X.; Hu, J.; Xu, W. Android malware detection method based on bytecode image. J. Ambient. Intell. Humaniz. Comput. 2020, 1–10. [Google Scholar] [CrossRef]
  10. Hammad, M.; Garcia, J.; Malek, S. A Large-Scale Empirical Study on the Effects of Code Obfuscations on Android Apps and Anti-Malware Products. In Proceedings of the 40th International Conference on Software Engineering, Gothenburg, Sweden, 27 May–3 June 2018; pp. 421–431. [Google Scholar] [CrossRef]
  11. Elsersy, W.F.; Feizollah, A.; Anuar, N.B. The rise of obfuscated Android malware and impacts on detection methods. PeerJ Comput. Sci. 2022, 8, e907. [Google Scholar] [CrossRef]
  12. Gohari, M.; Hashemi, S.; Abdi, L. Android Malware Detection and Classification Based on Network Traffic Using Deep Learning. In Proceedings of the 2021 7th International Conference on Web Research (ICWR), Tehran, Iran, 19–20 May 2021; pp. 71–77. [Google Scholar] [CrossRef]
  13. Wang, H.; He, H.; Zhang, W. Demadroid: Object reference graph-based malware detection in Android. Secur. Commun. Netw. 2018, 2018, 1–16. [Google Scholar] [CrossRef] [Green Version]
  14. Wang, X.; Li, C. Android malware detection through machine learning on kernel task structures. Neurocomputing 2021, 435, 126–150. [Google Scholar] [CrossRef]
  15. Zhang, W.; Wang, H.; He, H.; Liu, P. DAMBA: Detecting android malware by ORGB analysis. IEEE Trans. Reliab. 2020, 69, 55–69. [Google Scholar] [CrossRef]
  16. Chua, M.; Balachandran, V. Effectiveness of Android Obfuscation on Evading Anti-malware. In Proceedings of the Eighth ACM Conference on Data and Application Security and Privacy, Tempe, AZ, USA, 19–21 March 2018; pp. 143–145. [Google Scholar]
  17. Xue, Y.; Meng, G.; Liu, Y.; Tan, T.H.; Chen, H.; Sun, J.; Zhang, J. Auditing Anti-Malware Tools by Evolving Android Malware and Dynamic Loading Technique. IEEE Trans. Inf. Forensics Secur. 2017, 12, 1529–1544. [Google Scholar] [CrossRef]
  18. Bakour, K.; Ünver, H.M.; Ghanem, R. A Deep Camouflage: Evaluating Android’s Anti-malware Systems Robustness Against Hybridization of Obfuscation Techniques with Injection Attacks. Arab. J. Sci. Eng. 2019, 44, 9333–9347. [Google Scholar] [CrossRef]
  19. 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; pp. 309–320. [Google Scholar]
  20. Park, J.; Chun, H.; Jung, S. API and permission-based classification system for Android malware analysis. In Proceedings of the 2018 International Conference on Information Networking (ICOIN), Chiang Mai, Thailand, 10–12 January 2018; pp. 930–935. [Google Scholar]
  21. Kumar, R.; Xiaosong, Z.; Khan, R.U.; Kumar, J.; Ahad, I. Effective and Explainable Detection of Android Malware Based on Machine Learning Algorithms. In Proceedings of the 2018 International Conference on Computing and Artificial Intelligence, Sanya, China, 21–23 December 2018; pp. 35–40. [Google Scholar]
  22. Li, J.; Sun, L.; Yan, Q.; Li, Z.; Srisa-an, W.; Ye, H. Significant Permission Identification for Machine Learning Based Android Malware Detection. IEEE Trans. Ind. Inform. 2018, 14, 3216–3225. [Google Scholar] [CrossRef]
  23. Khalid, S.; Hussain, F.B. Evaluating Dynamic Analysis Features for Android Malware Categorization. In Proceedings of the 2022 International Wireless Communications and Mobile Computing (IWCMC), Dubrovnik, Croatia, 30 May–3 June 2022; pp. 401–406. [Google Scholar]
  24. 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 2019 International Carnahan Conference on Security Technology (ICCST), Chennai, India, 1–3 October 2019; pp. 1–8. [Google Scholar]
  25. Chai, Y.; Qiu, J.; Su, S.; Zhu, C.; Yin, L.; Tian, Z. LGMal: A joint framework based on local and global features for malware detection. In Proceedings of the 2020 International Wireless Communications and Mobile Computing (IWCMC), Limassol, Cyprus, 15–19 June 2020; pp. 463–468. [Google Scholar]
  26. Papadopoulos, H.; Georgiou, N.; Eliades, C.; Konstantinidis, A. Android malware detection with unbiased confidence guarantees. Neurocomputing 2018, 280, 3–12. [Google Scholar] [CrossRef]
  27. Bozkir, A.S.; Tahillioglu, E.; Aydos, M.; Kara, I. Catch them alive: A malware detection approach through memory forensics, manifold learning and computer vision. Comput. Secur. 2021, 103, 102166. [Google Scholar] [CrossRef]
  28. De Lorenzo, A.; Martinelli, F.; Medvet, E.; Mercaldo, F.; Santone, A. Visualizing the outcome of dynamic analysis of Android malware with VizMal. J. Inf. Secur. Appl. 2020, 50, 102423. [Google Scholar] [CrossRef]
  29. Dai, Y.; Li, H.; Qian, Y.; Lu, X. A malware classification method based on memory dump grayscale image. Digit. Investig. 2018, 27, 30–37. [Google Scholar] [CrossRef]
  30. Alawneh, H.; Umphress, D.; Skjellum, A. Android Malware Detection using Neural Networks & Process Control Block Information. In Proceedings of the 2019 14th International Conference on Malicious and Unwanted Software (MALWARE), 2019; pp. 3–12. Available online: https://www.researchgate.net/publication/337010787_Android_Malware_Detection_Using_Neural_Networks_Process_Control_Block_Information (accessed on 20 June 2022).
  31. Shahzad, F.; Akbar, M.; Khan, S.; Farooq, M. Tstructdroid: Realtime Malware Detection Using In-Execution Dynamic Analysis of Kernel Process Control Blocks on Android; National University of Computer & Emerging Sciences: Islamabad, Pakistan, 2013; Tech. Rep.; Available online: https://scholar.google.com.pk/citations?view_op=view_citation&hl=en&user=e3OC088AAAAJ&citation_for_view=e3OC088AAAAJ:Tyk-4Ss8FVUC (accessed on 23 October 2022).
  32. Tam, K.; Edwards, N.; Cavallaro, L. Detecting Android malware using memory image forensics. In Proceedings of the Engineering Secure Software and Systems (ESSoS) Doctoral Symposium, Milan, Italy, 4–6 March 2015. [Google Scholar]
  33. Alzaylaee, M.K.; Yerima, S.Y.; Sezer, S. DL-Droid: Deep learning based android malware detection using real devices. Comput. Secur. 2020, 89, 101663. [Google Scholar] [CrossRef]
  34. Urooj, U.; Al-rimy, B.A.S.; Zainal, A.; Ghaleb, F.A.; Rassam, M.A. Ransomware detection using the dynamic analysis and machine learning: A survey and research directions. Appl. Sci. 2021, 12, 172. [Google Scholar] [CrossRef]
  35. Or-Meir, O.; Nissim, N.; Elovici, Y.; Rokach, L. Dynamic malware analysis in the modern era—A state of the art survey. ACM Comput. Surv. (CSUR) 2019, 52, 1–48. [Google Scholar] [CrossRef] [Green Version]
  36. Salah, A.; Shalabi, E.; Khedr, W. A lightweight android malware classifier using novel feature selection methods. Symmetry 2020, 12, 858. [Google Scholar] [CrossRef]
  37. Abawajy, J.; Darem, A.; Alhashmi, A.A. Feature subset selection for malware detection in smart IoT platforms. Sensors 2021, 21, 1374. [Google Scholar] [CrossRef] [PubMed]
  38. Feizollah, A.; Anuar, N.B.; Salleh, R.; Wahab, A.W.A. A review on feature selection in mobile malware detection. Digit. Investig. 2015, 13, 22–37. [Google Scholar] [CrossRef]
  39. Paik, J.Y.; Jin, R.; Cho, E.S. Malware classification using a byte-granularity feature based on structural entropy. Comput. Intell. 2022, 38, 1536–1558. [Google Scholar] [CrossRef]
  40. Jung, J.; Kim, H.; Shin, D.; Lee, M.; Lee, H.; Cho, S.j.; Suh, K. Android malware detection based on useful API calls and machine learning. In Proceedings of the 2018 IEEE First International Conference on Artificial Intelligence and Knowledge Engineering (AIKE), Laguna Hills, CA, USA, 26–28 September 2018; pp. 175–178. [Google Scholar]
  41. Agrawal, P.; Trivedi, B. Machine learning classifiers for Android malware detection. In Data Management, Analytics and Innovation; Springer: Berlin/Heidelberg, Germany, 2021; pp. 311–322. [Google Scholar]
  42. Zhu, H.J.; Jiang, T.H.; Ma, B.; You, Z.H.; Shi, W.L.; Cheng, L. HEMD: A highly efficient random forest-based malware detection framework for Android. Neural Comput. Appl. 2018, 30, 3353–3361. [Google Scholar] [CrossRef]
  43. Mohammadinodooshan, A.; Kargén, U.; Shahmehri, N. Robust Detection of Obfuscated Strings in Android Apps. In Proceedings of the 12th ACM Workshop on Artificial Intelligence and Security, London, UK, 15 November 2019; pp. 25–35. [Google Scholar]
  44. Tam, K.; Feizollah, A.; Anuar, N.B.; Salleh, R.; Cavallaro, L. The evolution of android malware and android analysis techniques. ACM Comput. Surv. (CSUR) 2017, 49, 76. [Google Scholar] [CrossRef]
  45. Garcia, J.; Hammad, M.; Malek, S. Lightweight, obfuscation-resilient detection and family identification of Android malware. ACM Trans. Softw. Eng. Methodol. (TOSEM) 2018, 26, 11. [Google Scholar]
  46. Maiorca, D.; Ariu, D.; Corona, I.; Aresu, M.; Giacinto, G. Stealth attacks: An extended insight into the obfuscation effects on android malware. Comput. Secur. 2015, 51, 16–31. [Google Scholar] [CrossRef]
Figure 1. KTSODroid: flow of execution.
Figure 1. KTSODroid: flow of execution.
Electronics 11 04079 g001
Figure 2. KTSODroid: detailed framework.
Figure 2. KTSODroid: detailed framework.
Electronics 11 04079 g002
Figure 3. IG scores of the selected features.
Figure 3. IG scores of the selected features.
Electronics 11 04079 g003
Figure 4. Performance variations with a different number of trees in random forest.
Figure 4. Performance variations with a different number of trees in random forest.
Electronics 11 04079 g004
Table 1. Related work on malware detection using kernel task structure features.
Table 1. Related work on malware detection using kernel task structure features.
PaperFeaturesObfuscation TestingLimitations
[27]Memory dump as imageNoMemory dump has traces of system and other applications
[14]Process meta data from KTSNoOnly three categories are used for feature extraction
[5]Allocations of memory structuresNoFeatures are not representative of the application’s behavior; only allocations of memory regions are defined
[32]Library filesNoNot a data-driven approach
Table 2. Number of extracted features against each category of the kernel task structure.
Table 2. Number of extracted features against each category of the kernel task structure.
CategoryNo. of Attributes
Task State Information6
Memory Information211
Signal Information82
Scheduling Information90
Process Credentials74
I/O Statistics17
Open File Descriptors11
CPU Specific State19
Others16
Table 3. Performance for MI thresholds.
Table 3. Performance for MI thresholds.
Threshold for MI Score (T)FeaturesF1-Score
0.02850.926
0.12000.930
0.21500.943
0.31000.960
0.4280.982
0.5130.978
Table 4. KTSDroid performance for malicious and benign classes.
Table 4. KTSDroid performance for malicious and benign classes.
ClassF1-ScorePrecisionRecall
Malicious0.9820.9880.996
Benign0.9800.9870.992
Table 5. Performance for obfuscated malicious and benign applications.
Table 5. Performance for obfuscated malicious and benign applications.
ApkObfuscationSourceTrue LabelClassification
BeanbotReflectionPRAGuardSMS TorjanMalicious
PjappsString EncryptionPRAGuardTrojanMalicious
Fake PlayerClass encryptionPRAGuardSMS TorjanMalicious
BBCNewsControl FlowDashOBenignBenign
DisneyCarToysJunk Code insertionObfuscapkBenignBenign
LighteningControl FlowObfuscapkAdwareMalicious
droid couponReflectionPRAGuardRiskwareMalicious
BookControl FlowDashOAdwareMalicious
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Khalid, S.; Hussain, F.B.; Gohar, M. Towards Obfuscation Resilient Feature Design for Android Malware Detection-KTSODroid. Electronics 2022, 11, 4079. https://doi.org/10.3390/electronics11244079

AMA Style

Khalid S, Hussain FB, Gohar M. Towards Obfuscation Resilient Feature Design for Android Malware Detection-KTSODroid. Electronics. 2022; 11(24):4079. https://doi.org/10.3390/electronics11244079

Chicago/Turabian Style

Khalid, Saneeha, Faisal Bashir Hussain, and Moneeb Gohar. 2022. "Towards Obfuscation Resilient Feature Design for Android Malware Detection-KTSODroid" Electronics 11, no. 24: 4079. https://doi.org/10.3390/electronics11244079

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop