This repository provides an educational Windows lab to study how client applications, cookies, and tokens should be protected, and how to harden apps and web settings against abuse. It includes a simple GUI builder and build script for packaging a Windows executable for controlled demonstrations. Nothing is exfiltrated by default.
- Use only in environments you own or have explicit written permission to test.
- Do not collect, store, or forward real user data.
- Follow local law and platform terms. This project is for education only.
- main.py — core educational script (Windows-only). No outbound sends unless you explicitly set an environment variable.
- build.py — command-line builder using PyInstaller.
- build_gui.py — minimal GUI to configure options and run a build.
- Windows 10/11
- Python 3.10+ (added to PATH)
- Pip packages:
- requests, psutil, pycryptodome, pypiwin32, keyring, pathlib2, pyinstaller
- Optional (for Discord-related UI features): discord.py
Install on Windows (recommended):
- py -m pip install --upgrade pip
- py -m pip install requests psutil pycryptodome pypiwin32 keyring pathlib2 pyinstaller
- Optional: py -m pip install -U discord.py
- Open a terminal in the project folder.
- Launch the GUI:
- py build_gui.py
- Adjust build options as needed. Keep any external sinks unset for local labs.
- Click Build. The executable appears in dist/.
- Install prerequisites (see Requirements).
- From the project root:
- py build.py
- For a console-enabled build: py build.py --debug
- Find your executable in dist/.
- Windows-only. From the project root:
- Leave WEBHOOK_URL unset to avoid any outbound posts.
- py main.py
- To explicitly post to your own controlled sink in a private lab, set an environment variable before running:
- PowerShell: $env:WEBHOOK_URL="https://your.local.endpoint"
- CMD: set WEBHOOK_URL=https://your.local.endpoint
- Then run: py main.py
- No hardcoded webhooks or tokens.
- If WEBHOOK_URL is not set, the script skips any network send.
- Intended for local, consented testing and demonstration only.
- If PyInstaller is missing: py -m pip install pyinstaller
- If build fails on crypto/win32 packages:
- Ensure “Desktop development with C++” tools are installed, or re-run pip with a newer wheel.
- If antivirus blocks dist/ binaries, use a dedicated test VM.
- HttpOnly/Secure/SameSite cookie flags and their effects.
- Output encoding/escaping and templating safeguards.
- Content-Security-Policy (nonces/hashes, script restrictions).
- Logging/monitoring without storing sensitive data.
Learn safely and responsibly. Remove sensitive items from any code you plan to share.*** End Patch