Einzelnen Beitrag anzeigen

Olli
(Gast)

n/a Beiträge
 
#12

Re: Neue Version des XP Usermanger ist fertig!

  Alt 23. Mai 2005, 03:21
Zitat von Luckie:
Zu deinen Vermutungen äußere ich mich jetzt mal nicht. Aber für normale Anwender und Gelegenheits-Cracker sollte es reichen - hoffentlich. Ichmeine, wer hindert jemanden mit einer Vollversion daran es weiterzugeben oder ins Internet zu stellen?
Wie gesagt, es ist schwerer - unmöglich geht so oder so nicht

Für alle die es interessiert. Der Mechanismus mit dem die Adressen geholt werden ist recht simpel:
Code:
debug028:00418EE4 dd 18FF0h                              ; RVA to DLL name
debug028:00418EE8 dd 18FA0h                              ; RVA to function address
debug028:00418EEC dd 0
debug028:00418EF0 dd 0
debug028:00418EF4 dd 0
debug028:00418EF8 dd 18FFDh
debug028:00418EFC dd 18FB0h
debug028:00418F00 dd 0
debug028:00418F04 dd 0
debug028:00418F08 dd 0
debug028:00418F0C dd 1900Ah
debug028:00418F10 dd 18FB8h
debug028:00418F14 dd 0
debug028:00418F18 dd 0
debug028:00418F1C dd 0
debug028:00418F20 dd 19017h
debug028:00418F24 dd 18FC0h
debug028:00418F28 dd 0
debug028:00418F2C dd 0
debug028:00418F30 dd 0
debug028:00418F34 dd 19021h
debug028:00418F38 dd 18FC8h
debug028:00418F3C dd 0
debug028:00418F40 dd 0
debug028:00418F44 dd 0
debug028:00418F48 dd 19029h
debug028:00418F4C dd 18FD0h
debug028:00418F50 dd 0
debug028:00418F54 dd 0
debug028:00418F58 dd 0
debug028:00418F5C dd 19036h
debug028:00418F60 dd 18FD8h
debug028:00418F64 dd 0
debug028:00418F68 dd 0
debug028:00418F6C dd 0
debug028:00418F70 dd 19043h
debug028:00418F74 dd 18FE0h
debug028:00418F78 dd 0
debug028:00418F7C dd 0
debug028:00418F80 dd 0
debug028:00418F84 dd 1904Fh
debug028:00418F88 dd 18FE8h
debug028:00418F8C dd 0
debug028:00418F90 dd 0
debug028:00418F94 dd 0
debug028:00418F98 dd 0
debug028:00418F9C dd 0
[color=red]An diesen Stellen steht jeweils vorher (vor dem Auflösen) die RVA zum Funktionsnamen
Wie man sehen kann, ist die Basisadresse hier wieder 0x400000, also einfach RVA + 0x400000 ;)[/color]
debug028:00418FA0 dd 77E901D5h                           ; kernel32_LoadLibraryA
debug028:00418FA4 dd 77E90C5Fh                           ; kernel32_GetProcAddress
debug028:00418FA8 dd 77E96972h                           ; kernel32_ExitProcess
debug028:00418FAC dd 0                                    ; Separator
debug028:00418FB0 dd 793546D3h                           ; advapi32_FreeSid
debug028:00418FB4 dd 0                                    ; Separator
debug028:00418FB8 dd 7171884Ch                           ; comctl32_ImageList_Create
debug028:00418FBC dd 0                                    ; Separator
debug028:00418FC0 dd 77F4241Eh                           ; GDI32_SetBkMode
debug028:00418FC4 dd 0                                    ; Separator
debug028:00418FC8 dd 782F825Ah                           ; mpr_WNetAddConnection2A
debug028:00418FCC dd 0                                    ; Separator
debug028:00418FD0 dd 75117AD6h                           ; netapi32_NetUserDel
debug028:00418FD4 dd 0                                    ; Separator
debug028:00418FD8 dd 779C93D0h                           ; oleaut32_SysFreeString
debug028:00418FDC dd 0                                    ; Separator
debug028:00418FE0 dd 775B4EBEh                           ; shell32_SHGetMalloc
debug028:00418FE4 dd 0                                    ; Separator
debug028:00418FE8 dd 77E087E8h                           ; USER32_SetFocus
debug028:00418FEC dd 0                                    ; Separator
debug028:00418FF0 aKernel32_dll db 'KERNEL32.DLL',0
debug028:00418FFD aAdvapi32_dll db 'advapi32.dll',0
debug028:0041900A aComctl32_dll db 'comctl32.dll',0
debug028:00419017 aGdi32_dll db 'gdi32.dll',0
debug028:00419021 aMpr_dll db 'mpr.dll',0
debug028:00419029 aNetapi32_dll db 'netapi32.dll',0
debug028:00419036 aOleaut32_dll db 'oleaut32.dll',0
debug028:00419043 aShell32_dll db 'shell32.dll',0
debug028:0041904F aUser32_dll db 'user32.dll',0
debug028:0041905A db   0
debug028:0041905B db   0
debug028:0041905C aLoadlibrarya db 'LoadLibraryA',0
debug028:00419069 db   0
debug028:0041906A aGetprocaddress db 'GetProcAddress',0
debug028:00419079 db   0
debug028:0041907A aExitprocess db 'ExitProcess',0
debug028:00419086 db   0
debug028:00419087 db   0
debug028:00419088 aFreesid db 'FreeSid',0
debug028:00419090 db   0
debug028:00419091 db   0
debug028:00419092 aImagelist_crea db 'ImageList_Create',0
debug028:004190A3 db   0
debug028:004190A4 aSetbkmode db 'SetBkMode',0
debug028:004190AE db   0
debug028:004190AF db   0
debug028:004190B0 aWnetaddconnect db 'WNetAddConnection2A',0
debug028:004190C4 db   0
debug028:004190C5 db   0
debug028:004190C6 aNetuserdel db 'NetUserDel',0
debug028:004190D1 db   0
debug028:004190D2 aSysfreestring db 'SysFreeString',0
debug028:004190E0 db   0
debug028:004190E1 db   0
debug028:004190E2 aShgetmalloc db 'SHGetMalloc',0
debug028:004190EE db   0
debug028:004190EF db   0
debug028:004190F0 aSetfocus db 'SetFocus',0
debug028:004190F9 db   0
Da ich, wie gesagt, keine Zeit für eine intensive Analyse habe, hier noch der Teil, wo die eigene Importtabelle gefüllt wird:
Code:
.text:00521422 loc_521422:                            ; CODE XREF: sub_52113B+2E2j
.text:00521422 add    ecx, esi
.text:00521424 mov    [ebp+OwnImportTable], ecx
.text:00521427 add    eax, esi
.text:00521429 push   eax
.text:0052142A mov    eax, [ebp+LoadLibrary]
[color=red]DLL laden[/color]
.text:0052142D call   dword ptr [eax]                ; LoadLibrary
.text:0052142F test   eax, eax
.text:00521431 jz     loc_52153D
.text:00521437 mov    edi, eax
.text:00521439
.text:00521439 loc_521439:                            ; CODE XREF: sub_52113B+32Fj
.text:00521439 mov    ecx, [ebp+OwnImportTable]
.text:0052143C mov    edx, [ecx]
.text:0052143E test   edx, edx
.text:00521440 jz     short loc_52146C
.text:00521442 test   edx, 80000000h
.text:00521448 jz     short loc_521452
.text:0052144A and    edx, 7FFFFFFFh
.text:00521450 jmp    short loc_521456
.text:00521452 ; ---------------------------------------------------------------------------
.text:00521452
.text:00521452 loc_521452:                            ; CODE XREF: sub_52113B+30Dj
.text:00521452 add    edx, esi
.text:00521454 inc    edx
.text:00521455 inc    edx
.text:00521456
[color=red]Funktionsadresse ermitteln und zwischenspeichern[/color]
.text:00521456 loc_521456:                            ; CODE XREF: sub_52113B+315j
.text:00521456 push   edx
.text:00521457 push   edi
.text:00521458 mov    eax, [ebp+GetProcAddress]
.text:0052145B call   dword ptr [eax]                ; GetProcAddress
.text:0052145D mov    ecx, [ebp+var_3C]
.text:00521460 mov    [ecx], eax
.text:00521462 add    [ebp+var_3C], 4
.text:00521466 add    [ebp+OwnImportTable], 4
.text:0052146A jmp    short loc_521439
.text:0052146C ; ---------------------------------------------------------------------------
.text:0052146C
.text:0052146C loc_52146C:                            ; CODE XREF: sub_52113B+305j
.text:0052146C add    ebx, 14h
.text:0052146F jmp    short loc_52140A
.text:00521471 ; ---------------------------------------------------------------------------
.text:00521471
[color=red]Hochinteressant wird's hier auf NT[/color]
.text:00521471 loc_521471:                            ; CODE XREF: sub_52113B+2C8j
.text:00521471                                         ; sub_52113B+2D4j
.text:00521471 mov    eax, large fs:30h
.text:00521478 mov    eax, [eax+PEB.ProcessModuleInfo]
.text:0052147B mov    ebx, [eax+PEB.ProcessModuleInfo]
.text:0052147E mov    [ebp+ModuleInfo], ebx
.text:00521481
.text:00521481 loc_521481:                            ; CODE XREF: sub_52113B+3F3j
.text:00521481 mov    edx, [ebx+PEB_LDR_DATA.ModuleHeader.EntryToInMemoryOrderModuleList.Flink]
.text:00521484 cmp    edx, [ebp+var_50]
OEP ist übrigens: 0x00417160! Aber ich bin noch nicht sicher, ob das der OEP des UPX-gepackten Programmes ist, denn erst danach werden nochmal weiter API-Adressen aufgelöst.
  Mit Zitat antworten Zitat