Autor Beitrag
moddin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

WinXP Pro
Delphi 7 Enterprise ;-)
BeitragVerfasst: So 15.01.06 18:42 
Ich brauch mal echt hIlfe von profis ^^

Schleife 1

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
asm
LEA ESI,DWORD PTR DS:[40302F] --> ESI ist "12345678" bzw. 40302f ist "12345678"
/LODS BYTE PTR DS:[ESI]
|SUB AL,30
|AND AL,0// Was macht dieser Abscnitt in kurz?
|ADD EDX,EAX
|ROL EDX,4
\LOOPD SHORT Run0.00401093

MOV EAX,EDX --> EAX ist hier dann 23456781
XOR EAX,12345678 /// mich würde interessiern was diese beiden XORs
XOR EAX,87654321 /// eigentlich (allgemein und speziell )so machen (komm mit der Onlinehilfe nicht klar)
MOV ECX,1000
end;


Schleife 2

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
asm/XOR EAX,ECX
\LOOPD SHORT crackme0.004010B0 // Springt wieder zu XOR EAX,ECX

XOR EAX,12345678 // ????
CMP EAX,1FE50300 // weiß ich
JNZ SHORT crackme0.004010D3 // weiß ich
end;


Bitte ich verzweifle daran ich finde nämlich nicht raus was dieses Code Segment und die XORs eigentlich machen

Bitte helft mir
thnx

Moderiert von user profile iconChristian S.: Delpi-Tags und "asm"/"end" eingefügt
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 15.01.06 20:39 
Versuch es bitte mal mit Delphi-Tags, in die Du umschlossen von ASM \ End deinen Source einfügst ... THX.

Woher stammen diese Teile?

Was weißt Du bereits zu diesen Sources?

Was willst Du damit?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
moddin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

WinXP Pro
Delphi 7 Enterprise ;-)
BeitragVerfasst: Mo 16.01.06 18:50 
Ok also

Dies ist ein CrackMe Programm es geht hier darum ein passwort herauszufinden

SO erstmal der Code direkt ausm Assembler
ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
00401067  |. E8 AE000000    CALL <JMP.&user32.GetDlgItemTextA>       ; \GetDlgItemTextA
0040106C  |. 83F8 08        CMP EAX,8                                  // Ist eingabe 8 Stellen lang?
0040106F  |. 75 62          JNZ SHORT crackme0.004010D3                // Wenn nicht break
00401071  |. 8BC8           MOV ECX,EAX                                // ECX = EAX
00401073  |. 8D35 2F304000  LEA ESI,DWORD PTR DS:[40302F]              // Nun wird jede stelle der Eingabe geprüft 
00401079  |> AC             /LODS BYTE PTR DS:[ESI]                    // ob es eine zahl ist
0040107A  |. 3C 30          |CMP AL,30
0040107C  |. 7C 55          |JL SHORT crackme0.004010D3
0040107E  |. 3C 39          |CMP AL,39
00401080  |. 7F 51          |JG SHORT crackme0.004010D3
00401082  |.^E2 F5          \LOOPD SHORT crackme0.00401079
00401084  |. B9 08000000    MOV ECX,8                                  // ECX = 8 , EDX & EAX = 0 glaub ich
00401089  |. 33D2           XOR EDX,EDX 
0040108B  |. 33C0           XOR EAX,EAX
0040108D  |. 8D35 2F304000  LEA ESI,DWORD PTR DS:[40302F]              // "Stringzahl" in echte Zahl zum rechen
00401093  |> AC             /LODS BYTE PTR DS:[ESI]                    // umwandeln
00401094  |. 2C 30          |SUB AL,30
00401096  |. 24 0F          |AND AL,0F
00401098  |. 03D0           |ADD EDX,EAX
0040109A  |. C1C2 04        |ROL EDX,4
0040109D  |.^E2 F4          \LOOPD SHORT crackme0.00401093
0040109F  |. 8BC2           MOV EAX,EDX                               // ????
004010A1  |. 35 78563412    XOR EAX,12345678                          // ????
004010A6  |. 35 21436587    XOR EAX,87654321                          // ????
004010AB  |. B9 00100000    MOV ECX,1000                              // ????
004010B0  |> 33C1           /XOR EAX,ECX
004010B2  |.^E2 FC          \LOOPD SHORT crackme0.004010B0         --> was macht diese schleife?
004010B4  |. 35 78563412    XOR EAX,12345678                          // ????
004010B9  |. 3D 0003E51F    CMP EAX,1FE50300                          // errechtnetes PW wird mi wert verglicehn
004010BE  |. 75 13          JNZ SHORT crackme0.004010D3
004010C0  |. 6A 00          PUSH 0                                   ; /Style = MB_OK|MB_APPLMODAL
004010C2  |. 68 04304000    PUSH crackme0.00403004                   ; |Title = "Super!"
004010C7  |. 68 0B304000    PUSH crackme0.0040300B                   ; |Text = "Du kennst das richtige Passwort ;o)"
004010CC  |. 6A 00          PUSH 0                                   ; |hOwner = NULL
004010CE  |. E8 4D000000    CALL <JMP.&user32.MessageBoxA>           ; \MessageBoxA
004010D3  |> 6A 00          PUSH 0                                   ; /Result = 0
004010D5  |. FF75 08        PUSH DWORD PTR SS:[EBP+8]                ; |hWnd
004010D8  |. E8 37000000    CALL <JMP.&user32.EndDialog>             ; \EndDialog


so das weiß ich davon
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 16.01.06 20:23 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Begin
    Enc := Eingabe XOR $87654321;
    For X := $1000 downto 0 do Enc := Enc XOR X;
end;


HTH.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 16.01.06 20:57 
da es kein unterschied ist ob man 1 oder $1001 xor hat kann man die Schleife verglassen. Genausowenig spielt die Reihenfolge von verschiedenen Xors keine Rolle.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var bla: integer;
    i: integer;
begin
  bla := $1FE50300;
  //bla := bla xor $12345678;
  for i := 0 to $1000 do
    bla := bla xor i;
  bla := bla xor $87654321;
  //bla := bla xor $12345678;       hebt dich auf
  form1.caption := inttohex(bla,8);


sollte so richtig sein

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit