AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

MSN Messenger Exploit

Ein Thema von hedie · begonnen am 15. Dez 2007 · letzter Beitrag vom 15. Dez 2007
Antwort Antwort
Benutzerbild von PaddyL
PaddyL

Registriert seit: 23. Nov 2007
Ort: Lautertal
34 Beiträge
 
#1

Re: MSN Messenger Exploit

  Alt 15. Dez 2007, 14:28
Zitat von hedie:
Cool

Wie kann man den eine DLL in einen Process Injecten

Das is nur ne Allgemeine Frage ich meine ich krieg ja nichtmal die DLL hin
Wieso immer gleich ne ganze DLL? Ich hab das mal aus Spaß per Thread gemacht:

InjectCode.pas
Delphi-Quellcode:
unit InjectCode;

interface

uses
  Windows, ShellAPI, Dialogs;

procedure Inject(ProcessHandle: longword; EntryPoint: pointer);
procedure FindAndInject(WindowTitle: PChar; EntryPoint: pointer);

implementation

procedure Inject(ProcessHandle: longword; EntryPoint: pointer);
var
  Module, NewModule: Pointer;
  Size, BytesWritten, TID: longword;
begin
  Module := Pointer(GetModuleHandle(nil));
  Size := PImageOptionalHeader(Pointer(integer(Module) + PImageDosHeader(Module)._lfanew + SizeOf(dword) +SizeOf(TImageFileHeader))).SizeOfImage;
  VirtualFreeEx(ProcessHandle, Module, 0, MEM_RELEASE);
  NewModule := VirtualAllocEx(ProcessHandle, Module, Size, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);
  WriteProcessMemory(ProcessHandle, NewModule, Module, Size, BytesWritten);
  CreateRemoteThread(ProcessHandle, nil, 0, EntryPoint, Module, 0, TID);
end;

procedure FindAndInject(WindowTitle: PChar; EntryPoint: pointer);
var
  ProcessHandle, PID: longword;
  Active : Integer;
begin
  Active := FindWindow(nil, WindowTitle);
  if Active = 0 then
    Exit;
  GetWindowThreadProcessId(Active, @PID);
  ProcessHandle := OpenProcess(PROCESS_ALL_ACCESS, False, PID);
  Inject(ProcessHandle, EntryPoint);
  CloseHandle(ProcessHandle);
end;

end.
GTADelphi.dpr
Delphi-Quellcode:
program GTADelphi;

{$IMAGEBASE $13140000}

{$R 'GTADelphi.res' 'GTADelphi.rc'}

uses
  Windows, InjectCode;

{ This is the function which get's injected
  so add all your neat stuff here           }

function Main(EntryPoint: Pointer): LongWord; stdcall;
var
  ClearWantedLevel: procedure;
begin
  ClearWantedLevel := ptr($00438E40);
  ClearWantedLevel;
  
  Result := 0;
end;

begin
  // Inject Code
  FindAndInject('GTA: San Andreas', @Main);
  // Our Job is done
end.
Injected sich in San Andreas und ruft die Funktion zum reseten des Wanted Levels auf (sodas die Polizei einen nicht weiter sucht). Dannach beendet sich das ganze.
Patrick
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:26 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz