RustSoliloquy is a Rust implementation of the Internal-Monologue, designed to capture NetNTLM hashes by interacting locally with the NTLM authentication package without touching LSASS. This project combines the use of native APIs for most operations with the Security Support Provider Interface (SSPI) specifically for handling NTLM negotiation.
At its core, RustSoliloquy is a personal learning project aimed at deepening the understanding of NTLM authentication using the SSPI (Security Support Provider Interface) API.
Internal Monologue is a technique for capturing NetNTLM hashes by le the NTLM authentication package. It operates through four key steps: configuring registry settings to allow NetNTLMv1, impersonating logged-on users to gain their security context, simulating the NTLM authentication process to obtain NetNTLM hashes.
This step modifies specific registry keys using native APIs such as NtOpenKey, NtSet, and NtQuery. The adjustments allow NetNTLMv1 authentication by changing:
2 (Send NTLM response only) to enable NetNTLMv1 authentication.0x20000000 (128-bit encryption) to remove the enforcement of specific session security features such as NTLMv2 session security.0 (Allow all) to permit NTLM traffic, o settings like _"Deny all"_, which block all NetNTLM authentication attempts.NtQuerySystemInformation. For each process, it opens a handle using NtOpenProcess and retrieves the associated token with NtOpenProcessToken. This token allows access to the user's security context, which is required for impersonation.NtQueryInformationToken to determine its type (primary or impersonation). If it is a primary token, it is duplicated into an impersonation token using NtDuplicateToken. After duplication, the impersonation token is applied to the current thread using NtSetInformationThread, allowing the program to operate in the security context of the impersonated user. If the token is already an impersonation token, it is directly applied without duplication.AcquireCredentialsHandle. This function sets up the authentication package (NTLM) for the current user.InitializeSecurityContext. This message ad the client's capabilities and requests NTLM authentication from the server.AcceptSecurityContext to craft a Type-2 message, which includes a challenge and flags indicating the supported authentication options.InitializeSecurityContext and generates a Type-3 message containing its response to the challenge, including the NetNTLM hashes.The restoration process ensures all modified registry keys are returned to their original . Using NtOpenKey and NtSet, previous configurations are reapplied where applicable. If a value was originally absent, NtDelete is used to remove the newly added entries, ensuring the system remains consistent with its initial state.
RustSoliloquy offers several configurable options to tailor its functionality. The following features are a:
impersonate _(default)_: Enables the extraction, duplication, and impersonation of user tokens to create new security contexts. Without this feature, only the NTLM hashes of the current user are retrieved.downgrade _(default)_: Adjusts registry settings to allow NTLMv1 authentication by lowering security constraints. If disabled, NTLMv2 hashes are captured where applicable.restore _(default)_: Includes the downgrade feature and restores all modified registry settings to their original after execution.threads: Extends impersonate to support token impersonation at the thread level.: Activates detailed logging for debugging and monitoring execution flow.To build RustSoliloquy use the following commands:
This project is intended for educational and research purposes only. RustSoliloquy is a personal learning project designed to explore NTLM authentication mechanisms and the Security Support Provider Interface (SSPI). Use it responsibly, and keep in mind that any misuse is solely your responsibility.
Always adhere to ethical guidelines and legal frameworks when conducting security research (and, seriously, in e you do).
Contributions are welcome! If you ha for impro or encounter issues, please open an issue or submit a pull request.
开发语言:Rust
Star 数:193
该项目属于红蓝攻防方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕A Rust implementation of Internal-Monologue — retrieving NetNTLM hashes without touching LSASS, leveraging SSPI for NTLM negotiation and indirect NTAPIs for core operations.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | RustSoliloquy - A Rust implementation of Internal-Monologue — retr |
| 所属分类 | 红蓝攻防 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:47:15 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 212 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |