The Device Fingerprinter V1 Challenge is designed to test the skills of miners in developing a browser SDK that can accurately detect the driver type used by bots interacting with a webpage. The new iteration has two more bot frameworks to be detected and more strict evaluation criteria. Participants must create an SDK that can be installed on a website and automatically identify various bot drivers based on their behavior or technical characteristics.
- SDK for browser type detection
- Scoring based on accuracy of detection
- API server for challenge interaction
- Health check endpoint
- Dockerfile for deployment
- FastAPI
- Web service
-
Install Python (>= v3.10) and pip (>= 23):
- [RECOMMENDED] Miniconda (v3)
- [arm64/aarch64] Miniforge (v3)
- [Python virtual environment] venv [OPTIONAL] For DEVELOPMENT environment:
-
Install git
-
Setup an SSH key
[TIP] Skip this step, if you have already downloaded the source code.
2.1. Prepare projects directory (if not exists):
# Create projects directory:
mkdir -pv ~/workspaces/projects
# Enter into projects directory:
cd ~/workspaces/projects2.2. Follow one of the below options [A], [B] or [C]:
OPTION A. Clone the repository:
git clone https://github.com/RedTeamSubnet/RedTeam.git && \
cd RedTeam/redteam_core/challenge_pool/dev_fingerprinter_v1OPTION B. Clone the repository (for DEVELOPMENT: git + ssh key):
git clone --recursive git@github.com:RedTeamSubnet/RedTeam.git && \
cd RedTeam/redteam_core/challenge_pool/dev_fingerprinter_v1 && \
git submodule update --init --recursive && \
git submodule foreach --recursive git checkout main[TIP] Skip this step, if you're going to use docker runtime
pip install -r ./requirements.txtOPTION A. Run server as python module:
python -u -m src.api
# Or:
cd src
python -u -m apiOPTION B. Run server as python script:
cd src
python -u ./main.pyOPTION C. Run with uvicorn cli:
uvicorn src.main:app --host=[BIND_HOST] --port=[PORT] --no-access-log --no-server-header --proxy-headers --forwarded-allow-ips="*"
# For example:
uvicorn src.main:app --host="0.0.0.0" --port=10001 --no-access-log --no-server-header --proxy-headers --forwarded-allow-ips="*"
# Or:
cd src
uvicorn main:app --host="0.0.0.0" --port=10001 --no-access-log --no-server-header --proxy-headers --forwarded-allow-ips="*"
# For DEVELOPMENT:
uvicorn main:app --host="0.0.0.0" --port=10001 --no-access-log --no-server-header --proxy-headers --forwarded-allow-ips="*" --reload --reload-include="*.yml" --reload-include=".env"OPTION D. Run with docker compose:
## 1. Configure 'compose.override.yml' file.
# Copy 'compose.override.[ENV].yml' file to 'compose.override.yml' file:
cp -v ./templates/compose/compose.override.[ENV].yml ./compose.override.yml
# For example, DEVELOPMENT environment:
cp -v ./templates/compose/compose.override.dev.yml ./compose.override.yml
# For example, STATGING or PRODUCTION environment:
cp -v ./templates/compose/compose.override.prod.yml ./compose.override.yml
# Edit 'compose.override.yml' file to fit in your environment:
nano ./compose.override.yml
## 2. Check docker compose configuration is valid:
./compose.sh validate
# Or:
docker compose config
## 3. Start docker compose:
./compose.sh start -l
# Or:
docker compose up -d --remove-orphans --force-recreate && \
docker compose logs -f --tail 100Check with CLI (curl):
# Send a ping request with 'curl' to API server and parse JSON response with 'jq':
curl -s -k https://localhost:10001/ping | jqCheck with web browser:
- Health check: https://localhost:10001/health
- Swagger: https://localhost:10001/docs
- Redoc: https://localhost:10001/redoc
- OpenAPI JSON: https://localhost:10001/openapi.json
Docker runtime:
# Stop docker compose:
./compose.sh stop
# Or:
docker compose down --remove-orphans👍
## --- Environment variable --- ##
ENV=LOCAL
DEBUG=false
## -- API configs -- ##
DFP_API_PORT=10001
# DFP_API_LOGS_DIR="/var/log/rest.dfp-challenger"
# DFP_API_DATA_DIR="/var/lib/rest.dfp-challenger"
# DFP_API_VERSION="1"
# DFP_API_PREFIX=""
# DFP_API_DOCS_ENABLED=true
# DFP_API_DOCS_OPENAPI_URL="{api_prefix}/openapi.json"
# DFP_API_DOCS_DOCS_URL="{api_prefix}/docs"
# DFP_API_DOCS_REDOC_URL="{api_prefix}/redoc"To build the docker image, run the following command:
# Build docker image:
./scripts/build.sh
# Or:
docker compose build- FastAPI - https://fastapi.tiangolo.com
- Docker - https://docs.docker.com
- Docker Compose - https://docs.docker.com/compose