Log in

View Full Version : Stupid encryption Examples. (In protector help file). um, duh.


nikolatesla20
August 25th, 2004, 15:46
Just wanted to share this with everyone to show you how NOT to use encryption. See the problem in this implementation of the encrypted code?


Code:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ShellApi;

type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
lbtrialtime: TLabel;
Label4: TLabel;
Label5: TLabel;
lbusername: TLabel;
Ok: TButton;
Label3: TLabel;
Label6: TLabel;
Memo1: TMemo;
procedure OkClick(Sender: TObject);
procedure Label6Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
KeyCorrect: boolean;
implementation

{$R *.dfm}

Procedure TForm1.OkClick(Sender: TObject);
Begin
Close;
End;

Procedure TForm1.Label6Click(Sender: TObject);
Begin
ShellExecute(0, 'open', 'http://www.ultraprotect.com', Nil, Nil, SW_SHOW);
End;

Procedure TForm1.FormCreate(Sender: TObject);
Var usrname: Array[0..255] Of char;
a: byte;
Begin
memo1.clear;
Memo1.Lines.Add('Status:'+#13+#10);
{$I ..\..\include\critic_begin.inc} //dynamic lock begin
Memo1.lines.add('Dynamic En/Decrypt here!');
{$I ..\..\include\protect_begin.inc} //the embedded lock header and sapce
Memo1.lines.add('EmbeddedProtection here!');
fillchar(usrname, 256, #0);
//Get User name from UltraProtect loader
MessageBox($FFFFFFFF, @usrname[0], Nil, 0);
If trim(usrname) <> '' Then
lbusername.caption := usrname
Else
Begin
lbusername.caption := 'unregistered user';
//Get Trial UsageTime from UltraProtect loader if required
MessageBox($FFFFFFFF, @a, Nil, 1);
lbtrialtime.caption := inttostr(a);
End;
KeyCorrect := false;
{$I ..\..\include\regonly_begin.inc} //RSA lock code begin
KeyCorrect := true;
{$I ..\..\include\regonly_end.inc} //RSA lock code end
If keycorrect = false Then Begin
showmessage('Only licensed user can use this function');
Memo1.lines.add('RSA LOCK here :-<');
End Else Memo1.lines.add('RSA UnlOCK here :-)');

{$I ..\..\include\protect_end.inc} //the embedded lock tail and sapce
{$I ..\..\include\critic_end.inc} //dynamic lock end
End;

End.




See the problem? Look at the key testing....

And this is supposed to be a code example in using ACProtect.

-nt20

br00t_4_c
August 25th, 2004, 15:51
Heh.

dELTA
August 25th, 2004, 16:59
OMFG, I guess that's what happens when you rip someone else's code and sell it as your own product, while still wanting to at least make your own examples not to make it too obvious...

JMI
August 25th, 2004, 17:30
Tell me you didn't find this as part of the "encryption" of something from our "Office of Homeland Security."

Regards,

Hopcode
August 26th, 2004, 06:01
Looks like the author didn't get it well

Its pretty obvious that this example is mucked up.

Anyway, Delta speaks about ripping, this protector can be found if you know where to search, as well as Asprotect.

I have noticed that both products are very similar , even the includes etc.

ACProtector is a rip off of Asprotect? (not even mentionning the name)

dELTA
August 26th, 2004, 10:05
When ACProtect was first released, it was ridiculously similar to ASProtect, including examples, help files and everything, so yes, many people think it is originally a rip-off of ASProtect.

nikolatesla20
August 26th, 2004, 10:29
Speaking of ACProtect, I've looked at the new version, not too much has changed. OEP is simple to find, easy to dump too.

The code ripping code is better now, it uses a common self-decrypt routine, and also the original code that is ripped is obfuscated a little bit. Still rips 5 bytes sequences.

-nt20