This guide explains how to review your server’s log files to detect traces of web hosting panel activity—such as cPanel, Plesk, or similar tools—whether you’re investigating unauthorized access, verifying a clean install, or just understanding what’s running on your server. You’ll learn which logs to check, what patterns to look for, and how to interpret the findings. No prior log analysis experience is needed, but basic command-line familiarity helps.
What You’ll Need
- SSH (Secure Shell) access to the server with a user that has read permissions for log files (typically root or a sudo user).
- Basic familiarity with the Linux command line (cd, ls, grep, cat).
- A text editor or a way to view large files (like less or tail).
- Optional: a log analysis tool like GoAccess or lnav, but plain grep works fine.
Step-by-Step
- Identify the log locations. Web hosting panels log their activity in different places depending on the panel and the OS. Common locations include:
/var/log/cpanel(cPanel/WHM)/var/log/plesk(Plesk)/var/log/daemon.logor/var/log/directadmin(DirectAdmin)/var/log/messagesor/var/log/syslogfor general system events- Web server logs:
/var/log/apache2/access.log,/var/log/nginx/access.log, and their error logs.
- Check for panel-specific processes. Run
ps aux | grep -i -E 'cpanel|plesk|directadmin|httpd'to see if any panel-related processes are running. This gives a quick yes/no on whether a panel is installed. - Scan authentication logs. Look for login attempts to the panel itself. For cPanel, check
/var/log/cpanel/login.log; for Plesk,/var/log/plesk/login.logor/var/log/plesk/panel.log. Usegrep -i 'login\|auth' /var/log/cpanel/login.logto see who logged in and from which IP. - Review web server access logs for panel paths. Panels often have unique URL paths. For cPanel, that’s
/cpanelor:2083; for Plesk,:8443or/login_up.php. Search for these in the access logs:grep -E 'cpanel|plesk|webmail|:2083|:8443' /var/log/apache2/access.log. - Look for cron jobs or scheduled tasks. Panels add their own cron entries. Check
/etc/cron.d/and the root crontab withcrontab -l. Look for lines referencing panel binaries like/usr/local/cpanelor/usr/local/psa. - Inspect system logs for panel service starts. Use
grep -i -E 'cpanel|plesk|directadmin' /var/log/messagesor/var/log/syslogto find service start/stop events that indicate panel activity. - Check for panel-specific files and directories. Even if logs are rotated or deleted, the presence of panel directories can be a sign. Run
ls -la /usr/local/cpanel /usr/local/psa /usr/local/directadmin(if they exist) to confirm. - Analyze error logs for panel-related errors. Panels often log errors to the same logs as the web server. Search for panel names in
/var/log/apache2/error.logor/var/log/nginx/error.log. - Use log rotation and archival. If the logs are rotated (e.g.,
access.log.1.gz), you may need to decompress them withzcatorgunzip -cbefore searching. For example:zcat /var/log/apache2/access.log.1.gz | grep 'cpanel'. - Correlate timestamps and IPs. Once you find entries, note the timestamps and source IPs. Cross-reference with other logs (like auth.log) to see if there’s a pattern—e.g., a brute-force attempt on the panel login.
Common Mistakes
- Only checking the default log locations. Panels can be configured to log elsewhere, especially on custom installs. Always check the panel’s configuration file (e.g.,
/etc/cpanel.conf) for log paths. - Ignoring compressed logs. Old logs are often gzipped. If you only search the current log, you might miss crucial historical evidence.
- Confusing web server logs with panel logs. A request to
/cpanelin the access log doesn’t mean the panel is installed; it could be a 404. Look for successful responses (200, 302) and panel-specific content. - Forgetting about the panel’s own user activity logs. cPanel has
/var/log/cpanel/access_logwhich logs every cPanel session—this is distinct from the web server access log. - Not checking for panel-related ports. Panels listen on non-standard ports (2082, 2083, 2086, 2087 for cPanel; 8443 for Plesk). Use
netstat -tulpnorss -tulpnto see if anything is listening on those ports.
Tips
- Use grep with context. Use
grep -C 5to show lines around the match, which helps you understand the surrounding activity. - Create a baseline. If you’re auditing regularly, save a copy of the log entries you find as a baseline for future comparisons.
- Check the panel’s own logs first. They are the most direct evidence. For cPanel, the
/var/log/cpaneldirectory has login, access, and error logs. - Use logwatch or similar. Many servers have logwatch installed; it can summarize panel activity if configured.
- Look for unusual files in /tmp. Some panel exploits drop files in /tmp. Check for recently modified files there with
find /tmp -mtime -1 -type f.
Troubleshooting
- No logs found at the expected paths. If the directories don’t exist, the panel may not be installed, or it’s installed in a custom location. Run
find / -name '*cpanel*' -type d 2>/dev/nullto search the whole filesystem. - Logs are unreadable due to permissions. If you get ‘Permission denied’, use
sudoto read them. If you can’t sudo, contact your hosting provider. - Logs are empty or rotated away. If the logs are empty, the panel might not have been used, or logs are stored elsewhere. Check the panel’s configuration for log destination.
- You find entries but can’t tell if it’s a real panel or just a probe. Look for multiple requests to the same panel path from the same IP, or a sequence of login attempts. A single 404 to /cpanel is likely a scanner.
- Panic about a possible compromise. If you find evidence of unauthorized access, immediately change all passwords, update the panel, and review user accounts. Consider contacting your hosting provider or a security professional.
Frequently Asked Questions
What if I don’t have SSH access?
You’ll need to use the hosting control panel’s file manager or request log access from your provider. Many providers offer log downloads via the panel.
Can I detect a panel if it was uninstalled?
Yes, remnants often remain—directories, cron entries, or log files. Even after removal, logs may persist until manually deleted.
How do I know if a log entry is from the panel or just a user?
Panel entries typically reference panel-specific paths, binaries, or ports. User activity appears in web server logs with normal file paths. Also, panel logs are separate from user logs.
Are there automated tools for this?
Yes, security scanners like Lynis or rkhunter can sometimes detect panel installations, but manual log review is more thorough for specific activity.
What should I do if I find suspicious panel activity?
Immediately change all passwords, check for new user accounts, review open ports, and update the panel to the latest version. If you suspect a breach, consider a full security audit.
How often should I audit logs?
At least monthly, or more frequently if you handle sensitive data. Regular audits help you spot anomalies early.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Use Mac More Efficiently: 21 Proven Tips
- Best CPUs for Gaming and Streaming: Encoder Guide
- How to Compare AI Features and Performance in Phones
- Nginx Blocks in CentOS: Config Guide
- Create Google Meet Account: Step-by-Step Guide
- AI Frameworks: How Developers Choose and Ship Them