CookieFarm

module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2025 License: GPL-3.0

README ΒΆ

CookieFarm Logo

Version GitHub go.mod Go version GitHub code size in bytes GitHub License

πŸͺ CookieFarm

CookieFarm is an Attack/Defense CTF framework inspired by DestructiveFarm, developed by the Italian team ByteTheCookies. Its strength lies in a hybrid Go + Python architecture and a zero-distraction philosophy:

🎯 Your only task is to write the exploit!

CookieFarm automates exploit distribution, flag submission, and result monitoring β€” allowing you to focus entirely on building powerful exploits.


πŸ”§ Prerequisites

Make sure you have the following installed:

  • βœ… Python 3+
  • βœ… Docker

βš™οΈ Architecture Overview

Architecture Diagram

▢️ Getting Started

πŸ–₯️ Starting the Server
  1. Create an .env file in the server directory to configure the environment settings:

      # Server configuration
      DEBUG=false                   # Enable debug mode for verbose logging
      PASSWORD=SuperSecret  # Set a strong password for authentication
      CONFIG_FILE=true  # Set if the server takes the config from config.yml in the filesystem; otherwise, do not set the variable
      PORT=8080            # Define the port the server will listen on
    

⚠️ For production environments, set DEBUG=false and use a strong, unique password

  1. Start the server with Docker Compose:
    docker compose up --build
    

πŸ“˜ For more configuration details, refer to the server documentation.


πŸ’» Using the Client & Running Exploits
  1. Run the installation :
pip install cookiefarm

After installation, the ckc command is available globally in your terminal (or in your virtual environment if you are using one).

  1. Log in and configure the client:

    ckc config login -P SuperSecret -h 192.168.1.10 -p 8000 -u your_username
    
  2. Install the Python helper module and create a new exploit template:

    ckc exploit create -n your_exploit_name
    

    This will generate your_exploit_name.py in ~/.cookiefarm/exploits/.

  3. Run your exploit:

    ckc exploit run -e your_exploit_name.py -p 1234 -t 120 -T 40
    

πŸ“˜ For more usage examples, check out the client documentation.


🀝 Contributing

We welcome contributions, suggestions, and bug reports! See CONTRIBUTING.md for details on how to get involved.

πŸ“ˆ Star History

Star History Chart
Built with ❀️ by ByteTheCookies

Directories ΒΆ

Path Synopsis
cmd
client command
client/cmd
Package cmd contains commands for the CookieFarm client
Package cmd contains commands for the CookieFarm client
server command
Package main is the entry point for the API server.
Package main is the entry point for the API server.
internal
client/api
Package api provides functions to interact with the CookieFarm server API.
Package api provides functions to interact with the CookieFarm server API.
client/config
Package config provides functions to manage the CookieFarm client configuration globally.
Package config provides functions to manage the CookieFarm client configuration globally.
client/exploit
Package exploit provides functions to parse flags from JSON output.
Package exploit provides functions to parse flags from JSON output.
client/websockets
Package websockets used for communicating with the server via WebSocket protocol
Package websockets used for communicating with the server via WebSocket protocol
server/config
Package config for configuration management
Package config for configuration management
server/server
Package server initializes and configures the HTTP server for CookieFarm, including routing, static file serving, and debug settings.
Package server initializes and configures the HTTP server for CookieFarm, including routing, static file serving, and debug settings.
server/sqlite
Package sqlite provides some basic functionality for interacting with a SQLite database.
Package sqlite provides some basic functionality for interacting with a SQLite database.
pkg
logger
Package logger provides functions to manage the CookieFarm client logging.
Package logger provides functions to manage the CookieFarm client logging.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL