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.
- 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
- Linux (primarily Ubuntu-based distributions)
- Designed for CyberPatriot Linux competition images
Ensure Python is installed:
python --versionClone the repository:
git clone https://github.com/topher2025/CyberPatriotLinuxToolkit.git
cd CyberPatriotLinuxToolkitStart virtual environment:
python3 -m venv ~/venv
source ~/venv/bin/activateRun the setup file:
python3 setup.pyRun the script:
python3 main.py -h| 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 |
Parse README (auto-find):
python3 main.py -R -PParse README (specific path):
python3 main.py --readme /path/to/README.md --parse-readmeUser Management (with auto-found README):
python3 main.py -R -P -uDry-run preview:
python3 main.py -R -P -u -dNon-interactive (logs to logs/):
python3 main.py -R -P -u -yRun tests:
python3 main.py -R -P -u --testCyberPatriotLinuxToolkit/
├── 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
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Test your feature
- Commit your changes
- Push your changes to your fork
- Open a Pull Request for review
Open the CONTRIBUTIONS.md for more information on contributing
The concept and general automation approach were inspired by the following Windows-based project:
- Project Name: CyberPatriotAutomation
- Language / Platform: C# (Windows automation)
- Author: Maxwell McCormick
- Repository: NotMaxwell/CyberPatriotAutomation
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.