Anti-Debugging 项目使用教程

Anti-Debugging 项目使用教程

Anti-Debugging A collection of c++ programs that demonstrate common ways to detect the presence of an attached debugger. 项目地址: https://gitcode.com/gh_mirrors/an/Anti-Debugging

1. 项目的目录结构及介绍

Anti-Debugging/
├── build/
│   └── (构建文件)
├── CheckRemoteDebuggerPresent/
│   └── (相关源码文件)
├── DebugBreak/
│   └── (相关源码文件)
├── FindWindow/
│   └── (相关源码文件)
├── IsDebuggerPresent/
│   └── (相关源码文件)
├── OutputDebugString/
│   └── (相关源码文件)
├── ReadTEB/
│   └── (相关源码文件)
├── .gitattributes
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
└── anti-debug.png

目录结构介绍

  • build/: 用于存放构建生成的文件。
  • CheckRemoteDebuggerPresent/: 包含用于检测外部进程是否存在调试器的源码文件。
  • DebugBreak/: 包含用于触发调试器中断的源码文件。
  • FindWindow/: 包含用于查找调试器窗口的源码文件。
  • IsDebuggerPresent/: 包含用于检测当前进程是否被调试的源码文件。
  • OutputDebugString/: 包含用于向调试器输出调试信息的源码文件。
  • ReadTEB/: 包含用于读取线程环境块(TEB)的源码文件。
  • .gitattributes: Git 属性配置文件。
  • .gitignore: Git 忽略配置文件。
  • CMakeLists.txt: CMake 构建配置文件。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文件。
  • anti-debug.png: 项目相关图片文件。

2. 项目的启动文件介绍

项目中没有明确的“启动文件”,因为每个子目录下的源码文件都是独立的示例程序。要运行某个示例程序,需要先构建项目,然后运行生成的可执行文件。

构建项目

build/ 目录下运行以下命令:

cmake ..
cmake --build .

构建完成后,可以在 build/ 目录下找到生成的可执行文件,例如 CheckRemoteDebuggerPresent.exe

3. 项目的配置文件介绍

CMakeLists.txt

CMakeLists.txt 是 CMake 的配置文件,用于定义项目的构建规则。以下是文件的主要内容:

cmake_minimum_required(VERSION 3.10)
project(Anti-Debugging)

set(CMAKE_CXX_STANDARD 11)

# 添加子目录
add_subdirectory(CheckRemoteDebuggerPresent)
add_subdirectory(DebugBreak)
add_subdirectory(FindWindow)
add_subdirectory(IsDebuggerPresent)
add_subdirectory(OutputDebugString)
add_subdirectory(ReadTEB)

.gitattributes

.gitattributes 文件用于定义 Git 的属性,例如文件的换行符处理方式等。

.gitignore

.gitignore 文件用于指定 Git 忽略的文件和目录,例如构建生成的文件。

LICENSE

LICENSE 文件包含了项目的许可证信息,本项目使用 MIT 许可证。

README.md

README.md 文件是项目的说明文档,包含了项目的简介、构建方法、示例程序的介绍等内容。

Anti-Debugging A collection of c++ programs that demonstrate common ways to detect the presence of an attached debugger. 项目地址: https://gitcode.com/gh_mirrors/an/Anti-Debugging

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

秦贝仁Lincoln

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值