AddressOfEntryPoint in exe Finden

  • Ersteller Ersteller Tigerass 2.0
  • Erstellt am Erstellt am
T

Tigerass 2.0

Gast
Hallo Leute,

vielleicht kann mir jemand mal etwas ein bisschen erklären :)
Ich spiele zz mit PE-Headern, etc rum, und Versuche gerade, den Einsprungspunkt eine exe statisch Auszulesen.
Also von einer Beliebigen exe die Ersten Paar ASM-Befehle Auslesen :)
Zur Zeit bekom ich das Offset dafür so:

Code:
DWORD Start = (NtHeaders->OptionalHeader.AddressOfEntryPoint - 0xC00);

Jetzt meine Frage:
Ist dieses 0xC00 bei jedem Windows-System Gleich, und was ist das Überhaupt? Ich Tippe mal auf Die Größe des Headers, fragen geht aber schneller als ausprobieren :D. Und muss ich sonst noch irgendwas beachten?

2.Frage nur so nebenbei:
Was macht dieser ASM-Code:
Code:
xor edx,edx    ;edx auf null setzten
mov dl,30       ;0x30 in edx schreiben
push fs:[edx] ;?
pop edx         ;was steht jetzt in edx?

LG Tigerass
 
Also zu 1:
Microsoft sagt dazu:
AddressOfEntryPoint: The address of the entry point relative to the
image base when the executable file is loaded into memory. For program images,
this is the starting address. For device drivers, this is the address of the
initialization function. An entry point is optional for DLLs. When no entry
point is present, this field must be zero
Das Problem an der Geschichte: Du weißt nicht, welche section dort sein wird und um wie viel verschoben, also ist das 0xC00 willkürlich und vollkommen unabhängig vom BS aber abhängig von der EXE.

2. http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
 
Zurück
Oben