CN114826615B - Mobile terminal acquisition method and system based on mobile phone simulator - Google Patents
Mobile terminal acquisition method and system based on mobile phone simulator Download PDFInfo
- Publication number
- CN114826615B CN114826615B CN202210437898.3A CN202210437898A CN114826615B CN 114826615 B CN114826615 B CN 114826615B CN 202210437898 A CN202210437898 A CN 202210437898A CN 114826615 B CN114826615 B CN 114826615B
- Authority
- CN
- China
- Prior art keywords
- mobile phone
- mobile terminal
- phone simulator
- simulator
- hook
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/16—Obfuscation or hiding, e.g. involving white box
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention particularly relates to a mobile terminal acquisition method and system based on a mobile phone simulator. According to the mobile terminal acquisition method and system based on the mobile phone simulator, the App in the mobile phone simulator is directly utilized to calculate, and then the calculation result is exported for the acquisition program; writing a crawler code by adopting a python language, and providing a hook scheme by taking a mobile phone simulator end as a socket service node or forwarding a hook result to a local PC end; meanwhile, the mobile phone simulator is combined with an automatic testing tool to automatically simulate keys to carry out refreshing, dragging or sliding operation, and then the checked cookie is extracted by using an erection hook interface of the mobile terminal to finish the verification work of the sliding block verification code. According to the mobile terminal acquisition method and system based on the mobile phone simulator, the problem of a white box algorithm in a mobile terminal crawler is solved rapidly and efficiently, meanwhile, the problem of a slide block verification code is solved by combining a mobile terminal automation tool, and the data acquisition efficiency is improved.
Description
Technical Field
The invention relates to the technical field of mobile terminal data acquisition, in particular to a mobile terminal acquisition method and system based on a mobile phone simulator.
Background
With the development of more and more manufacturer services to mobile terminals, more and more data acquisition service requirements of the mobile terminals are formed. The service interfaces at the mobile terminal often need to carry local equipment signatures, request signatures or cookies to access successfully, and then the problems of wind control anti-climbing and the like can be met. With the gradual enhancement of vendor security reinforcement, the cost of completely analyzing a local signature is also higher and higher.
In order to avoid spending a lot of time in the early stage on the algorithm analysis reduction and reinforcement confusion countermeasure, the invention provides a mobile terminal acquisition method and a system based on a mobile phone simulator.
Disclosure of Invention
The invention provides a simple and efficient mobile terminal acquisition method and system based on a mobile phone simulator, which are used for overcoming the defects of the prior art.
The invention is realized by the following technical scheme:
a mobile terminal acquisition method based on a mobile phone simulator is characterized by comprising the following steps of: directly calculating by using an Application (Application) in a mobile phone simulator, and exporting a calculation result for the acquisition program;
writing a crawler code by adopting a python language, and providing a hook scheme by taking a mobile phone simulator end as a socket service node or forwarding a hook result to a local PC end;
meanwhile, the mobile phone simulator is combined with an automatic testing tool to automatically simulate a key to carry out refreshing, dragging or sliding operation, and then the mobile end erection hook interface is utilized to extract the verified cookie (data stored on the local terminal of the user) so as to complete the verification work of the slide block verification code.
According to the mobile terminal acquisition method based on the mobile phone simulator, firstly, packet grabbing and shelling are carried out according to service requirements, interface field parameters are analyzed, simple reverse is carried out on an App in the mobile phone simulator, the position of a required field is located, and calling codes are written.
The mobile terminal is provided with a local port through the Xpore module for interactive calling, a circulating thread is established through the Xpore module when the App is started, respective socket interfaces are established in the circulating thread, and active calling codes are written according to service requirements.
The mobile terminal carries out Hook on an on create (representing that a window is being generated) function of the MainActivity class of the App application, and the specific flow is as follows:
s1, finding a MainActivity class of a target application in android management.
S2, an onCreate function under a hook MainActivity class, and creating a thread in the onCreate function;
s3, acquiring a local Ip address and outputting the local Ip address to a log;
s4, a local socket interface is created in the thread, and a hook call code is written according to actual service requirements.
When the Xpore module is used, the PC acquisition end and the mobile phone simulator are connected at the same local area network address, a remote address is obtained through a log on the mobile phone simulator, and a corresponding interface is called to obtain signature information.
The mobile terminal interacts through the RPC (Remote Procedure Call Protocol ) of Frida, an interface is not required to be erected on the mobile terminal, a hook call code on the mobile phone simulator is directly exported in an rpc.exports mode, the exported result is directly placed on the PC acquisition terminal, and a corresponding service interface is erected on the PC acquisition terminal.
When the Frida-RPC mode is used, the PC acquisition end adopts the following flow:
s1, building a local service through a lightweight frame flash, and using the local service as a Frida export interface for calling a mobile phone simulator end;
s2, the collection program calls a lightweight frame flash interface to obtain signature information.
The automated test tools employ auto. Js tools or EasyClick tools.
A mobile terminal acquisition system based on a mobile phone simulator comprises a mobile terminal and a PC acquisition terminal, and is used for realizing the mobile terminal acquisition method based on the mobile phone simulator.
The beneficial effects of the invention are as follows: according to the mobile terminal acquisition method and system based on the mobile terminal simulator, when the mobile terminal interface is crawled, related information such as a signature is acquired by combining a mobile phone or a simulator environment in a hook active calling mode, the problem of white box algorithm in the mobile terminal crawler is solved rapidly and efficiently without paying attention to the algorithm logic of the signature, meanwhile, the problem of slide block verification codes is solved by combining a mobile terminal automation tool, and the data acquisition efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a design mode of an App interface of a mobile terminal according to the present invention.
Fig. 2 is a schematic diagram of an interaction flow between the acquisition end of the base PC and the App of the mobile terminal.
Detailed Description
In order to enable those skilled in the art to better understand the technical solution of the present invention, the following description will make clear and complete description of the technical solution of the present invention in combination with the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
In recent years, with the rapid development of the android system, the security countermeasure intensity in the android application has been approaching to the PC computer end. Each large manufacturer also pay more and more attention to the security of the white box, not just relies on traditional cryptography, and further forms a set of self wind control system. Meanwhile, the development of reinforcement technology also enables the local security of the application to reach a new height, and often core code blocks, signatures and the like are accompanied by strong confusion or code virtualization. Reverse analysis restores a white-box algorithm to an increasingly higher cost. However, in the process of data acquisition at the mobile terminal, the algorithm itself is not required to be concerned, and only a given input is required to be correctly output.
In some cases, the acquisition process is often accompanied by a slider verification code. The occurrence of the verification code means that the verification code is controlled by preliminary wind, and the verification code needs to be avoided as much as possible, for example, the verification code is controlled to be collected at a speed, some devices or accounts are polled, and agents and the like are used. When the verification code is needed, the environment is analyzed, the encryption algorithm of the track is time-consuming and labor-consuming, and the track algorithm of js is updated frequently.
According to the mobile terminal acquisition method based on the mobile phone simulator, an Application (Application) in the mobile phone simulator is directly utilized to calculate, and then a calculation result is exported for use by an acquisition program;
writing a crawler code by adopting a python language, and providing a hook scheme by taking a mobile phone simulator end as a socket service node or forwarding a hook result to a local PC end;
meanwhile, the mobile phone simulator is combined with an automatic testing tool to automatically simulate a key to carry out refreshing, dragging or sliding operation, and then the mobile end erection hook interface is utilized to extract the verified cookie (data stored on the local terminal of the user) so as to complete the verification work of the slide block verification code.
According to the mobile terminal acquisition method based on the mobile phone simulator, firstly, packet grabbing and shelling are carried out according to service requirements, interface field parameters are analyzed, simple reverse is carried out on an App in the mobile phone simulator, the position of a required field is located, and calling codes are written.
Fig. 1 is a schematic diagram of a design mode of an App interface of a mobile terminal. The number of the equipment nodes can be increased appropriately for polling according to the wind control intensity.
The mobile terminal can set up a local port through the Xpore module to carry out interactive calling, a circulating thread is established through the Xpore module when the App is started, respective socket interfaces are established in the circulating thread, and active calling codes are written according to service requirements.
The mobile terminal carries out Hook on an on create (representing that a window is being generated) function of the MainActivity class of the App application, and the specific flow is as follows:
s1, finding a MainActivity class of a target application in android management.
S2, an onCreate function under a hook MainActivity class, and creating a thread in the onCreate function;
s3, acquiring a local Ip address and outputting the local Ip address to a log;
s4, a local socket interface is created in the thread, and a hook call code is written according to actual service requirements.
When the Xpore module is used, the PC acquisition end and the mobile phone simulator are connected at the same local area network address, a remote address is obtained through a log on the mobile phone simulator, and a corresponding interface is called to obtain signature information.
The Firda is an easy-to-use cross-plane Hook tool, the Hook from the Java layer to the Native layer cannot be used, and the Firda is a dynamic pile inserting tool which can insert codes into the memory space of the Native App to dynamically monitor and modify behaviors; the native platform includes a Win, mac, linux, android, iOS full platform.
The mobile terminal can also interact through the RPC (Remote Procedure Call Protocol ) of Frida, an interface is not required to be erected on the mobile terminal, a hook call code on the mobile phone simulator is directly exported in an rpc.exports mode, the exported result is directly placed on the PC acquisition terminal, and a corresponding service interface is erected on the PC acquisition terminal.
When the Frida-RPC mode is used, the PC acquisition end adopts the following flow:
s1, building a local service through a lightweight frame flash, and using the local service as a Frida export interface for calling a mobile phone simulator end;
s2, the collection program calls a lightweight frame flash interface to obtain signature information.
The automated test tools employ auto. Js tools or EasyClick tools.
The mobile terminal acquisition system based on the mobile phone simulator comprises a mobile terminal and a PC acquisition terminal, and is used for realizing the mobile terminal acquisition method based on the mobile phone simulator.
Regardless of the way, the final purpose is to directly call the corresponding interface of the App in the acquisition program so as to quickly obtain signature information, encryption result or real-time cookie. Various wind control problems may still be encountered later, such as a series of problems of device signature, environment detection, and simulation of the track of the slider. The problems are mainly related to the wind control intensity, acquisition concurrency and the like of the interface. However, through testing, in the development of many mobile terminal crawler interfaces, the preliminary scheme has already satisfied the requirements of service acquisition. Even in some apps of the same family, some signature algorithms or extraction of cookies do not require any modification. For example, in the ali product, only the function mtopsdk.security.InnerSignImpl.getUnifiedSign for obtaining the signature needs to be located, and the corresponding signature can be obtained according to its parameter logic parameter (HashMap < String, string > hashMap, hashMap < String, string > hashMap2, string 2, bootean z, string 3). In the byte system App, the corresponding account number ck can be extracted by only calling the getCookie under the android Cookie manager and through regular matching.
The above examples are only one of the specific embodiments of the present invention, and the ordinary changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the scope of the present invention.
Claims (7)
1. A mobile terminal acquisition method based on a mobile phone simulator is characterized by comprising the following steps of: directly calculating by using an App in a mobile phone simulator, and exporting a calculation result for use of an acquisition program;
writing a crawler code by adopting a python language, and providing a hook scheme by taking a mobile phone simulator end as a socket service node or forwarding a hook result to a local PC end;
meanwhile, the mobile phone simulator is combined with an automatic testing tool to automatically simulate keys to carry out refreshing, dragging or sliding operation, and then the checked cookie is extracted by using an erection hook interface of the mobile terminal to finish the verification work of the sliding block verification code;
the mobile terminal sets up a local port through the Xpore module to carry out interactive call, establishes a circulation thread through the Xpore module when the App is started, establishes respective socket interfaces in the circulation thread, and writes active call codes according to service requirements;
the mobile terminal carries out Hook on the on Create function of the MainActivity class of the App application, and the specific flow is as follows:
s1, finding a MainActivity class of a target application in android management.
An onCreate function under class S2.hook MainActivity and creating a thread therein;
s3, acquiring a local Ip address and outputting the local Ip address to a log;
s4, creating a local socket interface in the thread, and writing a hook call code according to actual service requirements.
2. The mobile terminal acquisition method based on the mobile phone simulator as claimed in claim 1, wherein the method comprises the following steps: firstly, carrying out packet grabbing and shelling according to service requirements, analyzing interface field parameters, carrying out simple reverse on an App in a mobile phone simulator, positioning to a required field position, and writing a calling code.
3. The mobile terminal acquisition method based on the mobile phone simulator as claimed in claim 1, wherein the method comprises the following steps: when the Xpore module is used, the PC acquisition end and the mobile phone simulator are connected at the same local area network address, a remote address is obtained through a log on the mobile phone simulator, and a corresponding interface is called to obtain signature information.
4. The mobile terminal acquisition method based on the mobile phone simulator as claimed in claim 1, wherein the method comprises the following steps: the mobile terminal interacts through the RPC of Frida, an interface is not required to be erected on the mobile terminal, a hook call code on the mobile phone simulator is directly exported in an rpc.exports mode, the exported result is directly placed on the PC acquisition terminal, and a corresponding service interface is erected on the PC acquisition terminal.
5. The mobile terminal acquisition method based on the mobile phone simulator as claimed in claim 4, wherein the method comprises the following steps: when the Frida-RPC mode is used, the PC acquisition end adopts the following flow:
s1, building a local service through a lightweight frame flash, and using the local service as a Frida export interface for calling a mobile phone simulator end;
s2, the collection program calls a lightweight frame flash interface to obtain signature information.
6. The mobile terminal acquisition method based on the mobile phone simulator as claimed in claim 1, wherein the method comprises the following steps: the automated test tools employ auto. Js tools or EasyClick tools.
7. A mobile terminal acquisition system based on a mobile phone simulator is characterized in that: the mobile terminal acquisition method based on the mobile phone simulator comprises a mobile terminal and a PC acquisition terminal, and is used for realizing the mobile terminal acquisition method based on the mobile phone simulator according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210437898.3A CN114826615B (en) | 2022-04-25 | 2022-04-25 | Mobile terminal acquisition method and system based on mobile phone simulator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210437898.3A CN114826615B (en) | 2022-04-25 | 2022-04-25 | Mobile terminal acquisition method and system based on mobile phone simulator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114826615A CN114826615A (en) | 2022-07-29 |
CN114826615B true CN114826615B (en) | 2023-08-08 |
Family
ID=82508314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210437898.3A Active CN114826615B (en) | 2022-04-25 | 2022-04-25 | Mobile terminal acquisition method and system based on mobile phone simulator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114826615B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7035781B1 (en) * | 1999-12-30 | 2006-04-25 | Synopsys, Inc. | Mixed language simulator |
CN108133123A (en) * | 2017-12-15 | 2018-06-08 | 上海连尚网络科技有限公司 | A kind of recognition methods of application program and system |
CN112364227A (en) * | 2020-11-16 | 2021-02-12 | 浪潮卓数大数据产业发展有限公司 | Mobile APP data acquisition method |
CN112784289A (en) * | 2021-01-26 | 2021-05-11 | 济南大学 | Extraction system and method for Android application program encrypted network traffic |
CN113726945A (en) * | 2021-08-03 | 2021-11-30 | 贵州电子商务云运营有限责任公司 | Cell phone app data automatic acquisition method based on frida framework |
-
2022
- 2022-04-25 CN CN202210437898.3A patent/CN114826615B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7035781B1 (en) * | 1999-12-30 | 2006-04-25 | Synopsys, Inc. | Mixed language simulator |
CN108133123A (en) * | 2017-12-15 | 2018-06-08 | 上海连尚网络科技有限公司 | A kind of recognition methods of application program and system |
CN112364227A (en) * | 2020-11-16 | 2021-02-12 | 浪潮卓数大数据产业发展有限公司 | Mobile APP data acquisition method |
CN112784289A (en) * | 2021-01-26 | 2021-05-11 | 济南大学 | Extraction system and method for Android application program encrypted network traffic |
CN113726945A (en) * | 2021-08-03 | 2021-11-30 | 贵州电子商务云运营有限责任公司 | Cell phone app data automatic acquisition method based on frida framework |
Also Published As
Publication number | Publication date |
---|---|
CN114826615A (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110532169A (en) | Interface testing case generation method, device, computer equipment and storage medium | |
CN109669688A (en) | Based on visual software development methodology, device, terminal device and storage medium | |
CN111104341A (en) | Automatic testing method, device, equipment and storage medium for intelligent household equipment | |
CN109560996B (en) | Automatic testing system and method for terminal of Internet of things | |
CN107239392A (en) | A kind of method of testing, device and terminal | |
CN104980552B (en) | Realize the method and system of Android mobile terminal automatic test | |
US20170351597A1 (en) | Identifying and isolating library code in software applications | |
CN114003451B (en) | Interface testing method, device, system and medium | |
CN107045475A (en) | Method of testing and device | |
CN111190605A (en) | Embedded platform deployment method, equipment and storage medium | |
CN113672441A (en) | Method and device for testing intelligent equipment | |
CN113760730A (en) | Automatic testing method and device | |
CN113347060B (en) | Method, device and system for detecting power network fault based on process automation | |
CN111858336A (en) | Software automation test method and system | |
CN114491513A (en) | Knowledge graph-based block chain intelligent contract reentry attack detection system and method | |
CN116257427A (en) | Heterogeneous test method, heterogeneous test system, heterogeneous test equipment and heterogeneous test storage medium for federal learning task | |
CN114826615B (en) | Mobile terminal acquisition method and system based on mobile phone simulator | |
CN117290255A (en) | Batch interface performance test method based on Python and Locut frameworks | |
CN116303069A (en) | Test method, device, upper computer, system and medium of vehicle-mounted terminal | |
CN114567374A (en) | Method for checking operating conditions of a facility point, and associated device | |
CN113495498B (en) | Simulation method, simulator, device and medium for hardware device | |
CN113434217A (en) | Vulnerability scanning method and device, computer equipment and medium | |
CN103220179A (en) | Unstable network robustness evaluation and detection method based on statistical model testing | |
CN109104322B (en) | Method, device, readable storage medium and system for solving FL-NET communication fault | |
CN111859370A (en) | Method, apparatus, electronic device and computer-readable storage medium for identifying service |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |