The exclusive command-line interface for XeroCTF competitions.
Table of content:
xero-cli
is your main tool to be able to participate in XeroCTF competitions. You can view challenges, submit your flags or see any challenge's scoreboard.
You can either download the CLI binary directly or you can manually clone and build the project yourself. The former is strongly preferred.
Step 1) Refer to downloads list and download the correct archive according to your operating system and processor architecture.
Make sure to always use the latest version of the project. Otherwise you might encounter some issues while using the CLI.
Step 2) The archive only includes a single file which represents the xero-cli
binary. You'll need to extract the archive and move the binary to a suitable directory such as usr/local/bin
:
$ wget -qO- "https://github.com/SoroushTaheri/xero-cli/releases/download/v0.1.4/xero-v0.1.4-linux-amd64.tar.gz" | sudo tar xvz -C /usr/local/bin
You should be able to use the CLI in your shell. Do so by executing xero
command:
$ xero
Command-line interface for XeroCTF 2022.
Usage:
xero [command]
Available Commands:
auth Auth-related commands (login, status, ...)
challenge Get the full list of challenges or view details of a challenge
completion Generate the autocompletion script for the specified shell
help Help about any command
rules View CTF rules
scoreboard Show the scoreboard of the competition
submit Here you will submit the flag you earned
Flags:
-h, --help help for xero
Use "xero [command] --help" for more information about a command.
Clone the project:
$ git clone https://github.com/SoroushTaheri/xero-cli.git
Navigate to project's folder and build the project:
$ cd xero-cli
$ go build -v -o xero
Move the binary to a suitable location:
$ sudo mv ./xero /usr/local/bin
Verify that you can use the CLI by executing xero
command.
In order to use certain commands (e.g., submissing a flag) you must sign in to your RoboEpics account.
Use this command to log in to your account using your RoboEpics credentials.
$ xero auth login
Username/Email: [email protected]
Password: ***********
✅ Successfully logged in as: [email protected]
Check whether you're logged in or not. If logged in, you'll be able to see your email/username.
$ xero auth status
Logged in as "[email protected]/MrAmghezi"
View the full list of challenges or inspect details of a single challenge.
Shows the list of challenges. Each challenge has a unique identifier which must be used if you want to get any data related to that challenge (e.g., view the scoreboard for a challenge or its description)
$ xero challenge list
Challenges
• Ugupugu [rsa]
In the above example, the challenge Ugupugu
has the identifier rsa
.
Shows details and descriptions of a challenge.
In the following example, we'll inspect the details of Ugupugu
challenge:
$ xero challenge show rsa
Ugupugu
# Description
Can u decrypt this?
je9VobhwQWIGoNE3ugUBtJWPAYPJnQbaYJiA1BQqc2/6JlYjnN6nyD9gy78n06pjSg0anf7y3+02JbNI9kdksP+ZD+fNfFrSbii1...
Note that we used the challenge's identifier (rsa
) and not its title (Ugupugu
) in the command line.
Use this command to submit a flag you've captured! You need to pass challenge identifier and your flag as arguments.
In the following example, we'll submit the flag xeroctf{asc309vlk3m2lvpo}
for the Ugupugu
challenge:
$ xero submit rsa xeroctf{asc309vlk3m2lvpo}
Please note that every flag in XeroCTF competitions has the format: xeroctf{xxxxxx}
View the scoreboard for a particular challenge.
$ xero scoreboard rsa
Scoreboard
Total Records: 1
Pos | Team Name | Captured | Total Submissions | Last Submission
1 | Hallelujah | 1 | 15 | 2022-05-31 13:04:55
Shows specified rules by the organizers.
$ xero rules
Get the invite link to our XeroCTF Discord server.
Generates the autocompletion script for the specified shell. Available shells are:
- bash
- fish
- powershell
- zsh
For example, to use autocompletion in bash run the following commands:
xero completion bash > $HOME/xerocompletion
source $HOME/xerocompletion
Obviously you can setup your shell to source the autocompletion file on every reboot so you don't need to source it yourself. For example if you use bash, add a source
line in your $HOME/.bashrc
file:
.bashrc
...
source $HOME/<your autocompletion filename>
...
Distributed under the MIT License. See LICENSE
for more information.
Soroush Taheri
- Email: [email protected]
- Telegram: @soroushtaheri