唉,最近开学加马上Hvv,事情多了起来,文章更得慢,拿点之前的笔记凑数喽。
SLib是一个根据https://evasions.checkpoint.com/来封装的一个C#库。以此来进行沙箱检测。
主要包含下面的检测项:
项目地址为:https://github.com/Aetsu/SLib 先把项目clone,然后编译出dll,即可作为库使用了。
首先新建一个C#项目,然后导入刚刚的Dll
就可以使用了。下面介绍几个简单的demo,文件系统:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SLib;
namespace SandBoxEvasion
{
class Program
{
static void Main(string[] args)
{
Filesystem fsCheck = new Filesystem();
Generic.SandboxRes fsRes1 = fsCheck.checkFiles();
Console.WriteLine("[+]Is sandbox " + fsRes1.isSandbox.ToString());
foreach (Generic.SandboxTag tag in fsRes1.tagList) {
Console.WriteLine("Tag:{0} --> {1}",tag.tag,tag.query);
}
}
}
}
静态编译可以使用Costura.Fody来做,然后微步跑一跑:
注册表方法:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SLib;
namespace SandBoxEvasion
{
class Program
{
static void Main(string[] args)
{
RegistryQuery rQuery = new RegistryQuery();
Console.WriteLine("[+] Registry detection methods");
Generic.SandboxRes rQueryRes1 = rQuery.checkPath();
Console.WriteLine(" [*] Is sandbox? " + rQueryRes1.isSandbox.ToString());
foreach (Generic.SandboxTag tag in rQueryRes1.tagList)
{
Console.WriteLine(" Tag: {0} -> {1}", tag.tag, tag.query);
}
}
}
}
硬件检测法:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SLib;
namespace SandBoxEvasion
{
class Program
{
static void Main(string[] args)
{
Hardware hwHelper = new Hardware();
Generic.SandboxRes hwRes3 = hwHelper.checkAudio();
Console.WriteLine(" [-] Check if CPU temperature information is available");
Console.WriteLine(" [*] Is sandbox? " + hwRes3.isSandbox.ToString());
foreach (Generic.SandboxTag tag in hwRes3.tagList)
{
Console.WriteLine(" Tag: {0} -> {1}", tag.tag, tag.query);
}
}
}
}
成功检测到目标为虚拟机
本文始发于微信公众号(鸿鹄实验室):Evasion SandBox库SLib使用
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论