Reference
Complete reference guide for HardenSys CLI options and error codes.
CLI Options
Complete list of command-line options available in HardenSys.
Option |
Description |
Example |
--json FILE |
Path to tasks JSON file |
--json custom_tasks.json |
--heading NAME |
Filter by heading |
--heading "Account Policies" |
--subheading NAME |
Filter by subheading |
--subheading "Password Policy" |
--parameter NAME |
Filter by title name |
--parameter "Enforce password history" |
--info NAME |
Show detailed information |
--info "password" |
--output FILE |
Output file for report |
--output report.txt |
--format FORMAT |
Report format (text/json) |
--format json |
--list |
List available categories |
--list |
--verbose |
Verbose output |
--verbose |
--help |
Show help message |
--help |
Error Codes
Reference for all error codes and their meanings.
Exit Code |
Description |
Resolution |
0 |
Success |
Operation completed successfully |
1 |
General Error |
Check error message for details |
2 |
File Not Found |
Verify file paths and permissions |
3 |
Permission Denied |
Run as Administrator |
4 |
Import Error |
Check Python dependencies |
Frequently Asked Questions
General Questions
Q: What is HardenSys?
A: HardenSys is a comprehensive security policy management and compliance checking tool for Windows systems.
Q: Do I need Administrator privileges?
A: Yes, Administrator privileges are required for full functionality. Some checks may fail without proper permissions.
Q: Can I customize the security parameters?
A: Yes, you can modify the windows_tasks.json file to add or modify security parameters.
Technical Questions
Q: How do I generate reports?
A: Use the --output option to save reports: python HardenSys.py --output report.html
Q: Can I run specific categories only?
A: Yes, use the --heading or --subheading options to filter by category.
Changelog
Version history and changes for HardenSys.
Version 1.0.0
New Features
- Initial release of HardenSys
- CLI interface with 121 security parameters
- GUI interface for interactive use
- HTML and PDF report generation
- Backup and restore functionality
- Parameter filtering and search
Security Categories
- Account Policies (9 parameters)
- User Rights Assignment (7 parameters)
- Security Options (24 parameters)
- System Settings (32 parameters)
- Windows Firewall (18 parameters)
- Advanced Audit Policy (20 parameters)
- Application Guard (11 parameters)
Linux Reference
Complete reference guide for HardenSys CLI options and error codes on Linux systems.
Linux Reference: This section covers Linux-specific CLI options, error codes, and troubleshooting.
CLI Options
Complete list of command-line options available for Linux systems.
Basic Options
Option |
Description |
Example |
--help |
Display help information |
python3 HardenSys.py --help |
--version |
Show version information |
python3 HardenSys.py --version |
--list |
List all available categories |
python3 HardenSys.py --list |
--info |
Show detailed parameter information |
python3 HardenSys.py --info "SSH" |
Filtering Options
Option |
Description |
Example |
--heading |
Filter by category heading |
python3 HardenSys.py --heading "Filesystem Configuration" |
--subheading |
Filter by subcategory |
python3 HardenSys.py --subheading "SSH Configuration" |
--script-key |
Filter by script key |
python3 HardenSys.py --script-key "ssh_config" |
Output Options
Option |
Description |
Example |
--output |
Specify output file |
python3 HardenSys.py --output /var/log/compliance.html |
--format |
Output format (html, pdf, json) |
python3 HardenSys.py --format json |
--verbose |
Enable verbose output |
python3 HardenSys.py --verbose |
--quiet |
Suppress non-essential output |
python3 HardenSys.py --quiet |
Linux Error Codes
Common error codes and their meanings for Linux systems.
Permission Errors
Error 13: Permission Denied
Cause: Insufficient privileges to access system files or configurations.
Solution: Run with sudo privileges or ensure proper file permissions.
sudo python3 HardenSys.py
Error 2: No Such File or Directory
Cause: Required configuration files or directories are missing.
Solution: Verify system installation and file paths.
ls -la /etc/ssh/sshd_config
Configuration Errors
Error 100: Invalid Configuration
Cause: Malformed configuration file or invalid parameter values.
Solution: Check configuration file syntax and validate parameter values.
# Test SSH configuration
sudo sshd -t
# Check PAM configuration
pamtester sshd root authenticate
Error 101: Service Not Available
Cause: Required system service is not running or not installed.
Solution: Start the service or install the required package.
# Check service status
systemctl status sshd
# Start service if needed
sudo systemctl start sshd
System Errors
Error 200: Kernel Module Error
Cause: Unable to access or modify kernel modules.
Solution: Ensure kernel module tools are installed and accessible.
# Install kernel tools
sudo apt install linux-tools-common
# Check module status
lsmod | grep -i cramfs
Error 201: Network Configuration Error
Cause: Unable to access network configuration files or interfaces.
Solution: Check network configuration and firewall settings.
# Check network interfaces
ip addr show
# Check firewall status
sudo ufw status
Linux FAQ
Frequently asked questions about using HardenSys on Linux systems.
Q: Which Linux distributions are supported?
A: HardenSys supports major Linux distributions including Ubuntu, CentOS, RHEL, Debian, Fedora, and SUSE. The tool automatically detects the distribution and applies appropriate security checks.
Q: Do I need root privileges to run HardenSys?
A: Yes, most security checks require root privileges to access system configuration files and modify security settings. Run with sudo
or as root user.
Q: How do I install HardenSys on Linux?
A: Clone the repository and install dependencies:
git clone https://github.com/AjeyVerma/HardenSys.git
cd HardenSys
pip3 install -r requirements.txt
Q: Can I run HardenSys in a Docker container?
A: Yes, but with limitations. Some security checks require access to the host system. Use privileged containers or bind mounts for full functionality.
Q: How do I customize security parameters for my environment?
A: Modify the configuration files in the HardenSys directory or use command-line options to filter specific categories or parameters.
Q: What if a security check fails?
A: Review the detailed output and recommendations. Many failures can be resolved by modifying system configuration files or installing required packages.
Q: How often should I run security checks?
A: Run comprehensive checks weekly and targeted checks after system changes. Use cron jobs for automated scheduling.
Q: Can I integrate HardenSys with monitoring systems?
A: Yes, HardenSys can output JSON format for integration with monitoring tools like Nagios, Zabbix, or custom monitoring solutions.
Linux Changelog
Recent changes and updates for Linux support in HardenSys.
Version 1.0.0
Major Changes
- Complete rewrite of Linux security engine
- Added support for 89 Linux security parameters
- Implemented modular architecture
- Added comprehensive logging system
New Linux Features
- Kernel parameter validation
- Systemd service hardening
- File system permission checks
- Network security configuration
- SSH and PAM security validation