EonaCat.Security 1.0.6

Prefix Reserved
dotnet add package EonaCat.Security --version 1.0.6
                    
NuGet\Install-Package EonaCat.Security -Version 1.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EonaCat.Security" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EonaCat.Security" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="EonaCat.Security" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EonaCat.Security --version 1.0.6
                    
#r "nuget: EonaCat.Security, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=EonaCat.Security&version=1.0.6
                    
Install EonaCat.Security as a Cake Addin
#tool nuget:?package=EonaCat.Security&version=1.0.6
                    
Install EonaCat.Security as a Cake Tool

EonaCat Security


EonaCat Security library

The library provides:

A secrets manager.

  • Securely load key/values from a file (or memory)
  • Securely save key/values to a file (or memory)

AntiDebug features:

Call this at the entry point of your application (e.g., Main() or during startup):

AntiDebuggerModule.Start();

This will initialize the AntiDebugger module and start monitoring for debugging attempts.

To stop the AntiDebugger module, you can call:

AntiDebuggerModule.Stop();

If you want to manually trigger a crash (e.g., to confuse reverse engineers):

AntiDebuggerModule.Crash();

What It Detects:

  • Debugging tools (e.g., dnSpy, x64dbg, windbg, ollydbg)
  • Network monitors (e.g., Fiddler, Wireshark, Proxifier)
  • Disassemblers/decompilers (e.g., IDA64, ILSpy, dotPeek)
  • Other reverse engineering utilities.

AntiDumpModule The AntiDumpModule is a .NET anti-reverse-engineering component that attempts to corrupt the PE (Portable Executable) headers and section table of the currently running process. This makes it harder for tools like dumpers and decompilers to generate a valid copy of the executable

How to use:

AntiDumpModule.Start();

This will initialize the AntiDump module and start monitoring for dumping attempts.

To stop the AntiDump module, you can call:

AntiDumpModule.Stop();

Bytes Generator:

How to use:

// Generate random bytes
byte[] randomBytes = BytesGenerator.RandomBytes(16);

// Derive bytes from a password
string password = "securepassword";
byte[] salt = BytesGenerator.RandomBytes(8);
byte[] derivedBytes = BytesGenerator.BytesFromPassword(password, salt, 16);

// Convert bytes to string
string hexString = BytesGenerator.BytesToString(randomBytes);

// Convert string to bytes
byte[] bytesFromHex = BytesGenerator.StringToBytes(hexString);

Data Compressor:

How to use:

// Compress data
byte[] data = System.Text.Encoding.UTF8.GetBytes("This is some data to compress");
byte[] compressedData = DataCompressor.Compress(data);

// Decompress data
byte[] decompressedData = DataCompressor.Decompress(compressedData);
string decompressedString = System.Text.Encoding.UTF8.GetString(decompressedData);

DataEncryptor:

How to use:

// Encrypt an object
string originalData = "Sensitive data";
byte[] key = BytesGenerator.RandomBytes(32); // AES-256 key
byte[] iv = BytesGenerator.RandomBytes(16);  // AES IV
byte[] encryptedData = DataEncryptor.Encrypt(originalData, key, iv);

// Decrypt the object
string decryptedData = DataEncryptor.Decrypt<string>(encryptedData, key, iv);

FileEncryptor:

How to use:

// Encrypt a file
string inputFilePath = "file.txt";
string outputFilePath = "encryptedFile.xxx";
byte[] key = BytesGenerator.RandomBytes(32); // AES-256 key
byte[] iv = BytesGenerator.RandomBytes(16);  // AES IV
FileEncryptor.Encrypt(inputFilePath, outputFilePath, key, iv);

// Decrypt a file
string decryptedFilePath = "decryptedFile.txt";
FileEncryptor.Decrypt(outputFilePath, decryptedFilePath, key, iv);

Hash computation:

How to use:

// Compute hash
byte[] data = System.Text.Encoding.UTF8.GetBytes("This is my data");
byte[] hash = HashComputer.Compute(data);

// Verify hash
bool isMatch = HashComputer.Verify(data, hash);
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 212 5/3/2025
1.0.5 310 3/9/2025
1.0.4 227 7/9/2024