Browse Source

version 5.0

master
Dani Santos 5 months ago
parent
commit
12525c22eb
  1. 86
      README.md
  2. BIN
      bin/BaseLibrary.dll
  3. BIN
      bin/Google.Protobuf.dll
  4. BIN
      bin/Microsoft.ML.Core.dll
  5. BIN
      bin/Microsoft.ML.CpuMath.dll
  6. BIN
      bin/Microsoft.ML.Data.dll
  7. BIN
      bin/Microsoft.ML.DataView.dll
  8. BIN
      bin/Microsoft.ML.FastTree.dll
  9. BIN
      bin/Microsoft.ML.KMeansClustering.dll
  10. BIN
      bin/Microsoft.ML.PCA.dll
  11. BIN
      bin/Microsoft.ML.StandardTrainers.dll
  12. BIN
      bin/Microsoft.ML.TensorFlow.dll
  13. BIN
      bin/Microsoft.ML.Transforms.dll
  14. BIN
      bin/Microsoft.ML.Vision.dll
  15. BIN
      bin/Microsoft.ML.dll
  16. BIN
      bin/Newtonsoft.Json.dll
  17. BIN
      bin/NumSharp.Lite.dll
  18. BIN
      bin/PeNet.Asn1.dll
  19. BIN
      bin/PeNet.dll
  20. BIN
      bin/Protobuf.Text.dll
  21. BIN
      bin/SixLabors.ImageSharp.dll
  22. BIN
      bin/System.CodeDom.dll
  23. BIN
      bin/System.Numerics.Tensors.dll
  24. BIN
      bin/System.Security.Cryptography.Pkcs.dll
  25. BIN
      bin/TensorFlow.NET.dll
  26. BIN
      bin/Validation.dll
  27. BIN
      bin/Xunit.SkippableFact.dll
  28. 1811
      bin/XvirusSDK.deps.json
  29. BIN
      bin/XvirusSDK.dll
  30. BIN
      bin/runtimes/linux-arm/native/libLdaNative.so
  31. BIN
      bin/runtimes/linux-arm/native/libLdaNative.so.dbg
  32. BIN
      bin/runtimes/linux-arm64/native/libLdaNative.so
  33. BIN
      bin/runtimes/linux-arm64/native/libLdaNative.so.dbg
  34. BIN
      bin/runtimes/linux-x64/native/libFastTreeNative.so
  35. BIN
      bin/runtimes/linux-x64/native/libLdaNative.so
  36. BIN
      bin/runtimes/linux-x64/native/libLdaNative.so.dbg
  37. BIN
      bin/runtimes/linux-x64/native/libtensorflow.so
  38. BIN
      bin/runtimes/linux-x64/native/libtensorflow_framework.so.2
  39. BIN
      bin/runtimes/osx-arm64/native/libLdaNative.dylib
  40. BIN
      bin/runtimes/osx-arm64/native/libLdaNative.dylib.dwarf
  41. BIN
      bin/runtimes/osx-x64/native/libFastTreeNative.dylib
  42. BIN
      bin/runtimes/osx-x64/native/libLdaNative.dylib
  43. BIN
      bin/runtimes/osx-x64/native/libLdaNative.dylib.dwarf
  44. BIN
      bin/runtimes/osx-x64/native/libtensorflow.dylib
  45. BIN
      bin/runtimes/osx-x64/native/libtensorflow_framework.2.dylib
  46. BIN
      bin/runtimes/win-arm64/native/LdaNative.dll
  47. BIN
      bin/runtimes/win-x64/native/FastTreeNative.dll
  48. BIN
      bin/runtimes/win-x64/native/LdaNative.dll
  49. BIN
      bin/runtimes/win-x64/native/tensorflow.dll
  50. BIN
      bin/runtimes/win-x86/native/FastTreeNative.dll
  51. BIN
      bin/runtimes/win-x86/native/LdaNative.dll
  52. BIN
      bin/runtimes/win/lib/netcoreapp3.0/System.Security.Cryptography.Pkcs.dll
  53. 9
      bin/settings.json
  54. BIN
      bin/xunit.abstractions.dll
  55. BIN
      bin/xunit.core.dll
  56. BIN
      bin/xunit.execution.dotnet.dll
  57. 2
      example/Example.csproj

86
README.md

@ -1,6 +1,6 @@
# Xvirus SDK C#
Xvirus SDK 4.2.3 C# bindings.
Xvirus SDK 5.0 C# bindings.
## Table of Contents
@ -10,37 +10,48 @@ Xvirus SDK 4.2.3 C# bindings.
- [Changelog](#changelog)
- [Known Issues](#known-issues)
- [Get Started](#get-started)
- [Avaiable Functions](#avaiable-functions)
- [Available Functions](#available-functions)
- [Model](#model)
- [Settings](#settings)
- [Engine Settings](#engine-settings)
- [Scan Levels](#scan-levels)
- [File Size Limits](#file-size-limits)
- [Update Settings](#update-settings)
- [Exceptions](#exceptions)
## Minimum Requirements
To use Xvirus C# SDK you need:
- .NET 7 SDK - [download](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
- .NET 8 SDK - [download](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
The following Operating Systems are supported:
- Windows:
- Windows 10 1607
- Windows 11 22000
- Windows 11 22H2
- Windows Server 2012
- Windows Server Core 2012
- Linux (glibc 2.17):
- Alpine Linux 3.15
- CentOS 7
- Debian 10
- Fedora 36
- openSUSE 15
- Oracle Linux 7
- Red Hat Enterprise Linux 7
- SUSE Enterprise Linux (SLES) 12 SP2
- Ubuntu 18.04
- Linux (glibc 2.23):
- Alpine Linux 3.19
- Azure Linux 3.0
- CentOS Stream 9
- Debian 12
- Fedora 41
- openSUSE Leap 15.6
- Red Hat Enterprise Linux 8
- SUSE Enterprise Linux 15.6
- Ubuntu 22.04
## Changelog
- Version **5.0**:
- Updated to .NET 8
- XvirusAI is now out of beta
- XvirusAI now works on C++ bindings
- Improved performance of heuristics engine
- Added new settings: `EnableSignatures, HeuristicsLevel, AILevel, MaxHeuristicsPeScanLength, MaxHeuristicsOthersScanLength, MaxAIScanLength, CheckSDKUpdates`
- Version **4.2.3**:
- Fixed Windows scan performance regression
- Fixed ScanFolder command not working in CLI
@ -80,17 +91,15 @@ The following Operating Systems are supported:
## Known Issues
- XvirusAI engine is still in BETA. It is not recomended to use in production yet.
- XvirusAI engine does not work in C++ bindings.
- The checkUpdate function can now check for SDK updates but can't update it
- The checkUpdate function can check for SDK/CLI updates but can't update it automatically
## Get Started
The "`example`" folder contains an example project on how to import and use Xvirus SDK in C# (.NET 7).
The "`example`" folder contains an example project on how to import and use Xvirus SDK in C# (.NET 8).
You can run it by building it and then running executable file in the output folder.
## Avaiable Functions
## Available Functions
You have the following functions available:
@ -102,12 +111,12 @@ You have the following functions available:
- "**Malware**" - If malware is detected but the name isn't known.
- **_Malware Name_** - If it is malware from a known family (example: "Trojan.Downloader").
- "**AI.{aiScore}**" - Score of the file using XvirusAI from 0 to 100, the higher the score the more probable it is malicious (example: "AI.99").
- "**File not found!**" - If no file is found in the submited path.
- "**File not found!**" - If no file is found in the submitted path.
- "**File too big!**" - If the file size is bigger than the set limit.
- "**Could not get file hash!**" - There was an error calculating the hash of the file.
- **ScanFolder** - Scans all the files inside the folder at `folderpath`. It will return an IEnumerable of [`ScanResult`](#Model).
- **ScanFolderString** - Scans all the files inside the folder at `folderpath`. It will return the scan result message for each file scanned.
- **CheckUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `checkSDKUpdates`=true then it will also check for SDK updates. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings:
- **CheckUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings:
- "**There is a new SDK version available!**"
- "**Database was updated!**"
- "**Database is up-to-date!**"
@ -133,11 +142,29 @@ public class ScanResult
## Settings
Settings are located in the "`settings.json`" file in the root folder of the SDK. There are 5 avaiable options:
Settings are located in the "`settings.json`" file in the root folder of the SDK/CLI. Available options:
### Engine Settings
- **EnableSignatures** - Enables signature-based scanning of files. Default: _true_
- **EnableHeuristics** - Enables heuristics scanning of files. Default: _true_
- **EnableAIScan** - Enables XvirusAI scan engine. This feature is still in BETA. Default: _false_
- **EnableAIScan** - Enables XvirusAI scan engine. Default: _true_
### Scan Levels
- **HeuristicsLevel** - Heuristics aggressiveness level from 1 to 5, higher is more aggressive. Default: _4_
- **AILevel** - AI scan aggressiveness level from 1 to 100, higher is more aggressive. Default: _10_
### File Size Limits
- **MaxScanLength** - Maximum file size to be scanned in bytes. If set "null" then there is no limit. Default: _null_
- **MaxHeuristicsPeScanLength** - Maximum PE file size for heuristics scanning in bytes. If set "null" then there is no limit. Default: _20971520_ (20MB)
- **MaxHeuristicsOthersScanLength** - Maximum non-PE file size for heuristics scanning in bytes. If set "null" then there is no limit. Default: _10485760_ (10MB)
- **MaxAIScanLength** - Maximum file size for AI scanning in bytes. If set "null" then there is no limit. Default: _20971520_ (20MB)
### Update Settings
- **CheckSDKUpdates** - Enables checking for SDK updates. Default: _true_
- **DatabaseFolder** - Path to the database folder, it accepts both relative and absolute paths. Default: _"Database"_
- **DatabaseVersion** - KeyValue list of database files version. This is updated automatically when using the "checkUpdate()" function.
@ -145,9 +172,16 @@ Example of a `settings.json` file:
```JSON
{
"EnableSignatures": true,
"EnableHeuristics": true,
"EnableAIScan": false,
"EnableAIScan": true,
"HeuristicsLevel": 4,
"AILevel": 10,
"MaxScanLength": null,
"MaxHeuristicsPeScanLength": 20971520,
"MaxHeuristicsOthersScanLength": 10485760,
"MaxAIScanLength": 20971520,
"CheckSDKUpdates": true,
"DatabaseFolder": "Database",
"DatabaseVersion": {
"AIModel": 0,
@ -164,6 +198,6 @@ Example of a `settings.json` file:
## Exceptions
If any of the functions fail it may return an [exception](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/exceptions/).
If any of the functions fail it may return an [exception](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/exceptions/).
All exceptions are logged in the `errorlog.txt` file.
All exceptions are logged in the `errorlog.txt` file.

BIN
bin/BaseLibrary.dll

Binary file not shown.

BIN
bin/Google.Protobuf.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Core.dll

Binary file not shown.

BIN
bin/Microsoft.ML.CpuMath.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Data.dll

Binary file not shown.

BIN
bin/Microsoft.ML.DataView.dll

Binary file not shown.

BIN
bin/Microsoft.ML.FastTree.dll

Binary file not shown.

BIN
bin/Microsoft.ML.KMeansClustering.dll

Binary file not shown.

BIN
bin/Microsoft.ML.PCA.dll

Binary file not shown.

BIN
bin/Microsoft.ML.StandardTrainers.dll

Binary file not shown.

BIN
bin/Microsoft.ML.TensorFlow.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Transforms.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Vision.dll

Binary file not shown.

BIN
bin/Microsoft.ML.dll

Binary file not shown.

BIN
bin/Newtonsoft.Json.dll

Binary file not shown.

BIN
bin/NumSharp.Lite.dll

Binary file not shown.

BIN
bin/PeNet.Asn1.dll

Binary file not shown.

BIN
bin/PeNet.dll

Binary file not shown.

BIN
bin/Protobuf.Text.dll

Binary file not shown.

BIN
bin/SixLabors.ImageSharp.dll

Binary file not shown.

BIN
bin/System.CodeDom.dll

Binary file not shown.

BIN
bin/System.Numerics.Tensors.dll

Binary file not shown.

BIN
bin/System.Security.Cryptography.Pkcs.dll

Binary file not shown.

BIN
bin/TensorFlow.NET.dll

Binary file not shown.

BIN
bin/Validation.dll

Binary file not shown.

BIN
bin/Xunit.SkippableFact.dll

Binary file not shown.

1811
bin/XvirusSDK.deps.json

File diff suppressed because it is too large

BIN
bin/XvirusSDK.dll

Binary file not shown.

BIN
bin/runtimes/linux-arm/native/libLdaNative.so

Binary file not shown.

BIN
bin/runtimes/linux-arm/native/libLdaNative.so.dbg

Binary file not shown.

BIN
bin/runtimes/linux-arm64/native/libLdaNative.so

Binary file not shown.

BIN
bin/runtimes/linux-arm64/native/libLdaNative.so.dbg

Binary file not shown.

BIN
bin/runtimes/linux-x64/native/libFastTreeNative.so

Binary file not shown.

BIN
bin/runtimes/linux-x64/native/libLdaNative.so

Binary file not shown.

BIN
bin/runtimes/linux-x64/native/libLdaNative.so.dbg

Binary file not shown.

BIN
bin/runtimes/linux-x64/native/libtensorflow.so

Binary file not shown.

BIN
bin/runtimes/linux-x64/native/libtensorflow_framework.so.2

Binary file not shown.

BIN
bin/runtimes/osx-arm64/native/libLdaNative.dylib

Binary file not shown.

BIN
bin/runtimes/osx-arm64/native/libLdaNative.dylib.dwarf

Binary file not shown.

BIN
bin/runtimes/osx-x64/native/libFastTreeNative.dylib

Binary file not shown.

BIN
bin/runtimes/osx-x64/native/libLdaNative.dylib

Binary file not shown.

BIN
bin/runtimes/osx-x64/native/libLdaNative.dylib.dwarf

Binary file not shown.

BIN
bin/runtimes/osx-x64/native/libtensorflow.dylib

Binary file not shown.

BIN
bin/runtimes/osx-x64/native/libtensorflow_framework.2.dylib

Binary file not shown.

BIN
bin/runtimes/win-arm64/native/LdaNative.dll

Binary file not shown.

BIN
bin/runtimes/win-x64/native/FastTreeNative.dll

Binary file not shown.

BIN
bin/runtimes/win-x64/native/LdaNative.dll

Binary file not shown.

BIN
bin/runtimes/win-x64/native/tensorflow.dll

Binary file not shown.

BIN
bin/runtimes/win-x86/native/FastTreeNative.dll

Binary file not shown.

BIN
bin/runtimes/win-x86/native/LdaNative.dll

Binary file not shown.

BIN
bin/runtimes/win/lib/netcoreapp3.0/System.Security.Cryptography.Pkcs.dll

Binary file not shown.

9
bin/settings.json

@ -1,7 +1,14 @@
{
"EnableSignatures": true,
"EnableHeuristics": true,
"EnableAIScan": false,
"EnableAIScan": true,
"HeuristicsLevel": 4,
"AILevel": 10,
"MaxScanLength": null,
"MaxHeuristicsPeScanLength": 20971520,
"MaxHeuristicsOthersScanLength": 10485760,
"MaxAIScanLength": 20971520,
"CheckSDKUpdates": true,
"DatabaseFolder": "Database",
"DatabaseVersion": {
"AIModel": 0,

BIN
bin/xunit.abstractions.dll

Binary file not shown.

BIN
bin/xunit.core.dll

Binary file not shown.

BIN
bin/xunit.execution.dotnet.dll

Binary file not shown.

2
example/Example.csproj

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

Loading…
Cancel
Save