Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Code verification method and device

A verification method and code technology, applied in computer security devices, instruments, electrical digital data processing, etc., can solve problems such as increasing the running time of debugging code and destroying the integrity of code segments

Pending Publication Date: 2021-04-06
BEIJING NOVEL SUPER DIGITAL TV TECH
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method can only prevent SO from being statically decompiled before it is loaded. Once SO is loaded into memory, it may be attacked by attackers during operation by means of memory code modification, memory code injection, and interrupt debugging.
In addition, during the running of the program, if the attacker uses attack methods such as setting soft breakpoints, injecting running code, and modifying the code running logic, the integrity of the code segment will inevitably be destroyed; Increase the time that debug code runs

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code verification method and device
  • Code verification method and device
  • Code verification method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0019] figure 1 It is a schematic flowchart of the first code verification method provided by the embodiment of the present invention. like figure 1 As shown, the code verification method may include the following steps:

[0020] Step 101, use the dynamic link library file encryption tool to encrypt the dynamic link library file compiled from the source code, and preset the hash value of the code segment to be verified in the dynamic link library file before encryption to the encrypted dynamic link library file middle.

[0021] In this step, the electronic device can use the dynamic link library file encryption tool to encrypt the dynamic link library file compiled from the source code, and preset the hash value of the code segment to be verified in the dynamic link library file before encryption to the encrypted in the dynamic link library file. Specifically, the dynamic link library file compiled using the source code includes: a file header and file content; wherein, th...

Embodiment 2

[0030] figure 2 It is a second schematic flowchart of the code verification method provided by the embodiment of the present invention. like figure 2 As shown, the code verification method may include the following steps:

[0031] Step 201, use the dynamic link library file encryption tool to encrypt the dynamic link library file compiled from the source code, and preset the hash value of the code segment to be verified in the dynamic link library file before encryption to the encrypted dynamic link library file middle.

[0032] Step 202, when the encrypted dynamic link library file is loaded through the application program, the decryption code is called to decrypt the encrypted dynamic link library file, and the code segment to be verified of the decrypted dynamic link library file is obtained; and the decrypted The code segment to be verified of the dynamic link library file is loaded into the memory, and the decrypted and loaded dynamic link library is obtained.

[00...

Embodiment 3

[0042] image 3 It is a schematic structural diagram of a code verification device provided by Embodiment 3 of the present invention. like image 3 As shown, the code verification device includes: an encryption module 301, a decryption module 302 and a verification module 303; wherein,

[0043] The encryption module 301 is configured to use the dynamic link library file encryption tool to encrypt the dynamic link library file compiled from the source code, and preset the hash value of the code segment to be verified in the dynamic link library file before encryption to after encryption In the dynamic link library file;

[0044] The decryption module 302 is configured to call a decryption code to decrypt the encrypted dynamic link library file when the encrypted dynamic link library file is loaded by an application program, so as to obtain the waiting list of the decrypted dynamic link library file. Verifying the code segment; and loading the code segment to be verified of the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a code verification method and device. The method comprises the following steps: encrypting a dynamic link library file compiled by using a source code by using a dynamic link library file encryption tool, and presetting a hash value of a to-be-verified code segment of the dynamic link library file before encryption into the encrypted dynamic link library file; when the encrypted dynamic link library file is loaded through the application program, calling a decryption code to decrypt the encrypted dynamic link library file and loading the decrypted dynamic link library file into a memory; and when the decrypted and loaded dynamic link library is called to run, performing integrity verification on the to-be-verified code segment of the decrypted and loaded dynamic link library file based on the hash value of the to-be-verified code segment of the dynamic link library file before encryption. According to the embodiment of the invention, normal operation of the code can be dynamically protected, and the illegal infringement behavior of the code in the operation process is prevented, so that the purpose of protecting the legitimate rights and interests of application developers and users can be achieved.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of computer applications, and in particular to a code verification method and device. Background technique [0002] With the wide application of the Android system on various device platforms, Android applications have encountered more and more illegal attacks. Many attackers attack the dynamic link library SO of the application program running on the Android system through static decompilation, memory code modification, memory code injection, interrupt debugging, etc., so as to achieve piracy, tamper with program running results, obtain confidential information and Illegal infringement purposes such as private data have greatly damaged the legitimate rights and interests of application developers and users. [0003] At present, application developers usually adopt a method of encrypting and protecting the SO to protect program codes. However, this method can only prevent SO from ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F21/56
CPCG06F21/563G06F21/565
Inventor 刘好伟张晶
Owner BEIJING NOVEL SUPER DIGITAL TV TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products