Proxmox and Adversaries
Introduction
Adversary techniques
Initial Access
Living off the land
Guest VM details ::
pvesh get /nodes/pve/qemu/707/status/current/
Destroy Guest VM ::
pvesh delete /nodes/pve/qemu/707
🌟 Model PVE CLI usage using the following parameters:
- SSH session relationship
- Diversity of pve cli usage
- Directory cli tool invoked from
Logs Overview
To ensure appropriate coverage of audit activity collected from the proxmox product, supplementary host system activity must also be collected to provide detection coverage into techniques that jeopardize the integrity of the systems at the host level.
AuditD
Host system visibility can primarily be achieved through auditd. Auditd is a well supported third party package that can collect telemetry for a wide range operating system features. Telemetry collection is defined in a configuration file stored locally on each PVE node.
Through the collection of the host based telemetry we can aim to generate extended coverage such as:
-
Security control evasion
- log collector tampering
- local account changes
- firewall changes
- log file tampering
-
Remote access monitoring
- SSH
-
File system monitoring
- executable files in sensitive directories
- direct modification of the PVE installation folder
- Process execution
- pve cli usage
- system enumeration
- remote connections
# configuration files
-w /etc/pve/ -p wa -k pve_config_changes
# management tools
-w /usr/sbin/qm -p x -k pve_qm_exec
-w /usr/sbin/pct -p x -k pve_pct_exec
-w /usr/bin/pvecm -p x -k pve_cluster_exec
-w /usr/sbin/pvesm -p x -k pve_storage_exec
-w /usr/bin/pveum -p x -k pve_user_exec
-w /usr/bin/pvesh -p x -k pve_shell_exec
# Proxmox daemon
-w /usr/bin/pvedaemon -p x -k pve_daemon_exec
-w /usr/bin/pveproxy -p x -k pve_proxy_exec
# Perl Libraries.
-w /usr/share/perl5/PVE/ -p wa -k pve_core_perl_changes
Proxmox Environment Logs
Interactions directly in the proxmox GUI experience are stored in the log
file /var/log/pveproxy/access.log. This log file contains API
requests handled by the ‘pveproxy' system service. Once received the
requests are then sent to 'pvedaemon’ and executed. Interactions are
generally categorised through the corresponding HTTP request type where
deleting a resource or configuration will generate a log with the DELETE
request type and modifying configuration items will generate a POST or
PATCH request type.
JournalD
The proxmox environment registers its own records directly to JournalD by default. These logs are a simplified abstraction of the ‘pveproxy’ logs mentioned above and extend into node or cluster tasks (jobs) that were not routed through the proxy. Importantly not all actions are logged into journal in particular items like user creation and modification or cluster changes must be captured through the other log sources detailed in this post.
Example: Event generated from deletion of virtual machine
<root@pam> delete snapshot VM 3411: blueturtle
To ensure appropriate log coverage the following unit files tracked by journalD must be collected:
- pvedaemon.service
- pve-cluster.service
- pveproxy.service
- pvefw-logger.service
- proxmox-firewall.service
- pvesh.service
- pve-guests.service
- pvescheduler.service
- ssh.service
- cron.service
Deep dive into analytics
Don't use AI
Often people think that delegating tasks to AI tools will free up time to do other more worthwhile things. This is the first mistake, the labour involved in a task is important even if the reason why your doing it is not.
Often people think that the world's adoption of AI tools is much like the adoption of the calculator or mobile phones. This is the second mistake. AI tools have torn from our world it's most valuable possessions and so born from the dark pits of soulless executives with dollar signs gleaming in their eyes they emerged and they do work. They work too well. It's creators have developed a medium from which humans can pour out unconstrained thoughts. Thoughts that carry no beauty or deliberateness.
The modern computer took away things from us too but in doing so it pushed the boundaries of what can be done into new areas never before perceived. This exchange seems to of been worthwhile. AI tools do not offer a similar exchange, their ability to act as a surface without rough edges or muddy reflections means there's no room left for us. No way to abstract the information further pressing it's users against a ceiling of higher order thinking that is in no way nourishing.
Researching adversary behaviour and building systems necessitates you doing the hard parts. If your new to the work you need the depth lost in AI tools to fall in love and if your already committed to the work your knowledge needs to stretch across as much complexity as possible to keep your wisdom turning into ramblings. Using AI tools writing detections will make you worse at detecting adversary behaviour.
All energy is only borrowed and one day you have to give it back. Don't waste yours on AI.