Android Service Interception via Dynamic Link Library Injection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The Android system lacks a mechanism to intercept and evaluate service calls from applications, making it difficult to distinguish between trusted and malicious programs, leading to potential security breaches.
Innovation Solution
A method and device that load an interception dynamic link library into the process where the service is located, replacing input/output control function addresses with interception library addresses, allowing the library to intercept and evaluate service calls based on a white list, black list, and feature data, and optionally displaying application information for user selection.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a false service is registered to intercept malicious programs, then interception capability is provided, but the false service name is easily detected by malicious programs causing interception to fail
Solution Approach 1:
The patent introduces a service router as an intermediary component between applications and services. The service router intercepts service calls and routes them to the actual service implementation, enabling monitoring and control without requiring false service names. This mediator approach allows the system to observe and evaluate service calls while maintaining legitimate service names, thus avoiding detection by malicious programs.
Solution Approach 2:
The patent implements preliminary evaluation of application permissions and service call legitimacy before the actual service execution occurs. By establishing a service router that pre-intercepts and evaluates service calls based on white lists, black lists, and feature data, the system can prevent malicious programs from accessing services before they can cause harm, without leaving detectable traces.
2Ease of manufacture
If the Android system provides service interfaces without interception mechanism, then application development is simplified, but security evaluation of applications is not possible
Solution Approach 1:
The service router acts as an intermediary layer that sits between applications and services, enabling security evaluation without changing the existing service interface architecture. Applications continue to call services through the standard Binder mechanism, but the service router intercepts these calls to evaluate permissions and route to appropriate services, thus maintaining development simplicity while adding security capabilities.
Solution Approach 2:
The service router is designed as a universal component that handles multiple functions: it routes service calls to the correct service implementation, evaluates application permissions against white lists and black lists, and monitors service access. This multi-functional design allows the system to maintain existing application development patterns while adding comprehensive security evaluation capabilities.
3Adaptability or versatility
If the system allows all applications to access services freely, then application functionality is maximized, but malicious programs can access services without detection
Solution Approach 1:
The service router serves as a mediator that sits between applications and services, enabling the system to maintain broad application access freedom while simultaneously monitoring and controlling service calls. The router intercepts service calls to evaluate them against security policies (white lists, black lists, feature data) before allowing access, thus preventing malicious programs from accessing services without restricting legitimate applications.
Solution Approach 2:
The system implements feedback mechanisms where the service router continuously monitors service calls and provides feedback to the system about application behavior. By evaluating service calls in real-time and comparing them against security policies, the system can dynamically allow or block access based on the application's legitimacy, maintaining freedom for trusted applications while blocking malicious ones.
Data Source
AI summary
Disclosed are a method and a device for intercepting a call for a service by an application in an operating system of an electronic apparatus. The method comprises: loading an interception dynamic link library to a process where the service is located; replacing the address of an input/output control function in the process with a first address of the interception dynamic link library; when the application is calling the service, executing the interception dynamic link library based on the first address so as to obtain the name and information of the application as well as the information of the call, and replacing the address of the service to be called comprised in the information of the call with a second address of the interception dynamic link library; and executing processing based on the second address according to the name and/or information of the application. The invention increases the security of the operating system of the electronic apparatus.


