| | at : |


Archive

Win API 를 이용한 레지스트리 등록(Add Registry / WINAPI) 하훌 rwxr-xr-x 0 6/02/2015



Win API 를 이용한 레지스트리 등록(Add Registry / WINAPI)

Permission rw-r--r--
Author 하훌
Date and Time 6/02/2015
Label
License 크리에이티브 커먼즈 라이선스


Win API 를 이용한 레지스트리 등록


Add Registry(Startup Program / HKEY_LOCAL_MACHINE)
LONG lResult;
char buffer[100];
HKEY hKey;
DWORD dwDesc;
char *path = "c:\\winnt\\system32\\notepad.exe";

RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
0, KEY_ALL_ACCESS, &hKey);


lResult = RegCreateKeyEx(HKEY_LOCAL_MACHINE,                           "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
0, buffer, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,&hKey, &dwDesc);
if(lResult == ERROR_SUCCESS)
{
  RegSetValueEx(hKey, "abc", 0, REG_SZ, (BYTE*)path, strlen(path));
}
RegCloseKey(hKey);



RegCloseKey RegOpenKey RegConnectRegistry RegOpenKeyEx
RegCreateKey RegQueryInfoKey RegCreateKeyEx RegQueryMultipleValues
RegDeleteKey RegQueryValue RegDeleteValue RegQueryValueEx
RegEnumKey RegReplaceKey RegEnumKeyEx RegRestoreKey
RegEnumValue RegSaveKey RegFlushKey RegSetKeySecurity
RegGetKeySecurity RegSetValue RegLoadKey RegSetValueEx
RegNotifyChangeKeyValue RegUnLoadKey

Share







HAHWUL
HACKING | PENETRATION-TEST | CODING
HACKERONE : GIT : 0DAY-TODAY : EXPLOIT-DB : PACKETSTORM
GOOGLE+ | HAHWUL@GMAIL.COM | TWITTER
WWW.HAHWUL.COM






Recent Post

0 개의 댓글:

댓글 쓰기