WO2013189263A1 - 在移动终端中监控api函数调用的方法和装置 - Google Patents
在移动终端中监控api函数调用的方法和装置 Download PDFInfo
- Publication number
- WO2013189263A1 WO2013189263A1 PCT/CN2013/077321 CN2013077321W WO2013189263A1 WO 2013189263 A1 WO2013189263 A1 WO 2013189263A1 CN 2013077321 W CN2013077321 W CN 2013077321W WO 2013189263 A1 WO2013189263 A1 WO 2013189263A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- function
- monitored
- monitoring
- api
- api function
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/86—Event-based monitoring
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/865—Monitoring of software
Definitions
- the present application relates to the field of computer technologies, and in particular, to a method and apparatus for monitoring API function calls in a mobile terminal. Background of the invention
- an application is typically developed for the mobile terminal based on the operating system of the mobile terminal (e.g., cell phone, tablet, etc.).
- the application needs to call the application programming interface (API) function provided by the operating system.
- API application programming interface
- the application needs to call the API function of the mobile terminal's operating system to access the address book, so that the function of viewing the address book data can be realized.
- some applications in the mobile terminal may perform some operations involving user data security without the user's knowledge or authorization from the user, for example, reading the stored in the mobile terminal.
- the application is prevented from stealing user privacy and dynamic monitoring.
- Embodiments of the present invention provide a method and apparatus for monitoring API function calls in a mobile terminal, so that all API function calls that need to be monitored can be simultaneously monitored in a monitoring process, thereby making API functions for each required monitoring.
- the monitoring work called is made more simple and fast.
- a method for monitoring an API function call in a mobile terminal comprising: presetting at least one API function to be monitored and a response event corresponding to the at least one API function to be monitored;
- the current monitoring data output by the sending function monitoring module is obtained in real time; when the current monitoring data satisfies the response event, the monitoring processing module performs monitoring processing corresponding to the response event.
- An apparatus for monitoring an API function call in a mobile terminal comprising a memory, and a processor in communication with the memory, wherein the memory includes a setup instruction, an information acquisition instruction, and a monitoring process executable by the processor Instruction
- the setting instruction is configured to preset at least one API function to be monitored and a response event corresponding to the API function to be monitored;
- the information acquisition instruction is configured to acquire current monitoring data of the sending function in real time; and the monitoring processing instruction is configured to perform monitoring processing corresponding to the response event when the acquired current monitoring data satisfies the response event.
- FIG. 1 is a flow chart of a method for monitoring an API function call in a mobile terminal.
- 2 is a flowchart of a method for monitoring an API function call in a mobile terminal according to an embodiment of the present invention; Figure.
- FIG. 3 is a schematic diagram showing the structure of an apparatus for monitoring an API function call in a mobile terminal according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of another apparatus for monitoring API function calls in a mobile terminal according to an embodiment of the present invention. Mode for carrying out the invention
- FIG. 1 is a flow chart of a method for monitoring an API function call in a mobile terminal. As shown in FIG. 1, the method includes the following steps.
- Step 101 Determine each API function that needs to be monitored.
- the API function called by the operation behavior may be determined first, and the API function to be called is set to The API function that needs to be monitored.
- Step 102 Set a listening processing module corresponding to each API function to be monitored.
- a corresponding listening processing module is set for the API function to be monitored, and the listening processing module is configured to monitor the call of the API function to be monitored and perform subsequent processing.
- Step 103 Listen to each API function that needs to be monitored by using each interception processing module.
- Step 104 When the API function to be monitored is called, the monitoring processing module is used for subsequent processing.
- the subsequent processing may be at least one of the following: sending reminder information or inquiry information to the user, recording information of the application that invoked the API function, and interrupting An application that calls the API function, etc.
- FIG. 2 is a flow chart of a method for monitoring an API function call in a mobile terminal according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps.
- Step 201 preset one or more API functions to be monitored and a response event corresponding to the API function to be monitored.
- one or more API functions to be monitored may be determined in a preset manner, and then corresponding response events are set for each API function to be monitored.
- the API function to be monitored may be at least one of the following functions: deleting a contact function (ABAddressBookRemoveRecord), accessing a network function (for example, a setURL method of the NSMutableURLRequest class), obtaining an application installation.
- List function MobilelnstallationBrowse
- a function to send text messages a function to read contact information, a function to start an application, a function to access a file, and a function to make a call.
- the response event corresponding to the API function to be monitored may be preset according to the actual application.
- the response event can be: At least one application running in the system invokes at least one API function to be monitored.
- the response event corresponding to the access network function can be set as: Any one or more applications that are running in the system call the access network function (for example, the setURL of the NSMutableURLRequest class) Method) to connect to the network; when the API function to be monitored is to obtain the application installation list function, the response event corresponding to the acquisition application installation list function can be set as: Any one or more application calls running in the system The MobilelnstallationBrowse function gets a list of application installations in the mobile terminal.
- the access network function for example, the setURL of the NSMutableURLRequest class
- the response event corresponding to the acquisition application installation list function can be set as: Any one or more application calls running in the system The MobilelnstallationBrowse function gets a list of application installations in the mobile terminal.
- Step 202 Set a monitoring processing module according to all API functions to be monitored.
- a plurality of API functions to be monitored may be set in advance.
- Only one monitoring processing module is set for all API functions to be monitored for subsequent monitoring processing.
- the subsequent monitoring process may be at least one of the following: recording information of an application that invokes an API function to be monitored, interrupting an application that invokes an API function to be monitored, and sending a reminder or query message to the user. And according to the user's instructions or pre-set default operations, for example, to allow or block the operation of the corresponding application, but also other pre-set processing operations.
- Step 203 Acquire current monitoring data output by the sending function monitoring module in real time.
- various applications running in a mobile terminal are written using a specific programming language.
- a mobile terminal produced by Apple for example, an iPhone series mobile phone or an iPad system tablet
- applications running are generally written using the Objective_c language.
- the objective_c language is an object-oriented language in which no concept of object calling methods is used, but various functions are implemented by sending corresponding information to individual object methods. Among them, all the operations of sending corresponding information to each object method are implemented by the target information sending (objc_msgSend) function. Therefore, you only need to listen to the objc_msgSend function, you can listen to all the calls to the various API functions, so you can monitor one or more API function calls at the same time.
- target information sending objc_msgSend
- the sending function is the objc_msgSend function
- the sending function monitoring module is the objc_msgSend function listening module as an example.
- the objc_msgSend function listener module can be pre-set and used to monitor the send operation of the objc_msgSend function in real time, and output the corresponding current listener data, ie the current Listen for data.
- the current listening data may include: an object method corresponding to each sending operation of the objc_msgSend function. According to the current listening data, it can be known which information the objc_msgSend function sends to which object methods.
- the objc_msgSend function listening module can use the objc_msgSend function commonly used in the technical field to listen to the module. Therefore, the specific objc_msgSend function monitoring module setting method is not described herein.
- the corresponding current listening data can be obtained in real time from the objc_msgSend function listening module.
- Step 204 Record the obtained current interception data.
- the acquired current listening data may be recorded, for the technical personnel to have a logical relationship with the recorded monitoring data, and thus various operating behaviors of the application may be performed. Track and/or analyze.
- step and the subsequent step 205 may be performed simultaneously, or may be performed in a preset execution sequence.
- step 204 may be performed first, and then step 205 may be performed.
- this step can be omitted.
- Step 205 When the acquired current monitoring data satisfies the response event, the monitoring processing module performs monitoring processing corresponding to the response event.
- the current monitoring data meets a preset response event according to the obtained current monitoring data. For example, according to the acquired current monitoring data, it is determined whether there is at least one application currently running in the system. The at least one monitored API function is called, and if so, the current listening data satisfies the response event, so the monitoring processing module performs corresponding subsequent monitoring processing.
- the subsequent monitoring process may be at least one of the following: recording information of the application that invoked the monitored API function, and interrupting the called monitored
- An API function application that sends a reminder or query message to the user and processes it according to the user's instructions or preset default actions, such as allowing or blocking the operation of the corresponding application. It may also be other pre-set processing operations and the like.
- the sending function such as the objc_msgSend function
- the application invokes one or more API functions that are monitored, thereby simultaneously monitoring all API function calls in one monitoring process.
- the monitoring of API function calls becomes more straightforward and faster.
- multiple API function calls can be monitored at the same time, and the intercept data of the objc_msgSend function can also be recorded, so that the corresponding intercepted data can be correspondingly performed.
- Analysis so as to know the logical relationship between each API function called by a specific application, and then can track and/or analyze various operational behaviors of the application.
- an embodiment of the present invention further provides an apparatus for monitoring an API function in a mobile terminal.
- Figure 3 is a block diagram showing the structure of an apparatus for monitoring an API function in a mobile terminal in an embodiment of the present invention.
- the apparatus 300 includes: a setting module 301, an information obtaining module 302, and a monitoring processing module 303.
- the setting module 301 is configured to preset one or more API functions to be monitored and a response event corresponding to the API function to be monitored, and send the API function and the response event to be monitored to the monitoring processing module 303.
- the information acquisition module 302 is configured to acquire the current monitoring data of the sending function monitoring module in real time, and send the current monitoring data to the monitoring processing module 303.
- the module is the objc_msgSend function listener module.
- the monitoring processing module 303 is configured to perform corresponding subsequent monitoring processing when the acquired current monitoring data meets the response event.
- the apparatus 300 for monitoring API function calls in the mobile terminal may further include a storage module 304.
- the storage module 304 is configured to record the acquired current monitoring data.
- the apparatus 400 includes a memory 401 and a processor 402 in communication with the memory, wherein the memory includes a setup command 411, an information acquisition command 412, and a monitor processing instruction 413 that are executable by the processor.
- the setting instruction 411 is configured to preset at least one API function to be monitored and a response event corresponding to the API function to be monitored.
- the information acquisition instruction 412 is used to acquire the current listening data of the transmission function in real time.
- the send function is objc_msgSend function.
- the monitoring processing instruction 413 is configured to perform corresponding subsequent monitoring processing when the acquired current monitoring data satisfies the response event.
- the memory may further include a storage instruction 414 for recording the acquired current monitoring data.
- the sending function such as the objc_msgSend function
- the application invokes one or more API functions to be monitored, thereby implementing the same monitoring process.
- the monitoring of one or more specified API function calls is performed at the same time, and it is not necessary to perform an independent monitoring process for each API function call monitoring, so that the monitoring of API function calls becomes more simple and fast.
- multiple API function calls can be monitored at the same time, and objc_msgSend can also be recorded.
- the function listens to the data, thus enabling the technician to perform a logical relationship based on the recorded intercepted data, thereby tracking and/or analyzing various operational behaviors of the application.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Debugging And Monitoring (AREA)
- Telephonic Communication Services (AREA)
- Stored Programmes (AREA)
- Telephone Function (AREA)
Description
Claims
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US14/408,923 US9612886B2 (en) | 2012-06-18 | 2013-06-17 | Method and device for monitoring API function scheduling in mobile terminal |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210200327.4A CN103514075B (zh) | 2012-06-18 | 2012-06-18 | 在移动终端中监控api函数调用的方法和装置 |
| CN201210200327.4 | 2012-06-18 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013189263A1 true WO2013189263A1 (zh) | 2013-12-27 |
Family
ID=49768108
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2013/077321 Ceased WO2013189263A1 (zh) | 2012-06-18 | 2013-06-17 | 在移动终端中监控api函数调用的方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US9612886B2 (zh) |
| CN (1) | CN103514075B (zh) |
| WO (1) | WO2013189263A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110737465A (zh) * | 2018-07-20 | 2020-01-31 | 武汉斗鱼网络科技有限公司 | 一种函数调用路径获取的方法和相关装置 |
| CN112612555A (zh) * | 2020-12-24 | 2021-04-06 | 深圳赛安特技术服务有限公司 | 第三方库的调用链获取方法、装置、设备及存储介质 |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107846321B (zh) * | 2016-09-19 | 2022-03-11 | 阿里巴巴集团控股有限公司 | 一种接口的监控方法、装置及电子设备 |
| CN108228411A (zh) * | 2016-12-14 | 2018-06-29 | 北京国双科技有限公司 | 一种app界面监测的方法及移动终端 |
| CN107124400A (zh) * | 2017-04-01 | 2017-09-01 | 中国科学院信息工程研究所 | 基于安全策略的入侵防御装置及方法 |
| CN108572866B (zh) * | 2018-04-23 | 2021-05-14 | Oppo广东移动通信有限公司 | 一种应用程序管理方法、应用程序管理装置及移动终端 |
| CN109471804A (zh) * | 2018-11-14 | 2019-03-15 | 苏州科达科技股份有限公司 | iOS中的应用检测方法、装置及存储介质 |
| US11366704B2 (en) | 2018-11-27 | 2022-06-21 | Sap Se | Configurable analytics for microservices performance analysis |
| CN109582827A (zh) * | 2018-11-30 | 2019-04-05 | 深圳市小牛普惠投资管理有限公司 | 无埋点数据采集方法、装置、计算机设备以及存储介质 |
| CN109982315B (zh) * | 2019-03-15 | 2021-10-22 | Oppo广东移动通信有限公司 | 日志上传方法及相关设备 |
| CN112597130B (zh) * | 2020-12-22 | 2025-02-14 | 天聚地合(苏州)数据股份有限公司 | 一种数据预警方法、装置、电子设备及存储介质 |
| US12373327B2 (en) * | 2022-04-28 | 2025-07-29 | Twilio Inc. | Data logging for API usage analytics |
| CN120224298A (zh) * | 2023-12-27 | 2025-06-27 | 华为技术有限公司 | 通信方法、装置和系统 |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101478667A (zh) * | 2009-01-19 | 2009-07-08 | 北京中星微电子有限公司 | 网络视频监控系统中客户端向终端摄像装置传输信息方法 |
| CN101513008A (zh) * | 2006-07-31 | 2009-08-19 | 意大利电信股份公司 | 在电信终端上实现安全性的系统 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8291395B2 (en) * | 2006-03-31 | 2012-10-16 | Apple Inc. | Fast function call dispatching |
| CN101005497A (zh) * | 2006-11-27 | 2007-07-25 | 科博技术有限公司 | 一种阻止恶意代码入侵的系统及方法 |
| CN101854624A (zh) * | 2009-04-02 | 2010-10-06 | 联芯科技有限公司 | 移动终端的动态加载软件验证方法、监控方法和装置 |
| WO2013089695A1 (en) * | 2011-12-14 | 2013-06-20 | Intel Corporation | Method and system for monitoring calls to an application program interface (api) function |
| US9146787B2 (en) * | 2013-11-07 | 2015-09-29 | Accenture Global Services Limited | Analytics for application programming interfaces |
-
2012
- 2012-06-18 CN CN201210200327.4A patent/CN103514075B/zh active Active
-
2013
- 2013-06-17 US US14/408,923 patent/US9612886B2/en active Active
- 2013-06-17 WO PCT/CN2013/077321 patent/WO2013189263A1/zh not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101513008A (zh) * | 2006-07-31 | 2009-08-19 | 意大利电信股份公司 | 在电信终端上实现安全性的系统 |
| CN101478667A (zh) * | 2009-01-19 | 2009-07-08 | 北京中星微电子有限公司 | 网络视频监控系统中客户端向终端摄像装置传输信息方法 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110737465A (zh) * | 2018-07-20 | 2020-01-31 | 武汉斗鱼网络科技有限公司 | 一种函数调用路径获取的方法和相关装置 |
| CN110737465B (zh) * | 2018-07-20 | 2023-09-22 | 深圳市大梦龙途网络科技有限公司 | 一种函数调用路径获取的方法和相关装置 |
| CN112612555A (zh) * | 2020-12-24 | 2021-04-06 | 深圳赛安特技术服务有限公司 | 第三方库的调用链获取方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103514075A (zh) | 2014-01-15 |
| US9612886B2 (en) | 2017-04-04 |
| CN103514075B (zh) | 2016-06-29 |
| US20150193280A1 (en) | 2015-07-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2013189263A1 (zh) | 在移动终端中监控api函数调用的方法和装置 | |
| CN104217164B (zh) | 智能移动终端恶意软件的检测方法与装置 | |
| CN110727560B (zh) | 云服务报警方法及装置 | |
| US9740861B2 (en) | Method for detecting eavesdropping activity and terminal device | |
| US12182319B2 (en) | Software initiated camera and microphone indicator | |
| CN111147313B (zh) | 一种报文异常监控方法、装置、存储介质及电子设备 | |
| CN108153647A (zh) | 日志处理方法、装置、终端设备及存储介质 | |
| CN108170844A (zh) | 录屏文件的存储方法、装置、终端及存储介质 | |
| WO2022036865A1 (zh) | 日志文件自动抓取方法、装置和计算机设备 | |
| CN106445745A (zh) | 终端设备及其恢复出厂设置的方法 | |
| CN102938783A (zh) | 一种Socket处理方法、装置和Web服务器 | |
| CN108984234B (zh) | 一种移动终端与摄像装置的调用提示方法 | |
| CN115022309B (zh) | 在线客服远程交互方法、装置及电子设备 | |
| CN110727941B (zh) | 一种隐私数据保护方法、装置、终端设备及存储介质 | |
| CN110321189A (zh) | 一种在宿主程序中呈现寄宿程序的方法与设备 | |
| EP3525128B1 (en) | Method and device for realizing supporting function in application | |
| WO2016070690A1 (zh) | 实现终端设备上的网页和应用间通信的方法、装置和系统 | |
| CN103516864B (zh) | 在移动终端中监控预设操作的方法和装置 | |
| CN113360863B (zh) | 操作执行方法、装置、电子设备及介质 | |
| WO2022142620A1 (zh) | 一种识别二维码的方法与设备 | |
| CN116560879B (zh) | 人脸识别服务的调用方法、装置、终端设备及存储介质 | |
| CN110958315A (zh) | 一种呈现消息通知的方法与设备 | |
| CN103442360A (zh) | 移动应用的安全性检测方法及移动终端 | |
| CN114722018A (zh) | 日志信息处理方法、装置、电子设备及可读存储介质 | |
| US10516570B1 (en) | Systems and methods for tagging client devices |
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: 13807572 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 14408923 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 29/05/2015) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 13807572 Country of ref document: EP Kind code of ref document: A1 |