- every running process should be started and stopped by common means (init, systemd, upstart, services)
- every running service must have working logging
monitoring should have a foundation in a baseline
- baseline.sh
- baseline.ps1 (requires toolbox!)
tar czf /tmp/$(hostname -f)-base.tgz --exclude='/aDirectory*' /bin /boot /etc /home /lib /lib64 /opt /root /sbin /usr /var [LOCALDIRS]
warning: todo
Linux |
`ps faxu`
|
bsd | `ps faxud` |
windows |
`pslist /t`
`wmic process get Caption,CommandLine,ProcessId,ExecutablePath`
[pstree.ps1](tools/windows/toolbox/pstree.ps1)
[fero.ps1](tools/windows/toolbox/fero.ps1)
|
- hook with
php_value auto_prepend_file "log-request.php"
/data
must exist and be 777- could be used as simple WAF
<?php
$unique = md5(uniqid());
$data = json_encode($_SERVER, JSON_PRETTY_PRINT) . "\n";
$data .= json_encode($_POST, JSON_PRETTY_PRINT) . "\n";
$data .= json_encode($_GET, JSON_PRETTY_PRINT) . "\n";
file_put_contents( "/data/$unique", $data);
?>