WO2018098881A1 - Access processing method and device for application - Google Patents

Access processing method and device for application Download PDF

Info

Publication number
WO2018098881A1
WO2018098881A1 PCT/CN2016/112862 CN2016112862W WO2018098881A1 WO 2018098881 A1 WO2018098881 A1 WO 2018098881A1 CN 2016112862 W CN2016112862 W CN 2016112862W WO 2018098881 A1 WO2018098881 A1 WO 2018098881A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
access
interface
kernel
kernel interface
Prior art date
Application number
PCT/CN2016/112862
Other languages
French (fr)
Chinese (zh)
Inventor
杨斌
Original Assignee
深圳Tcl新技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2018098881A1 publication Critical patent/WO2018098881A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present invention relates to the field of application access security, and in particular, to an access processing method and apparatus for an application.
  • the application is usually scanned for security when the application is installed, and the scanned application has hidden malicious interface calls, but this method can only perform a security scan when the application is installed, if the application After the program installation scan is completed, and further update the code by remote access in the background, there is still a security risk.
  • the main object of the present invention is to provide an access processing method and apparatus for an application, which aims to solve the technical problem that the application still has security risks after the security scan of the application.
  • the present invention provides an access processing method for an application, and the access processing method of the application includes:
  • the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  • the access processing method of the application further includes:
  • the present invention further provides an access processing method for an application, where the access processing method of the application includes:
  • the system call is intercepted to prevent the application from accessing the system kernel interface.
  • determining whether the application has access to the system kernel interface includes:
  • the access processing method of the application further includes:
  • intercepting the system call to prevent the application from accessing the system kernel interface includes:
  • the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  • determining whether the application has the right to access the system kernel interface includes:
  • the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  • the present invention further provides an access processing device for an application, where the access processing device of the application includes:
  • a detection module configured to detect whether an application currently accesses a system kernel interface through a system call
  • a judging module configured to determine, when the application currently accesses the system kernel interface by using a system call, whether the application has the right to access the kernel interface of the system;
  • a processing module configured to: when the application does not have the right to access the system kernel interface, intercept the system call to prevent the application from accessing the system kernel interface.
  • the determining module comprises:
  • An obtaining unit configured to acquire identity information of the application and a permission mapping table of the application accessing the kernel interface when the currently existing application accesses the system kernel interface through the system call;
  • the determining unit is configured to determine, according to the identity information and the rights mapping table, whether the application has the right to access the system kernel interface.
  • the detecting module is further configured to:
  • the processing module is further configured to:
  • the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  • the processing module is further configured to:
  • the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  • the system kernel interface when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application.
  • the invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
  • FIG. 1 is a schematic flowchart of an embodiment of an access processing method of an application according to the present invention
  • FIG. 2 is a schematic diagram showing spatial division of an Android system in an access processing method of an application according to the present invention
  • step S20 in FIG. 1 is a schematic diagram showing the refinement process of step S20 in FIG. 1;
  • FIG. 4 is a schematic diagram of functional modules of an embodiment of an access processing apparatus of an application according to the present invention.
  • FIG. 5 is a schematic diagram of a refinement function module of the judging module in FIG. 4.
  • FIG. 5 is a schematic diagram of a refinement function module of the judging module in FIG. 4.
  • the core idea of the present invention is that when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, in the present invention, when the application accesses the kernel through the system call, the interception is completed, thereby fundamentally preventing the illegal access of the application and improving the security of the system operation.
  • the invention provides an access processing method of an application.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of an access processing method of an application program according to the present invention.
  • the access processing method of the application includes:
  • Step S10 detecting whether an application currently accesses the system kernel interface through a system call
  • Android usually divides the entire virtual address space into two parts: user space and kernel space. It also stipulates that user space cannot directly access kernel space, while kernel space can access user space. By dividing this level, the kernel space can be made more stable and secure. However, if the application process needs to access the kernel or use a kernel function, it usually needs to pass the system call (System Call) to complete. In Android, system calls are the only way for user space to access kernel space. as shown in picture 2.
  • a system call is a set of function interfaces provided by the kernel that allows a process running on user space to interact with the kernel.
  • a user process accesses a hardware device or some resources of an operating system through a system call, and the like.
  • Android application programming interface API to access the Android kernel, such as network interface, file system interface, CPU FM interface.
  • the type of the application program accessing the system kernel interface through the system call for example, a network interface, a file system interface, a CPU FM interface, and the like.
  • the manner of detecting the system call generated by the application is not limited, and is specifically set according to actual needs.
  • Step S20 when the currently existing application accesses the system kernel interface through the system call, determining whether the application has the right to access the system kernel interface;
  • the determination manner is not limited.
  • the corresponding authority mapping table may be set in advance for determination.
  • the system function of all applications is filtered by the filtering function provided by the system kernel, thereby determining whether the application has the right to access the corresponding system kernel interface. .
  • the filter function needs to be performed in the privilege level mode of the Android system, the system mode needs to be converted from the user level mode to the privilege level mode before filtering the application system call.
  • the user level mode and the privilege level mode are two security level modes of the Android system.
  • all applications run in the user level mode, and the Android kernel system functions run in the privilege level mode.
  • the filter function can scan any system call of any application.
  • a trap call generates a system call to trigger a processor interrupt, which in turn is converted from a user-level mode to a privileged-level mode.
  • Step S30 when the application does not have the right to access the system kernel interface, intercept the system call to prevent the application from accessing the system kernel interface.
  • the system call generated by the application is intercepted, thereby fundamentally preventing malicious applications from accessing the system kernel interface, thereby causing security risks.
  • the manner of intercepting the system call generated by the application is not limited.
  • the system function of the illegal application is intercepted by the intercept function of the system kernel. Intercept.
  • the system kernel interface when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application.
  • the invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
  • FIG. 3 is a schematic diagram of the refinement process of step S20 in FIG.
  • the foregoing step S20 further includes:
  • Step S201 when the application program currently accesses the system kernel interface through the system call, acquiring the identity information of the application, and the permission mapping table of the application program accessing the kernel interface;
  • the identity information of the acquired application is not limited, and may be, for example, a process PID, an application name, an application category, an application credibility level, and the like.
  • the acquired application's identity information may be process PID: 1234, application name: A, application category: file management class, application credibility level: level 3.
  • the permission mapping table of the application accessing the kernel interface may be set in advance according to the category of the application, the credibility of the application, the confidentiality level of the kernel interface, and the like.
  • an application that is set according to the category of the application accesses the permission mapping table of the kernel interface, as shown in Table 1.
  • Application category System kernel interface access Document management Interface A, B, C Word processing All interfaces image display Interface A, B, C, D, E
  • an application that is set according to the credibility of the application accesses the permissions map of the kernel interface, as shown in Table 2:
  • Application credibility System kernel interface access Level 1 Interface A, B, C Level 2 Interface A, B, C Level 3 Interface A, B, C, D, E
  • Step S202 Determine, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface.
  • the mapping relationship between the application program and the access authority of the kernel interface as shown in Table 1 is obtained, and the identity information of the application is obtained.
  • the identity information of the application it is known that the application belongs to the picture display category, and according to Table 1, it can be determined that the application does not have the right to access the kernel interface of the Android system.
  • the method includes:
  • the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  • the application can only access the system kernel network interface through the system call.
  • the kernel function corresponding to the system call number is invoked to achieve the The purpose of the application to access the system kernel network interface.
  • the system call number is generated when the application accesses the system kernel through a system call.
  • the application program uses the system call through the application programming interface, and generates a system call number, which is found in the system call table and corresponds to the system call number.
  • the Android kernel function which is called in the Android kernel to implement the system call to the Android kernel interface.
  • step S30 specifically includes:
  • the system call is intercepted and an intercept warning prompt is generated.
  • the method for suspending the application to access the kernel of the system is not limited, and may be intercepting the system call generated by the application through the application programming interface API, or directly killing Dead this application process. And exit the kernel space to return to the user space, the system will generate an intrusion report and push it to the user, for example, the application name C, at time T, illegally call the Android kernel interface, blocked, and can also prompt the user to be prompted.
  • the access processing method of the application further includes:
  • the mapping relationship between the application and the access rights of the kernel interface can be formulated through preset rules.
  • the preset rule is that only the application that comes with the smart terminal has the right to access the kernel interface, so that only the application that is included in the system has access to the kernel on the smart terminal.
  • the permissions of the interface, other third-party software installed on the smart terminal do not have access to the system kernel interface.
  • the mapping relationship between the application and the access rights of the kernel interface may also be pre-defined by the user.
  • the user formulates a mapping relationship between the application and the access authority of the kernel interface of the Android system.
  • the method is not limited, for example, according to the name of the application, the function classification of the application, the credibility level of the application, etc., and the type of the kernel interface of the Android system is not limited, such as a network interface, a file system interface, a CPU FM interface, and the like.
  • the application can be set to not have the call permission to the Android kernel interface, or can be set to have one or more call permissions to the Android kernel interface.
  • the application has the right to invoke the kernel network interface of the Android system, the application A has the right to call the Android kernel network interface.
  • the application of the file management category has the right to invoke the kernel system file system interface of the Android system. At this time, all file management category applications in the Android system have the right to call the Android kernel file system interface.
  • the application with the credibility level 5 has the function of calling Android.
  • the scenario in which the user formulates the mapping relationship between the application and the access authority of the Android system kernel interface is not limited. For example, it can be either when the application is installed or when the application is running.
  • an interface is popped up for the user to formulate a mapping relationship between the application and the access authority of the Android system kernel interface.
  • the trap instruction is executed to convert the system from the user level mode to the privilege level mode, and In privilege level mode, all interface calls brought by the application are detected, and the corresponding kernel interface is invoked according to the interface of the application to ask the user whether the application has the right to call one or more kernel interfaces in the kernel interfaces.
  • the mapping relationship is stored for a long time until the user manually deletes the mapping relationship.
  • the mapping relationship may be temporarily stored, and the user ends the application to the application. The use of the mapping is automatically removed after the application's process is closed.
  • the information of the rights mapping table is monitored.
  • the application applies to modify the permission mapping table
  • the application submits the modification permission request for example, deletes the mapping relationship between an application and the system kernel interface or adds a mapping relationship between an application and the system kernel interface.
  • a warning screen is generated, prompting the user to perform identity authentication, which may be through password verification, fingerprint verification, facial recognition, etc., and only through authentication can complete the operation of modifying the permission mapping table; otherwise, the permission mapping table information is not made. modify.
  • the present invention provides an access processing device for an application.
  • FIG. 4 is a schematic diagram of functional modules of an access processing apparatus of an application program according to the present invention.
  • the access processing device of the application includes:
  • the detecting module 10 is configured to detect whether an application currently accesses the system kernel interface through a system call
  • Android usually divides the entire virtual address space into two parts: user space and kernel space. It also stipulates that user space cannot directly access kernel space, while kernel space can access user space. By dividing this level, the kernel space can be made more stable and secure. However, if the application process needs to access the kernel or use a kernel function, it usually needs to pass the system call (System Call) to complete. In Android, system calls are the only way for user space to access kernel space. as shown in picture 2.
  • a system call is a set of function interfaces provided by the kernel that allows a process running on user space to interact with the kernel.
  • a user process accesses a hardware device or some resources of an operating system through a system call, and the like.
  • Android application programming interface API to access the Android kernel, such as network interface, file system interface, CPU FM interface.
  • the type of the application program accessing the system kernel interface through the system call for example, a network interface, a file system interface, a CPU FM interface, and the like.
  • the manner of detecting the system call generated by the application is not limited, and is specifically set according to actual needs.
  • the determining module 20 is configured to determine, when the application currently accesses the system kernel interface by using a system call, whether the application has the right to access the system kernel interface;
  • the determination manner is not limited.
  • the corresponding authority mapping table may be set in advance for determination.
  • the system function of all applications is filtered by the filtering function provided by the system kernel, thereby determining whether the application has the right to access the corresponding system kernel interface. .
  • the filter function needs to be performed in the privilege level mode of the Android system, the system mode needs to be converted from the user level mode to the privilege level mode before filtering the application system call.
  • the user level mode and the privilege level mode are two security level modes of the Android system.
  • all applications run in the user level mode, and the Android kernel system functions run in the privilege level mode.
  • the filter function can scan any system call of any application.
  • a trap call generates a system call to trigger a processor interrupt, which in turn is converted from a user-level mode to a privileged-level mode.
  • the processing module 30 is configured to intercept the system call when the application does not have the right to access the system kernel interface to prevent the application from accessing the system kernel interface.
  • the system call generated by the application is intercepted, thereby fundamentally preventing malicious applications from accessing the system kernel interface, thereby causing security risks.
  • the manner of intercepting the system call generated by the application is not limited.
  • the system function of the illegal application is intercepted by the intercept function of the system kernel. Intercept.
  • the system kernel interface when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application.
  • the invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
  • FIG. 5 is a schematic diagram of a refinement function module of the judging module in FIG. 4.
  • the judging module 20 includes:
  • the obtaining unit 201 is configured to acquire, when the application currently accesses the system kernel interface by using a system call, the identity information of the application, and the permission mapping table of the application accessing the kernel interface;
  • the identity information of the acquired application is not limited, and may be, for example, a process PID, an application name, an application category, an application credibility level, and the like.
  • the acquired application's identity information may be process PID: 1234, application name: A, application category: file management class, application credibility level: level 3.
  • the permission mapping table of the application accessing the kernel interface may be set in advance according to the category of the application, the credibility of the application, the confidentiality level of the kernel interface, and the like.
  • an application that is set according to the category of the application accesses the permission mapping table of the kernel interface, as shown in Table 3.
  • an application that is set according to the credibility of the application accesses the permissions map of the kernel interface, as shown in Table 4:
  • Table 4 Application credibility System kernel interface access Level 1 Interface A, B, C Level 2 Interface A, B, C Level 3 Interface A, B, C, D, E
  • the determining unit 202 is configured to determine, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface.
  • the mapping relationship between the application program and the access authority of the kernel interface as shown in Table 3 is obtained, and the identity information of the application is obtained. According to the identity information of the application, it is known that the application belongs to the picture display category, and according to Table 3, it can be judged that the application does not have the right to access the kernel interface of the Android system.
  • the processing module 30 is further configured to:
  • the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  • the application can only access the system kernel network interface through the system call.
  • the kernel function corresponding to the system call number is invoked to achieve the The purpose of the application to access the system kernel network interface.
  • the system call number is generated when the application accesses the system kernel through a system call.
  • the application program uses the system call through the application programming interface, and generates a system call number, which is found in the system call table and corresponds to the system call number.
  • the Android kernel function which is called in the Android kernel to implement the system call to the Android kernel interface.
  • the processing module 30 is further configured to:
  • the system call is intercepted and an intercept warning prompt is generated.
  • the method for suspending the application to access the kernel of the system is not limited, and may be intercepting the system call generated by the application through the application programming interface API, or directly killing Dead this application process. And exit the kernel space to return to the user space, the system will generate an intrusion report and push it to the user, for example, the application name C, at time T, illegally call the Android kernel interface, blocked, and can also prompt the user to be prompted.
  • the detecting module 10 is further configured to:
  • the mapping relationship between the application and the access rights of the kernel interface can be formulated through preset rules.
  • the preset rule is that only the application that comes with the smart terminal has the right to access the kernel interface, so that only the application that is included in the system has access to the kernel on the smart terminal.
  • the permissions of the interface, other third-party software installed on the smart terminal do not have access to the system kernel interface.
  • the mapping relationship between the application and the access rights of the kernel interface may also be pre-defined by the user.
  • the user formulates a mapping relationship between the application and the access authority of the kernel interface of the Android system.
  • the method is not limited, for example, according to the name of the application, the function classification of the application, the credibility level of the application, etc., and the type of the kernel interface of the Android system is not limited, such as a network interface, a file system interface, a CPU FM interface, and the like.
  • the application can be set to not have the call permission to the Android kernel interface, or can be set to have one or more call permissions to the Android kernel interface.
  • the application has the right to invoke the kernel network interface of the Android system, the application A has the right to call the Android kernel network interface.
  • the application of the file management category has the right to invoke the kernel system file system interface of the Android system. At this time, all file management category applications in the Android system have the right to call the Android kernel file system interface.
  • the application with the credibility level 5 has the function of calling Android.
  • the scenario in which the user formulates the mapping relationship between the application and the access authority of the Android system kernel interface is not limited. For example, it can be either when the application is installed or when the application is running.
  • an interface is popped up for the user to formulate a mapping relationship between the application and the access authority of the Android system kernel interface.
  • the trap instruction is executed to convert the system from the user level mode to the privilege level mode, and In privilege level mode, all interface calls brought by the application are detected, and the corresponding kernel interface is invoked according to the interface of the application to ask the user whether the application has the right to call one or more kernel interfaces in the kernel interfaces.
  • the mapping relationship is stored for a long time until the user manually deletes the mapping relationship.
  • the mapping relationship may be temporarily stored, and the user ends the application to the application. The use of the mapping is automatically removed after the application's process is closed.
  • the information of the rights mapping table is monitored. Generated when the application requests to modify the permission mapping table and submit a modification permission request, such as deleting the mapping relationship between an application and the system kernel interface or adding a mapping relationship between an application and the system kernel interface.
  • a warning screen prompts the user to perform identity authentication, which may be through password verification, fingerprint verification, facial recognition, etc., and only through authentication can the operation of modifying the permission mapping table be completed; otherwise, the permission mapping table information is not modified.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Storage Device Security (AREA)

Abstract

An access processing method and device for an application. The access processing method for an application comprises: detecting whether an application accessing a system kernel interface by means of a system call exists currently (S10); determining, when an application accessing a system kernel interface by means of a system call exists currently, whether the application has a permission to access the system kernel interface (S20); and intercepting, when the application has no permission to access the system kernel interface, the system call so as to prevent the application from accessing the system kernel interface (S30). The method and device can prevent an illegal application from accessing a system kernel interface, and improve the operation security of the system.

Description

应用程序的访问处理方法及装置  Application access processing method and device
技术领域Technical field
本发明涉及应用访问安全领域,尤其涉及应用程序的访问处理方法及装置。The present invention relates to the field of application access security, and in particular, to an access processing method and apparatus for an application.
背景技术Background technique
随着智能终端的普及与应用,越来越多的用户在使用智能终端。在智能终端上,用户可以下载各种类型的具有不同功能的应用程序,比如即时通讯类应用程序、影音类应用程序、办公类应用程序等。虽然这些应用程序的使用给我们的生活带来了很多便利,但并不能保证应用程序访问的绝对安全性。比如,有些应用程序会在后台偷偷调用内核网络接口访问服务器,不仅会造成用户网络流量的损失,还会在未经用户允许的情况下自动把系统内隐私数据信息发送至远程服务器,进而侵犯用户隐私。With the popularity and application of smart terminals, more and more users are using smart terminals. On the smart terminal, users can download various types of applications with different functions, such as instant messaging applications, audio and video applications, office applications, and the like. Although the use of these applications brings a lot of convenience to our lives, it does not guarantee the absolute security of application access. For example, some applications will secretly call the kernel network interface to access the server in the background, which will not only cause loss of user network traffic, but also automatically send private data in the system to the remote server without the user's permission, thereby invading the user. privacy.
现有技术中,通常在应用程序安装时对应用程序进行安全扫描,扫描应用程序是否有隐藏的带有恶意的接口调用,但此方式仅仅只能在应用程序安装时进行一次安全扫描,如果应用程序安装扫描完成后,再进一步在后台通过远程访问方式更新自身代码的话,则依然存在安全隐患。 In the prior art, the application is usually scanned for security when the application is installed, and the scanned application has hidden malicious interface calls, but this method can only perform a security scan when the application is installed, if the application After the program installation scan is completed, and further update the code by remote access in the background, there is still a security risk.
发明内容Summary of the invention
本发明的主要目的在于提供一种应用程序的访问处理方法及装置,旨在解决现有技术中,应用程序进行安全扫描后依然存在安全隐患的技术问题。The main object of the present invention is to provide an access processing method and apparatus for an application, which aims to solve the technical problem that the application still has security risks after the security scan of the application.
为实现上述目的,本发明提供一种应用程序的访问处理方法,所述应用程序的访问处理方法包括:To achieve the above objective, the present invention provides an access processing method for an application, and the access processing method of the application includes:
检测当前是否存在应用程序通过系统调用访问系统内核接口;Detect whether there is an application currently accessing the system kernel interface through a system call;
当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;Obtaining the identity information of the application and the permission mapping table of the application accessing the kernel interface when the application currently accesses the system kernel interface through the system call;
根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限;Determining, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface;
当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
优选地,所述应用程序的访问处理方法还包括:Preferably, the access processing method of the application further includes:
检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
为实现上述目的,本发明还提供一种应用程序的访问处理方法,所述应用程序的访问处理方法包括: To achieve the above object, the present invention further provides an access processing method for an application, where the access processing method of the application includes:
检测当前是否存在应用程序通过系统调用访问系统内核接口;Detect whether there is an application currently accessing the system kernel interface through a system call;
当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限;When the currently existing application accesses the system kernel interface through a system call, determining whether the application has the right to access the system kernel interface;
当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface.
优选地,所述当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限包括: Preferably, when the currently existing application accesses the system kernel interface through a system call, determining whether the application has access to the system kernel interface includes:
当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;Obtaining the identity information of the application and the permission mapping table of the application accessing the kernel interface when the application currently accesses the system kernel interface through the system call;
根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限。Determining, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface.
优选地,所述应用程序的访问处理方法还包括:Preferably, the access processing method of the application further includes:
检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
优选地,所述当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口包括:Preferably, when the application does not have the right to access the system kernel interface, intercepting the system call to prevent the application from accessing the system kernel interface includes:
当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
优选地,所述当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限之后包括: Preferably, when the currently existing application accesses the system kernel interface through the system call, determining whether the application has the right to access the system kernel interface includes:
当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
此外,为实现上述目的,本发明还提供一种应用程序的访问处理装置,所述应用程序的访问处理装置包括:In addition, in order to achieve the above object, the present invention further provides an access processing device for an application, where the access processing device of the application includes:
检测模块,用于检测当前是否存在应用程序通过系统调用访问系统内核接口;a detection module, configured to detect whether an application currently accesses a system kernel interface through a system call;
判断模块,用于当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限;a judging module, configured to determine, when the application currently accesses the system kernel interface by using a system call, whether the application has the right to access the kernel interface of the system;
处理模块,用于当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。And a processing module, configured to: when the application does not have the right to access the system kernel interface, intercept the system call to prevent the application from accessing the system kernel interface.
优选地,所述判断模块包括: Preferably, the determining module comprises:
获取单元,用于当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;An obtaining unit, configured to acquire identity information of the application and a permission mapping table of the application accessing the kernel interface when the currently existing application accesses the system kernel interface through the system call;
判断单元,用于根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限。The determining unit is configured to determine, according to the identity information and the rights mapping table, whether the application has the right to access the system kernel interface.
优选地,所述检测模块还用于:Preferably, the detecting module is further configured to:
检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
优选地,所述处理模块具体还用于: Preferably, the processing module is further configured to:
当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
优选地,所述处理模块还用于: Preferably, the processing module is further configured to:
当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
本发明中,通常带有恶意的应用程序运行时,其为实现某一功能或目的,一般都会通过系统调用来访问系统内核接口,进而对用户造成安全隐患。因此,可通过检测是否存在应用程序通过系统调用访问系统内核接口,当存在时,则对该应用程序是否具有访问系统内核接口的权限进行判断,若该应用程序不具有相应权限,则拦截该应用程序发出的系统调用,以防止该应用程序非法访问系统内核接口。本发明可在应用程序进行安全扫描的基础上,进一步防止非法应用程序访问系统内核接口,进而提升系统运行的安全性。In the present invention, when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application. A system call issued by the program to prevent the application from illegally accessing the system kernel interface. The invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
附图说明DRAWINGS
图1为本发明应用程序的访问处理方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of an access processing method of an application according to the present invention;
图2为本发明应用程序的访问处理方法中安卓系统一实施例的空间划分示意图;2 is a schematic diagram showing spatial division of an Android system in an access processing method of an application according to the present invention;
图3为图1中步骤S20的细化流程示意图;3 is a schematic diagram showing the refinement process of step S20 in FIG. 1;
图4为本发明应用程序的访问处理装置一实施例的功能模块示意图;4 is a schematic diagram of functional modules of an embodiment of an access processing apparatus of an application according to the present invention;
图5为图4中判断模块的细化功能模块示意图。FIG. 5 is a schematic diagram of a refinement function module of the judging module in FIG. 4. FIG.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明的核心思想是:通常带有恶意的应用程序运行时,其为实现某一功能或目的,一般都会通过系统调用来访问系统内核接口,进而对用户造成安全隐患。因此,本发明中,具体在应用程序通过系统调用访问内核时,完成拦截,进而从根本上杜绝应用程序的非法访问,提升系统运行的安全性。The core idea of the present invention is that when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, in the present invention, when the application accesses the kernel through the system call, the interception is completed, thereby fundamentally preventing the illegal access of the application and improving the security of the system operation.
此外,为便于对本发明进行说明,下面具体以安卓系统进行举例说明。In addition, in order to facilitate the description of the present invention, the following is specifically illustrated by the Android system.
本发明提供一种应用程序的访问处理方法。The invention provides an access processing method of an application.
参照图1,图1为本发明应用程序的访问处理方法一实施例的流程示意图。在本实施例中,应用程序的访问处理方法包括:Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of an embodiment of an access processing method of an application program according to the present invention. In this embodiment, the access processing method of the application includes:
步骤S10,检测当前是否存在应用程序通过系统调用访问系统内核接口; Step S10, detecting whether an application currently accesses the system kernel interface through a system call;
安卓系统通常将整个虚拟地址空间划分为两部分:用户空间和内核空间。并且规定,用户空间不能直接访问内核空间,而内核空间则可以访问用户空间。通过这样的级别划分,可以使得内核空间更加稳定、安全。但是,若应用程序进程需要访问内核或使用某个内核函数,则通常需要通过系统调用(System Call)来完成。在安卓系统中,系统调用是用户空间访问内核空间的唯一途径。如图2所示。系统调用是内核提供的一组函数接口,它使得用户空间上运行的进程可以和内核之间进行交互。Android usually divides the entire virtual address space into two parts: user space and kernel space. It also stipulates that user space cannot directly access kernel space, while kernel space can access user space. By dividing this level, the kernel space can be made more stable and secure. However, if the application process needs to access the kernel or use a kernel function, it usually needs to pass the system call (System Call) to complete. In Android, system calls are the only way for user space to access kernel space. as shown in picture 2. A system call is a set of function interfaces provided by the kernel that allows a process running on user space to interact with the kernel.
例如,用户进程通过系统调用访问硬件设备或操作系统的某些资源等。安卓系统中所有应用程序运行时,都会通过安卓系统应用编程接口API产生系统调用来访问安卓系统内核,比如网络接口、文件系统接口、CPU调频接口等。本实施例中,对于应用程序通过系统调用访问系统内核接口的类型不限,例如,网络接口、文件系统接口、CPU调频接口等。For example, a user process accesses a hardware device or some resources of an operating system through a system call, and the like. When all applications in Android run, they will generate system calls through the Android application programming interface API to access the Android kernel, such as network interface, file system interface, CPU FM interface. In this embodiment, there is no limitation on the type of the application program accessing the system kernel interface through the system call, for example, a network interface, a file system interface, a CPU FM interface, and the like.
此外,本实施例中,对于检测应用程序产生的系统调用的方式不限,具体根据实际需要进行设置。In addition, in this embodiment, the manner of detecting the system call generated by the application is not limited, and is specifically set according to actual needs.
步骤S20,当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限;Step S20, when the currently existing application accesses the system kernel interface through the system call, determining whether the application has the right to access the system kernel interface;
本实施例中,当检测到存在应用程序产生的系统调用时,为避免该系统调用所对应的系统内核接口执行相应内核函数,因此,需要先确定该应用程序是否具有访问该系统内核接口的权限。本实施例中,对于判断方式不限,比如,可预先设置相应的权限映射表进行判断。In this embodiment, when it is detected that there is a system call generated by the application, in order to avoid the corresponding kernel function of the system kernel interface corresponding to the system call, it is necessary to first determine whether the application has the right to access the kernel interface of the system. . In this embodiment, the determination manner is not limited. For example, the corresponding authority mapping table may be set in advance for determination.
需要进一步说明的是,如图2所示,本实施例中,具体通过系统内核自带的过滤函数对所有应用程序的系统调用进行过滤,进而确定该应用程序是否具有访问相应系统内核接口的权限。It should be further noted that, as shown in FIG. 2, in this embodiment, the system function of all applications is filtered by the filtering function provided by the system kernel, thereby determining whether the application has the right to access the corresponding system kernel interface. .
此外,由于过滤函数需要在安卓系统的特权级别模式下进行,因此,在对应用程序的系统调用进行过滤之前,需要将系统模式由用户级别模式转换为特权级别模式。其中,用户级别模式和特权级别模式是安卓系统的两种安全级别模式,通常所有的应用程序都运行在用户级别模式,而安卓内核的系统函数则运行在特权级别模式。同时,特权级别模式下,过滤函数可以扫描任何应用程序的任何系统调用。In addition, since the filter function needs to be performed in the privilege level mode of the Android system, the system mode needs to be converted from the user level mode to the privilege level mode before filtering the application system call. Among them, the user level mode and the privilege level mode are two security level modes of the Android system. Generally, all applications run in the user level mode, and the Android kernel system functions run in the privilege level mode. At the same time, in privilege level mode, the filter function can scan any system call of any application.
本实施例中,对于用户级别模式转换为特权级别模式的实现方式不限。比如,通过陷阱指令产生系统调用以引发处理机中断的指令,进而由用户级别模式转换为特权级别模式。In this embodiment, the implementation manner of converting the user level mode to the privilege level mode is not limited. For example, a trap call generates a system call to trigger a processor interrupt, which in turn is converted from a user-level mode to a privileged-level mode.
步骤S30,当所述应用程序不具有访问系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。Step S30, when the application does not have the right to access the system kernel interface, intercept the system call to prevent the application from accessing the system kernel interface.
本实施例中,当确定当前应用程序不具有访问系统内核接口的权限时,则拦截该应用程序所产生的系统调用,进而从根本上杜绝具有恶意的应用程序访问系统内核接口,从而造成安全隐患。In this embodiment, when it is determined that the current application does not have the right to access the system kernel interface, the system call generated by the application is intercepted, thereby fundamentally preventing malicious applications from accessing the system kernel interface, thereby causing security risks. .
本实施例中,对于拦截应用程序产生的系统调用的方式不限,比如,在内核空间中,当安卓系统处于特权级别模式下时,通过系统内核自带的拦截函数对非法应用程序的系统调用进行拦截。In this embodiment, the manner of intercepting the system call generated by the application is not limited. For example, in the kernel space, when the Android system is in the privilege level mode, the system function of the illegal application is intercepted by the intercept function of the system kernel. Intercept.
本实施例中,通常带有恶意的应用程序运行时,其为实现某一功能或目的,一般都会通过系统调用来访问系统内核接口,进而对用户造成安全隐患。因此,可通过检测是否存在应用程序通过系统调用访问系统内核接口,当存在时,则对该应用程序是否具有访问系统内核接口的权限进行判断,若该应用程序不具有相应权限,则拦截该应用程序发出的系统调用,以防止该应用程序非法访问系统内核接口。本发明可在应用程序进行安全扫描的基础上,进一步防止非法应用程序访问系统内核接口,进而提升系统运行的安全性。In this embodiment, when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application. A system call issued by the program to prevent the application from illegally accessing the system kernel interface. The invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
参照图3,图3为图1中步骤S20的细化流程示意图。本实施例中,上述步骤S20进一步包括:  Referring to FIG. 3, FIG. 3 is a schematic diagram of the refinement process of step S20 in FIG. In this embodiment, the foregoing step S20 further includes:
步骤S201,当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;Step S201, when the application program currently accesses the system kernel interface through the system call, acquiring the identity information of the application, and the permission mapping table of the application program accessing the kernel interface;
本实施例中,对获取的应用程序的身份信息不限,比如可以是进程PID、应用程序名称、应用程序类别、应用程序可信度等级等。例如,获取的应用程序的身份信息可以是进程PID:1234,应用程序名称:A,应用程序类别:文件管理类、应用程序可信度等级:级别3。In this embodiment, the identity information of the acquired application is not limited, and may be, for example, a process PID, an application name, an application category, an application credibility level, and the like. For example, the acquired application's identity information may be process PID: 1234, application name: A, application category: file management class, application credibility level: level 3.
本实施例中,应用程序访问内核接口的权限映射表可以预先根据应用程序的类别、应用程序的可信度、内核接口的机密级别等进行设置。In this embodiment, the permission mapping table of the application accessing the kernel interface may be set in advance according to the category of the application, the credibility of the application, the confidentiality level of the kernel interface, and the like.
例如,根据应用程序的类别设置的应用程序访问内核接口的权限映射表,如表1所示。For example, an application that is set according to the category of the application accesses the permission mapping table of the kernel interface, as shown in Table 1.
表1Table 1
应用程序类别 Application category 系统内核接口访问权限 System kernel interface access
文件管理 Document management 接口A、B、C Interface A, B, C
文字处理 Word processing 所有接口 All interfaces
图片展示 image display 接口A、B、C、D、E Interface A, B, C, D, E
例如,根据应用程序的可信度设置的应用程序访问内核接口的权限映射表,如表2所示:For example, an application that is set according to the credibility of the application accesses the permissions map of the kernel interface, as shown in Table 2:
表2Table 2
应用程序可信度 Application credibility 系统内核接口访问权限 System kernel interface access
级别1 Level 1 接口A、B、C Interface A, B, C
级别2 Level 2 接口A、B、C Interface A, B, C
级别3Level 3 接口A、B、C、D、EInterface A, B, C, D, E
步骤S202,根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限。Step S202: Determine, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface.
本实施例中,若存在应用程序通过系统调用访问安卓系统内核接口,则获取到如表1所示的应用程序与内核接口的访问权限之间的映射关系,且获取到应用程序的身份信息,根据该应用程序的身份信息得知该应用程序属于图片展示类别,则根据表1可判断该应用程序不具有访问安卓系统内核接口的权限。In this embodiment, if the application program accesses the kernel interface of the Android system through the system call, the mapping relationship between the application program and the access authority of the kernel interface as shown in Table 1 is obtained, and the identity information of the application is obtained. According to the identity information of the application, it is known that the application belongs to the picture display category, and according to Table 1, it can be determined that the application does not have the right to access the kernel interface of the Android system.
进一步,在本发明应用程序的访问处理方法另一实施例中,基于上述本发明应用程序的访问处理方法一实施例,在本实施例中,步骤S20之后包括:Further, in another embodiment of the access processing method of the application of the present invention, based on an embodiment of the access processing method of the application program of the present invention, in the embodiment, after step S20, the method includes:
当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
在本实施例中,若应用程序具有访问系统内核网络接口的权限,则该应用程序便只能通过系统调用访问系统内核网络接口。In this embodiment, if the application has the right to access the system kernel network interface, the application can only access the system kernel network interface through the system call.
在本发明一可选实施例中,若应用程序通过系统调用访问系统内核网络接口,且判断出该应用程序具有访问系统内核网络接口的权限,则调用系统调用号对应的内核函数,以达到该应用程序访问系统内核网络接口的目的。系统调用号为应用程序通过系统调用访问系统内核时产生。In an optional embodiment of the present invention, if the application accesses the system kernel network interface through a system call, and determines that the application has the right to access the system kernel network interface, the kernel function corresponding to the system call number is invoked to achieve the The purpose of the application to access the system kernel network interface. The system call number is generated when the application accesses the system kernel through a system call.
在本实施例中,当应用程序具有合法权限访问系统内核接口时,应用程序通过应用编程接口来使用系统调用,并产生系统调用号,通过在系统调用表中找出的与该系统调用号对应的安卓系统内核函数,从而在安卓系统内核中调用该内核函数,以实现应用程序对安卓系统内核接口的系统调用。In this embodiment, when the application has legal permission to access the system kernel interface, the application program uses the system call through the application programming interface, and generates a system call number, which is found in the system call table and corresponds to the system call number. The Android kernel function, which is called in the Android kernel to implement the system call to the Android kernel interface.
进一步,在本发明应用程序的访问处理方法另一实施例中,基于上述本发明应用程序的访问处理方法一实施例,在本实施例中,步骤S30具体还包括:Further, in another embodiment of the access processing method of the application program of the present invention, based on an embodiment of the access processing method of the application program of the present invention, in the embodiment, step S30 specifically includes:
当所述应用程序不具有访问系统内核接口的权限时,拦截所述系统调用,并生成拦截预警提示。When the application does not have permission to access the system kernel interface, the system call is intercepted and an intercept warning prompt is generated.
本实施例中,当应用程序不具有合法权限访问系统内核时,中止应用程序访问系统内核的方式不限,可以是对该应用程序通过应用编程接口API产生的系统调用进行拦截,也可以直接杀死这个应用程序进程。并退出内核空间返回用户空间,系统将产生入侵报告并推送给用户,例如应用程序名称C,于时间T,非法调用安卓系统内核接口,已阻止”,还可以发出提示声音提示用户。In this embodiment, when the application does not have the legal permission to access the system kernel, the method for suspending the application to access the kernel of the system is not limited, and may be intercepting the system call generated by the application through the application programming interface API, or directly killing Dead this application process. And exit the kernel space to return to the user space, the system will generate an intrusion report and push it to the user, for example, the application name C, at time T, illegally call the Android kernel interface, blocked, and can also prompt the user to be prompted.
进一步,在本发明应用程序的访问处理方法另一实施例,应用程序的访问处理方法还包括:Further, in another embodiment of the access processing method of the application of the present invention, the access processing method of the application further includes:
检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
在本实施例中,应用程序与内核接口的访问权限之间的映射关系可以通过预置的规则进行制定。例如,在本发明一可选实施例中,预置规则为:只有智能终端自带的应用程序具有访问内核接口的权限,从而在该智能终端上只有其系统自带的应用程序才具有访问内核接口的权限,安装在智能终端上的其他第三方软件均不具有访问系统内核接口的权限。In this embodiment, the mapping relationship between the application and the access rights of the kernel interface can be formulated through preset rules. For example, in an optional embodiment of the present invention, the preset rule is that only the application that comes with the smart terminal has the right to access the kernel interface, so that only the application that is included in the system has access to the kernel on the smart terminal. The permissions of the interface, other third-party software installed on the smart terminal do not have access to the system kernel interface.
在本实施例中,应用程序与内核接口的访问权限之间的映射关系还可以由用户预先制定,在本实施例中,用户制定应用程序与安卓系统内核接口的访问权限之间的映射关系的方式不限,例如根据应用程序的名称、应用程序的功能分类、应用程序的可信度等级等进行制定,对安卓系统内核接口的类型不限,例如网络接口、文件系统接口、CPU调频接口等,应用程序可以设置为不具有对安卓系统内核接口的调用权限,也可以设置为具有一种或多种对安卓系统内核接口的调用权限。In this embodiment, the mapping relationship between the application and the access rights of the kernel interface may also be pre-defined by the user. In this embodiment, the user formulates a mapping relationship between the application and the access authority of the kernel interface of the Android system. The method is not limited, for example, according to the name of the application, the function classification of the application, the credibility level of the application, etc., and the type of the kernel interface of the Android system is not limited, such as a network interface, a file system interface, a CPU FM interface, and the like. The application can be set to not have the call permission to the Android kernel interface, or can be set to have one or more call permissions to the Android kernel interface.
在本发明一可选实施例中,若用户对一名称为A的应用程序制定的与内核接口的访问权限之间的映射关系为:该应用程序具有调用安卓系统内核网络接口权限,该应用程序A便具有调用安卓系统内核网络接口权限。In an optional embodiment of the present invention, if the user has a mapping relationship with an access right of the kernel interface defined by an application called A: the application has the right to invoke the kernel network interface of the Android system, the application A has the right to call the Android kernel network interface.
在本发明另一可选实施例中,若用户对文件管理类别的应用程序制定的与内核接口的访问权限之间的映射关系为:文件管理类别的应用程序具有调用安卓系统内核文件系统接口权限,此时,安卓系统内的所有文件管理类别的应用程序均具有调用安卓系统内核文件系统接口权限。In another optional embodiment of the present invention, if the user has a mapping relationship with the kernel interface for the application of the file management category, the application of the file management category has the right to invoke the kernel system file system interface of the Android system. At this time, all file management category applications in the Android system have the right to call the Android kernel file system interface.
在本发明另一可选实施例中,若用户对可信度为级别5的应用程序制定的与内核接口的访问权限之间的映射关系为:可信度为级别5的应用程序具有调用安卓系统内核CPU调频接口及网络接口的权限,此时,安卓系统内的所有可信度为级别5的应用程序均具有调用安卓系统内核CPU调频接口及网络接口的权限。 In another optional embodiment of the present invention, if the user has a mapping relationship with the kernel interface for the application whose credibility is level 5, the application with the credibility level 5 has the function of calling Android. The system kernel CPU FM interface and network interface permissions, at this time, all the credibility of the Android system level 5 applications have the right to call the Android system kernel CPU FM interface and network interface.
在本实施例中,用户制定应用程序与安卓系统内核接口的访问权限之间的映射关系的情景不限。例如可以是在应用程序安装时,也可以是在应用程序运行时。In this embodiment, the scenario in which the user formulates the mapping relationship between the application and the access authority of the Android system kernel interface is not limited. For example, it can be either when the application is installed or when the application is running.
在本发明一可选实施例中,当应用程序安装时,弹出一个界面,以供用户制定该应用程序与安卓系统内核接口的访问权限之间的映射关系。In an optional embodiment of the present invention, when the application is installed, an interface is popped up for the user to formulate a mapping relationship between the application and the access authority of the Android system kernel interface.
进一步,在本发明另一可选实施例中,在用户级别模式下,当某个应用程序使用系统调用访问系统内核时,运行陷阱指令将系统由用户级别模式转换为特权级别模式,并通过在特权级别模式下检测出该应用程序带有的所有接口调用,根据该应用程序带有的接口调用对应的内核接口询问用户该应用程序是否具有调用这些内核接口中一个或多个内核接口的权限。Further, in another optional embodiment of the present invention, in the user level mode, when an application accesses the system kernel by using a system call, the trap instruction is executed to convert the system from the user level mode to the privilege level mode, and In privilege level mode, all interface calls brought by the application are detected, and the corresponding kernel interface is invoked according to the interface of the application to ask the user whether the application has the right to call one or more kernel interfaces in the kernel interfaces.
可选的,若用户在应用程序安装时确定了该应用程序与安卓系统内核接口的访问权限之间的映射关系,则将该映射关系长时间存储,直至用户手动删除该映射关系。可选的,若用户每次使用某应用程序时都需确定该应用程序与安卓系统内核接口的访问权限之间的映射关系,可以将该映射关系临时存储,当用户结束此次对该应用程序的使用,关闭该应用程序的进程后自动删除该映射关系。Optionally, if the user determines the mapping relationship between the application and the access authority of the Android kernel interface when the application is installed, the mapping relationship is stored for a long time until the user manually deletes the mapping relationship. Optionally, if the user needs to determine the mapping relationship between the application and the access authority of the Android kernel interface each time the user uses an application, the mapping relationship may be temporarily stored, and the user ends the application to the application. The use of the mapping is automatically removed after the application's process is closed.
在本实施例中,该权限映射表生成之后,便对该权限映射表的信息进行监控。当应用程序申请修改该权限映射表,在应用程序提交修改权限请求时,例如删除之前某个应用程序与系统内核接口间的映射关系或者新增某个应用程序与系统内核接口之间的映射关系,则生成一个警告画面,提示用户需要进行身份认证,可以是通过密码验证、指纹验证、面部识别等方式,只有通过认证才可完成修改权限映射表的操作;否则不对该权限映射表信息做出修改。In this embodiment, after the permission mapping table is generated, the information of the rights mapping table is monitored. When the application applies to modify the permission mapping table, when the application submits the modification permission request, for example, deletes the mapping relationship between an application and the system kernel interface or adds a mapping relationship between an application and the system kernel interface. , a warning screen is generated, prompting the user to perform identity authentication, which may be through password verification, fingerprint verification, facial recognition, etc., and only through authentication can complete the operation of modifying the permission mapping table; otherwise, the permission mapping table information is not made. modify.
本实施例中,通过确定应用程序与安卓系统内核接口的访问权限之间的映射关系,使得只有具有访问系统内核接口权限的应用程序才能调用其权限范围内可以调用的安卓系统内核接口,一方面给了用户更好的使用感受,另一方面提高了安卓内核的安全性。In this embodiment, by determining the mapping relationship between the application and the access authority of the kernel interface of the Android system, only the application having the authority to access the kernel interface of the system can invoke the kernel interface of the Android system that can be called within the scope of the permission. Give users a better experience, and on the other hand improve the security of the Android kernel.
进一步,本发明提供一种应用程序的访问处理装置。Further, the present invention provides an access processing device for an application.
参照图4,图4为本发明应用程序的访问处理装置一实施例的功能模块示意图。在本实施例中,应用程序的访问处理装置包括:Referring to FIG. 4, FIG. 4 is a schematic diagram of functional modules of an access processing apparatus of an application program according to the present invention. In this embodiment, the access processing device of the application includes:
检测模块10,用于检测当前是否存在应用程序通过系统调用访问系统内核接口;The detecting module 10 is configured to detect whether an application currently accesses the system kernel interface through a system call;
安卓系统通常将整个虚拟地址空间划分为两部分:用户空间和内核空间。并且规定,用户空间不能直接访问内核空间,而内核空间则可以访问用户空间。通过这样的级别划分,可以使得内核空间更加稳定、安全。但是,若应用程序进程需要访问内核或使用某个内核函数,则通常需要通过系统调用(System Call)来完成。在安卓系统中,系统调用是用户空间访问内核空间的唯一途径。如图2所示。系统调用是内核提供的一组函数接口,它使得用户空间上运行的进程可以和内核之间进行交互。Android usually divides the entire virtual address space into two parts: user space and kernel space. It also stipulates that user space cannot directly access kernel space, while kernel space can access user space. By dividing this level, the kernel space can be made more stable and secure. However, if the application process needs to access the kernel or use a kernel function, it usually needs to pass the system call (System Call) to complete. In Android, system calls are the only way for user space to access kernel space. as shown in picture 2. A system call is a set of function interfaces provided by the kernel that allows a process running on user space to interact with the kernel.
例如,用户进程通过系统调用访问硬件设备或操作系统的某些资源等。安卓系统中所有应用程序运行时,都会通过安卓系统应用编程接口API产生系统调用来访问安卓系统内核,比如网络接口、文件系统接口、CPU调频接口等。本实施例中,对于应用程序通过系统调用访问系统内核接口的类型不限,例如,网络接口、文件系统接口、CPU调频接口等。For example, a user process accesses a hardware device or some resources of an operating system through a system call, and the like. When all applications in Android run, they will generate system calls through the Android application programming interface API to access the Android kernel, such as network interface, file system interface, CPU FM interface. In this embodiment, there is no limitation on the type of the application program accessing the system kernel interface through the system call, for example, a network interface, a file system interface, a CPU FM interface, and the like.
此外,本实施例中,对于检测应用程序产生的系统调用的方式不限,具体根据实际需要进行设置。In addition, in this embodiment, the manner of detecting the system call generated by the application is not limited, and is specifically set according to actual needs.
判断模块20,用于当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问系统内核接口的权限;The determining module 20 is configured to determine, when the application currently accesses the system kernel interface by using a system call, whether the application has the right to access the system kernel interface;
本实施例中,当检测到存在应用程序产生的系统调用时,为避免该系统调用所对应的系统内核接口执行相应内核函数,因此,需要先确定该应用程序是否具有访问该系统内核接口的权限。本实施例中,对于判断方式不限,比如,可预先设置相应的权限映射表进行判断。In this embodiment, when it is detected that there is a system call generated by the application, in order to avoid the corresponding kernel function of the system kernel interface corresponding to the system call, it is necessary to first determine whether the application has the right to access the kernel interface of the system. . In this embodiment, the determination manner is not limited. For example, the corresponding authority mapping table may be set in advance for determination.
需要进一步说明的是,如图2所示,本实施例中,具体通过系统内核自带的过滤函数对所有应用程序的系统调用进行过滤,进而确定该应用程序是否具有访问相应系统内核接口的权限。It should be further noted that, as shown in FIG. 2, in this embodiment, the system function of all applications is filtered by the filtering function provided by the system kernel, thereby determining whether the application has the right to access the corresponding system kernel interface. .
此外,由于过滤函数需要在安卓系统的特权级别模式下进行,因此,在对应用程序的系统调用进行过滤之前,需要将系统模式由用户级别模式转换为特权级别模式。其中,用户级别模式和特权级别模式是安卓系统的两种安全级别模式,通常所有的应用程序都运行在用户级别模式,而安卓内核的系统函数则运行在特权级别模式。同时,特权级别模式下,过滤函数可以扫描任何应用程序的任何系统调用。In addition, since the filter function needs to be performed in the privilege level mode of the Android system, the system mode needs to be converted from the user level mode to the privilege level mode before filtering the application system call. Among them, the user level mode and the privilege level mode are two security level modes of the Android system. Generally, all applications run in the user level mode, and the Android kernel system functions run in the privilege level mode. At the same time, in privilege level mode, the filter function can scan any system call of any application.
本实施例中,对于用户级别模式转换为特权级别模式的实现方式不限。比如,通过陷阱指令产生系统调用以引发处理机中断的指令,进而由用户级别模式转换为特权级别模式。In this embodiment, the implementation manner of converting the user level mode to the privilege level mode is not limited. For example, a trap call generates a system call to trigger a processor interrupt, which in turn is converted from a user-level mode to a privileged-level mode.
处理模块30,用于当所述应用程序不具有访问系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。The processing module 30 is configured to intercept the system call when the application does not have the right to access the system kernel interface to prevent the application from accessing the system kernel interface.
本实施例中,当确定当前应用程序不具有访问系统内核接口的权限时,则拦截该应用程序所产生的系统调用,进而从根本上杜绝具有恶意的应用程序访问系统内核接口,从而造成安全隐患。In this embodiment, when it is determined that the current application does not have the right to access the system kernel interface, the system call generated by the application is intercepted, thereby fundamentally preventing malicious applications from accessing the system kernel interface, thereby causing security risks. .
本实施例中,对于拦截应用程序产生的系统调用的方式不限,比如,在内核空间中,当安卓系统处于特权级别模式下时,通过系统内核自带的拦截函数对非法应用程序的系统调用进行拦截。In this embodiment, the manner of intercepting the system call generated by the application is not limited. For example, in the kernel space, when the Android system is in the privilege level mode, the system function of the illegal application is intercepted by the intercept function of the system kernel. Intercept.
本实施例中,通常带有恶意的应用程序运行时,其为实现某一功能或目的,一般都会通过系统调用来访问系统内核接口,进而对用户造成安全隐患。因此,可通过检测是否存在应用程序通过系统调用访问系统内核接口,当存在时,则对该应用程序是否具有访问系统内核接口的权限进行判断,若该应用程序不具有相应权限,则拦截该应用程序发出的系统调用,以防止该应用程序非法访问系统内核接口。本发明可在应用程序进行安全扫描的基础上,进一步防止非法应用程序访问系统内核接口,进而提升系统运行的安全性。In this embodiment, when a malicious application is usually running, in order to implement a certain function or purpose, the system kernel interface is generally accessed through a system call, thereby causing a security risk to the user. Therefore, by detecting whether an application exists to access the system kernel interface through a system call, when it exists, it determines whether the application has the right to access the system kernel interface, and if the application does not have the corresponding permission, intercepts the application. A system call issued by the program to prevent the application from illegally accessing the system kernel interface. The invention can further prevent the illegal application from accessing the system kernel interface on the basis of the security scan of the application, thereby improving the security of the system operation.
参照图5,图5为图4中判断模块的细化功能模块示意图,在本实施例中判断模块20包括: Referring to FIG. 5, FIG. 5 is a schematic diagram of a refinement function module of the judging module in FIG. 4. In the embodiment, the judging module 20 includes:
获取单元201,用于当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;The obtaining unit 201 is configured to acquire, when the application currently accesses the system kernel interface by using a system call, the identity information of the application, and the permission mapping table of the application accessing the kernel interface;
本实施例中,对获取的应用程序的身份信息不限,比如可以是进程PID、应用程序名称、应用程序类别、应用程序可信度等级等。例如,获取的应用程序的身份信息可以是进程PID:1234,应用程序名称:A,应用程序类别:文件管理类、应用程序可信度等级:级别3。In this embodiment, the identity information of the acquired application is not limited, and may be, for example, a process PID, an application name, an application category, an application credibility level, and the like. For example, the acquired application's identity information may be process PID: 1234, application name: A, application category: file management class, application credibility level: level 3.
本实施例中,应用程序访问内核接口的权限映射表可以预先根据应用程序的类别、应用程序的可信度、内核接口的机密级别等进行设置。In this embodiment, the permission mapping table of the application accessing the kernel interface may be set in advance according to the category of the application, the credibility of the application, the confidentiality level of the kernel interface, and the like.
例如,根据应用程序的类别设置的应用程序访问内核接口的权限映射表,如表3所示。For example, an application that is set according to the category of the application accesses the permission mapping table of the kernel interface, as shown in Table 3.
表3
应用程序类别 系统内核接口访问权限
文件管理 接口A、B、C
文字处理 所有接口
图片展示 接口A、B、C、D、E
table 3
Application category System kernel interface access
Document management Interface A, B, C
Word processing All interfaces
image display Interface A, B, C, D, E
例如,根据应用程序的可信度设置的应用程序访问内核接口的权限映射表,如表4所示:For example, an application that is set according to the credibility of the application accesses the permissions map of the kernel interface, as shown in Table 4:
表4
应用程序可信度 系统内核接口访问权限
级别1 接口A、B、C
级别2 接口A、B、C
级别3 接口A、B、C、D、E
Table 4
Application credibility System kernel interface access
Level 1 Interface A, B, C
Level 2 Interface A, B, C
Level 3 Interface A, B, C, D, E
判断单元202,用于根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限。The determining unit 202 is configured to determine, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface.
本实施例中,若存在应用程序通过系统调用访问安卓系统内核接口,则获取到如表3所示的应用程序与内核接口的访问权限之间的映射关系,且获取到应用程序的身份信息,根据该应用程序的身份信息得知该应用程序属于图片展示类别,则根据表3可判断该应用程序不具有访问安卓系统内核接口的权限。In this embodiment, if the application program accesses the kernel interface of the Android system through the system call, the mapping relationship between the application program and the access authority of the kernel interface as shown in Table 3 is obtained, and the identity information of the application is obtained, According to the identity information of the application, it is known that the application belongs to the picture display category, and according to Table 3, it can be judged that the application does not have the right to access the kernel interface of the Android system.
进一步,在本发明应用程序的访问处理装置另一实施例中,基于上述本发明应用程序的访问处理装置一实施例,在本实施例中,处理模块30还用于: Further, in another embodiment of the access processing device of the application program of the present invention, an embodiment of the access processing device based on the application program of the present invention described above, in the embodiment, the processing module 30 is further configured to:
当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。 When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
在本实施例中,若应用程序具有访问系统内核网络接口的权限,则该应用程序便只能通过系统调用访问系统内核网络接口。In this embodiment, if the application has the right to access the system kernel network interface, the application can only access the system kernel network interface through the system call.
在本发明一可选实施例中,若应用程序通过系统调用访问系统内核网络接口,且判断出该应用程序具有访问系统内核网络接口的权限,则调用系统调用号对应的内核函数,以达到该应用程序访问系统内核网络接口的目的。系统调用号为应用程序通过系统调用访问系统内核时产生。In an optional embodiment of the present invention, if the application accesses the system kernel network interface through a system call, and determines that the application has the right to access the system kernel network interface, the kernel function corresponding to the system call number is invoked to achieve the The purpose of the application to access the system kernel network interface. The system call number is generated when the application accesses the system kernel through a system call.
在本实施例中,当应用程序具有合法权限访问系统内核接口时,应用程序通过应用编程接口来使用系统调用,并产生系统调用号,通过在系统调用表中找出的与该系统调用号对应的安卓系统内核函数,从而在安卓系统内核中调用该内核函数,以实现应用程序对安卓系统内核接口的系统调用。In this embodiment, when the application has legal permission to access the system kernel interface, the application program uses the system call through the application programming interface, and generates a system call number, which is found in the system call table and corresponds to the system call number. The Android kernel function, which is called in the Android kernel to implement the system call to the Android kernel interface.
进一步,在本发明应用程序的访问处理装置另一实施例中,基于上述本发明应用程序的访问处理装置一实施例,在本实施例中,处理模块30具体还用于:Further, in another embodiment of the access processing device of the application program of the present invention, an embodiment of the access processing device based on the application program of the present invention described above, in the embodiment, the processing module 30 is further configured to:
当所述应用程序不具有访问系统内核接口的权限时,拦截所述系统调用,并生成拦截预警提示。When the application does not have permission to access the system kernel interface, the system call is intercepted and an intercept warning prompt is generated.
本实施例中,当应用程序不具有合法权限访问系统内核时,中止应用程序访问系统内核的方式不限,可以是对该应用程序通过应用编程接口API产生的系统调用进行拦截,也可以直接杀死这个应用程序进程。并退出内核空间返回用户空间,系统将产生入侵报告并推送给用户,例如应用程序名称C,于时间T,非法调用安卓系统内核接口,已阻止”,还可以发出提示声音提示用户。In this embodiment, when the application does not have the legal permission to access the system kernel, the method for suspending the application to access the kernel of the system is not limited, and may be intercepting the system call generated by the application through the application programming interface API, or directly killing Dead this application process. And exit the kernel space to return to the user space, the system will generate an intrusion report and push it to the user, for example, the application name C, at time T, illegally call the Android kernel interface, blocked, and can also prompt the user to be prompted.
进一步,在本发明应用程序的访问处理装置另一实施例中,基于上述本发明应用程序的访问处理装置一实施例,在本实施例中,检测模块10还用于:Further, in another embodiment of the access processing device of the application program of the present invention, an embodiment of the access processing device based on the application program of the present invention described above, in the embodiment, the detecting module 10 is further configured to:
检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
在本实施例中,应用程序与内核接口的访问权限之间的映射关系可以通过预置的规则进行制定。例如,在本发明一可选实施例中,预置规则为:只有智能终端自带的应用程序具有访问内核接口的权限,从而在该智能终端上只有其系统自带的应用程序才具有访问内核接口的权限,安装在智能终端上的其他第三方软件均不具有访问系统内核接口的权限。In this embodiment, the mapping relationship between the application and the access rights of the kernel interface can be formulated through preset rules. For example, in an optional embodiment of the present invention, the preset rule is that only the application that comes with the smart terminal has the right to access the kernel interface, so that only the application that is included in the system has access to the kernel on the smart terminal. The permissions of the interface, other third-party software installed on the smart terminal do not have access to the system kernel interface.
在本实施例中,应用程序与内核接口的访问权限之间的映射关系还可以由用户预先制定,在本实施例中,用户制定应用程序与安卓系统内核接口的访问权限之间的映射关系的方式不限,例如根据应用程序的名称、应用程序的功能分类、应用程序的可信度等级等进行制定,对安卓系统内核接口的类型不限,例如网络接口、文件系统接口、CPU调频接口等,应用程序可以设置为不具有对安卓系统内核接口的调用权限,也可以设置为具有一种或多种对安卓系统内核接口的调用权限。In this embodiment, the mapping relationship between the application and the access rights of the kernel interface may also be pre-defined by the user. In this embodiment, the user formulates a mapping relationship between the application and the access authority of the kernel interface of the Android system. The method is not limited, for example, according to the name of the application, the function classification of the application, the credibility level of the application, etc., and the type of the kernel interface of the Android system is not limited, such as a network interface, a file system interface, a CPU FM interface, and the like. The application can be set to not have the call permission to the Android kernel interface, or can be set to have one or more call permissions to the Android kernel interface.
在本发明一可选实施例中,若用户对一名称为A的应用程序制定的与内核接口的访问权限之间的映射关系为:该应用程序具有调用安卓系统内核网络接口权限,该应用程序A便具有调用安卓系统内核网络接口权限。In an optional embodiment of the present invention, if the user has a mapping relationship with an access right of the kernel interface defined by an application called A: the application has the right to invoke the kernel network interface of the Android system, the application A has the right to call the Android kernel network interface.
在本发明另一可选实施例中,若用户对文件管理类别的应用程序制定的与内核接口的访问权限之间的映射关系为:文件管理类别的应用程序具有调用安卓系统内核文件系统接口权限,此时,安卓系统内的所有文件管理类别的应用程序均具有调用安卓系统内核文件系统接口权限。In another optional embodiment of the present invention, if the user has a mapping relationship with the kernel interface for the application of the file management category, the application of the file management category has the right to invoke the kernel system file system interface of the Android system. At this time, all file management category applications in the Android system have the right to call the Android kernel file system interface.
在本发明另一可选实施例中,若用户对可信度为级别5的应用程序制定的与内核接口的访问权限之间的映射关系为:可信度为级别5的应用程序具有调用安卓系统内核CPU调频接口及网络接口的权限,此时,安卓系统内的所有可信度为级别5的应用程序均具有调用安卓系统内核CPU调频接口及网络接口的权限。 In another optional embodiment of the present invention, if the user has a mapping relationship with the kernel interface for the application whose credibility is level 5, the application with the credibility level 5 has the function of calling Android. The system kernel CPU FM interface and network interface permissions, at this time, all the credibility of the Android system level 5 applications have the right to call the Android system kernel CPU FM interface and network interface.
在本实施例中,用户制定应用程序与安卓系统内核接口的访问权限之间的映射关系的情景不限。例如可以是在应用程序安装时,也可以是在应用程序运行时。In this embodiment, the scenario in which the user formulates the mapping relationship between the application and the access authority of the Android system kernel interface is not limited. For example, it can be either when the application is installed or when the application is running.
在本发明一可选实施例中,当应用程序安装时,弹出一个界面,以供用户制定该应用程序与安卓系统内核接口的访问权限之间的映射关系。In an optional embodiment of the present invention, when the application is installed, an interface is popped up for the user to formulate a mapping relationship between the application and the access authority of the Android system kernel interface.
进一步,在本发明另一可选实施例中,在用户级别模式下,当某个应用程序使用系统调用访问系统内核时,运行陷阱指令将系统由用户级别模式转换为特权级别模式,并通过在特权级别模式下检测出该应用程序带有的所有接口调用,根据该应用程序带有的接口调用对应的内核接口询问用户该应用程序是否具有调用这些内核接口中一个或多个内核接口的权限。Further, in another optional embodiment of the present invention, in the user level mode, when an application accesses the system kernel by using a system call, the trap instruction is executed to convert the system from the user level mode to the privilege level mode, and In privilege level mode, all interface calls brought by the application are detected, and the corresponding kernel interface is invoked according to the interface of the application to ask the user whether the application has the right to call one or more kernel interfaces in the kernel interfaces.
可选的,若用户在应用程序安装时确定了该应用程序与安卓系统内核接口的访问权限之间的映射关系,则将该映射关系长时间存储,直至用户手动删除该映射关系。可选的,若用户每次使用某应用程序时都需确定该应用程序与安卓系统内核接口的访问权限之间的映射关系,可以将该映射关系临时存储,当用户结束此次对该应用程序的使用,关闭该应用程序的进程后自动删除该映射关系。Optionally, if the user determines the mapping relationship between the application and the access authority of the Android kernel interface when the application is installed, the mapping relationship is stored for a long time until the user manually deletes the mapping relationship. Optionally, if the user needs to determine the mapping relationship between the application and the access authority of the Android kernel interface each time the user uses an application, the mapping relationship may be temporarily stored, and the user ends the application to the application. The use of the mapping is automatically removed after the application's process is closed.
在本实施例中,该权限映射表生成之后,便对该权限映射表的信息进行监控。在应用程序申请修改该权限映射表并提交修改权限请求时,例如删除之前某个应用程序与系统内核接口间的映射关系或者新增某个应用程序与系统内核接口之间的映射关系,则生成一个警告画面,提示用户需要进行身份认证,可以是通过密码验证、指纹验证、面部识别等方式,只有通过认证才可完成修改权限映射表的操作;否则不对该权限映射表信息做出修改。In this embodiment, after the permission mapping table is generated, the information of the rights mapping table is monitored. Generated when the application requests to modify the permission mapping table and submit a modification permission request, such as deleting the mapping relationship between an application and the system kernel interface or adding a mapping relationship between an application and the system kernel interface. A warning screen prompts the user to perform identity authentication, which may be through password verification, fingerprint verification, facial recognition, etc., and only through authentication can the operation of modifying the permission mapping table be completed; otherwise, the permission mapping table information is not modified.
本实施例中,通过确定应用程序与安卓系统内核接口的访问权限之间的映射关系,使得只有具有访问系统内核接口权限的应用程序才能调用其权限范围内可以调用的安卓系统内核接口,一方面给了用户更好的使用感受,另一方面提高了安卓内核的安全性。In this embodiment, by determining the mapping relationship between the application and the access authority of the kernel interface of the Android system, only the application having the authority to access the kernel interface of the system can invoke the kernel interface of the Android system that can be called within the scope of the permission. Give users a better experience, and on the other hand improve the security of the Android kernel.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (14)

  1. 一种应用程序的访问处理方法,其特征在于,所述应用程序的访问处理方法包括: An access processing method for an application, characterized in that the access processing method of the application comprises:
    检测当前是否存在应用程序通过系统调用访问系统内核接口;Detect whether there is an application currently accessing the system kernel interface through a system call;
    当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;Obtaining the identity information of the application and the permission mapping table of the application accessing the kernel interface when the application currently accesses the system kernel interface through the system call;
    根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限;Determining, according to the identity information and the rights mapping table, whether the application has the right to access a system kernel interface;
    当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  2. 如权利要求1所述的应用程序的访问处理方法,其特征在于,所述应用程序的访问处理方法还包括:The access processing method of the application according to claim 1, wherein the access processing method of the application further comprises:
    检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
  3. 一种应用程序的访问处理方法,其特征在于,所述应用程序的访问处理方法包括:An access processing method for an application, characterized in that the access processing method of the application comprises:
    检测当前是否存在应用程序通过系统调用访问系统内核接口;Detect whether there is an application currently accessing the system kernel interface through a system call;
    当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限;When the currently existing application accesses the system kernel interface through a system call, determining whether the application has the right to access the system kernel interface;
    当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface.
  4. 如权利要求3所述的应用程序的访问处理方法,其特征在于,所述当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口包括:The access processing method of an application according to claim 3, wherein said said system call is intercepted when said application does not have permission to access said system kernel interface to prevent said application from accessing System kernel interfaces include:
    当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  5. 如权利要求3所述的应用程序的访问处理方法,其特征在于,所述当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限之后包括: The access processing method of an application according to claim 3, wherein when the currently existing application accesses the system kernel interface through a system call, it is determined whether the application has the right to access the system kernel interface. include:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  6. 如权利要求4所述的应用程序的访问处理方法,其特征在于,所述当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限之后包括: The access processing method of an application according to claim 4, wherein when the currently existing application accesses the system kernel interface through a system call, it is determined whether the application has the right to access the system kernel interface. include:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  7. 一种应用程序的访问处理装置,其特征在于,所述应用程序的访问处理装置包括: An access processing device for an application, characterized in that the access processing device of the application comprises:
    检测模块,用于检测当前是否存在应用程序通过系统调用访问系统内核接口;a detection module, configured to detect whether an application currently accesses a system kernel interface through a system call;
    判断模块,用于当当前存在应用程序通过系统调用访问系统内核接口时,判断所述应用程序是否具有访问所述系统内核接口的权限;a judging module, configured to determine, when the application currently accesses the system kernel interface by using a system call, whether the application has the right to access the kernel interface of the system;
    处理模块,用于当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口。And a processing module, configured to: when the application does not have the right to access the system kernel interface, intercept the system call to prevent the application from accessing the system kernel interface.
  8. 如权利要求7所述的应用程序的访问处理装置,其特征在于,所述判断模块包括: The access processing device of the application of claim 7, wherein the determining module comprises:
    获取单元,用于当当前存在应用程序通过系统调用访问系统内核接口时,获取所述应用程序的身份信息、应用程序访问内核接口的权限映射表;An obtaining unit, configured to acquire identity information of the application and a permission mapping table of the application accessing the kernel interface when the currently existing application accesses the system kernel interface through the system call;
    判断单元,用于根据所述身份信息、所述权限映射表,判断所述应用程序是否具有访问系统内核接口的权限。The determining unit is configured to determine, according to the identity information and the rights mapping table, whether the application has the right to access the system kernel interface.
  9. 如权利要求8所述的应用程序的访问处理装置,其特征在于,所述检测模块还用于:The access processing device of the application of claim 8, wherein the detecting module is further configured to:
    检测是否存在修改所述权限映射表的指令,若存在,则生成权限修改预警提示。It is detected whether there is an instruction to modify the permission mapping table, and if yes, a permission modification warning prompt is generated.
  10. 如权利要求7所述的应用程序的访问处理装置,其特征在于,所述处理模块具体还用于: The access processing device of the application according to claim 7, wherein the processing module is further configured to:
    当所述应用程序不具有访问所述系统内核接口的权限时,拦截所述系统调用,以防止所述应用程序访问系统内核接口,并生成拦截预警提示。When the application does not have access to the system kernel interface, the system call is intercepted to prevent the application from accessing the system kernel interface and generating an intercept warning prompt.
  11. 如权利要求7所述的应用程序的访问处理装置,其特征在于,所述处理模块还用于: The access processing device of the application of claim 7, wherein the processing module is further configured to:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  12. 如权利要求8所述的应用程序的访问处理装置,其特征在于,所述处理模块还用于: The access processing device of the application of claim 8, wherein the processing module is further configured to:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  13. 如权利要求9所述的应用程序的访问处理装置,其特征在于,所述处理模块还用于: The access processing device of the application according to claim 9, wherein the processing module is further configured to:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
  14. 如权利要求10所述的应用程序的访问处理装置,其特征在于,所述处理模块还用于: The access processing device of the application of claim 10, wherein the processing module is further configured to:
    当所述应用程序具有访问所述系统内核接口的权限时,根据预置的函数映射表,确定所述系统调用所对应的内核函数,以供调用执行所述内核函数。When the application has the right to access the system kernel interface, the kernel function corresponding to the system call is determined according to a preset function mapping table for invoking execution of the kernel function.
PCT/CN2016/112862 2016-12-01 2016-12-29 Access processing method and device for application WO2018098881A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611093519.4 2016-12-01
CN201611093519.4A CN106778208A (en) 2016-12-01 2016-12-01 The access processing method and device of application program

Publications (1)

Publication Number Publication Date
WO2018098881A1 true WO2018098881A1 (en) 2018-06-07

Family

ID=58882696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112862 WO2018098881A1 (en) 2016-12-01 2016-12-29 Access processing method and device for application

Country Status (2)

Country Link
CN (1) CN106778208A (en)
WO (1) WO2018098881A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871287A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 Interface call method, device, computer installation and storage medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679412B (en) * 2017-09-15 2021-05-18 福建星瑞格软件有限公司 Method and device for intercepting database access data
CN110287694B (en) * 2019-06-26 2021-08-20 维沃移动通信有限公司 Application program management method, mobile terminal and storage medium
CN110276209B (en) * 2019-06-28 2022-01-28 维沃移动通信有限公司 Alarm method and mobile terminal
CN111124506A (en) * 2019-11-12 2020-05-08 中国电子科技集团公司第三十研究所 Operation card driving implementation method based on application layer
CN111079135A (en) * 2019-11-27 2020-04-28 浪潮商用机器有限公司 Kernel access method, device and medium
CN111083541B (en) * 2019-12-30 2022-10-04 深圳Tcl数字技术有限公司 Interface calling method and device, smart television and readable storage medium
CN112084490A (en) * 2020-09-09 2020-12-15 南京烽火星空通信发展有限公司 Method and system for realizing protection of software source code based on Linux kernel calling
CN112163130A (en) * 2020-10-28 2021-01-01 河北时代电子有限公司 Access processing method for social security data query
CN112199662B (en) * 2020-12-09 2021-02-19 江苏东大集成电路系统工程技术有限公司 Permission verification system based on self-adaptive plug-in

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8621624B2 (en) * 2008-06-17 2013-12-31 Electronics And Telecommunications Research Institute Apparatus and method for preventing anomaly of application program
CN103593238A (en) * 2012-08-16 2014-02-19 腾讯科技(深圳)有限公司 Method and device for controlling invocation of application programming interfaces
CN104680084A (en) * 2015-03-20 2015-06-03 北京瑞星信息技术有限公司 Method and system for protecting user privacy in computer
CN105701415A (en) * 2016-01-04 2016-06-22 上海斐讯数据通信技术有限公司 Kernel authority management system and method of mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542182A (en) * 2010-12-15 2012-07-04 苏州凌霄科技有限公司 Device and method for controlling mandatory access based on Windows platform
CN103268451B (en) * 2013-06-08 2017-12-05 上海斐讯数据通信技术有限公司 A kind of dynamic permission management system based on mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8621624B2 (en) * 2008-06-17 2013-12-31 Electronics And Telecommunications Research Institute Apparatus and method for preventing anomaly of application program
CN103593238A (en) * 2012-08-16 2014-02-19 腾讯科技(深圳)有限公司 Method and device for controlling invocation of application programming interfaces
CN104680084A (en) * 2015-03-20 2015-06-03 北京瑞星信息技术有限公司 Method and system for protecting user privacy in computer
CN105701415A (en) * 2016-01-04 2016-06-22 上海斐讯数据通信技术有限公司 Kernel authority management system and method of mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871287A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 Interface call method, device, computer installation and storage medium

Also Published As

Publication number Publication date
CN106778208A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2018098881A1 (en) Access processing method and device for application
WO2019227557A1 (en) Key management method, device, storage medium and apparatus
WO2013079010A1 (en) Processing method and device in application running
WO2019128007A1 (en) Container logon method, application server, system, and storage medium
WO2016101745A1 (en) Activating mobile terminal token method
WO2019100604A1 (en) Account inquiry method, apparatus, device, and computer readable storage medium
WO2019051887A1 (en) Method and device for controlling home appliance, and computer-readable storage medium
WO2020224247A1 (en) Blockchain–based data provenance method, apparatus and device, and readable storage medium
WO2014187168A1 (en) Information storage and management method and apparatus based on webkit browser
WO2015172684A1 (en) Ap connection method, terminal, and server
WO2019127971A1 (en) Image synchronization method for image registry, system, device, and storage medium
WO2019196213A1 (en) Interface test method, apparatus and device, and computer-readable storage medium
WO2014019183A1 (en) Method and system for controlling terminal device to access wireless network
WO2019161597A1 (en) Information sending method, apparatus and device based on instant messaging, and storage medium
WO2019051902A1 (en) Terminal control method, air conditioner and computer-readable storage medium
WO2019033904A1 (en) Login authentication method and system, and computer-readable storage medium
WO2019051898A1 (en) Device control method and apparatus, and computer readable storage medium
WO2017092498A1 (en) Information management method and user terminal
WO2015196960A1 (en) Method and system for checking security of url for mobile terminal
WO2018028121A1 (en) Method and device for managing storage space of data partition
WO2018076870A1 (en) Data processing method and apparatus, storage medium, server, and data processing system
WO2019085301A1 (en) Missed call feedback method, apparatus and device for fixed phone, and readable storage medium
WO2018053963A1 (en) Method and apparatus for upgrading system of smart television
WO2017071352A1 (en) Password push method, push system, and terminal device
WO2018034491A1 (en) A primary device, an accessory device, and methods for processing operations on the primary device and the accessory device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16923001

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16923001

Country of ref document: EP

Kind code of ref document: A1