CN105117661A - File protection method and device - Google Patents

File protection method and device Download PDF

Info

Publication number
CN105117661A
CN105117661A CN201510472634.1A CN201510472634A CN105117661A CN 105117661 A CN105117661 A CN 105117661A CN 201510472634 A CN201510472634 A CN 201510472634A CN 105117661 A CN105117661 A CN 105117661A
Authority
CN
China
Prior art keywords
file
eigenwert
code
file destination
modification
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.)
Granted
Application number
CN201510472634.1A
Other languages
Chinese (zh)
Other versions
CN105117661B (en
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.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201510472634.1A priority Critical patent/CN105117661B/en
Publication of CN105117661A publication Critical patent/CN105117661A/en
Application granted granted Critical
Publication of CN105117661B publication Critical patent/CN105117661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6281Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database at program execution time, where the protection is within the operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a file protection method and a device, wherein the method comprises the following steps: when a processing instruction for the characteristic value in the target file is detected, calling the code of the target modification file for modifying the target file to modify the encoding mode of the characteristic value in the target file or to modify the position of the code of the characteristic value in the target file in the code of the target file, wherein the characteristic value in the target file is used for uniquely identifying the target file, and the target modification file is a file for processing the characteristic value in the target file; and generating a target file according to the modified codes. By implementing the embodiment of the invention, the processing efficiency of the characteristic value in the file can be improved.

Description

A kind of document protection method and device
Technical field
The present invention relates to field of computer technology, be specifically related to a kind of document protection method and device.
Background technology
Along with the development of computer technology, the files tend of required storage is many, therefore, becomes a problem demanding prompt solution to the protection of file.Wherein, file comprises the eigenwert for unique identification file, and after eigenwert is obtained by third party, third party can destroy file or amendment file function, therefore, in order to ensure that the security of file needs to process eigenwert by eigenwert.Due to after eigenwert is obtained by third party, third party can destroy file or amendment file function by eigenwert, therefore, when research staff finds that file is destroyed or file function is modified, in order to ensure that the security of file needs again to process eigenwert.At present, to needing research staff's manual unlocking document code when eigenwert processes in file, and manually amendment document code realizes, and because needs user carries out multi-pass operations, therefore, reduces the treatment effeciency of eigenwert in file.
Summary of the invention
The embodiment of the invention discloses a kind of document protection method and device, for improving the treatment effeciency of eigenwert in file.
Embodiment of the present invention first aspect discloses a kind of document protection method, comprising:
When the processing instruction of eigenwert in for file destination being detected, the code of file destination described in invocation target amendment file modification, to revise the coded system of described eigenwert, or with the code revising described eigenwert present position in the code of described file destination, described eigenwert is used for file destination described in unique identification, and described target modification file is the file for the treatment of described eigenwert;
According to amended described code building file destination.
In conjunction with embodiment of the present invention first aspect, in the first possible implementation of embodiment of the present invention first aspect, after processing instruction eigenwert in for file destination being detected, described method also comprises:
Judge whether to there is the target modification file for the treatment of described eigenwert;
If there is not described target modification file, then generate described target modification file, and perform the step of the code of file destination described in invocation target amendment file modification.
In conjunction with embodiment of the present invention first aspect, in the implementation that the second of embodiment of the present invention first aspect is possible, described file destination comprises data segment, and described data segment comprises described eigenwert;
Described in described invocation target amendment file modification, the code of file destination comprises:
Code present position in the code of described data segment of eigenwert described in invocation target amendment file modification, to revise code present position in the code of described file destination of described eigenwert.
In conjunction with embodiment of the present invention first aspect, in the third possible implementation of embodiment of the present invention first aspect, described file destination comprises flag, and described flag is for identifying the coded system of described eigenwert;
Described in described invocation target amendment file modification, the code of file destination comprises:
The value of flag described in invocation target amendment file modification, to revise the coded system of described eigenwert.
In conjunction with the third possible implementation of embodiment of the present invention first aspect, in the 4th kind of possible implementation of embodiment of the present invention first aspect, described file destination comprises data segment, and described flag is the zone bit of described data segment;
Described in described invocation target amendment file modification, the value of flag comprises:
The value of zone bit described in invocation target amendment file modification.
Embodiment of the present invention second aspect discloses a kind of file protection device, comprising:
Amendment unit, for when the processing instruction of eigenwert in for file destination being detected, the code of file destination described in invocation target amendment file modification, to revise the coded system of described eigenwert, or with the code revising described eigenwert present position in the code of described file destination, described eigenwert is used for file destination described in unique identification, and described target modification file is the file for the treatment of described eigenwert;
First generation unit, for according to the amended described code building file destination of described amendment unit.
In conjunction with embodiment of the present invention second aspect, in the first possible implementation of embodiment of the present invention second aspect, described device also comprises:
, there is the target modification file for the treatment of described eigenwert for judging whether in judging unit;
Second generation unit, for when the judged result of described judging unit is no, generates described target modification file, and triggers the step that described amendment unit performs the code of file destination described in invocation target amendment file modification.
In conjunction with embodiment of the present invention second aspect, in the implementation that the second of embodiment of the present invention second aspect is possible, described file destination comprises data segment, and described data segment comprises described eigenwert;
Described amendment unit, specifically for code present position in the code of described data segment of eigenwert described in invocation target amendment file modification, to revise code present position in the code of described file destination of described eigenwert.
In conjunction with embodiment of the present invention second aspect, in the third possible implementation of embodiment of the present invention second aspect, described file destination comprises flag, and described flag is for identifying the coded system of described eigenwert;
Described amendment unit, specifically for the value of flag described in invocation target amendment file modification, to revise the coded system of described eigenwert.
In conjunction with the third possible implementation of embodiment of the present invention second aspect, in the 4th kind of possible implementation of embodiment of the present invention second aspect, described file destination comprises data segment, and described flag is the zone bit of described data segment;
Described in described amendment metacall target modification file modification, the mode of the value of flag is specially:
The value of zone bit described in invocation target amendment file modification.
In the embodiment of the present invention, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, to revise the coded system of eigenwert, or with the code revising eigenwert present position in the code of file destination, afterwards according to amended code building file destination, due to when the processing instruction of eigenwert in for file destination being detected, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of a kind of document protection method disclosed in the embodiment of the present invention;
Fig. 2 is the process flow diagram of another kind of document protection method disclosed in the embodiment of the present invention;
Fig. 3 is the structural drawing of a kind of file protection device disclosed in the embodiment of the present invention;
Fig. 4 is the structural drawing of another kind of file protection device disclosed in the embodiment of the present invention;
Fig. 5 is the structural drawing of the embodiment of the present invention another file protection device disclosed.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of document protection method and device, for improving the treatment effeciency of eigenwert in file.Below be described in detail respectively.
Refer to Fig. 1, Fig. 1 is the process flow diagram of a kind of document protection method disclosed in the embodiment of the present invention.As shown in Figure 1, this document protection method can comprise the following steps.
S101, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, in file destination, eigenwert is used for unique identification file destination, and target modification file is the file for the treatment of eigenwert in file destination.
In the present embodiment, file destination comprises data segment, and data segment refers to the one piece of region of memory being used for depositing initialized global variable in program inside file destination, and data segment comprises eigenwert, and eigenwert is used for unique identification file destination.When research staff finds that file destination is destroyed or file destination function is modified, research staff can input processing instruction for eigenwert in file destination by modes such as keyboards, afterwards when the processing instruction of eigenwert in for file destination being detected, invocation target is revised the code of file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination.
S102, according to amended code building file destination.
In the present embodiment, after the code of invocation target amendment file modification file destination, file destination is regenerated by according to the code of amended file destination, the coded system of eigenwert in the file destination generated, or the code of eigenwert changes present position in the code of file destination.Therefore, when third party use file destination be modified before decoding process obtain eigenwert in file destination, or third party's file destination from the code of amended file destination be modified before eigenwert present position when obtaining eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.Wherein, target modification file is the file for the treatment of eigenwert in file destination.
In the document protection method described by Fig. 1, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, to revise the coded system of eigenwert, or with the code revising eigenwert present position in the code of file destination, afterwards according to amended code building file destination, due to when the processing instruction of eigenwert in for file destination being detected, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
Refer to Fig. 2, Fig. 2 is the process flow diagram of another kind of document protection method disclosed in the embodiment of the present invention.As shown in Figure 2, this document protection method can comprise the following steps.
S201, when the processing instruction of eigenwert in for file destination being detected, judge whether to exist for the treatment of the target modification file of eigenwert in file destination, in file destination, eigenwert is used for unique identification file destination.
In the present embodiment, file destination comprises data segment, and data segment refers to the one piece of region of memory being used for depositing initialized global variable in program inside file destination, and data segment comprises eigenwert, and eigenwert is used for unique identification file destination.When research staff finds that file destination is destroyed or file destination function is modified, research staff can input processing instruction for eigenwert in file destination by modes such as keyboards.Due to cannot the code of direct modify target file with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, and need to be modified by target modification file, therefore, after processing instruction eigenwert in for file destination being detected, first judge whether to there is the target modification file for the treatment of eigenwert in file destination.
If S202 does not exist target modification file, then generate target modification file.
In the present embodiment, when there is not target modification file, the target modification file for the treatment of eigenwert in file destination will be generated; Correspondingly, when there is target modification file, step S203 will be performed.
The code of S203, invocation target amendment file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination.
As a kind of possible embodiment, file destination comprises data segment, and data segment comprises eigenwert;
The mode of the code of invocation target amendment file modification file destination is specially:
Code present position in the code of data segment of eigenwert in invocation target amendment file modification file destination, with the code of eigenwert in modify target file present position in the code of file destination.
In the present embodiment, after generating target modification file or judging to there is target modification file, invocation target is revised code present position in the code of data segment of eigenwert in file modification file destination, with the code of eigenwert in modify target file present position in the code of file destination.Therefore, when before third party's file destination from the code of amended file destination is modified, eigenwert present position obtains eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.
Illustrate, be treated to example with XOR and be described, as follows:
Header file, i.e. data segment, middle definition exists inside FILE_CHARACTERISTIC deposits the character string of eigenwert, and then is packaged into inside CONFIG, a CONFIG and adds HEAD as byte of padding.Each to when in file, eigenwert processes, PADDING_SIZE can be regulated to change the side-play amount of eigenwert in data segment, then again preserve, because the position of eigenwert at data segment changes, therefore, in the file destination generated, the value of XOR changes, thus can realize the process to eigenwert in file destination.
As a kind of possible embodiment, file destination comprises flag, and this flag is for identifying the coded system of eigenwert in file destination;
The mode of the code of invocation target amendment file modification file destination is specially:
The value of this flag of invocation target amendment file modification, with the coded system of eigenwert in modify target file.
As a kind of possible embodiment, file destination comprises data segment, and this flag is the zone bit of data segment;
The mode of the value of this flag of invocation target amendment file modification is specially:
The value of invocation target amendment file modification zone bit.
In the present embodiment, file destination can comprise flag, and this flag is for identifying the coded system of eigenwert in file destination, and this flag can be the zone bit of data segment, and may not be the zone bit of data segment, the present embodiment is not construed as limiting.After generating target modification file or judging to there is target modification file, invocation target is revised the value of flag in file modification file destination, with the coded system of eigenwert in modify target file.When this flag is the zone bit of data segment, the value of invocation target amendment file modification zone bit the coded system of eigenwert in modify target file can be carried out.
Illustrate, when the value of flag is 1, base64 can be adopted to encode eigenwert in file destination is processed, when the value of flag is 2, XOR algorithm can be adopted to process eigenwert in file destination.
S204, according to amended code building file destination.
In the present embodiment, after the code of invocation target amendment file modification file destination, file destination is regenerated by according to the code of amended file destination, the coded system of eigenwert in the file destination generated, or the code of eigenwert changes present position in the code of file destination.Therefore, when third party use file destination be modified before decoding process obtain eigenwert in file destination, or third party's file destination from the code of amended file destination be modified before eigenwert present position when obtaining eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.Wherein, target modification file is the file for the treatment of eigenwert in file destination.
In the document protection method described by Fig. 2, when the processing instruction of eigenwert in for file destination being detected, judge whether to there is the target modification file for the treatment of eigenwert in file destination, if there is not target modification file, then generate target modification file, and the code of invocation target amendment file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, owing to working as the processing instruction detected for eigenwert in file destination, and when there is target modification file, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
Refer to Fig. 3, Fig. 3 is the structural drawing of a kind of file protection device disclosed in the embodiment of the present invention.As shown in Figure 3, this file protection device 300 can comprise:
Amendment unit 301, for revising unit, for when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, in file destination, eigenwert is used for unique identification file destination, and target modification file is the file for the treatment of eigenwert in file destination;
Generation unit 302, for according to amendment unit 301 amended code building file destination.
In the present embodiment, file destination comprises data segment, and data segment refers to the one piece of region of memory being used for depositing initialized global variable in program inside file destination, and data segment comprises eigenwert, and eigenwert is used for unique identification file destination.When research staff finds that file destination is destroyed or file destination function is modified, research staff can input processing instruction for eigenwert in file destination by modes such as keyboards, afterwards when the processing instruction of eigenwert in for file destination being detected, invocation target is revised the code of file modification file destination by amendment unit 301, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination.
In the present embodiment, after the code of amendment unit 301 invocation target amendment file modification file destination, generation unit 302 regenerates file destination by according to the code of amended file destination, the coded system of eigenwert in the file destination generated, or the code of eigenwert changes present position in the code of file destination.Therefore, when third party use file destination be modified before decoding process obtain eigenwert in file destination, or third party's file destination from the code of amended file destination be modified before eigenwert present position when obtaining eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.Wherein, target modification file is the file for the treatment of eigenwert in file destination.
In the file protection device described by Fig. 3, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, to revise the coded system of eigenwert, or with the code revising eigenwert present position in the code of file destination, afterwards according to amended code building file destination, due to when the processing instruction of eigenwert in for file destination being detected, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
Refer to Fig. 4, Fig. 4 is the structural drawing of another kind of file protection device disclosed in the embodiment of the present invention.As shown in Figure 4, this file protection device 400 can comprise:
Amendment unit 401, for revising unit, for when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, in file destination, eigenwert is used for unique identification file destination, and target modification file is the file for the treatment of eigenwert in file destination;
First generation unit 402, for according to amendment unit 401 amended code building file destination.
In the present embodiment, file destination comprises data segment, and data segment refers to the one piece of region of memory being used for depositing initialized global variable in program inside file destination, and data segment comprises eigenwert, and eigenwert is used for unique identification file destination.When research staff finds that file destination is destroyed or file destination function is modified, research staff can input processing instruction for eigenwert in file destination by modes such as keyboards, afterwards when the processing instruction of eigenwert in for file destination being detected, invocation target is revised the code of file modification file destination by amendment unit 401, with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination.
In the present embodiment, after the code of amendment unit 401 invocation target amendment file modification file destination, first generation unit 402 regenerates file destination by according to the code of amended file destination, the coded system of eigenwert in the file destination generated, or the code of eigenwert changes present position in the code of file destination.Therefore, when third party use file destination be modified before decoding process obtain eigenwert in file destination, or third party's file destination from the code of amended file destination be modified before eigenwert present position when obtaining eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.Wherein, target modification file is the file for the treatment of eigenwert in file destination.
As a kind of possible embodiment, file protection device 400 can also comprise:
, there is the target modification file for the treatment of eigenwert in file destination for judging whether in judging unit 403;
Second generation unit 404, for when the judged result of judging unit 403 is no, generates target modification file, and triggers the step that amendment unit 401 calls the code performing invocation target amendment file modification file destination.
In the present embodiment, due to cannot the code of direct modify target file with the coded system of eigenwert in modify target file, or with the code of eigenwert in modify target file present position in the code of file destination, and need to be modified by target modification file, therefore, after processing instruction eigenwert in for file destination being detected, there is the target modification file for the treatment of eigenwert in file destination by judging whether in judging unit 403.
In the present embodiment, when judging unit 403 judges the target modification file that there is not eigenwert in for the treatment of file destination, the target modification file that the second generation unit 404 will generate for the treatment of eigenwert in file destination; Correspondingly, when judging unit 403 judges to exist the target modification file of eigenwert in for the treatment of file destination, the code of amendment unit 401 invocation target amendment file modification file destination will be triggered.
As a kind of possible embodiment, file destination comprises data segment, and data segment comprises eigenwert;
Amendment unit 401, specifically for code present position in the code of data segment of invocation target amendment file modification eigenwert, to revise code present position in the code of file destination of eigenwert.
As in a kind of possible embodiment, file destination comprises flag, and this flag is used for the coded system of identification characteristics value;
Amendment unit 401, specifically for the value of this flag of invocation target amendment file modification, to revise the coded system of this eigenwert.
In the present embodiment, after the second generation unit 404 generates target modification file or judging unit 403 judges to there is target modification file, invocation target is revised code present position in the code of data segment of eigenwert in file modification file destination by amendment unit 401, with the code of eigenwert in modify target file present position in the code of file destination.Therefore, when before third party's file destination from the code of amended file destination is modified, eigenwert present position obtains eigenwert in file destination, third party cannot get correct eigenwert, thus can ensure the security of file.
As a kind of possible embodiment, file destination comprises data segment, and this flag can be the zone bit of data segment;
The mode of the value of this flag of amendment unit 401 invocation target amendment file modification is specially:
The value of invocation target amendment file modification zone bit.
As a kind of possible embodiment, file destination comprises data segment, and this flag is the zone bit of data segment;
The mode of the value of this flag of amendment unit 401 invocation target amendment file modification is specially:
The value of invocation target amendment file modification zone bit.
In the present embodiment, file destination can comprise flag, and this flag is for identifying the coded system of eigenwert in file destination, and this flag can be the zone bit of data segment, and may not be the zone bit of data segment, the present embodiment is not construed as limiting.After the second generation unit 404 generates target modification file or judging unit 403 judges to there is target modification file, invocation target is revised the value of flag in file modification file destination by amendment unit 401, with the coded system of eigenwert in modify target file.When this flag is the zone bit of data segment, the value of invocation target amendment file modification zone bit the coded system of eigenwert in modify target file can be carried out.
In the file protection device described by Fig. 4, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, to revise the coded system of eigenwert, or with the code revising eigenwert present position in the code of file destination, afterwards according to amended code building file destination, due to when the processing instruction of eigenwert in for file destination being detected, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
Refer to Fig. 5, Fig. 5 is the structural drawing of the embodiment of the present invention another file protection device disclosed.As shown in Figure 5, this net file protection device 500 can comprise: at least one processor 501 (as CPU), at least one storer 502, input media 503 and at least one communication bus, 504.Wherein, communication bus 504 is for realizing the connection communication between these assemblies.Storer 502 can be high-speed RAM storer, also can be non-labile storer (non-volatilememory), such as at least one magnetic disk memory.Storer 502 can also be optionally that at least one is positioned at the memory storage away from aforementioned processing 501.Wherein:
Input media 503, for the processing instruction for eigenwert in file destination being detected, and sends to processor 501 by this processing instruction;
Store batch processing code in storer 502, processor 501 performs following operation for calling the program code stored in storer 502:
The code of invocation target amendment file modification file destination, to revise the coded system of this eigenwert, or with the code revising this eigenwert present position in the code of file destination, this eigenwert is used for unique identification file destination, and target modification file is the file for the treatment of eigenwert;
According to amended code building file destination.
As a kind of possible embodiment, after input media detects the processing instruction for eigenwert in file destination, and the code of processor 501 invocation target amendment file modification file destination, processor 501 also performs following operation for calling the program code stored in storer 502:
Judge whether to there is the target modification file for the treatment of this eigenwert;
If there is not target modification file, then generate target modification file, and perform the step of the code of invocation target amendment file modification file destination.
As a kind of possible embodiment, file destination comprises data segment, and data segment comprises this eigenwert;
The mode of the code of processor 501 invocation target amendment file modification file destination is specially:
Code present position in the code of data segment of this eigenwert of invocation target amendment file modification, to revise code present position in the code of file destination of this eigenwert.
As a kind of possible embodiment, file destination comprises flag, and this flag is for identifying the coded system of this eigenwert;
The mode of the code of processor 501 invocation target amendment file modification file destination is specially:
The value of this flag of invocation target amendment file modification, to revise the coded system of this eigenwert.
As a kind of possible embodiment, file destination comprises data segment, and this flag can be the zone bit of data segment;
The mode of the value of this flag of processor 501 invocation target amendment file modification is specially:
The value of invocation target amendment file modification zone bit.
In the file protection device described by Fig. 5, when the processing instruction of eigenwert in for file destination being detected, the code of invocation target amendment file modification file destination, to revise the coded system of eigenwert, or with the code revising eigenwert present position in the code of file destination, afterwards according to amended code building file destination, due to when the processing instruction of eigenwert in for file destination being detected, Automatically invoked is revised the code of file modification file destination, to revise the coded system of eigenwert, or code present position in the code of file destination of amendment eigenwert, therefore, the treatment effeciency of eigenwert in file can be improved.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, storage medium can comprise: flash disk, ROM (read-only memory) (Read-OnlyMemory, ROM), random access device (RandomAccessMemory, RAM), disk or CD etc.
Above document protection method disclosed in the embodiment of the present invention and device are described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a document protection method, is characterized in that, comprising:
When the processing instruction of eigenwert in for file destination being detected, the code of file destination described in invocation target amendment file modification, to revise the coded system of described eigenwert, or with the code revising described eigenwert present position in the code of described file destination, described eigenwert is used for file destination described in unique identification, and described target modification file is the file for the treatment of described eigenwert;
According to amended described code building file destination.
2. method according to claim 1, is characterized in that, after processing instruction eigenwert in for file destination being detected, described method also comprises:
Judge whether to there is the target modification file for the treatment of described eigenwert;
If there is not described target modification file, then generate described target modification file, and perform the step of the code of file destination described in invocation target amendment file modification.
3. method according to claim 1, is characterized in that, described file destination comprises data segment, and described data segment comprises described eigenwert;
Described in described invocation target amendment file modification, the code of file destination comprises:
Code present position in the code of described data segment of eigenwert described in invocation target amendment file modification, to revise code present position in the code of described file destination of described eigenwert.
4. method according to claim 1, is characterized in that, described file destination comprises flag, and described flag is for identifying the coded system of described eigenwert;
Described in described invocation target amendment file modification, the code of file destination comprises:
The value of flag described in invocation target amendment file modification, to revise the coded system of described eigenwert.
5. method according to claim 4, is characterized in that, described file destination comprises data segment, and described flag is the zone bit of described data segment;
Described in described invocation target amendment file modification, the value of flag comprises:
The value of zone bit described in invocation target amendment file modification.
6. a file protection device, is characterized in that, comprising:
Amendment unit, for when the processing instruction of eigenwert in for file destination being detected, the code of file destination described in invocation target amendment file modification, to revise the coded system of described eigenwert, or with the code revising described eigenwert present position in the code of described file destination, described eigenwert is used for file destination described in unique identification, and described target modification file is the file for the treatment of described eigenwert;
First generation unit, for according to the amended described code building file destination of described amendment unit.
7. device according to claim 6, is characterized in that, described device also comprises:
, there is the target modification file for the treatment of described eigenwert for judging whether in judging unit;
Second generation unit, for when the judged result of described judging unit is no, generates described target modification file, and triggers the step that described amendment unit performs the code of file destination described in invocation target amendment file modification.
8. device according to claim 6, is characterized in that, described file destination comprises data segment, and described data segment comprises described eigenwert;
Described amendment unit, specifically for code present position in the code of described data segment of eigenwert described in invocation target amendment file modification, to revise code present position in the code of described file destination of described eigenwert.
9. device according to claim 6, is characterized in that, described file destination comprises flag, and described flag is for identifying the coded system of described eigenwert;
Described amendment unit, specifically for the value of flag described in invocation target amendment file modification, to revise the coded system of described eigenwert.
10. device according to claim 9, is characterized in that, described file destination comprises data segment, and described flag is the zone bit of described data segment;
Described in described amendment metacall target modification file modification, the mode of the value of flag is specially:
The value of zone bit described in invocation target amendment file modification.
CN201510472634.1A 2015-08-04 2015-08-04 File protection method and device Active CN105117661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510472634.1A CN105117661B (en) 2015-08-04 2015-08-04 File protection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510472634.1A CN105117661B (en) 2015-08-04 2015-08-04 File protection method and device

Publications (2)

Publication Number Publication Date
CN105117661A true CN105117661A (en) 2015-12-02
CN105117661B CN105117661B (en) 2018-05-08

Family

ID=54665645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510472634.1A Active CN105117661B (en) 2015-08-04 2015-08-04 File protection method and device

Country Status (1)

Country Link
CN (1) CN105117661B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909810A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of method and device for realizing APK file protection

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7280956B2 (en) * 2003-10-24 2007-10-09 Microsoft Corporation System, method, and computer program product for file encryption, decryption and transfer
CN101359353A (en) * 2008-09-05 2009-02-04 成都市华为赛门铁克科技有限公司 File protection method and device
CN102334124A (en) * 2011-08-15 2012-01-25 华为终端有限公司 File protection method and device
CN102831346A (en) * 2012-07-31 2012-12-19 深圳市紫色力腾科技发展有限公司 Method and system for file protection
CN103793665A (en) * 2014-03-06 2014-05-14 北京淦蓝润和信息技术有限公司 Electronic document processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7280956B2 (en) * 2003-10-24 2007-10-09 Microsoft Corporation System, method, and computer program product for file encryption, decryption and transfer
CN101359353A (en) * 2008-09-05 2009-02-04 成都市华为赛门铁克科技有限公司 File protection method and device
CN102334124A (en) * 2011-08-15 2012-01-25 华为终端有限公司 File protection method and device
CN102831346A (en) * 2012-07-31 2012-12-19 深圳市紫色力腾科技发展有限公司 Method and system for file protection
CN103793665A (en) * 2014-03-06 2014-05-14 北京淦蓝润和信息技术有限公司 Electronic document processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LPYXT: "vfp&exe加密程序破解实录", 《香雪网》 *
焦龙龙等: "PE文件加壳技术研究与实现", 《信息网络安全》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909810A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of method and device for realizing APK file protection

Also Published As

Publication number Publication date
CN105117661B (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN107608820B (en) Erasure code based file writing method and related device
CN108399319B (en) Source code protection method, application server and computer readable storage medium
CN107077540B (en) Method and system for providing cloud-based application security services
CN114116313A (en) Backup data processing method and device
CN109614772B (en) Code conversion method and device based on application installation package file
CN104809391A (en) Buffer overflow attack detecting device, method and safeguard system
CN107239698A (en) A kind of anti-debug method and apparatus based on signal transacting mechanism
US9256741B2 (en) Method and device for determining propagation relationship of Trojan horse files
CN108932407B (en) Program safety protection method and device
CN104484132A (en) Data reduction method and device
CN108182358B (en) File protection method and device, computing equipment and computer storage medium
CN105117661A (en) File protection method and device
CN111865616B (en) Method and device for generating key pair based on ECDSA algorithm
KR20140139392A (en) Method for generating application execution file for mobile device, application execution method of mobile device, device for generating application execution file and mobile device
CN108021790B (en) File protection method and device, computing equipment and computer storage medium
CN114090965B (en) Java code confusion method, system, computer equipment and storage medium
CN112559497B (en) Data processing method, information transmission method, device and electronic equipment
US20190102573A1 (en) Theater ears android app sensitive data management
CN108415709A (en) A kind of method and device for reinforcing source code based on finite state machine
JP2010134644A (en) Ic card and patch execution method
CN104751026A (en) Software protection method and software application method of android system, and related devices
CN114637988A (en) Binary-oriented function level software randomization method
CN107968793A (en) A kind of method, apparatus and system for downloading whitepack key
CN112527460A (en) Method and system for controlling consistency of data state of bottom assets of block chain
CN111460464B (en) Data encryption and decryption method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20181203

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Leopard Technology Co.,Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

TR01 Transfer of patent right