This article was reproduced from: http://www.cnblogs.com/whp2011/archive/2015/01/26/4250875.html
I. What security research does
Attack Angle: The method of exploiting the vulnerability of a module, the technology to exploit a vulnerability, and the attack technology such as infection, hijacking, etc., by reverse engineering cracking program, decrypting data, infecting system or application.
Defense perspective: Malicious application methods, detection and prevention of exploit, to enhance the security of the system and third-party applications to provide solutions.
Usually, the attack and defense is relatively vague, a security technology is often applicable at both ends, perhaps more noteworthy is a technology behind the idea and awareness.
Ii. Knowledge Required
The scope of knowledge involved in security is limitless, but most of the time it is possible to encounter problems before you know the relevant knowledge.
Iii. the theoretical knowledge to be mastered
Operating system principle, is very important, is to know a specific system premise.
Microsoft Open source Windows study Kernel (WRK) is also a great learning material.
To compile the kernel of the system, it is more helpful to analyze and debug the kernel with the debugger than to read the source code and analyze the article.
Try writing kernel driver modules or analyzing existing kernel rootkits to gain a deeper understanding of the operating system.
As far as mobile platforms are concerned, understanding the operating system helps to further understand the Android system itself, and after understanding the Android system, you can begin to discuss the security of the Android system.
Iv. languages to be mastered by several doors
There is no need for a particularly strong software development capability, it is necessary to focus on the internal implementation process of a language.
Master C + +, you can understand the implementation of the language by the compiler after the compilation level of the principle.
Understanding Java requires an understanding of the implementation process within the Dalvik/art virtual machine.
To the X86/arm assembly, can read, encountered no instructions can be found from the command set.
Master a scripting language that is used to quickly write gadgets or POC, and recommend Python, because most of the Android security analysis tools in the open source community are written in Python, such as well-known Androguard and Drozer.
V. Reverse ENGINEERING
Reverse engineering is definitely an essential skill. The analysis of malware behavior or the analysis of closed-source software, all have to reverse engineering.
Vi. Understanding the Android system
Android source code is very large, only see components for several years, not to mention the Linux kernel, baseband, bootloader, trustzone and other underlying modules.
We only need to understand the core services supporting the operation of the Android system, as well as the security mechanism of the Android system design, the rest of the content is used to analyze.
1. Components
(1) Zygote:android application incubator, all Android programs fork from this process.
(2) binder:android communication mechanism between processes, it is the most core functional component of Android platform.
(3) Package Manager service: Application installation package Management Services, not only responsible for the installation and uninstallation of packages, more importantly, is responsible for Android application information query and control, such as Android Rights Management.
(4) Activity Manager Service: The process of managing the Android framework layer, also contains the logic implementation of the four components of Android application.
(5) Dalvik virtual machine: Although it will be replaced by art, Dalvik remains a good textbook to help us understand the file formats of virtual machines and Android executables.
2. Security mechanisms
(1) Sandbox isolation: sandboxes are implemented based on the user ID of different applications, which is essentially a Linux isolation of access rights between different users.
(2) Application rights control: Android system applications need to request the appropriate permissions to access the system's resources and information, most of the permissions are controlled by the Android framework layer of the API, and the other part of the permissions mapped to the application on the group ID, by the Linux kernel control.
(3) The security enhancement of Selinux:linux kernel layer is a set of compulsory permission control mechanism independent from traditional Linux access control. Google has ported this mechanism to the Android kernel, which poses some challenges to exploiting kernel exploits.
Vii. the focus and current situation of Android security research
1. Mobile root and kernel exploit exploit
android2.x era, often using some of the vulnerabilities of the user layer program can be the phone root, now mainly rely on kernel vulnerabilities.
Android introduces a new kernel module to the Linux kernel, as well as a different manufacturer's drive scheme. This introduces a new security risk for the system kernel, whether it is Qualcomm, MTK or Samsung Orion, or Huawei HiSilicon chip, there have been a number of kernel vulnerabilities, which is a major attack point of the Android platform kernel. As Google introduces SELinux to Android, the attack surface is reduced, but the kernel exploits are not completely resolved.
Defense, there are also challenges: some apt attacks will get full control of the system if they exploit the kernel vulnerabilities. Android platform kernel vulnerabilities have been continuously exposed for a long time, exploit and prevention is still a persistent hotspot.
Starting with this, you first need to understand the Linux kernel, and then continue to analyze the CVE vulnerabilities that are currently exposed to understand the causes and types of vulnerabilities.
In terms of exploit, the open source project Run_root_shell can be used as a reference, the project contains a number of classic exploits of the implementation, the introduction of good materials.
In addition, you can also focus on foreign POC programs or the one-click Root product Analysis.
2.Android application and System framework it's a hole-digging.
The problems of Android application itself mainly focus on 4 large components, usually some logic processing problems lead to information disclosure, authentication bypassing, etc.
The application itself has a relatively small attack surface thanks to the Android sandbox mechanism.
In addition, the security issues surrounding WebView or SSL vulnerabilities are more common.
The vulnerability of framework layer is also the most logical loophole, but the harm is often bigger than the application. Famous high-risk vulnerabilities include master key signature Bypass, WebView remote code execution, and so on.
There are some open source vulnerability mining tools, such as Drozer and intent fuzzer. Improvements can be made on this basis.
3. Malicious software attack
In quantitative terms, privacy theft and phishing software is currently the main malware type on the Android platform.
If the user has no knowledge of the application's permissions, an application can easily access the user's text messages, contacts, geographical location, hiring and other private information.
The Android platform needs to have active Defense program control app to get privacy behavior, there are currently 2 ways to achieve: one is integrated into the ROM code, the other is the use of API hook implementation. Whichever way you use it, the problem now is how to manage permissions more intelligently for your users to reduce the intrusion of frequent pop-up windows from your defense software.
There are also a lot of counterfeit payment applications that may seem to be indistinguishable from genuine apps because they are tampered with by genuine apps. There is usually a malicious code that has a user name and password theft. Security software needs to be identified by means of signatures, code features, and so on.
On the trend, malware is no longer distributed in the form of an Android installation package (APK), but often comes with a Linux executable (ELF) that attacks the system in a deep way. Currently on the market security products to the APK file is relatively mature, but for the system native layer of malware Avira has not been particularly perfect implementation, for some apt-level new threat defense is still in the exploration stage.
The well-known malware oldboot is a typical case of malicious programs using the underlying technology against Avira, and a complete analysis has been made public.
4. Payment Security
Mobile phone payment by SMS verification code and independent payment password to solve the problem of the payer identity authentication, but still there is the risk of SMS eavesdropping or password theft, some manufacturers imitate the U Shield program on the PC, the introduction of audio shield or Bluetooth shield to solve the certification problem. Using the Trustzone in the ARM architecture, the payment authentication process is independent of the operating system and is also a direction.
5. Application of Reinforcement (Packers) and reverse engineering
The domestic well-known strengthening scheme has: Bang Bang reinforcement, 360 reinforcement, love encryption.
6. Enterprise Security BYOD
In the case of end-devices only, the BYOD solution isolates the phone system from two environments: one public, one private, and the other.
Viii. Example: Android4.4.2 system Vold Vulnerability
1. How to know the first time the loophole
Not all the loopholes will be included in CVE, a lot of things secretly patched. One way is to see the version upgrade of Android source in the change Log, if you are lucky, you can note the following from the GIT commit message of AOSP:
Project:platform/system/vold
0de7c61:validate asec Names
Click on the link to see Google's secret patching of the vulnerability. 、
2. How to master the vulnerability details
3. How to use this vulnerability to get root
by Retme
"Turn" Android security research experience talk