SMC混淆
SMC混淆这几天的Hgame和n1CTF都碰到了这个东西,所以专门来学一下。 SMC概念SMC(Self Modifying Code),自修改代码,一种动态代码加密技术,或者局部加密技术,指通过修改代码或数据,阻止别人直接静态分析,然后在动态运行程序的时候对代码进行解密,达到程序能正常运行的结果。 具体的原理是将需要加密的代码区段单独编译成一个section(段),并将其标记为可读、可写、不可执行,然后通过某种方式在程序运行的时候将这个section解密为可执行的代码,并标记为可读、可执行、不可写。这样,攻击者就无法在内存中找到加密的代码,从而无法直接执行或修改加密的代码。 大概的实现的代码如下: 1234567891011proc main:............IF .运行条件满足 CALL DecryptProc (Address of MyProc)//对某个函数代码解密 ........ CALL MyProc //调用这个函数 ........ CALL EncryptProc (Address of...
Test
这是一个测试1234#include <stdio.h>int main(){ printf("Hello World!This is w1n9!!!");}
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment