Malware Note
main
main
  • 恶意软件学习笔记
  • 权限维持
    • 服务
      • 新建服务
      • 修改服务
      • 隐藏服务
      • 劫持服务
    • 启动项
      • 注册表
      • 文件夹
    • 用户账户
      • 新建用户
      • 隐藏用户
    • DLL劫持
      • 劫持自启动程序
      • 劫持.NET程序
    • COM劫持
      • COM劫持
    • 映像劫持
      • 映像劫持
    • 计划任务
      • 新建任务
    • WMI
      • WMI事件
    • Office
      • VSTO
      • WLL/XLL
      • 模板文件
      • COM劫持
    • BITS Jobs
      • BITS
    • Rootkit
      • Rootkit
    • 未分类
      • Windows Telemetry
      • 替换文件
      • AppInit_DLLs注入
      • 粘滞键
      • cmd启动劫持
      • 屏幕保护
      • 注册SSP DLL
      • AddMonitor
      • 滥用POWERSHELL配置文件
      • W32Time
      • UWP
      • Waitfor
      • Bios
      • 劫持更新程序
      • 利用LAPS
      • SDB文件
  • 提权
    • UAC Bypass
    • 漏洞
    • 错误配置
  • 横向移动
    • WMI
    • RPC
    • DCOM
    • HASH
    • Kerberos tickets
  • 文件结构
    • Office
    • LNK
      • 钓鱼lnk
    • PE
    • CHM
      • 钓鱼chm
  • 注入
    • 注入
  • 反分析
    • 反虚拟机/沙盒
  • 获取用户密码或hash
    • SMB
    • 注入mstsc.exe
    • Mimikatz
    • NPLogonNotify
    • Tickets
  • 进程链
    • 启动进程
  • 关闭杀软
    • 关闭WD
  • AMSI
    • 绕过AMSI
  • Dump内存
    • MiniDumpWriteDump
    • Shellcode
    • SilentProcessExit
    • procdump
    • Task Manager/Process Explorer
    • Sqldumper
    • comsvcs.dll
    • WinPmem
    • ProcessDump.exe
    • Dumpert
    • BSOD
    • PPLdump
    • Hibernation
  • 木马分析
    • Stealer
      • 输入法
    • Hidden Remote
  • 常用工具
    • Untitled
  • 鬼知道有什么用的小知识
    • 鬼知道有什么用的小知识
由 GitBook 提供支持
在本页

这有帮助吗?

  1. 反分析

反虚拟机/沙盒

c#(WMI检测内存):

using System;
using System.Management;
using System.Threading;

namespace Program
{
    class Anti_Analysis
    {
        public static void RunAntiAnalysis()
        {
            if (isVM()) 
            {
                Environment.FailFast(null);
            }
            Thread.Sleep(1000);
        }
        public static bool isVM()
        {            
            SelectQuery selectQuery = new SelectQuery("Select * from Win32_CacheMemory");
            //SelectQuery selectQuery = new SelectQuery("Select * from CIM_Memory");
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(selectQuery);
            int i = 0;
            foreach (ManagementObject DeviceID in searcher.Get()) 
                i++;
            return (i == 0);            
        }
    }
}

c++(即插即用设备)

#include <Windows.h>
#include <iostream>
#include <string>

int main()
{
  DISPLAY_DEVICE dd;
  dd.cb = sizeof(dd);
  int deviceIndex = 0;
  while (EnumDisplayDevices(0, deviceIndex, &dd, 0))
  {
    std::wstring deviceName = dd.DeviceName;
    int monitorIndex = 0;
    while (EnumDisplayDevices(deviceName.c_str(), monitorIndex, &dd, 0))
    {
      int flag = strlen((const char*)dd.DeviceString);
      if (flag > 2) {
        std::wcout << "this is vm";
      }
      else
      {
        std::wcout << "this is not vm";
      }
      ++monitorIndex;
    }
    ++deviceIndex;
  }
  return 0;
}

测试工具:

上一页注入下一页SMB

最后更新于3年前

这有帮助吗?

LogoGitHub - LordNoteworthy/al-khaser: Public malware techniques used in the wild: Virtual Machine, Emulation, Debuggers, Sandbox detection.GitHub
LogoGitHub - LordNoteworthy/al-khaser: Public malware techniques used in the wild: Virtual Machine, Emulation, Debuggers, Sandbox detection.GitHub
LogoGitHub - a0rtega/pafish: Pafish is a testing tool that uses different techniques to detect virtual machines and malware analysis environments in the same way that malware families doGitHub
LogoGitHub - a0rtega/pafish: Pafish is a testing tool that uses different techniques to detect virtual machines and malware analysis environments in the same way that malware families doGitHub