Beruflich Dokumente
Kultur Dokumente
1 of 3
http://computertricks168.blogspot.com.br/2014/04/dll-inj...
Compartilhar
mais
Prximo blog
Criar um blog
Login
Computer Fun
Sunday, April 27, 2014
DLL Injector
This tool's source codes are mainly copied from the book Windows via C/C++. It has some bugs,
especially the string memory allocation.
here's the code:
#include <Windows.h>
#include <stdio.h>
#include <iostream>
#include <TlHelp32.h>
#include <cstring>
Google+ Followers
Xing Hua Guan
Add to circles
0 have me in circles
View all
Popular Posts
DLL Injector
This tool's source codes are mainly
copied from the book Windows via
C/C++ . It has some bugs, especially
the string memory allocation....
Reverse Connection Socket
Programming
The codes I posted are for
educational purpose only. I am not a
computer professional, but enjoy
learning computer, especially
compute...
Labels
C programming (2)
About Me
Xing Hua Guan
Follow
Blog Archive
int i;
cin>>i;
2014 (2)
April (2)
DLL Injector
}
///////////////////////////////////////////////////////
BOOL InjectLib(DWORD dwProcessId,char* pszLibFile)
{
BOOL bOK=FALSE; //assume that function fails
HANDLE hProcess=NULL,hThread=NULL;
PSTR pszLibFileRemote=NULL;
Reverse Connection
Socket Programming
04/28/2014 01:06 PM
2 of 3
http://computertricks168.blogspot.com.br/2014/04/dll-inj...
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
}
return(bOK);
}
////////////////////////////////////////////////////////////
DWORD GetTargetProcessIdFromProcname(char *procName)
{
DWORD dwRet=0;
HANDLE hsnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
04/28/2014 01:06 PM
3 of 3
http://computertricks168.blogspot.com.br/2014/04/dll-inj...
PROCESSENTRY32 pe32;
pe32.dwSize=sizeof(PROCESSENTRY32);
Process32First(hsnapshot,&pe32);
do{
if(lstrcmpi(pe32.szExeFile,procName)==0)
{
dwRet=pe32.th32ProcessID;
break;
}
}while(Process32Next(hsnapshot,&pe32));
CloseHandle(hsnapshot);
return dwRet;
}
Labels: C programming
No comments:
Post a Comment
Enter your comment...
Comment as:
Publish
Select profile...
Preview
Home
Older Post
04/28/2014 01:06 PM