0xbbuddha/GoFenrir

GitHub: 0xbbuddha/GoFenrir

一款使用 Go 编写的 Active Directory 枚举与攻击框架,基于 Manticore 实现单一二进制、无依赖的离线渗透工具。

Stars: 3 | Forks: 0

GoFenrir Logo

GoFenrir

使用 Go 编写的 Active Directory 枚举与攻击框架,基于 TheManticoreProject/Manticore 构建。

## 什么是 GoFenrir? GoFenrir 是一个受 [NetExec](https://github.com/Pennyw0rth/NetExec) 启用的 Active Directory 进攻框架。与依赖 Impacket 的 NetExec 不同,GoFenrir 使用 [Manticore](https://github.com/TheManticoreProject/Manticore) 作为协议后端。所有内容均用 Go 编写——单一二进制文件,无需 Python,无依赖地狱。 ## 支持的协议 | 协议 | 状态 | 说明 | |------|------|------| | LDAP / LDAPS | 可用 | 完整枚举与攻击支持 | | SMB v1 | 可用 | 仅限启用了 SMBv1 的主机 | | SMB v2/v3 | 计划中 | 等待 Manticore | | Kerberos | 计划中 | 等待 Manticore | 协议支持随 [TheManticoreProject/Manticore](https://github.com/TheManticoreProject/Manticore) 同步更新。 ## 用法 ``` gf [options] ``` ### LDAP ``` # 身份验证检查 gf ldap -t DC01.domain.local -u user -p 'Password123' -d domain.local # Pass-the-Hash gf ldap -t DC01.domain.local -u user -H -d domain.local # 在子网上喷洒凭据 gf ldap -t 192.168.1.0/24 -u users.txt -p passwords.txt -d domain.local --threads 10 ``` #### 枚举 ``` gf ldap ... --users # User accounts (enabled/disabled) gf ldap ... --groups # Groups with member count gf ldap ... --dcs # Domain controllers (including RODCs) gf ldap ... --computers # Computer accounts with OS info gf ldap ... --admins # Domain admins gf ldap ... --ous # Organizational units gf ldap ... --gpos # Group Policy Objects gf ldap ... --trusts # Domain trusts gf ldap ... --pwd-policy # Password policy ``` #### Kerberos 攻击 ``` gf ldap ... --kerberoastable # Accounts with SPNs (Kerberoast targets) gf ldap ... --asreproast # Accounts without pre-auth (AS-REP roast targets) ``` #### 委派 ``` gf ldap ... --unconstrained # Computers/users with unconstrained delegation (excludes DCs) gf ldap ... --constrained # Accounts with constrained delegation + SPNs + protocol transition flag gf ldap ... --rbcd # Objects with resource-based constrained delegation configured ``` #### ADCS ``` gf ldap ... --adcs # Enumerate CAs, enabled templates, and detect ESC1 vulnerabilities ``` ESC1 检测检查项: - `CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` 在 `msPKI-Certificate-Name-Flag` 中设置 - 存在客户端认证 EKU(或无 EKU 限制) - 无需管理器批准 - 无签发代理要求(`msPKI-RA-Signature == 0`) #### 凭据攻击 ``` gf ldap ... --shadow-creds # Objects with msDS-KeyCredentialLink (shadow credentials) gf ldap ... --weak-accounts # Accounts with dangerous UAC flags ``` 检查的弱账户标志: - `PASSWD_NOTREQD` — 账户可能设有空密码 - `ENCRYPTED_TEXT_PWD_ALLOWED` — 密码以可逆加密存储 - `USE_DES_KEY_ONLY` — Kerberos 仅使用弱 DES 加密 - `DONT_EXPIRE_PASSWORD` — 密码永不过期 ### SMB ``` # 身份验证检查 gf smb -t DC01.domain.local -u user -p 'Password123' -d domain.local # 枚举共享访问 gf smb -t DC01.domain.local -u user -p 'Password123' -d domain.local --shares # 空会话检查 gf smb -t DC01.domain.local --null-session ``` ## 安装 通过 `go install`: ``` go install github.com/0xbbuddha/GoFenrir/cmd/gf@latest ``` 从源码安装: ``` git clone https://github.com/0xbbuddha/GoFenrir cd GoFenrir go build -o gf ./cmd/gf/ ``` ## 构建工具 - [Go](https://golang.org/) - [TheManticoreProject/Manticore](https://github.com/TheManticoreProject/Manticore) - [Cobra](https://github.com/spf13/cobra) ## 免责声明 仅限授权的安全测试使用。
标签:Active Directory, EVTX分析, Go语言, GPO, LDAP, LDAPS, Manticore, NetExec, Pass-the-Hash, Plaso, SMB, Tactics, 信任枚举, 关键词SEO, 协议, 协议分析, 单二进制, 域控发现, 密码喷洒, 开源, 攻击框架, 数据展示, 日志审计, 权限提升, 枚举, 横向移动, 目录服务, 程序破解, 红队, 组枚举, 编程规范, 认证检查, 错误配置检测