Encryption for executable files

Can someone recommend a good way to encrypt an executable? I tried to use AxCrypt, but I do not like the use, i.e. You specify the password, and the person who runs exe must specify the password. Is there a way to encrypt it once and users just run exe without specifying any passwords?

+4
source share
5 answers

This is basically pointless. If it is a .NET or Java program, obfuscators can improve performance and reduce executable file size and make reversing difficult. Packers can reduce the size of the executable file. Signing can provide your users with confidence that you have created a program. But encrypting the executable to hide its executable code is pretty pointless.

+10
source

A program that knows how to decrypt itself will contain all the information that a hacker must compromise. You pass the lock with the key. However, let's say that you want to create a small barrier to entry into your program. Perhaps you have cheat codes in your game, and you don’t want anyone to just run the β€œlines” above your program and view them.

I suggest packing your program using the UPX program. This can lead to confusion of your program on disk. In your basic interrogation methods, you will see only a tiny decompressor. However, a particular hacker quickly recognizes the compressor program and unpacks it. In any case, as soon as the program runs in memory, you can take the main dump of the process or attach a debugger to it. There is not much to prevent this on most hardware.

+6
source

If you want certain users to run exe, you can define policies under the windows that will allow you to run it only for specific users.

but if you want to hide the code, then: since you did not indicate which language you used exe in. If its c / C ++ is already sufficiently encrypted, some work is required to get it. If its java or csharp has obfuscators you can use. this will make it harder to get the code from exe.

0
source

I think you should use software that uses public and private keys. Here's more info on how this works.

-1
source

You guy do not understand the question, it is normal for a programmer to think so. But as an ethical hacker it is clear that he wants to bypass the antivirus, and not hide the code, in any case, you can use Visual Basic.

use this code for encryption

Public Function TripleDES_Encrypt(ByVal input As String, ByVal pass As String) As String Dim TripleDES As New System.Security.Cryptography.TripleDESCryptoServiceProvider Dim Hash_TripleDES As New System.Security.Cryptography.MD5CryptoServiceProvider Dim encrypted As String = "" Try Dim hash(23) As Byte Dim temp As Byte() = Hash_TripleDES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass)) Array.Copy(temp, 0, hash, 0, 16) Array.Copy(temp, 0, hash, 15, 8) TripleDES.Key = hash TripleDES.Mode = Security.Cryptography.CipherMode.ECB Dim DESEncrypter As System.Security.Cryptography.ICryptoTransform = TripleDES.CreateEncryptor Dim Buffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(input) encrypted = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length)) Return encrypted Catch ex As Exception End Try End Function 

for decryption

 Public Function TripleDES_Decrypt(ByVal input As String, ByVal pass As String) As String Dim TripleDES As New System.Security.Cryptography.TripleDESCryptoServiceProvider Dim Hash_TripleDES As New System.Security.Cryptography.MD5CryptoServiceProvider Dim decrypted As String = "" Try Dim hash(23) As Byte Dim temp As Byte() = Hash_TripleDES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass)) Array.Copy(temp, 0, hash, 0, 16) Array.Copy(temp, 0, hash, 15, 8) TripleDES.Key = hash TripleDES.Mode = Security.Cryptography.CipherMode.ECB Dim DESDecrypter As System.Security.Cryptography.ICryptoTransform = TripleDES.CreateDecryptor Dim Buffer As Byte() = Convert.FromBase64String(input) decrypted = System.Text.ASCIIEncoding.ASCII.GetString(DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length)) Return decrypted Catch ex As Exception End Try End Function 
-2
source

All Articles