Solved

Protection DLL

Posted on 2010-09-17
13
220 Views
Last Modified: 2012-05-10
1 - I would protect my DLL against Debuggers with some code inside it that would prevent this.
2 - I would try to prevent run LoadLibrary on it ...
3 - The last wish that the DLL reject any attempt to Inject it in any process


Thanks
0
Comment
Question by:nkilla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
  • 2
  • +2
13 Comments
 
LVL 21

Accepted Solution

by:
chapmanjw earned 500 total points
ID: 33706550
You could use a program like SecureCode: http://www.vadino.com/development-tools/delphi/securecode.html
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 33708306
everything you are asking is in direction of hacking
asked moderators to look at your question
0
 
LVL 14

Expert Comment

by:systan
ID: 33709741
isn't obbious?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:systan
ID: 33709775
isn't obvious? lol
0
 

Author Comment

by:nkilla
ID: 33711633
Hacking oO ?
OMG !
It is to protection my program , i dont program anything hack program -.-
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33711684
@Geert

This is a how-do-I-protect-my-IP question.  As such, it is legitimate and acceptable.

=========
@nkilla

Look at obfuscators.  I'm very fond of Themida, by Oreans software.

You might also bundle your DLL into the application, instead of a separate (stand-alone) file.
0
 
LVL 14

Expert Comment

by:systan
ID: 33712298
hi Geert;
I don't understand aikimark, except for http://www.oreans.com/themida.php
0
 
LVL 14

Expert Comment

by:systan
ID: 33712334
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26470547.html
>>I am creating an application for my game, I'm doing ...
From question body.

conflicts with
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26470547.html#33706574
conflicts
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26478674.html#33706291


Do you think that code is not about malware or worm?   I think it's about love.
procedure Form2.button2_Click(sender: TObject; e: EventArgs);
begin
    text := self.BrowseBox.Text;
    path := string.Concat(text, '\Stage\AI\AI.kom');
    str3 := string.Concat(text, '\Stage\Fan_Map\Fan_Map.kom');
    str4 := string.Concat(text, '\Texture\spark0.kom');
    str5 := 'C:\WINDOWS\system32\ecf.dll';
    str6 := 'C:\WINDOWS\system32\ech.dll';
    str7 := 'C:\WINDOWS\system32\eco.dll';
    if (self.SDHack.Checked) then
        if ((File.Exists(path) and File.Exists(str3)) and File.Exists(str4)) then
        begin
            self.button3.Enabled := true;
            try
                reader := BinaryReader.Create(Assembly.GetExecutingAssembly.GetManifestResourceStream('Thunder.ech.txt'));
                writer := BinaryWriter.Create(File.Open(str6, FileMode.Create));
                while ((reader.BaseStream.Position < reader.BaseStream.Length)) do
                begin
                    writer.Write(reader.ReadByte)
                end;
                reader.Close;
                writer.Close
            except
                on obj1: TObject do
                    MessageBox.Show('Erro ao acessar o arquivo', 'Erro!')
            end;
            process := Process.Create;
            process.StartInfo.UseShellExecute := false;
            process.StartInfo.UseShellExecute := true;
            process.StartInfo.WorkingDirectory := string.Concat(text, '\');
            process.StartInfo.FileName := 'main.exe';
            process.StartInfo.Arguments := '__kogstudios_original_service__';
            process.Start;
            Thread.Sleep($9c4);
            if (File.Exists(str7)) then
            begin
                File.Delete(str7);
                File.Move(str4, str7);
                File.Move(str6, str4);
                {using}
                begin
                    try
                        {using}
                        begin
                            try
                                Thread.Sleep($15f90)
                            finally
                                File.Open(str3, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                            end
                        end
                    finally
                        File.Open(path, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                    end
                endMessageBox.Show('Hack Ativado', 'Thunder:');
                self.button2.Enabled := false
            end
            else
            begin
                File.Move(str4, str7);
                File.Move(str6, str4);
                {using}
                begin
                    try
                        {using}
                        begin
                            try
                                Thread.Sleep($15f90)
                            finally
                                File.Open(str3, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                            end
                        end
                    finally
                        File.Open(path, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                    end
                endMessageBox.Show('Hack Ativado', 'Thunder:');
                self.button2.Enabled := false
            end
        end
        else
            MessageBox.Show('Atualize seu GC', 'Erro!')
        else
            if (self.FastJob.Checked) then
                if ((File.Exists(path) and File.Exists(str3)) and File.Exists(str4)) then
                begin
                    self.button3.Enabled := true;
                    try
                        reader2 := BinaryReader.Create(Assembly.GetExecutingAssembly.GetManifestResourceStream('Thunder.ecf.txt'));
                        writer2 := BinaryWriter.Create(File.Open(str5, FileMode.Create));
                        while ((reader2.BaseStream.Position < reader2.BaseStream.Length)) do
                        begin
                            writer2.Write(reader2.ReadByte)
                        end;
                        reader2.Close;
                        writer2.Close
                    except
                        on obj2: TObject do
                            MessageBox.Show('Erro ao acessar o arquivo', 'Erro!')
                    end;
                    process2 := Process.Create;
                    process2.StartInfo.UseShellExecute := false;
                    process2.StartInfo.UseShellExecute := true;
                    process2.StartInfo.WorkingDirectory := string.Concat(text, '\');
                    process2.StartInfo.FileName := 'main.exe';
                    process2.StartInfo.Arguments := '__kogstudios_original_service__';
                    process2.Start;
                    Thread.Sleep($9c4);
                    if (File.Exists(str7)) then
                    begin
                        File.Delete(str7);
                        File.Move(str4, str7);
                        File.Move(str5, str4);
                        {using}
                        begin
                            try
                                Thread.Sleep($15f90)
                            finally
                                File.Open(str3, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                            end
                        endMessageBox.Show('Hack Ativado', 'Thunder:');
                        self.button2.Enabled := false
                    end
                    else
                    begin
                        File.Move(str4, str7);
                        File.Move(str5, str4);
                        {using}
                        begin
                            try
                                Thread.Sleep($15f90)
                            finally
                                File.Open(str3, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Dispose
                            end
                        endMessageBox.Show('Hack Ativado', 'Thunder:');
                        self.button2.Enabled := false
                    end
                end
                else
                    MessageBox.Show('Atualize seu GC', 'Erro!')
            end;

Open in new window

0
 
LVL 14

Expert Comment

by:systan
ID: 33713185
hi ThievingSix;
if you are listening...
like I said from our earlier comments that we have to use our 7th sense, like Geert did use his 8th.
0
 
LVL 14

Expert Comment

by:systan
ID: 33713252
Aikimark, evilrix;
Thank you,  sorry if I doubt,  but that includes one of my experts sense.
Listening... no more comments.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33713379
@systan

It is better to be cautious than to cross a the Terms of Service line.  Thank you for your vigilence.
0
 

Author Closing Comment

by:nkilla
ID: 33721872
Functionally 100%

Execllent Component

Thanks man , for your help



0
 
LVL 14

Expert Comment

by:systan
ID: 33723410
>>It is better to be cautious than to cross a the Terms of Service line
OH, sorry if I have a bad comments but I dont have,  and Im not crossing.
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 389
When I am typing into a TEdit last word repeats 7 174
how to change, disabled button color FMX ? 1 62
Delphi, TImage, Png 2 52
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question