CN109918083A - A kind of security processing based on application programming, intelligent terminal and storage medium - Google Patents

A kind of security processing based on application programming, intelligent terminal and storage medium Download PDF

Info

Publication number
CN109918083A
CN109918083A CN201910171560.6A CN201910171560A CN109918083A CN 109918083 A CN109918083 A CN 109918083A CN 201910171560 A CN201910171560 A CN 201910171560A CN 109918083 A CN109918083 A CN 109918083A
Authority
CN
China
Prior art keywords
class
name
index
application programming
information
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.)
Pending
Application number
CN201910171560.6A
Other languages
Chinese (zh)
Inventor
张天水
廖兴龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhiyouwang'an Technology Co Ltd
Original Assignee
Beijing Zhiyouwang'an Technology Co Ltd
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 Beijing Zhiyouwang'an Technology Co Ltd filed Critical Beijing Zhiyouwang'an Technology Co Ltd
Priority to CN201910171560.6A priority Critical patent/CN109918083A/en
Publication of CN109918083A publication Critical patent/CN109918083A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of security processing based on application programming, intelligent terminal and storage mediums, the described method includes: obtaining and parsing executable file, the header information in the executable file is read, and reads the index information about different zones position;Data field is read according to the index information of different zones position, reads the corresponding value in index region of class relevant information within a data area;The essential information of a class is read, and reads the index for all method names that a class includes according to the essential information;Class name and method name are searched from string table according to class name and the index of method name, and modify class name and method name according to preset rules.The present invention passes through class name and method name, the original significant English conveniently checked is changed to nonsensical English or than more random character combination, cracker is just not easy the corresponding function of Guess in this way, and the safety of APP is improved under the premise of keeping APP developer's working efficiency.

Description

A kind of security processing based on application programming, intelligent terminal and storage medium
Technical field
The present invention relates to computer application technology more particularly to a kind of security processing based on application programming, Intelligent terminal and storage medium.
Background technique
Problem of data safety increasingly receives attention at present, and iOS APP, which is cracked, will cause leaking data, valuable skill Art can be stolen by rival, may cause big business loss.In order to crack iOS APP, the personnel of cracking can pass through static state Analysis (being analyzed when APP is not run according to the characteristics of file) iOS APP and dynamic analysis (APP is analyzed when running) iOS APP.During analyzing code, often through class name and method name, (class name and method name are roots when writing APP program According to the fixed name of functional characteristics, there are multiple methods inside a class, class name and method name are generally all realized with it in programming process Function it is related) (class and method of safety-critical, such as user step on for the core classes that can quickly navigate to APP and core methed Land), by distorting these classes and method, to achieve the purpose that obtain valuable information.
In order to avoid above-mentioned risk, during developing APP, can compiled by adding macrodefinition to class, method name Achieve the effect that modify class name method name when translating, but this method needs to add macrodefinition one by one for all class and method, Development efficiency is influenced during project development.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
The main purpose of the present invention is to provide a kind of security processing based on application programming, intelligent terminal and storages Medium, it is intended to, will original significant convenience by reading class name and method name in the APP binary executable after compiling The English checked is changed to nonsensical English or than more random character combination, and such cracker is just not easy Guess Corresponding function improves the safety of APP under the premise of keeping APP developer's working efficiency.
To achieve the above object, the present invention provides a kind of security processing based on application programming, described based on application The security processing of programming includes the following steps:
Executable file is obtained and parsed, reads the header information in the executable file, and read about different zones institute Index information in position;
Data field is read according to the index information of different zones position, the rope of class relevant information is read in the data field Draw the corresponding value in region;
The essential information of a class is read, and reads the index for all method names that a class includes according to the essential information;
Class name and method name are searched from string table according to class name and the index of method name, and modify class name according to preset rules And method name.
Optionally, described to obtain and parse executable file, the header information in the executable file is read, and read Index information about different zones position specifically includes:
The Mach-O file for obtaining iOS APP, the Mach-O file is parsed;
The header information in the Mach-O file is read, and reads the index information about different zones position.
Optionally, described to obtain and parse executable file, the header information in the executable file is read, and read Index information about different zones position further include:
When parsing the Mach-O file, the Mach-O file beginning about entire Mach-O file basic letter Breath, the essential information for first parsing head go parsing details further according to header information.
Optionally, the identical data of function are attributed to a region by the Mach-O file, and the region includes code area The data field and.
Optionally, described that data field is read according to the index information of different zones position, it is read in the data field The corresponding value in index region of class relevant information is taken to specifically include:
According to the index information of different zones position, data field is read;
The corresponding value in index region of class relevant information is read in the data field, each value is the corresponding address of a class.
Optionally, the iOS APP is write by multiple classes, and a class includes multiple method names.
Optionally, the essential information for reading a class, and the institute that a class includes is read according to the essential information There is the index of method name to specifically include:
The essential information of a class in the Mach-O file is read according to the header information;
The index for all method names that a class includes is read according to the essential information.
Optionally, described that class name and method name are searched from string table according to class name and the index of method name, and according to Preset rules modification class name and method name specifically include:
String table is obtained, class name and method name are searched from the string table according to class name and the index of method name;
Class name and method name are modified according to preset rules, the preset rules are to keep the length of original class name and method name constant And modified class name and method name cannot be distinguished.
In addition, to achieve the above object, the present invention also provides a kind of intelligent terminals, wherein the intelligent terminal includes: to deposit Reservoir, processor and it is stored in the safe handling based on application programming that can be run on the memory and on the processor Program, described realize when being executed based on the render safe procedures of application programming by the processor are compiled based on application as described above The step of security processing of journey.
In addition, to achieve the above object, the present invention also provides a kind of storage mediums, wherein the storage medium is stored with Render safe procedures based on application programming are realized such as when the render safe procedures based on application programming are executed by processor Above the step of security processing based on application programming.
The invention discloses a kind of security processing based on application programming, intelligent terminal and storage medium, the sides Method includes: acquisition and parses executable file, reads the header information in the executable file, and read about different zones The index information of position;Data field is read according to the index information of different zones position, is read in the data field Take the corresponding value in index region of class relevant information;The essential information of a class is read, and reads one according to the essential information The index for all method names that a class includes;Class name and method are searched from string table according to class name and the index of method name Name, and class name and method name are modified according to preset rules.The present invention passes through in the APP binary executable after reading compiling Class name and method name, the information for then modifying class name and method name both achieve the effect that obscure, improve APP exploit person employee Make efficiency, while difficulty of the personnel of cracking when analyzing code can be improved, improves the technical threshold for the personnel that crack, realize Keep the safety that APP is improved under the premise of APP developer's working efficiency.
Detailed description of the invention
Fig. 1 is the flow chart of the preferred embodiment of the security processing the present invention is based on application programming;
Fig. 2 is that the present invention is based on the flow charts of step S10 in the preferred embodiment of the security processing of application programming;
Fig. 3 is that the present invention is based on the flow charts of step S20 in the preferred embodiment of the security processing of application programming;
Fig. 4 is that the present invention is based on the flow charts of step S30 in the preferred embodiment of the security processing of application programming;
Fig. 5 is that the present invention is based on the flow charts of step S40 in the preferred embodiment of the security processing of application programming;
Fig. 6 is the running environment schematic diagram of the preferred embodiment of intelligent terminal of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to It is of the invention in limiting.
Based on the security processing of application programming described in present pre-ferred embodiments, as shown in Figure 1, described be based on answering With the security processing of programming the following steps are included:
Step S10, acquisition and executable file is parsed, reads the header information in the executable file, and read about not With the index information of region position.
Specific process is referring to Fig. 2, it is step in the security processing provided by the invention based on application programming The flow chart of S10.
As shown in Fig. 2, the step S10 includes:
S11, the Mach-O file for obtaining iOS APP, the Mach-O file is parsed;
Header information in S12, the reading Mach-O file, and read the index information about different zones position.
Specifically, class name and method name are names fixed according to functional characteristics when writing APP program, are had inside a class more A method name.
Mach-O file is found first, and Mach-O file is the executable text of iOS, Mac OS apple Watch platform Part, the exe being equivalent on windows platform;Then reading head information, when parsing Mach-O file, in opening for file Head is about the essential information of entire file, and first the essential information on parsing head goes parsing details further according to header information; Last read load cmd (being the index information about specific area position), the data that Mach-O file can be the same function It puts together, the region put together is exactly an area (specific area), such as code area, data field.
Step S20, data field is read according to the index information of different zones position, reads class in the data field The corresponding value in index region of relevant information.
Specific process is referring to Fig. 3, it is step in the security processing provided by the invention based on application programming The flow chart of S20.
As shown in figure 3, the step S20 includes:
S21, according to the index information of different zones position, read data field;
S22, the corresponding value in index region that class relevant information is read in the data field, it is each to be worth for a class correspondingly Location.
Specifically, from load cmd(different zones, specific area in other words) in, the data field Data Segment(is read, is led to Refer to be used to store one piece of region of memory of initialized global variable in program), it is read from Data Segment The index region of objc_classlist(class relevant information) corresponding value, each value is the corresponding address of a class.
Step S30, the essential information of a class is read, and all sides that a class includes are read according to the essential information The index of religious name.
Specific process is referring to Fig. 4, it is step in the security processing provided by the invention based on application programming The flow chart of S30.
As shown in figure 4, the step S30 includes:
S31, the essential information that a class in the Mach-O file is read according to the header information;
S32, the index that all method names that a class includes are read according to the essential information.
Specifically, the essential information of a class (APP is write by multiple classes) is read, then according to essential information Read the index for all method names (this refers to all method names in a class) that a class includes;It is write inside method name It is the parameter of transmitting.
Step S40, class name and method name are searched from string table according to class name and the index of method name, and according to default Rules modification class name and method name.
Specific process is referring to Fig. 5, it is step in the security processing provided by the invention based on application programming The flow chart of S40.
As shown in figure 5, the step S40 includes:
S41, string table is obtained, class name and method name is searched from the string table according to class name and the index of method name;
S42, to modify class name and method name, the preset rules according to preset rules be to keep the length of original class name and method name Constant and modified class name and method name cannot be distinguished, and same method handles other classes.
Specifically, find and modify class name, method name after class name, method name, modification has certain alteration ruler, rule be with Length of name originally is consistent, and can not know which is class name after modifying, which is method name, that is, modified Class name and method name are nonsensical, and the corresponding function of bad Guess name method name achievees the effect that obscure class name method name, phase When in improving difficulty of the personnel of cracking when analyzing code, raising cracks personnel's technical threshold.
It modifies, can play after reading class name and method name in APP binary executable through the invention The effect for obscuring core class name, method name improves the working efficiency of developer;It can be improved and cracked by reversal technique simultaneously The difficulty of APP, to effectively improve the safety of APP.
Further, as shown in fig. 6, based on the above-mentioned security processing based on application programming, the present invention is also accordingly mentioned A kind of intelligent terminal is supplied, the intelligent terminal includes processor 10, memory 20 and display 30.Fig. 6 illustrates only intelligence The members of terminal, it should be understood that be not required for implementing all components shown, the implementation that can be substituted it is more or The less component of person.
The memory 20 can be the internal storage unit of the intelligent terminal in some embodiments, such as intelligence is eventually The hard disk or memory at end.The external storage that the memory 20 is also possible to the intelligent terminal in further embodiments is set Plug-in type hard disk that is standby, such as being equipped on the intelligent terminal, intelligent memory card (Smart Media Card, SMC), safety Digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 20 can also be both Internal storage unit including the intelligent terminal also includes External memory equipment.The memory 20 is installed on institute for storing State the application software and Various types of data of intelligent terminal, such as the program code etc. of the installation intelligent terminal.The memory 20 It can be also used for temporarily storing the data that has exported or will export.In one embodiment, it is stored on memory 20 Render safe procedures 40 based on application programming, being somebody's turn to do the render safe procedures 40 based on application programming can be held by processor 10 Row, to realize the security processing in the application based on application programming.
The processor 10 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, for running the program code stored in the memory 20 or processing number According to, such as execute the security processing etc. based on application programming.
The display 30 can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display in some embodiments And OLED(Organic Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..The display 30 is used In the information for being shown in the intelligent terminal and for showing visual user interface.The component 10- of the intelligent terminal 30 are in communication with each other by system bus.
In one embodiment, when processor 10 executes the render safe procedures 40 in the memory 20 based on application programming When perform the steps of
Executable file is obtained and parsed, reads the header information in the executable file, and read about different zones institute Index information in position;
Data field is read according to the index information of different zones position, the rope of class relevant information is read in the data field Draw the corresponding value in region;
The essential information of a class is read, and reads the index for all method names that a class includes according to the essential information;
Class name and method name are searched from string table according to class name and the index of method name, and modify class name according to preset rules And method name.
The acquisition simultaneously parses executable file, reads the header information in the executable file, and read about not Index information with region position specifically includes:
The Mach-O file for obtaining iOS APP, the Mach-O file is parsed;
The header information in the Mach-O file is read, and reads the index information about different zones position.
The acquisition simultaneously parses executable file, reads the header information in the executable file, and read about not With the index information of region position further include:
When parsing the Mach-O file, the Mach-O file beginning about entire Mach-O file basic letter Breath, the essential information for first parsing head go parsing details further according to header information.
Wherein, the identical data of function are attributed to a region by the Mach-O file, the region include code area and Data field.
It is described that data field is read according to the index information of different zones position, it is related that class is read in the data field The corresponding value in index region of information specifically includes:
According to the index information of different zones position, data field is read;
The corresponding value in index region of class relevant information is read in the data field, each value is the corresponding address of a class.
Wherein, the iOS APP is write by multiple classes, and a class includes multiple method names.
The essential information for reading a class, and all method names that a class includes are read according to the essential information Index specifically include:
The essential information of a class in the Mach-O file is read according to the header information;
The index for all method names that a class includes is read according to the essential information.
It is described that class name and method name are searched from string table according to class name and the index of method name, and according to preset rules Modification class name and method name specifically include:
String table is obtained, class name and method name are searched from the string table according to class name and the index of method name;
Class name and method name are modified according to preset rules, the preset rules are to keep the length of original class name and method name constant And modified class name and method name cannot be distinguished.
The present invention also provides a kind of storage mediums, wherein the storage medium is stored with the safe place based on application programming Program is managed, is realized when the render safe procedures based on application programming are executed by processor and is based on application programming as described above Security processing the step of.
In conclusion the present invention provides a kind of security processing based on application programming, intelligent terminal and storage medium, The described method includes: obtaining and parsing executable file, the header information in the executable file is read, and read about not With the index information of region position;Data field is read according to the index information of different zones position, in the data The corresponding value in index region of class relevant information is read in area;The essential information of a class is read, and according to the essential information Read the index for all method names that a class includes;According to class name and the index of method name searched from string table class name and Method name, and class name and method name are modified according to preset rules.The present invention passes through the executable text of APP binary system after reading compiling The original significant English conveniently checked is changed to nonsensical English or than more random by class name and method name in part Character combination, such cracker is just not easy the corresponding function of Guess, improves APP developer's working efficiency, while can Difficulty of the personnel when analyzing code is cracked to improve, improves the technical threshold for the personnel that crack, is keeping APP developer's work The safety of APP is improved under the premise of efficiency.
Certainly, those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, It is that related hardware (such as processor, controller etc.) can be instructed to complete by computer program, the program can store In a computer-readable storage medium, described program may include the process such as above-mentioned each method embodiment when being executed. Wherein the storage medium can be memory, magnetic disk, CD etc..
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. a kind of security processing based on application programming, which is characterized in that the safe handling side based on application programming Method includes:
Executable file is obtained and parsed, reads the header information in the executable file, and read about different zones institute Index information in position;
Data field is read according to the index information of different zones position, the rope of class relevant information is read in the data field Draw the corresponding value in region;
The essential information of a class is read, and reads the index for all method names that a class includes according to the essential information;
Class name and method name are searched from string table according to class name and the index of method name, and modify class name according to preset rules And method name.
2. the security processing according to claim 1 based on application programming, which is characterized in that the acquisition simultaneously parses Executable file reads the header information in the executable file, and reads and believe about the index of different zones position Breath specifically includes:
The Mach-O file for obtaining iOS APP, the Mach-O file is parsed;
The header information in the Mach-O file is read, and reads the index information about different zones position.
3. the security processing according to claim 2 based on application programming, which is characterized in that the acquisition simultaneously parses Executable file reads the header information in the executable file, and reads and believe about the index of different zones position Breath further include:
When parsing the Mach-O file, the Mach-O file beginning about entire Mach-O file basic letter Breath, the essential information for first parsing head go parsing details further according to header information.
4. the security processing according to claim 2 based on application programming, which is characterized in that the Mach-O file The identical data of function are attributed to a region, the region includes code area and data field.
5. the security processing according to claim 2 based on application programming, which is characterized in that the basis not same district The index information of domain position reads data field, and the corresponding value in index region of class relevant information is read in the data field It specifically includes:
According to the index information of different zones position, data field is read;
The corresponding value in index region of class relevant information is read in the data field, each value is the corresponding address of a class.
6. the security processing according to claim 5 based on application programming, which is characterized in that the iOS APP by Multiple classes are write, and a class includes multiple method names.
7. the security processing according to claim 5 based on application programming, which is characterized in that one class of the reading Essential information, and specifically included according to the index that the essential information reads a class all method names for including:
The essential information of a class in the Mach-O file is read according to the header information;
The index for all method names that a class includes is read according to the essential information.
8. the security processing according to claim 7 based on application programming, which is characterized in that it is described according to class name and The index of method name searches class name and method name from string table, and is specifically wrapped according to preset rules modification class name and method name It includes:
String table is obtained, class name and method name are searched from the string table according to class name and the index of method name;
Class name and method name are modified according to preset rules, the preset rules are to keep the length of original class name and method name constant And modified class name and method name cannot be distinguished.
9. a kind of intelligent terminal, which is characterized in that the intelligent terminal includes: memory, processor and is stored in the storage On device and the render safe procedures based on application programming that can run on the processor, the safety based on application programming Such as claim 1-8 described in any item safe handlings based on application programming are realized when processing routine is executed by the processor The step of method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with the render safe procedures based on application programming, It realizes when the render safe procedures based on application programming are executed by processor and is based on as claim 1-8 is described in any item The step of security processing of application programming.
CN201910171560.6A 2019-03-07 2019-03-07 A kind of security processing based on application programming, intelligent terminal and storage medium Pending CN109918083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910171560.6A CN109918083A (en) 2019-03-07 2019-03-07 A kind of security processing based on application programming, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910171560.6A CN109918083A (en) 2019-03-07 2019-03-07 A kind of security processing based on application programming, intelligent terminal and storage medium

Publications (1)

Publication Number Publication Date
CN109918083A true CN109918083A (en) 2019-06-21

Family

ID=66963758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910171560.6A Pending CN109918083A (en) 2019-03-07 2019-03-07 A kind of security processing based on application programming, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109918083A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596739A (en) * 2020-12-17 2021-04-02 北京五八信息技术有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530535A (en) * 2013-10-25 2014-01-22 苏州通付盾信息技术有限公司 Shell adding and removing method for Android platform application program protection
CN103902857A (en) * 2012-12-25 2014-07-02 深圳市腾讯计算机系统有限公司 Method and device for protecting software programs
US20180157808A1 (en) * 2015-08-10 2018-06-07 Line Corporation System and method for code obfuscation of application
CN109409037A (en) * 2018-09-29 2019-03-01 阿里巴巴集团控股有限公司 A kind of generation method, device and the equipment of data obfuscation rule

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902857A (en) * 2012-12-25 2014-07-02 深圳市腾讯计算机系统有限公司 Method and device for protecting software programs
CN103530535A (en) * 2013-10-25 2014-01-22 苏州通付盾信息技术有限公司 Shell adding and removing method for Android platform application program protection
US20180157808A1 (en) * 2015-08-10 2018-06-07 Line Corporation System and method for code obfuscation of application
CN109409037A (en) * 2018-09-29 2019-03-01 阿里巴巴集团控股有限公司 A kind of generation method, device and the equipment of data obfuscation rule

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596739A (en) * 2020-12-17 2021-04-02 北京五八信息技术有限公司 Data processing method and device
CN112596739B (en) * 2020-12-17 2022-03-04 北京五八信息技术有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
US10198580B2 (en) Behavior specification, finding main, and call graph visualizations
US20100122313A1 (en) Method and system for restricting file access in a computer system
CN108647355A (en) Methods of exhibiting, device, equipment and the storage medium of test case
CN108932406A (en) Virtualization software guard method and device
CN103020207B (en) Browser label page grouping management method and device
US20160196204A1 (en) Smart Validated Code Searching System
CN107729376A (en) Insurance data checking method, device, computer equipment and storage medium
US7802089B2 (en) Analyzing interpretable code for harm potential
US10579799B2 (en) System and method for execution of objects lacking rules of interpretation
CA3044034A1 (en) Electronic form identification using spatial information
US7669192B2 (en) Method to find a violation of a coding rule in program
CN109885610A (en) A kind of abstracting method of structural data, device, electronic equipment and storage medium
CN109669854A (en) Page assembly rapid extracting method and system based on data processing
CN109918083A (en) A kind of security processing based on application programming, intelligent terminal and storage medium
CN109426496A (en) Method, storage medium, electronic equipment and the system of program log write-in file
CN107544811A (en) Ios platform hides method, storage medium, electronic equipment and the system of dylib files
CN111046349A (en) So library file reinforcement identification method, intelligent terminal and storage medium
US11301520B2 (en) Artificial intelligence content detection system
CN104615935B (en) A kind of hidden method towards Xen virtual platforms
CN111090668A (en) Data retrieval method and device, electronic equipment and computer-readable storage medium
US9201937B2 (en) Rapid provisioning of information for business analytics
CN110377337A (en) Information extracting method, intelligent terminal and storage medium in a kind of application
CN109426702A (en) IOS platform file reads guard method, storage medium, electronic equipment and system
EP3333746A1 (en) System and method of execution of code by an interpreter
CN111079375A (en) Information sorting method and device, computer storage medium and terminal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190621