Skip to content

topher2025/CyberPatriotLinuxToolkit

Repository files navigation

CyberPatriot Linux Toolkit

License Python Author

Author: Christopher Lewis
Copyright: © 2026 Christopher Lewis
License: Apache License 2.0

A Linux automation and system-hardening toolkit designed to assist CyberPatriot competitors during training environments and competitions.

This project automates common security checks while keeping all actions transparent and easily updateable.


Features

  • User and group auditing
  • Service and daemon inspection
  • File permission checks
  • Common Linux hardening helpers
  • Clear logging of actions taken
  • Modular design for selective execution

Design goals:

  • Readable – scripts are easy to understand and modify
  • Modular – run only what you need
  • Competition-safe – avoids destructive or rule-breaking behavior

Supported Platforms

  • Linux (primarily Ubuntu-based distributions)
  • Designed for CyberPatriot Linux competition images

Installation

Ensure Python is installed:

python --version

Clone the repository:

git clone https://github.com/topher2025/CyberPatriotLinuxToolkit.git
cd CyberPatriotLinuxToolkit

Start virtual environment:

python3 -m venv ~/venv
source ~/venv/bin/activate

Run the setup file:

python3 setup.py

Run the script:

python3 main.py -h

Options

Argument Short Description Status
--readme -r Path to competition README file Done
--auto-readme -R Auto-find README in common locations Done
--parse-readme -P Only parse and display README data Done
--dry-run -d Preview changes without applying Done
--no-interactive -y Disable interactive prompts and redirects stdout to ./logs/ Done
--password-policy -p Password policy enforcement Done
--account-permissions -a Account permissions check (requires README) Not Started
--user-management -u User management (requires README) Done
--service-management -s Service management Not Started
--audit-policy -t Audit policy configuration Not Started
--firewall -f Firewall configuration Not Started
--security-hardening -k Security hardening Not Started
--media-scan -m Prohibited media scanner Not Started
--all Run all tasks In Progress
--test Run tests for supplied arguments In Progress
--help -h Show this help message and exit Done

Usage Examples

Parse README (auto-find):

python3 main.py -R -P

Parse README (specific path):

python3 main.py --readme /path/to/README.md --parse-readme

User Management (with auto-found README):

python3 main.py -R -P -u

Dry-run preview:

python3 main.py -R -P -u -d

Non-interactive (logs to logs/):

python3 main.py -R -P -u -y

Run tests:

python3 main.py -R -P -u --test

Project Structure

CyberPatriotLinuxToolkit/
├── README.md               # This file
├── LICENSE                 # Apache 2.0 License
├── NOTICE                  # Attribution & trademark notice
├── CREDITS.md              # Credits and insparations
├── CONTRIBUTING.md         # Contribution guidelines
├── setup.py                # Initial setup
├── main.py                 # Entry point
├── data/                   # Data and config fils
│   ├── parsed.json         # Output path for README parsing
│   ├── prohibited.json     # Prohibited items
├── modules/                # Modules for tasks
│   ├── user_mgmt/          # User & group auditing ✓
│   ├── pswd_policy/        # Password policy enforcement ✓
│   ├── services/           # Service inspection
│   ├── firewall/           # Firewall checks
│   ├── hardening/          # System hardening helpers
│   └── media_scan/         # Prohibited media scanning
├── utils/                  # Shared helpers
│   ├── readme.py           # Supports README opperations
│   ├── scripts.py          # Supports shell script operations
└── tests/                  # Sample READMEs

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
  3. Test your feature
  4. Commit your changes
  5. Push your changes to your fork
  6. Open a Pull Request for review

Open the CONTRIBUTIONS.md for more information on contributing

Credits

The concept and general automation approach were inspired by the following Windows-based project:

No source code, scripts, or assets from the above project were used. All logic, structure, and implementation in this repository were written independently for Linux systems.

About

A Linux automation and system-hardening toolkit designed to assist CyberPatriot competitors during training environments and competitions.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages