Results 1 to 7 of 7

Thread: Stupid encryption Examples. (In protector help file). um, duh.

  1. #1
    : Code Injector : nikolatesla20's Avatar
    Join Date
    Apr 2002
    Location
    :ether:
    Posts
    815

    Stupid encryption Examples. (In protector help file). um, duh.

    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

  2. #2
    br00t_4_c
    Guest
    Heh.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  3. #3
    Administrator dELTA's Avatar
    Join Date
    Oct 2000
    Location
    Ring -1
    Posts
    4,206
    Blog Entries
    5
    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...

  4. #4
    Tell me you didn't find this as part of the "encryption" of something from our "Office of Homeland Security."

    Regards,
    JMI

  5. #5
    Registered User
    Join Date
    Oct 2002
    Location
    UK
    Posts
    83
    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)

  6. #6
    Administrator dELTA's Avatar
    Join Date
    Oct 2000
    Location
    Ring -1
    Posts
    4,206
    Blog Entries
    5
    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.

  7. #7
    : Code Injector : nikolatesla20's Avatar
    Join Date
    Apr 2002
    Location
    :ether:
    Posts
    815
    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

Similar Threads

  1. find encryption algorithm used in malware,binary or its config file
    By charlie in forum Advanced Reversing and Programming
    Replies: 2
    Last Post: December 1st, 2012, 13:51
  2. Rijndael S-Box? AES... Maybe even XOR? -- Examples
    By ph3wl in forum RCE Cryptographics
    Replies: 0
    Last Post: February 21st, 2011, 12:10
  3. how to know what protector is used
    By alim2201 in forum The Newbie Forum
    Replies: 6
    Last Post: March 19th, 2010, 22:12
  4. problem with NTFS file encryption
    By Hero in forum The Newbie Forum
    Replies: 10
    Last Post: October 22nd, 2004, 03:49
  5. What is the best EXE-protector?
    By make in forum Advanced Reversing and Programming
    Replies: 8
    Last Post: June 13th, 2004, 06:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •