VMProtect code Restoration Technology

Source: Internet
Author: User

I found that everyone was afraid of the VMProtect shell. So I found a new version and analyzed it. I found that he had a lot of junk commands and also used virtual machine protection, in addition, the virtual machine code for each program after being shelled does not seem to be the same. If you want to use a VMProtect automatic shell removal machine, you should first remove the spam command, then reorganize the command, then automatically identify the meaning of the VM command, and finally reorganize the VM code to restore the EXE before shelling.
After reading the spam instruction of VMProtect, it is actually quite regular. The main reason is to add multiple invalid commands before a certain command, for example, the following command:
Mov eax, ebx
VMProtect may add these invalid commands before this command:
Mov al, cl
Sete eax
Therefore, it is easy to identify the preceding spam command based on the last command.

After one afternoon, I wrote a flower command to remove the program (it is still far away from automatic shelling, but it should be easy to debug it ).
The basic principles are as follows:

1. Read BB blocks from the specified location or the current eip address (if e8 is encountered, e9 jumps to the target address to continue reading) and generate a command description table
2. 1st scan command description table identifying invalid clc, stc, and cmc commands
3. 2nd scan command description table recognition test and cmp invalid commands
4. Scan the instruction description table for 3rd Times to identify invalid instructions such as assignment and operation.
5. Scan push and pop commands


Let's take a look at the running effect:
Code for getting VM commands:

 

 



 



Effect after restoration:





Find another VM command to process the Code:



Effect after restoration:


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.