Add basic miner check
This commit is contained in:
@@ -162,6 +162,29 @@ public class MalwareScanService
|
||||
}
|
||||
}
|
||||
|
||||
async Task ScanMinerJar()
|
||||
{
|
||||
var access = await ServerService.CreateFileAccess(server, null!);
|
||||
var fileElements = await access.Ls();
|
||||
|
||||
if (fileElements.Any(x => x.Name == "libraries" && !x.IsFile))
|
||||
{
|
||||
await access.Cd("libraries");
|
||||
|
||||
fileElements = await access.Ls();
|
||||
|
||||
if (fileElements.Any(x => x.Name == "jdk" && !x.IsFile))
|
||||
{
|
||||
results.Add(new ()
|
||||
{
|
||||
Title = "Found Miner",
|
||||
Description = "Detected suspicious library directory which may contain a script for miners",
|
||||
Author = "Marcel Baumgartner"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async Task ScanFakePlayerPlugins()
|
||||
{
|
||||
var access = await ServerService.CreateFileAccess(server, null!);
|
||||
@@ -190,6 +213,7 @@ public class MalwareScanService
|
||||
// Execute scans
|
||||
await ScanSelfBot();
|
||||
await ScanFakePlayerPlugins();
|
||||
await ScanMinerJar();
|
||||
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user