CTF思路
点击放大

!GitHub Tags
!GitHub Releases
!GitHub Repo stars
<div>
<b>Tests</b><br>
<img src="
<br><br>
<b>OS</b><br>
<img alt="current " src="
<img alt="current " src="
<img alt="current " src="
<br><br>
<b>Architecture</b><br>
<img alt="amd64" src=")-supported-success"><br>
<img alt="arm64" src=")-supported-success">
<br><br>
<b>Misc</b><br>
<img alt="current " src="
<br>
<img alt="current " src="
<br><br>
</div>
HTB-Operator is de and maintained by user0x1337. It interacts with the Hack The Box API, a popular cybersecurity training platform. Its primary goal is to save time when working with HTB.
<img alt="current " src="
It is strongly recommended to use a en. Use pipx (which automatically creates an isolated Python en) to install htb-operator:
1. Visit:
2. Click Create App Token.
<img width="1465" height="181" alt="image" src=" />
3. Create a token.
<img width="567" height="409" alt="image" src=" />
4. Store the token.
<img width="562" height="389" alt="image" src=" />
5. Run:
The API token (and other settings) is stored locally at:
$HOME/.config/htb-operator/config.ini%APPDATA%\htb-operator\config.iniHTB-Operator is an unofficial command-line tool for automating legitimate Hack The Box workflows. It is intended for use with your own Hack The Box account and within authorized HTB lab en only.
The tool stores local configuration , including the HTB API token, in the user's configuration directory. Keep this file private and do not commit API tokens, , logs, flags, configuration files, or challenge-related secrets to public repositories.
Some features may require elevated pri, for example starting or stopping or modifying the local hosts file. Review these actions carefully before execution.
Automation features such as custom scripts are executed locally on your system. Only run scripts you understand and trust.
HTB-Operator is not affiliated with, endorsed by, or officially supported by Hack The Box.
-h or --help at any level to display help information. The top-le are shown when you run the program without arguments:!image
init should be the first command you run. As mentioned above, use it to register your API token:!image
init also supports an alternative HTB API URL. Use this only with caution and only if HTB changes the API URL.
info command retrie for a user. If no user is specified, it shows information for the authenticated user.-s / --username-s USERNAME or --username USERNAME, you can display the profile of USERNAME. Example:!image
-a / --activity-a or --activity to show the full activity history.-s / --username also works with this flag:
!image
-l / --list!image
download subcommand, you can download a certificate. With --id, specify the certificate ID (for example, from --list), and with -f / --filename, set the target path and filename.!image
machine command provides subcommands to list machines, display details, and start, stop, or reset machines.htb-operator machine list -h.!image
Acti that will be retired soon are marked as ✘/✔.
--limit--limit <NUMBER> to change that value. Example:!image
--retired--retired is set, only retired machines are shown.!image
--active--active is set, only acti are shown.--group-by-osRetired and Active, output is grouped by OS.!image
--id or --name.!image
--start-vpn!image
--update-hosts-file/etc/hosts (Linux) or /drivers/etc/hosts (Windows, not tested) is updated. The machine hostname plus suffix htb (for example HOSTNAME.htb) and the assigned IP address are added. This action requires root/sudo/admin permissions. On Linux, you will be prompted for your sudo password.!image
--wait-for-release--script <SCRIPT_FILE>htb-operator sets these en :$HTB_MACHINE_IP -> assigned IP$HTB_MACHINE_NAME -> machine name (for example Sea)$HTB_MACHINE_OS -> machine OS (Linux, Windows, FreeBSD, ...)$HTB_MACHINE_DIFFICULTY -> machine difficulty (for example Easy)$HTB_MACHINE_INFO -> information provided by HTB$HTB_MACHINE_HOSTNAME -> hostname (for example sea.htb)#### Example
Example script:
Command (flags can be combined for automation):
!image
In this example, a warning appeared because a was already running. This is informational and can usually be ignored.
!image
--stop-vpn--clean-hosts-filestop flags shown above:!image
--update-hosts-filemachine start --update-hosts-file.!image
--id or --name.!image
--user-flag for the user flag and --root-flag for the root flag. You also need -d to rate difficulty (from 1 = Piece of Cake to 10 = Brainfuck)./home/USERNAME/user.txt (non-root) or /root/root.txt (root), and submits it to HTB for the currently acti. You also need -d to provide a difficulty rating (from 1 = Piece of Cake to 10 = Brainfuck).challenge command provides subcommands to list challenges, display details, download files/writeups, start challenge instances, and submit flags. Example: download files, unzip them, and start the instance with one command:search to find challenges that contain the search term. --name is required.!image
--unsolved--solved and --unsolved are provided, unsol are returned.--solved--solved and --unsolved are provided, unsol are returned.--todoTODO flag set.--category!image
--difficultyprolabs command provides subcommands to list all ProLabs and retrie for a specific ProLab.!image
--id or --name.!image
info already includes ProLab flags and machines. For focused views, use these dedicated subcommands:
submit to submit ProLab flags. Example:You can start and stop HTB , view , download Open, and run benchmarks against all or selected .
!image
list subcommand. Use the help command for details.htb-operator will try to switch to the appropriate "" after asking for confirmation. This action requires root/admin permissions.!image
!image
--id.!image
!image
list subcommand. For more details, use info.!image
info subcommand provides --ids to show only selected seasons. It also supports --username to view another user's results. You can combine --ids and --username.!image
badge list.!image
You can also filter for open badges (not yet earned) with --open. Use --category to filter by category. You can additionally use --username to display another user's badge status. Flags can be combined.
!image
htb-operator is currently not possible.!image
Establishes an SSH connection to the running Pwnbox instance. sshpass must be installed on your system.
!image
!image
开发语言:Python
Star 数:74
该项目属于CTF思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Command-Line tool for accessing HTB展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | htb-operator - Command-Line tool for accessing HTB |
| 所属分类 | CTF思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:00:36 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 409 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |