Cyclically dependent checks for software tamper-proofing
AssigneeSnap Inc.
InventorsJohan Wehrli, Julien Rinaldini
Life of this patent
Estimating the term…
Abstract
Embodiments of the present disclosure relate to anti-tamper computer systems, in particular to methods and systems which can embed protection code into software. Among other things, the protection code helps prevent (and make it more costly) to reverse engineer to tamper with the protected software with malicious intent, such as, but not restricted to: the removal of a license protection mechanism; the removal of code displaying advertisements; the injection of a malicious thread into the program memory space; illicit usage; or any other kind of unauthorized modification of the software.
Claims20
A system comprising:
- a processor;
- and
- memory coupled to the processor and storing instructions that, when executed by the processor, cause the system to perform operations comprising:
- selecting, for one or more compilation unit of a piece of software, at least two basic blocks from a plurality of basic blocks for the compilation unit, wherein each basic block is located at a respective starting address;
- selecting, for each selected basic block in each of the one or more compilation units, a check routine that returns a check value as a function of an area of memory of the selected basic block;
- inserting, for each selected basic block in each of the one or more compilation units, code into the selected basic block for collecting a result from the selected check routine for the selected basic block;
- and
- inserting, for each of the one or more compilation units and for each selected basic block, code into the selected basic block to compute a starting address of a next basic block to be executed based on the result collected from the selected check routine.
A method comprising:
- selecting, for one or more compilation units of a piece of software, at least two basic blocks from a plurality of basic blocks for the compilation unit, wherein each basic block is located at a respective starting address;
- selecting, for each selected basic block in each of the one or more compilation units, a check routine that returns a check value as a function of an area of memory of the selected basic block;
- inserting, for each selected basic block in each of the one or more compilation units, code into the selected basic block for collecting a result from the selected check routine for the selected basic block;
- and
- inserting, for each of the one or more compilation units and for each selected basic block, code into the selected basic block to compute a starting address of a next basic block to be executed based on the result collected from the selected check routine.
A non-transitory computer-readable medium storing instructions that, when executed by a computer system, cause the computer system to perform operations comprising:
- selecting, for one or more compilation units of a piece of software, at least two basic blocks from a plurality of basic blocks for the compilation unit, wherein each basic block is located at a respective starting address;
- selecting, for each selected basic block in each of the one or more compilation units, a check routine that returns a check value as a function of an area of memory of the selected basic block;
- inserting, for each selected basic block in each of the one or more compilation units, code into the selected basic block for collecting a result from the selected check routine for the selected basic block;
- and
- inserting, for each of the one or more compilation units and for each selected basic block, code into the selected basic block to compute a starting address of a next basic block to be executed based on the result collected from the selected check routine.
Dependencies are inferred from the claim text.