htb
htb copied to clipboard
Command-line client to interact with Hack The Box
htb - command-line interface to Hack The Box
htb
is a command-line client to Hack The Box.
Machines
Search machines
Machines can be listed with filters applied to find the find you are looking for. Currently, the following filters are supported:
-
--owned
: display machines where you owned both user and root -
--unowned
: display machines you did not complete -
--spawned
: display machines that are currently started -
--active
: display active machines -
--retired
: display retired machines -
--todo
: display the machines that you added to your to-do list -
--assigned
: display the machines that are assigned to you -
--difficulty DIFFICULTY
: filter machines by their difficulty level -
--os OS
: filter by operating systems -
--name NAME
: display the machines matching the given name
Also, the output can be sorted by id
, name
, rating
or release
date by providing the --sort
option. Results can be sorted in descending order by providing the -x
option.
Note: machines
is aliased to machine
, box
and vm
.
$ htb machines list --owned --retired
NAME | OS | USER | ROOT | IP ADDRESS | RATING | POINTS
Lame | Linux | 👤 15430 | # 16559 | 10.10.10.3 | ★ 4.3 | 🞋 20
Legacy | Windows | 👤 12370 | # 12860 | 10.10.10.4 | ★ 4.2 | 🞋 20
Devel | Windows | 👤 10626 | # 11128 | 10.10.10.5 | ★ 4.0 | 🞋 20
Beep | Linux | 👤 7212 | # 7606 | 10.10.10.7 | ★ 4.7 | 🞋 20
Optimum | Windows | 👤 11634 | # 7446 | 10.10.10.8 | ★ 4.7 | 🞋 20
Grandpa | Windows | 👤 5104 | # 5257 | 10.10.10.14 | ★ 3.8 | 🞋 20
Granny | Windows | 👤 4365 | # 4523 | 10.10.10.15 | ★ 3.2 | 🞋 20
Blocky | Linux | 👤 4322 | # 4312 | 10.10.10.37 | ★ 4.7 | 🞋 20
Blue | Windows | 👤 12210 | # 12634 | 10.10.10.40 | ★ 4.5 | 🞋 20
Mirai | Linux | 👤 7235 | # 6858 | 10.10.10.48 | ★ 4.2 | 🞋 20
[...]
Display machine details
$ htb machines show registry
Registry
■■■■■■■■■■■■■■■■■■■■ ★ 4.5
Hard 💻 Linux - 🞋 40 - 👤 3657 - # 2968
Made by thek
Released on 19 Oct 2019
IP address: 10.10.10.159
First bloods:
👤 InfoSecJack in 00 days, 03 hours, 28 mins, 17 seconds
# jkr in 00 days, 04 hours, 26 mins, 08 seconds
Add and remove machines from your to-do list
$ htb machines todo blue
✓ Blue was added to your todo list
$ htb machines todo blue
✓ Blue was removed from your todo list
Submit flags with difficulty
$ htb machines own themachine -f e825b7d1941c15cee7512238715f50ff -d 3
✗ Incorrect flag!
Start, stop and reset machines
$ htb machines start registry
🕑 please wait while we try and assign `Registry` to you...
✓ Machine deployed to lab.
$ htb machines start lame
🕑 please wait while we try and assign `Lame` to you...
✗ You already have an active machine.
$ htb machines reset mirai
🕑 please wait while we try and reset `Mirai`...
✗ Mirai was not reset. Another reset from this user is pending.
Conversations
List conversations
$ htb chat list
💬 user1 (123)
user1: Why?
💬 user2 (456)
You: Did you start ForwardSlash?
Show messages from conversations
$ htb chat show 123
03:27am user1: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
03:35am user1: Ut vulputate sit amet neque et aliquam. Vestibulum ac interdum dui, eu placerat lectus. Phasellus in risus velit.
03:36am user1: :sweat_smile:
01:39pm apognu: Vestibulum sollicitudin ullamcorper neque non pharetra. Integer at ipsum ut mauris lobortis semper. Praesent ut erat ac ligula vehicula vulputate vitae at mauris.
01:40pm apognu: Phasellus consequat mi eu augue aliquam placerat.
Open an interactive shell to a chat
$ htb chat open 123
✓ Chat session started
/history to display latest messages
/quit or ^D to exit
05:04pm user1: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
05:10pm apognu: Ut vulputate sit amet neque et aliquam. Vestibulum ac interdum dui, eu placerat lectus.
05:14pm apognu: Phasellus consequat mi eu augue aliquam placerat.
> your message...