body { font-family: 微软雅黑, “Microsoft YaHei”, Georgia, Helvetica, Arial, sans-serif, 宋体, PMingLiU, serif; font-size: 10.5pt; line-height: 1.5 }
html, body { }
h1 { font-size: 1.5em; font-weight: bold }
h2 { font-size: 1.4em; font-weight: bold }
h3 { font-size: 1.3em; font-weight: bold }
h4 { font-size: 1.2em; font-weight: bold }
h5 { font-size: 1.1em; font-weight: bold }
h6 { font-size: 1em; font-weight: bold }
img { border: 0; max- 100%; height: auto !important }
blockquote { margin-top: 0; margin-bottom: 0 }
table { border-collapse: collapse; border: 1px solid rgba(187, 187, 187, 1) }
td { border-collapse: collapse; border: 1px solid rgba(187, 187, 187, 1) }
由于win系统不允许进程间相互修改,采用dll注射的方法修改一个exe文件中的值。
一个简单的程序:
#include<stdio.h>
#include<windows.h>
void main(){
int x = 10;
int y = 100000;
printf(“%x,%x
“ , & x, &y );
while (1){
printf (“%d %d
“, x, y );
Sleep (3000);
}
}
生成如下的exe文件:
然后写一段dll文件:
#include<stdlib.h>
#include<windows.h>
_declspec(dllexport ) void goA()
{
int* p = ( int*)0x16f84c;
*p = 222222;
int* p1 = ( int*)0x16f840;
*p1 = 444444;
}
注射进exe进程中,然后exe文件运行发生了变化: