а так же этот драйвер можно использовать)
хукает ZwDuplicateObject ZwReadVirtualMemory, ZwWriteVirtual, ZwTerminateProcess, ZwOpenProcess
а вызывать bsod легко, просто защищаем какой нибудь процесс и ждем... при выключении пк выскочит бсод
function _EnablePrivilegeW(Privilege: WideString): Boolean;
var
TokenHandle: THandle;
TokenPrivileges: TTokenPrivileges;
ReturnLength: Cardinal;
begin
Result := False;
if Windows.OpenProcessToken(GetCurrentProcess, TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, TokenHandle) then
begin
try
LookupPrivilegeValueW(nil, PWideChar(Privilege), TokenPrivileges.Privileges***91;0***93;.Luid);
TokenPrivileges.PrivilegeCount := 1;
TokenPrivileges.Privileges***91;0***93;.Attributes := SE_PRIVILEGE_ENABLED;
if AdjustTokenPrivileges(TokenHandle, False, TokenPrivileges, 0, nil, ReturnLength) then
Result := True;
finally
CloseHandle(TokenHandle);
end;
end;
end;
procedure _LoadDriverW(DriverPath: WideString);
var
hSCManager, hService: SC_HANDLE;
lpServiceArgVectors: PWideChar;
begin
hSCManager := 0;
hSCManager := OpenSCManagerW(nil, nil, SC_MANAGER_ALL_ACCESS);
if hSCManager <> 0 then
begin
hService := 0;
hService := CreateServiceW(hSCManager,
'ProtectService',
'Protect Kernel Driver',
SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER,
SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
PWideChar(DriverPath),
nil,
nil,
nil,
nil,
nil);
hService := 0;
lpServiceArgVectors := nil;
hService := OpenServiceW(hSCManager, 'ProtectService', SERVICE_ALL_ACCESS);
if hService <> 0 then
begin
StartServiceW(hService, 0, PWideChar(lpServiceArgVectors));
CloseServiceHandle(hService);
end;
procedure _UnloadDriverW;
var
hSCManager, hService: SC_HANDLE;
lpServiceStatus: TServiceStatus;
begin
if (DriverDevice <> 0) then
CloseHandle(DriverDevice);
hService := 0;
hService := OpenServiceW(hSCManager, 'ProtectService', SERVICE_ALL_ACCESS);
if (hService <> 0) then
begin
ControlService(hService, SERVICE_CONTROL_STOP, lpServiceStatus);
DeleteService(hService);
CloseServiceHandle(hService);
end;
CloseServiceHandle(hSCManager);
end;
end;
function CTL_CODE(DeviceType: Integer; Func: Integer; Meth: Integer; Access: Integer): DWORD;
begin
Result := (DeviceType shl 16) or (Access shl 14) or (Func shl 2) or (Meth);
end;
type
TFunctionsAddresses = record
ZwDuplicateObjectAddress: Pointer;
ZwReadVirtualMemory: Pointer;
ZwWriteVirtualMemory: Pointer;
ZwTerminateProcessAddress: Pointer;
ZwOpenProcessAddress: Pointer;
end;
PFunctionsAddresses = ^TFunctionsAddresses;
function SendFunctionsAddresses: Boolean;
var
dwBytesReturned: DWORD;
FunctionsAddresses: TFunctionsAddresses;
begin
Result := False;
FunctionsAddresses.ZwDuplicateObjectAddress := (GetProcAddress(GetModuleHandleW('ntdll.dll'), 'NtDuplicateObject'));
FunctionsAddresses.ZwReadVirtualMemory := (GetProcAddress(GetModuleHandleW('ntdll.dll'), 'NtReadVirtualMemory'));
FunctionsAddresses.ZwWriteVirtualMemory := (GetProcAddress(GetModuleHandleW('ntdll.dll'), 'NtWriteVirtualMemory'));
FunctionsAddresses.ZwTerminateProcessAddress := (GetProcAddress(GetModuleHandleW('ntdll.dll'), 'NtTerminateProcess'));
FunctionsAddresses.ZwOpenProcessAddress := (GetProcAddress(GetModuleHandleW('ntdll.dll'), 'NtOpenProcess'));
Result := DeviceIoControl(DriverDevice, CTL_CODE($F100, $0901, 0, 0), @FunctionsAddresses, SizeOf(FunctionsAddresses), nil, 0, dwBytesReturned, 0);
end;
type
TProtectInfo = record
ProtectProcessId: Cardinal;
//ProtectProcessId2: Cardinal;
end;
PProtectInfo = ^TProtectInfo;
function SendProtectInfo: Boolean;
var
dwBytesReturned: DWORD;
ProtectInfo: TProtectInfo;
begin
Result := False;
ProtectInfo.ProtectProcessId := StrToInt(Form1.Edit1.Text);
//ProtectInfo.ProtectProcessId2 := ;
Result := DeviceIoControl(DriverDevice, CTL_CODE($F100, $0900, 0, 0), @ProtectInfo, SizeOf(ProtectInfo), nil, 0, dwBytesReturned, 0);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Left:= Screen.Width div 2 - Width div 2;
Top:= Screen.Height div 2 - Height div 2;
Font.Name:= 'Microsoft Sans Serif';
Название файла: Driver.sys Размер файла: 7168 байт Дата сканирования: Sun, 19 Jan 14 09:13:49 -0500 MD5-хэш файла: 4bc9ef9d9c53547ffaaec5e3e1638620
Результат: 13 из 36
Ad-Aware: Malware detected AhnLab V3 Internet Security: OK ArcaVir: OK Avast: OK AVG: trj.Hider.EAJ Avira: RKIT/56249.A root kit! Bitdefender/BullGuard: OK BullGuard Internet Security 2013: OK Comodo: Malware@#3r958ln5i90x5 Dr.Web: OK Emsisoft Anti-Malware (a-squared Anti-Malware): OK eScan Internet Security Suite 14: OK Fortinet 5: OK F-Prot: Malware detected F-Secure 2014: OK G Data: OK IKARUS: OK Immunet/ClamAV: OK K7 Ultimate: Trojan ( 004753d81 ) Kaspersky Internet Security 2014: OK McAfee Total Protection 2013: OK Microsoft Security Essentials: OK NANO: Trojan.Win32.SYStroj.lqxno NOD32: @Trojan.Win32/LockScreen.AVJ Norman: winpe/Suspicious_Gen2.EYMUN Norton Internet Security: OK Outpost Security Suite Pro 8.0: Rootkit.Agent!VWwV6L3jW9k (Trojan) Quick Heal: OK Sophos: Mal/RootKit-A SUPERAntiSpyware: OK Total Defense Internet Security: OK Trendmicro Titanium Internet Security: OK Twister Antivirus 8: W32.LockScreen.AVJ.medo VBA: OK VIPRE Internet Security 2013: Trojan.Win32.Generic!BT Virit: OK