AarzaK
04-03-2005, 05:06 PM
Hi! sorry my question if this dont is the correct board, I working in this code and have problems
for understand for why has only 1 serial valid, I think that this has more serials, I have problems
with my study only take a 1 serial correct, can helpme please, sorry my english.
my (bad??) study:
the tale start in the offset 401540;
00401540 /$ 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4]
here mov the serial into EAX
example: 111 111 1111 --> 423A35C7h
later 7 and 8 push e1e235d1 (correct serial!), push 33c65319 and push eax
so call a serialcheck where
MOV EAX,DWORD PTR SS:[ESP+4] -> here mov the serial from the dialog box
MOV ECX,DWORD PTR SS:[ESP+C] -> here mov the correct serial (only 1??)
XOR EAX,ECX -> no understand this piece
IMUL EAX,DWORD PTR SS:[ESP+8] -> imul and get out from the rutine
later this use this aritmetic comprobation and take...
XOR EDX,EDX
* * * * * MOV ECX,138D
* * * * * DIV ECX * * * * * * * * * *
* * * * * ADD ESP,0C
* * * * * MOV EAX,EDX
* * * * * NEG EAX
* * * * * SBB EAX,EAX
* * * * * INC EAX
I write a bruteforcer and this only send a 1 serial, I think have a trouble with my study
SERIAL CHECK
00402723 * *. E8 18EEFFFF * *CALL SERIALCHECK.00401540
00402728 * *. 83C4 08 * * * *ADD ESP,8
0040272B * *. 85C0 * * * * * TEST EAX,EAX
0040272D * *. 0F84 D3000000 *JE SERIALCHECK.00402806
1)00401530 */$ 8B4424 04 * * *MOV EAX,DWORD PTR SS:[ESP+4]
2)00401534 *|. 8B4C24 0C * * *MOV ECX,DWORD PTR SS:[ESP+C]
3)00401538 *|. 33C1 * * * * * XOR EAX,ECX * * * * * * * * ; *SERIALCHECK.0040FDD2
4)0040153A *|. 0FAF4424 08 * *IMUL EAX,DWORD PTR SS:[ESP+8]
5)0040153F *\. C3 * * * * * * RETN
6)00401540 */$ 8B4424 04 * * *MOV EAX,DWORD PTR SS:[ESP+4]
7)00401544 *|. 68 D135E2E1 * *PUSH E1E235D1
8)00401549 *|. 68 1953C633 * *PUSH 33C65319
9)0040154E *|. 50 * * * * * * PUSH EAX
10)0040154F *|. E8 DCFFFFFF * *CALL SERIALCHECK.00401530
11)00401554 *|. 33D2 * * * * * XOR EDX,EDX
12)00401556 *|. B9 8D130000 * *MOV ECX,138D
13)0040155B *|. F7F1 * * * * * DIV ECX * * * * * * * * * ; *SERIALCHECK.0040FDD2
14)0040155D *|. 83C4 0C * * * *ADD ESP,0C
15)00401560 *|. 8BC2 * * * * * MOV EAX,EDX
16)00401562 *|. F7D8 * * * * * NEG EAX
17)00401564 *|. 1BC0 * * * * * SBB EAX,EAX
18)00401566 *|. 40 * * * * * * INC EAX
19)00401567 *\. C3 * * * * * * RETN
en (6) comienza la rutina de generacion de serial, el mueve a EAX el valor ingresado
del serial convertido a hexadecimal, luego en (7),(8) y (9) guarda en la pila los valores
y hace un call a (1), donde mueve a eax el valor ingresado, a ecx el serial valido y
hace un "xor eax,ecx" luego hace una multiplicacion con signo y sale de la rutina.
en (11) hace una limpieza de edx y luego en (12) mueve a edx con 138dh para dividor en
(13) con eax, me queda un resto en edx el cual luego muevo a eax (15) lo niego (16)
y despues lo resto pero con acarreo si este fue 1, luego lo incremento y me salgo.
brute forcer
//---------------------------------------------------------------------------
#include <vcl.h>
#include <stdlib.h>
#include <iostream.h>
#pragma hdrstop
#include "MUnit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
* * * *: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
unsigned long A,B,C,D,E,F,G,H,I;
DWORD J,K,P1=3789698513,P2=868635417,P3=5005;
try
{
K=StrToInt64(Edit1->Text);
if(K < 4294967295)
{
RichEdit1->Lines->Clear();
J=0;
do{
__asm
{
* *xor eax,eax;
* *mov eax,K
* *mul eax,P3;
* *mov A,eax
* *idiv eax,P2;
* *mov D,edx;
* *mov B,eax
* *or eax,P1;
* *mov F,eax;
}
RichEdit1->Lines->Add("SERIAL: *" + AnsiString(F));
Edit2->Text = AnsiString(J+1);
Edit2->Refresh();
K++;
J++;
}while(K<4294967295);
*SaveDialog1->Execute();
*RichEdit1->Lines->SaveToFile(SaveDialog1->FileName);
}
else if (K >=4294967295)
{
RichEdit1->Lines->Add("out from range ");
}
}
catch(...)
{
RichEdit1->Lines->Add("Write Only numbers in decimal format ok :) ");
}
Edit1->Clear();
Edit2->Clear();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Close();
}
//-------------------
the program always repeat the serial and no change, I think is my analizing is bad
I hope can helpme with this
Best Regards, AarzaK. :D
for understand for why has only 1 serial valid, I think that this has more serials, I have problems
with my study only take a 1 serial correct, can helpme please, sorry my english.
my (bad??) study:
the tale start in the offset 401540;
00401540 /$ 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4]
here mov the serial into EAX
example: 111 111 1111 --> 423A35C7h
later 7 and 8 push e1e235d1 (correct serial!), push 33c65319 and push eax
so call a serialcheck where
MOV EAX,DWORD PTR SS:[ESP+4] -> here mov the serial from the dialog box
MOV ECX,DWORD PTR SS:[ESP+C] -> here mov the correct serial (only 1??)
XOR EAX,ECX -> no understand this piece
IMUL EAX,DWORD PTR SS:[ESP+8] -> imul and get out from the rutine
later this use this aritmetic comprobation and take...
XOR EDX,EDX
* * * * * MOV ECX,138D
* * * * * DIV ECX * * * * * * * * * *
* * * * * ADD ESP,0C
* * * * * MOV EAX,EDX
* * * * * NEG EAX
* * * * * SBB EAX,EAX
* * * * * INC EAX
I write a bruteforcer and this only send a 1 serial, I think have a trouble with my study
SERIAL CHECK
00402723 * *. E8 18EEFFFF * *CALL SERIALCHECK.00401540
00402728 * *. 83C4 08 * * * *ADD ESP,8
0040272B * *. 85C0 * * * * * TEST EAX,EAX
0040272D * *. 0F84 D3000000 *JE SERIALCHECK.00402806
1)00401530 */$ 8B4424 04 * * *MOV EAX,DWORD PTR SS:[ESP+4]
2)00401534 *|. 8B4C24 0C * * *MOV ECX,DWORD PTR SS:[ESP+C]
3)00401538 *|. 33C1 * * * * * XOR EAX,ECX * * * * * * * * ; *SERIALCHECK.0040FDD2
4)0040153A *|. 0FAF4424 08 * *IMUL EAX,DWORD PTR SS:[ESP+8]
5)0040153F *\. C3 * * * * * * RETN
6)00401540 */$ 8B4424 04 * * *MOV EAX,DWORD PTR SS:[ESP+4]
7)00401544 *|. 68 D135E2E1 * *PUSH E1E235D1
8)00401549 *|. 68 1953C633 * *PUSH 33C65319
9)0040154E *|. 50 * * * * * * PUSH EAX
10)0040154F *|. E8 DCFFFFFF * *CALL SERIALCHECK.00401530
11)00401554 *|. 33D2 * * * * * XOR EDX,EDX
12)00401556 *|. B9 8D130000 * *MOV ECX,138D
13)0040155B *|. F7F1 * * * * * DIV ECX * * * * * * * * * ; *SERIALCHECK.0040FDD2
14)0040155D *|. 83C4 0C * * * *ADD ESP,0C
15)00401560 *|. 8BC2 * * * * * MOV EAX,EDX
16)00401562 *|. F7D8 * * * * * NEG EAX
17)00401564 *|. 1BC0 * * * * * SBB EAX,EAX
18)00401566 *|. 40 * * * * * * INC EAX
19)00401567 *\. C3 * * * * * * RETN
en (6) comienza la rutina de generacion de serial, el mueve a EAX el valor ingresado
del serial convertido a hexadecimal, luego en (7),(8) y (9) guarda en la pila los valores
y hace un call a (1), donde mueve a eax el valor ingresado, a ecx el serial valido y
hace un "xor eax,ecx" luego hace una multiplicacion con signo y sale de la rutina.
en (11) hace una limpieza de edx y luego en (12) mueve a edx con 138dh para dividor en
(13) con eax, me queda un resto en edx el cual luego muevo a eax (15) lo niego (16)
y despues lo resto pero con acarreo si este fue 1, luego lo incremento y me salgo.
brute forcer
//---------------------------------------------------------------------------
#include <vcl.h>
#include <stdlib.h>
#include <iostream.h>
#pragma hdrstop
#include "MUnit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
* * * *: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
unsigned long A,B,C,D,E,F,G,H,I;
DWORD J,K,P1=3789698513,P2=868635417,P3=5005;
try
{
K=StrToInt64(Edit1->Text);
if(K < 4294967295)
{
RichEdit1->Lines->Clear();
J=0;
do{
__asm
{
* *xor eax,eax;
* *mov eax,K
* *mul eax,P3;
* *mov A,eax
* *idiv eax,P2;
* *mov D,edx;
* *mov B,eax
* *or eax,P1;
* *mov F,eax;
}
RichEdit1->Lines->Add("SERIAL: *" + AnsiString(F));
Edit2->Text = AnsiString(J+1);
Edit2->Refresh();
K++;
J++;
}while(K<4294967295);
*SaveDialog1->Execute();
*RichEdit1->Lines->SaveToFile(SaveDialog1->FileName);
}
else if (K >=4294967295)
{
RichEdit1->Lines->Add("out from range ");
}
}
catch(...)
{
RichEdit1->Lines->Add("Write Only numbers in decimal format ok :) ");
}
Edit1->Clear();
Edit2->Clear();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Close();
}
//-------------------
the program always repeat the serial and no change, I think is my analizing is bad
I hope can helpme with this
Best Regards, AarzaK. :D