SniffCat-cPanel integrates cPHulk Brute Force Protection (built into cPanel/WHM) with the SniffCat threat intelligence API. When cPHulk detects and blocks a brute force attack, this integration automatically reports the attacker's IP address to SniffCat, contributing to a shared threat intelligence database.
Attacker → cPHulk detects brute force → cphulk.sh triggered → IP reported to SniffCat API
- cPHulk detects a brute force attack and blocks the offending IP
- cPHulk executes the configured command (
cphulk.sh) with attack details - cphulk.sh sends a structured report to the SniffCat API with the attacker's IP and metadata
- cPanel/WHM server with cPHulk enabled
curlinstalled on the server- Root access
- SniffCat API token — get one here
bash <(curl -fsSL https://raw.githubusercontent.com/Rexikon/SniffCat-cPanel/main/install.sh)The installer will interactively ask for your SniffCat API token and handle everything else.
Using curl:
bash <(curl -fsSL https://raw.githubusercontent.com/Rexikon/SniffCat-cPanel/main/install.sh)Using wget:
bash <(wget -qO- https://raw.githubusercontent.com/Rexikon/SniffCat-cPanel/main/install.sh)The installer will:
- Verify root access and dependencies
- Ask for your SniffCat API token
- Install the script to
/opt/sniffcat/ - Create a secure config file (
chmod 600) - Set up logging to
/var/log/sniffcat.log - Display the WHM configuration instructions
# Create installation directory
mkdir -p /opt/sniffcat
# Download the script
curl -fsSL https://raw.githubusercontent.com/Rexikon/SniffCat-cPanel/main/cphulk.sh \
-o /opt/sniffcat/cphulk.sh
# Make it executable
chmod 755 /opt/sniffcat/cphulk.sh
# Create config file with your token
cat > /opt/sniffcat/sniffcat.conf <<EOF
SNIFFCAT_TOKEN="your-token-here"
EOF
# Secure the config file
chmod 600 /opt/sniffcat/sniffcat.conf
# Create log file
touch /var/log/sniffcat.log
chmod 640 /var/log/sniffcat.log- Log in to WHM
- Navigate to Security Center → cPHulk Brute Force Protection
- Find the IP Address-based Protection section
- In the field "Command to Run When an IP Address Triggers Brute Force Protection", enter:
/opt/sniffcat/cphulk.sh %remote_ip% %authservice% %user% %current_failures% %reason%
- Click Save
| Parameter | cPHulk Variable | Description |
|---|---|---|
$1 |
%remote_ip% |
IP address of the attacker |
$2 |
%authservice% |
Service being attacked (SMTP, FTP, etc.) |
$3 |
%user% |
Username used in the attack attempt |
$4 |
%current_failures% |
Number of failed authentication attempts |
$5 |
%reason% |
Reason for the block |
/opt/sniffcat/
├── cphulk.sh # Main script (755)
└── sniffcat.conf # API token configuration (600)
/var/log/
└── sniffcat.log # Activity log (640)
Only errors are logged to /var/log/sniffcat.log — successful reports are silent:
2026-02-11 12:34:56 [SniffCat] ERROR: IP=203.0.113.50 service=smtp user=admin — HTTP 401: {"error":"invalid token"}
2026-02-11 13:01:22 [SniffCat] ERROR: Config file not found: /opt/sniffcat/sniffcat.conf
Using the uninstaller:
bash <(curl -fsSL https://raw.githubusercontent.com/Rexikon/SniffCat-cPanel/main/uninstall.sh)Or manually:
rm -rf /opt/sniffcat
rm -f /var/log/sniffcat.logNote: Remember to remove the command from WHM → cPHulk Brute Force Protection settings after uninstalling.
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -m 'Add improvement') - Push to the branch (
git push origin feature/improvement) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.