keepcalculator

06 Numbers and Powers

How to Audit Server Logs for Web Hosting Panel Signs

Card No. 06·74165 · Updated · Standard formula, shown below

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

  1. 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.log or /var/log/directadmin (DirectAdmin)
    • /var/log/messages or /var/log/syslog for general system events
    • Web server logs: /var/log/apache2/access.log, /var/log/nginx/access.log, and their error logs.
  2. 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.
  3. 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.log or /var/log/plesk/panel.log. Use grep -i 'login\|auth' /var/log/cpanel/login.log to see who logged in and from which IP.
  4. Review web server access logs for panel paths. Panels often have unique URL paths. For cPanel, that’s /cpanel or :2083; for Plesk, :8443 or /login_up.php. Search for these in the access logs: grep -E 'cpanel|plesk|webmail|:2083|:8443' /var/log/apache2/access.log.
  5. Look for cron jobs or scheduled tasks. Panels add their own cron entries. Check /etc/cron.d/ and the root crontab with crontab -l. Look for lines referencing panel binaries like /usr/local/cpanel or /usr/local/psa.
  6. Inspect system logs for panel service starts. Use grep -i -E 'cpanel|plesk|directadmin' /var/log/messages or /var/log/syslog to find service start/stop events that indicate panel activity.
  7. 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.
  8. 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.log or /var/log/nginx/error.log.
  9. Use log rotation and archival. If the logs are rotated (e.g., access.log.1.gz), you may need to decompress them with zcat or gunzip -c before searching. For example: zcat /var/log/apache2/access.log.1.gz | grep 'cpanel'.
  10. 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 /cpanel in 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_log which 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 -tulpn or ss -tulpn to see if anything is listening on those ports.

Tips

  • Use grep with context. Use grep -C 5 to 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/cpanel directory 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/null to search the whole filesystem.
  • Logs are unreadable due to permissions. If you get ‘Permission denied’, use sudo to 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

The whole Numbers and Powers drawer →