IP Library Granted Patent US 10,255,443
Granted Patent B2
US 10,255,443 · App. 15/429,665 · Granted Apr 9, 2019

Method, apparatus, system and non-transitory computer readable medium for code protection

Inventors: Sungbeom Ahn (Seongnam-si, KR); SangHun Jeon (Seongnam-si, KR); Wang Jin Oh (Seongnam-si, KR); Myungju Chung (Seongnam-si, KR); Dongpil Seo (Seongnam-si, KR); Seong Yeol Lim (Seongnam-si, KR); Kwang-Hee Han (Seongnam-si, KR)
Assignee: Line Corporation
G06F21/602G06F21/14G06F21/54H04L9/14G06F2221/033
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,255,443
App. No.
15/429,665
Granted
Apr 9, 2019
Kind
B2
Abstract

A code protection method may include storing, using a processor of a computer, a package file that includes files for an application on a storage device of the computer; transforming, at the processor, a protection target method and/or function selected from a file that includes an execution code among the files, or converting or deleting a library file among the files; regenerating the package file by adding, to the package file, a first protection module file for restoring the transformed protection target method and/or function or a second protection module file for restoring the library file; and providing the regenerated package file over a network.

Claims (50)

1. A code protection method, the method comprising:

storing, using at least one processor, a package file that includes a plurality of files of an application on a storage device;

transforming, using the at least one processor, execution code of a protection target method or function selected from at least one file of the plurality of files that includes the execution code to an unknown instruction;

regenerating, using the at least one processor, the package file by adding to the package file a first protection module file for restoring the transformed protection target method or function; and

transmitting, using the at least one processor, the regenerated package file over a network to an electronic device,

wherein the transforming of the protection target method or function comprises:

selecting the protection target method or function from the selected file that includes the execution code;

cloning the selected protection target method or function;

adding the cloned protection target method or function to the first protection module file;

transforming code included in the selected protection target method or function into execution code associated with the unknown instruction;

adding, to the execution code of the protection target method or function, discovery code for discovering the cloned protection target method or function in the first protection module file;

encrypting at least one instruction of the cloned protection target method or function of the first protection module file using a first encryption key or a first encryption algorithm; and

adding decryption code for decrypting the encrypted instruction to the cloned protection target method or function of the first protection module file.

2. The method of claim 1 , wherein the selecting the protection target method or function from the selected file comprises: selecting a method or a function of a desired method or function from all of the methods or functions of the execution code as the protection target method or function, or selecting a method or a function corresponding to input information as the protection target method or function.

3. The method of claim 1 , wherein the transforming of the code comprises transforming an instruction of the code into an instruction that jumps to a random memory address.

4. The method of claim 1 , wherein the adding of the discovery code comprises:

adding a first code for calling a gateway to the selected protection target method or function; and

adding a second code for acquiring a memory address of the cloned protection target method or function of the first protection module to the execution code of the gateway.

5. The method of claim 4 , wherein the memory address is calculated based on the second code by using a program counter of the electronic device on which the application is installed and executed and a relative address value provided from the first protection module file.

6. The method of claim 1 , wherein the first protection module file includes a re-encryption function for re-encrypting the instruction using a second encryption key or a second encryption algorithm based on a desired condition associated with execution of the application on the electronic device and decryption of the encrypted instruction of the cloned protection target method or function of the first protection module file using the decryption code.

7. The method of claim 1 , further comprising: encrypting a selected library file from the plurality of files of the application using an encryption key; deleting the library file from the package file; and adding the encrypted library file to a second protection module file, and the second protection module file includes a module configured to intercept a control command for the deleted library file at the electronic device on which the application is installed using the package file and to process the intercepted control command using the encrypted library file included in the second protection module file.

8. The method of claim 7 , wherein, when the application is executed on the electronic device, a detour linker is generated in response to an open command for the second protection module file that is loaded to a memory of the electronic device, and the control command for the library file is intercepted by the detour linker.

9. The method of claim 7 , wherein the control command for the deleted library file includes an open command for the deleted library file; and the second protection module file is configured to decrypt the encrypted library file in response to the intercepted open command and to generate and return a fake handle parameter providing instructions to a buffer that stores content of the decrypted library file.

10. The method of claim 9 , wherein the control command for the deleted library file further includes at least one command of the open command, a write command, and a discover command for the library file; and the second protection module file is configured to process the at least one command by connecting to the buffer that stores the content of the decrypted library file based on the fake handle parameter in response to the intercepted at least one command.

11. The method of claim 10 , wherein the second protection module file is configured to: copy and return content corresponding to the read command from and to the buffer in response to the read command; write content corresponding to the write command to the buffer in response to the write command; or return a location of a file pointer corresponding to the discover command to the buffer in response to the discover command.

12. A non-transitory computer-readable medium storing computer readable instructions, which when executed by at least one processor, causes the at least one processor to execute a code protection method, wherein the code protection method comprises:

storing a package file that includes a plurality of files of an application on a storage device, the package file including, a first protection module file for restoring a transformed protection target method or function associated with the application;

restoring the transformed protection target method or function using the first protection module file in response to execution of the application, the restoring including generating execution code based on the transformed protection target method or function and the package file; and

executing the generated execution code using the first protection module file,

the method further comprising:

cloning the protection target method or function;

adding the cloned protection target method or function to the first protection module file;

adding discovery code to the generated execution code, the discovery code including instructions for discovering the cloned protection target method or function in the first protection module file;

the executing of the generated execution code using the first protection module file comprises executing the generated execution code by discovering the cloned protection target method or function from the first protection module file using the discovery code with respect to the selected protection target method or function;

encrypting at least one instruction of the cloned protection target method or function of the first protection module file using a first encryption key or a first encryption algorithm; and

adding decryption code for decrypting the encrypted instruction to the cloned protection target method or function of the first protection module file.

13. The non-transitory computer-readable medium of claim 12 , wherein at least one instruction of code included in the protection target method or function is transformed into an unknown instruction or an instruction that jumps to a random memory address.

14. The non-transitory computer-readable medium of claim 12 , the method further comprising: encrypting a library file associated with the application using an encryption key; adding the encrypted library file to a second protection module file; and processing of a control command for the library file using the second protection module file, the processing including, loading a protection module included in the second protection module file to a memory of the electronic device in response to execution of the application, intercepting the control command for the library file using the loaded protection module, and processing the intercepted control command using the encrypted library file added to the second protection module file using the loaded protection module.

15. A code protection method of an electronic device, the method comprising:

storing, using at least one processor of the electronic device, a package file that includes a plurality of files of an application on a storage device of the electronic device, the package file including, a first protection module file for restoring a transformed protection target method or function associated with the application;

restoring, using the at least one processor, the transformed protection target method or function using the first protection module file in response to execution of the application, the restoring including generating execution code based on the transformed protection target method or function and the package file; and

executing, using the at least one processor, the generated execution code,

the method further comprising:

cloning, using the at least one processor, the protection target method or function;

adding, using the at least one processor, the cloned protection target method or function to the first protection module file;

adding, using the at least one processor, discovery code to the generated execution code, the discovery code including instructions for discovering the cloned protection target method or function in the first protection module file;

the executing of the generated execution code using the first protection module file comprises executing the generated execution code by discovering the cloned protection target method or function from the first protection module file using the discovery code with respect to the selected protection target method or function;

encrypting at least one instruction of the cloned protection target method or function of the first protection module file using a first encryption key or a first encryption algorithm; and

adding decryption code for decrypting the encrypted instruction to the cloned protection target method or function of the first protection module file.

16. The method of claim 15 , the method further comprising: encrypting, using the at least one processor, a library file associated with the application using an encryption key; adding, using the at least one processor, the encrypted library file to a second protection module file; and processing, using the at least one processor, a control command using the second protection module file, the processing of the control command including, loading a protection module included in the second protection module file to a memory of the electronic device in response to the execution of the application, intercepting the control command for the library file using the loaded protection module; and processing the intercepted control command using the encrypted library file added to the second protection module file using the loaded protection module.

Assignments (8)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 12, 2024
From: Z INTERMEDIATE GLOBAL CORPORATION
To: LY CORPORATION
Reel/Frame 067096/0431 →
CHANGE OF NAME Recorded Apr 10, 2024
From: LINE CORPORATION
To: Z INTERMEDIATE GLOBAL CORPORATION
Reel/Frame 067069/0467 →
CORRECTIVE ASSIGNMENT TO CORRECT THE THE CITY SHOULD BE SPELLED AS TOKYO PREVIOUSLY RECORDED AT REEL: 058597 FRAME: 0141. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jan 17, 2023
From: LINE CORPORATION
To: A HOLDINGS CORPORATION
Reel/Frame 062401/0328 →
CORRECTIVE ASSIGNMENT TO CORRECT THE SPELLING OF THE ASSIGNEES CITY IN THE ADDRESS SHOULD BE TOKYO, JAPAN PREVIOUSLY RECORDED AT REEL: 058597 FRAME: 0303. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jan 17, 2023
From: A HOLDINGS CORPORATION
To: LINE CORPORATION
Reel/Frame 062401/0490 →
CHANGE OF ADDRESS Recorded Dec 28, 2021
From: LINE CORPORATION
To: LINE CORPORATION
Reel/Frame 059511/0374 →
CHANGE OF NAME Recorded Dec 28, 2021
From: LINE CORPORATION
To: A HOLDINGS CORPORATION
Reel/Frame 058597/0141 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 28, 2021
From: A HOLDINGS CORPORATION
To: LINE CORPORATION
Reel/Frame 058597/0303 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 13, 2017
From: AHN, SUNGBEOM; JEON, SANGHUN; OH, WANG JIN; CHUNG, MYUNGJU; SEO, DONGPIL; LIM, SEONG YEOL; HAN, KWANG-HEE
To: LINE CORPORATION
Reel/Frame 041239/0607 →
Priority Claims (2)
KR 10-2016-0015910 · Feb 11, 2016 · national
KR 10-2016-0027824 · Mar 8, 2016 · national
Continuity (1)
Related Publication 20170235963A1 · Aug 17, 2017