Next up, we have Mansur on IntelliAV, Building an Effective On-Device Android Malware Detector. Hope you all enjoy. Hello, everyone. I'm Mansur. My talk is about the anti-malware I developed in collaboration with a bachelor's student, Angelo, under supervision of my supervisor, my former supervisor. In Italy, and it's an anti-malware for Android. It's fully based on machine learning. It works on device, and let's see how it works. So, a short summary about myself. I'm a research associate at Northeastern University. My current research is about applying machine learning for vulnerability detection. But prior to that, since 2010, I published a couple of papers. About the application of Machine Learning for both Windows and Android malware detection and classification You can find the list of my publications on my website if you are interested. So, what is the problem? The problem is that many people think that there are not too many android malware in the wild. And mostly they don't care about their protection. about their mobile devices. Because they think that Android is safe. But the problem is that every 10 seconds, a new malware, a new Android malware, is found in the wild. So it causes a huge number of Android malware. And it was a motivation for us that built an intelligent anti-malware that doesn't need frequent updates. So we developed IntelliAV. It's like intelligent antivirus. I know antivirus is not a good term. But we want to have a fancy name. So we selected IntelliAV. But it's like an anti-malware, not antivirus. So what is IntelliAV? It helps the user to understand the risk of Android applications. It extracts some features from Android applications and uses a machine learning model to give a risk score to each application. The novelty is that the inference phase is on device. So we don't use any cloud. And so it's fully working on device. So if there is no internet, it works. It can analyze applications. And it's based on TensorFlow library. It's a library from Google. Probably most of you know about this library. So we received many positive feedbacks from security guys about IntelliAV. But there has been a few negative reactions to IntelliAV from security guys. One of them said that I don't think the phone is powerful enough to run TensorFlow. It's on Twitter. Another one said that I don't see how TensorFlow could do any better than signatures. So those guys that are applying machine learning for security tools know about this, that how machine learning can outperform your system. In fact, thanks to TensorFlow, that you can build a model on one platform and simply transfer it to another platform. So it's practical that build an anti-malware on device. And to answer the second guy, I think if you attended Black Hat, you know that there have been many talks about how artificial intelligence can be applied for security tools. So machine learning is not a silver bullet for security problems, but it can help to make evasion harder. I'll show you later. So if I want to compare it with other research papers on this topic, there has been just two research papers that claim that they perform on device. But when we checked the papers, the first one, they just put a user interface about the antivirus. But we didn't find any application. So we don't know if it exists or is just a user interface. The second one is from Qualcomm and the paper published in 2017. Again, the application is not available, and there is no information about their anti-malware. So I believe, and I think, that is the first on-device anti-malware based on campaigns. learning. So why we need an on-device machine learning based system? The reason that we need on-device is mostly because of droppers. Probably you know about droppers. The dropper usually do not carry malicious behaviors by themselves but they can drop another APK that the second APK contains malicious behavior and they mostly can evade from security detections by Google Play store and maybe you have heard that there has been many report that there are some malware on Google Play. Third-party application stores are popular among users and they are not free of malware. And if you If you have heard about some news about malware that's shipped with Android devices during supply chain. So when you receive your Android device, it contains malware and probably you need to have an anti-malware on device to scan all of these applications. Why we need machine learning? Probably you know that we don't want to have frequent updates and we want to detect unseen malware and based on my knowledge that I search in internet, almost all of the major AVs for Android, not for workstations, do not still use machine learning. Just two of them claim that use machine learning, but we believe that, I don't know, they don't use it or they use it somewhere else, not for on device. So, this is the overview of Intel AV, it has two phases. At the first phase, we build a model on workstation, I build it on my laptop. And it has two steps, we need to extract features based on, from API's permission, some statistical features and then pass the feature vector to Intel AV. And to construct a model, and we apply different optimization techniques like which model should be selected and what are the best features for our model. Also parameter tuning and validation. And after that, we pass the optimized model to Intel AV application and it can be used for prediction. So, that's it. So, we need also to extract features from Android applications on device. And then the final result is a risk score that shows if the application is risky or it's not risky. So, based on our previous works that we published in some conferences, some features perform very good for Android applications, for Android malware detection like permissions, intents, some statistical features. And API calls. So, we extracted 4,000 features and then we applied feature selection and we selected 1,000 top influential features that perform very good on our test case. To construct the model, we used TensorForest. TensorForest is an implementation of TensorFlowflow in, as an implementation of TensorFlowflow. And the final model can be used on different platforms. We used about 20,000 Android applications. And all of these applications both benign and malicious applications from, we gathered all of these applications from virus total from 2011 to 2016. And then we built the model. And the size of the model after compression is just 3 megabytes. So, the size of the final Intel AIV application is just like 10 megabytes. So, as we ship the model with the Android application, users can access the model itself. So, in order to make reverse engineering harder, we try to encrypt the name of features. Because. if people know about the name of features so probably they can apply some adversarial machine learning to evade our our detection but security is not 100% so if anyone could crack it let us know and so we can improve the model to to analyze Android applications on mobile device we don't need route permission because all of the Android apks after you install an Android application the APK itself is wall readable so we can read them and analyze them we don't have any problem because we do it we do static analysis but it's almost impossible to do dynamic analysis on device without route permission because uh um And if the anti-malware needs to read system calls of other applications, they need root permission, and they cannot do it without root permission. The final score that IntelliAV provides is like a probability between zero to one. And based on the experiments that we have done, we selected three different thresholds to give a risk type to Android applications. The first one is safe, the second one is suspicious, and the last one is risky. So we provide this risk type to Android applications, and the user can select if they want to keep this application or if they think that they should remove the application. Because there are some applications like a torch application that they ask for many permissions and API calls, and definitely they don't need those kind of permissions. And we want to say that this application is very similar to the malware that we have seen before. I mean the combination of permissions, APIs, and other features. So people can decide if they want to remove it or they still want to keep it. So it has two capabilities. It scans all of the applications on device. It's quick scan. And the second capability is custom scan. So if you download an APK, you can pass it to IntelliAV, and just it analyzes, it extracts the features and analyzes the risk type. So the first evaluation that we have done was on more than 20,000 malware. All of them first seen based on virus total in 2017. So it's interesting. Because we don't have any malware. We have malware from 2017 in our training set. So all of the malware are like unseen malware for our anti-malware. We could achieve 72% detection rate. And we compared with top five Android AV. I don't name them here because I don't want to rank them. But you can check our paper. The names are there. So three are how we selected these five Android anti-malware. Three of them are top downloaded anti-malware in Google Play. And other two claim that they use machine learning. So we wanted to see how they use machine learning. And the false positive we achieved is like 7% on more than about 3,000 benign application. But interestingly, after a few months. We checked. those, we checked the label of those samples and many of them turn out to be malware. So in fact, they are not false positives. We detected them as never before seen malware. So in the second test that has been done by AV Comparatives, it's like completely an independent test. They tested on 2,000 malicious Android applications. They are the most common Android malware in 2017. Intel AV is ranked 34 among 200 Android security tools. But the point is that all of the Android malware are unseen malware for Intel AV because we don't have any sample in our training set. The model was tested from 2017. So they are all unseen malware. So opposite of other Android signature based systems, we don't need frequent update. It doesn't need frequent update. And with minimal effort we can update the model. Because there is no major evolution in Android malware based on this experiment. Another interesting case that we could detect it is detecting droppers as I said if I run Intel AV in in one dropper application it has just one permission with a few API calls and as they don't carry malicious applications they cannot be detected and it is reasonable but if you run the APK it shows an error message and you can scan it with Intel AV and the second APK is risky now you can see the risk score here so the dropped APK that contained malicious behavior can be detected easily so we evaluated against obfuscation techniques if you attended last night last year Black Hat USA they some guys from Georgia Tech presented AV pass and you can also find malicious applications in Intel And it was like an obfuscation framework for evading Android anti-malware tools. And they could almost evade it from most of Android anti-malware in the market. These are different obfuscation types that they used. As we checked them, just three of them could affect on IntelliAV. One of them is inserting benign permissions. The second one is inserting benign API calls. And the last one is hiding API calls by Java reflection. So these three could affect on IntelliAV. And we wanted to see how they could affect IntelliAV. We randomly selected 10 Android malware from VirusTotal. And we tried the original malware. And also we obfuscated it. And we fingerprinted the malware with AVPaths. As we tested for the original malware, you can see many anti-malware detected as a malware. And for the obfuscated variant, just a few of them detected as malware. And the point is that, in fact, those anti-malware fingerprinted AVPaths. They didn't detect the malicious behavior. They just fingerprinted AVPaths. Because we obfuscated. Some benign applications. And then we passed it to VirusTotal. They detected those obfuscated benign applications as malware. But as you can see here, the risk score decreased a bit. In some cases from 100% to 84%. But the risk score is still high. For some cases, even the risk score increased. Because the obfuscation is not targeted. They just inject some benign permissions or API calls just randomly. I don't know. Or based on the test cases that they have. If I want to show you the overhead of IntelliAV. We tested IntelliAV on a Galaxy S6 Edge. And the average time is just 3 seconds. On different APKs. With different sizes. Just for Airbnb for example. The size is 54 megabytes. And it needs 8 seconds to analyze it. After we checked the reason. We understand that Airbnb has 15 DEX files. And we have to parse all of the DEX files for extracting features. Extracting API calls. So it makes the feature extraction much slower. As a summary. We propose the first practical anti-malware for Android. Fully based on machine learning. The detail. We published a research paper. And you can check IntelliAV.com website. To read the paper. It's about 20 pages. It contains most of the details. And we try to carefully select a set of lightweight features. That make our anti-malware. Practical for Android devices. Because they are known as limited computational. That they have limited computational power. And it's like just a motivation for other major AVs. That applying machine learning for mobile devices. For security tools. Is practical. And probably they can use it. And improve the security. Thank you. Thank you very much for your attention. If you have any questions. You can follow us. And if you have any questions. I'm happy to answer. Yeah. . . . . . . . . . . . . . . . get the result, and they say that if they are malware or if they are not malware. But they don't provide a rate for a... Risk? No, no, no. They don't provide. No. But if you are with their application, do you consider everything that they're talking about as malware? Yeah. It's more than 0.6 as malware. 0.6? Yeah. I think they are mostly based on signatures, not machine learning. So we didn't find that if any of them is based on machine learning and they can provide the risk score and we can compare it. So as you know, it's very difficult to compare false positives. Because, as I said here, our false positive is 7%, and if they are signature-based, they are 0%. But as you can see here, many of them, many of our false positives turn out to be malware after a few months. So you cannot compare false positives. Recently? A false positive rate is 7%. Sorry? Yeah. I don't remember. I think more than 60 of them turn out to be malware from 3,000. No. Sorry. Yeah. From 3,000 benign applications. So you can compare the percentage. Yeah. All right. Thank you so much. That's about all the time for questions. Thank you. We have a couple of more questions we have. We would ask since there's a long line of people that want to come into the village, if there's any seats next to you, please raise your hand. Or if you've been here for a while and you want to let someone new take your seat, feel free. And we're going to get set up really quick. Or if you don't care about Internet scanning and the most awesome thing on earth.