Know the stack
- Apache: serves the storefront over HTTP.
- PHP: runs the application logic.
- PHP sessions: preserve the shopping cart.
- firewalld: controls network exposure.
- SELinux: limits web-service access.
Tomorrow's Labs
Three service-focused exercises. Learn how each stack works, secure it without destroying availability, and be ready to explain every change.
Secure a small Apache and PHP storefront while preserving remote access, the product catalog, and the shopping cart.
/etc/httpd/conf/httpd.conf/etc/httpd/conf.d//etc/php.ini/etc/php.d/99-ecom-ccdc.ini/var/www/html/store//var/log/httpd/Enable firewalld, permit only the storefront traffic, then test the site from another machine after each change.
Audit accounts, sudo access and SSH keys; then disable exposed errors, version disclosure, and insecure session-cookie settings.
ss -lntp
firewall-cmd --list-all
systemctl status httpd
getenforce
restorecon -RF /var/www/html/store
journalctl -u httpd
Open the storefront from another machine, add products to the cart, secure the host, remove RedHavi artifacts, and prove the application still works.
Understand the complete mail path—from SMTP delivery to Maildir storage and remote access through webmail or IMAP.
/etc/postfix/main.cf/etc/dovecot/dovecot.conf/etc/dovecot/conf.d//etc/roundcube/config.inc.php/etc/apache2/conf-enabled/roundcube.conf/home/username/Maildir/inet_interfaces = all accepts remote connections. Never use mynetworks = 0.0.0.0/0; that can create an open relay.
Send a test attachment, locate it under the recipient's Maildir, and verify ownership and permissions without making mail readable by other users.
ss -lntp
ufw status verbose
postconf -n
doveconf -n
systemctl --failed
journalctl -u postfix -u dovecot
Send an email with an attachment from one user to another, access it from a different machine, and demonstrate where it is stored under the recipient's Maildir.
Protect the monitoring platform while preserving log ingestion, searches, dashboards, forwarder communication, and evidence needed by the team.
/opt/splunk/etc/system/local//opt/splunk/etc/apps/*/local//opt/splunk/etc/apps/*/bin//opt/splunk/etc/users//opt/splunk/etc/auth//opt/splunk/var/log/splunk/Inventory approved forwarders, deployment clients, destinations, and receiving ports. Investigate unknown peers or changes to outputs.conf, inputs.conf, and deploymentclient.conf.
Inspect script:// inputs, alert actions, custom commands, modular inputs, and app bin/ directories. The lab plants ccdc_post as a benign example of this execution path.
/opt/splunk/etc/apps changed to root:splunk mode 0777./opt/splunk/etc/apps/ccdc_post/./opt/splunk/bin/splunk status
/opt/splunk/bin/splunk list forward-server
/opt/splunk/bin/splunk btool inputs list --debug
/opt/splunk/bin/splunk btool outputs list --debug
ss -lntp
journalctl -u Splunkd
Identify every log source and forwarder, locate the ccdc_post scripted input, preserve evidence, and remove the practice app. Restore /opt/splunk/etc/apps to splunk:splunk mode 0755, then prove ingestion, searches, and dashboards still work.