This repository contains the code of the cryptographic task "LittleKnowledge", that we created for the CTFZone 2020 Finals. We now publish this code for the community to use for new tasks, educational purposes, etc. If you have any questions you can contact one of the authors:
- Alina Garbuz (a.garbuz@bi.zone)
- Igor Motroni (i.motroni@bi.zone)
- Innokentii Sennovskii (i.sennovskiy@bi.zone, isennovskiy@gmail.com)
- zknlib/ - contains C library that provides core functionality
- Dockerfile - team server build
- LICENSE
- private_zkn.pem - private RSA key we used for the challenge
- public.pem - public RSA key we use for the challenge
- Readme.md - this file
- requirements.txt - requirements you need to install for running the task locally
- team_server.py - python script containing high-level team server functionality
- test.py - python script that was used for first test of wrapper functionality
- zkn_checker.py - checker implementation for testing (our infrastracture used a different version)
- zkn_support.py - wrapper around the C library, providing easy API.
You can choose to build team server through docker or on host. To build locally:
cd zknlib && make clean && make libzkn && cp obj/libzkn.so ../ && cd ../Install requirements:
python3 -m pip install -r requirements.txt --userThen you can start the server:
python3 team_server.pyIt will run on port 1337. Alternatively you can build a container:
docker build -t zkn_team_server:0.0.1 .and run:
docker run -p1337:1337 -t zkn_team_server:0.0.1 .To run the checker you'll need to build and copy the library anyway. After its done, run:
python3 zkn_checker.pyYou can also build zkn for fuzzing (but you need to enable one of the harnesses in zknlib/test/fuzzing.c):
cd zknlib && make clean && make fuzzOr you can build a version for tests:
cd zknlib && make clean && make test_zknYou can find minized corpora in zknlib/test/corpus_collection.