Files
vm/README.md
2026-05-14 17:48:01 +02:00

40 lines
1.2 KiB
Markdown

# SAS Project 2026 - Program
## Building
Required dependencies:
- `riscv64-unknown-elf` toolchain
- `riscv64-unknown-elf-gcc`
- `gcc`
- Python 3
- 7z (7-zip CLI)
```sh
make
```
### Getting the flag
Compiling with `make` will print the correct flag to stderr, e.g.:
```
[Codegen] Generated Flag: ctf{3P1WBAldo2PxYZtJIoadV_NnL1nueJAbVDtMiJhY0vQ}
```
## Configuration
Some challenge parameters can be set with environment variables.
The provided `.env.example` file contains a sample configuration.
- `FLAG_LEN`: Number, the length of the flag
- `FLAG_FORMAT`: String, containing the constant `FLAG_GOES_HERE` to be replaced by the flag
- `ENCRYPTOR_VENDOR_ID`: String, overwrite CPU vendor id. Will use system information if unset
- `ENCRYPTOR_MODEL_NAME`: String, overwrite CPU model name. Will use system information if unset
- `ENCRYPTOR_OS_VERSION`: String, overwrite OS version. Will use system information if unset
- `ENCRYPTOR_MEM_TOTAL`: String, overwrite total memory (in kB). Will use system information if unset
## Running the challenge
- The built binary is at `build/main[.exe]`
- The binary together with the encrypted license file is packaged in `build/challenge.zip`