Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uplogvm(s) #830
Comments
marmarek
added this to the
Release 3 milestone
Mar 8, 2015
marmarek
added
enhancement
C: other
P: major
labels
Mar 8, 2015
marmarek
modified the milestones:
Release 3.1,
Release 3.0
May 13, 2015
marmarek
added
the
release-notes
label
Jan 4, 2016
marmarek
modified the milestones:
Release 4.1,
Release 3.1
Jan 4, 2016
marmarek
referenced this issue
Mar 29, 2016
Closed
Web page with list of wanted maintainers/developers/others #1700
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rudd-O
May 11, 2016
This is EXCELLENT.
Plus, with journald log replication, it should be trivial to do.
Care must be taken that the files received by the logvm do not compromise the logvm upon using journalctl to read those logs.
Rudd-O
commented
May 11, 2016
|
This is EXCELLENT. Plus, with journald log replication, it should be trivial to do. Care must be taken that the files received by the logvm do not compromise the logvm upon using journalctl to read those logs. |
andrewdavidwong
added
the
help wanted
label
Jun 9, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@Rudd-O: Would you be interested in taking this on? |
added a commit
that referenced
this issue
Jun 9, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rudd-O
Jun 12, 2016
I wish I could, but I am extremely busy.
Is this intended to send/receive arbitrary logs, or specific structured logs like systemd ones? systemd has a good protocol for incremental send and receive of logs, and it is quite possible that it can be adapted to this use case with a minimal shim.
What's the idea w.r.t. who initiates the copy? Is it the logvm that extracts logs from other machines? Or is it the VM producing the log entries which sends it to the logvm?
Rudd-O
commented
Jun 12, 2016
|
I wish I could, but I am extremely busy. Is this intended to send/receive arbitrary logs, or specific structured logs like systemd ones? systemd has a good protocol for incremental send and receive of logs, and it is quite possible that it can be adapted to this use case with a minimal shim. What's the idea w.r.t. who initiates the copy? Is it the logvm that extracts logs from other machines? Or is it the VM producing the log entries which sends it to the logvm? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jun 12, 2016
Member
Is this intended to send/receive arbitrary logs, or specific structured logs like systemd ones? systemd has a good protocol for incremental send and receive of logs, and it is quite possible that it can be adapted to this use case with a minimal shim.
I think it's fair assumption to have systemd (or generally syslog-like) logs. But this shouldn't use any complex protocol, to not expose too much code for attacks. It looks like a simple "one log message per line" should be enough.
What's the idea w.r.t. who initiates the copy? Is it the logvm that extracts logs from other machines? Or is it the VM producing the log entries which sends it to the logvm?
Logically VM producing the logs should send them to logvm. After all it know when there is anything for sending, so no need for polling. Maybe even send logs to logvm instead of writing them to /var/log (or /var/log/journal).
I think it's fair assumption to have systemd (or generally syslog-like) logs. But this shouldn't use any complex protocol, to not expose too much code for attacks. It looks like a simple "one log message per line" should be enough.
Logically VM producing the logs should send them to logvm. After all it know when there is anything for sending, so no need for polling. Maybe even send logs to logvm instead of writing them to |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rudd-O
Jun 12, 2016
On 06/12/2016 06:09 PM, Marek Marczykowski-Górecki wrote:
Is this intended to send/receive arbitrary logs, or specific structured logs like systemd ones? systemd has a good protocol for incremental send and receive of logs, and it is quite possible that it can be adapted to this use case with a minimal shim.I think it's fair assumption to have systemd (or generally
syslog-like) logs. But this shouldn't use any complex protocol, to not
expose too much code for attacks. It looks like a simple "one log
message per line" should be enough.
You would lose a LOT of useful and certified metadata if you only
ingested "one message per line" syslog-style logs. Perhaps the format
used by systemd-journald log forwarding is not suitable for what you
want to do, or perhaps it is.
Look into how it works.
What's the idea w.r.t. who initiates the copy? Is it the logvm that extracts logs from other machines? Or is it the VM producing the log entries which sends it to the logvm?Logically VM producing the logs should send them to logvm. After all
it know when there is anything for sending, so no need for polling.
Maybe even send logs to logvm /instead of/ writing them to |/var/log|
(or |/var/log/journal|).
Send instead of write sounds like a sensible thing.
It sounds like what you want is a systemd-journald log forwarder on each
client VM, continually sending log data over a vchan connection to the
log VM. That should not be very difficult to do.
Rudd-O
http://rudd-o.com/
Rudd-O
commented
Jun 12, 2016
|
On 06/12/2016 06:09 PM, Marek Marczykowski-Górecki wrote:
You would lose a LOT of useful and certified metadata if you only Look into how it works.
Send instead of write sounds like a sensible thing. It sounds like what you want is a systemd-journald log forwarder on each
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jun 12, 2016
Member
It sounds like what you want is a systemd-journald log forwarder on each client VM, continually sending log data over a vchan connection to the log VM.
Yes, something like this. But the priority is to not allow such logvm being compromised with some mis-formatted message. If that requirement means dropping some metadata, so be it.
Yes, something like this. But the priority is to not allow such logvm being compromised with some mis-formatted message. If that requirement means dropping some metadata, so be it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rudd-O
Jun 12, 2016
On 06/12/2016 06:31 PM, Marek Marczykowski-Górecki wrote:
It sounds like what you want is a systemd-journald log forwarder on each client VM, continually sending log data over a vchan connection to the log VM.Yes, something like this. But the priority is to not allow such logvm
being compromised with some mis-formatted message. If that requirement
means dropping some metadata, so be it.
This is why the receiving code in the systemd log forwarder needs to be
reviewed. I expect it to be generally better than other stuff, if only
because it is meant to be exposed as a service on a network. If, for
some reason, the code does not meet your security standards, then the
two sides of the vchan connection can do serialization and deserialization.
If you reuse the log forwarder system, you also get forward secure
sealing of logs from VMs. That means a VM cannot tamper with old log
entries (without it becoming evident) no matter what it tries to do.
Rudd-O
http://rudd-o.com/
Rudd-O
commented
Jun 12, 2016
|
On 06/12/2016 06:31 PM, Marek Marczykowski-Górecki wrote:
This is why the receiving code in the systemd log forwarder needs to be If you reuse the log forwarder system, you also get forward secure
|
marmarek
referenced this issue
Aug 4, 2016
Closed
Weird race condition that makes DNS ProxyVM rules disappear #2227
jpouellet
referenced this issue
Nov 14, 2016
Closed
Lesspipe should be disabled in dom0 for security reasons #1014
marmarek
referenced this issue
May 25, 2018
Closed
Warnings or non important messages handled by journald #3927
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
May 26, 2018
So one option would be redirect journald using a version of systemd-journal-remote with vchan connections but it could be security problem due complex protocol and potentially a VM could compromise it.
As benefit logVM would have a powerful tool for monitoring, filter, search....
Another option I see, doing a very simple logVM wich just receives messages and save thems, is using an unikernel for it. It could dump the received lines in xen console so you can easily see all logs events in realtime and save them in files (separed by VM, dates, ...), if you need more detailed analysis of logs you could then bypass them (maybe with readonly access) to guiVM, dom0 or another trusted VM.
donob4n
commented
May 26, 2018
•
|
So one option would be redirect journald using a version of systemd-journal-remote with vchan connections but it could be security problem due complex protocol and potentially a VM could compromise it. Another option I see, doing a very simple logVM wich just receives messages and save thems, is using an unikernel for it. It could dump the received lines in xen console so you can easily see all logs events in realtime and save them in files (separed by VM, dates, ...), if you need more detailed analysis of logs you could then bypass them (maybe with readonly access) to guiVM, dom0 or another trusted VM. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rudd-O
May 26, 2018
Rudd-O
commented
May 26, 2018
|
I like the unikernel idea to save RAM in the VM that receives logs, but then querying the log would be tricky. I'd very much like to aggregate logs from several Qubes servers as well.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
May 26, 2018
Yes the idea is querying the log with another trusted VM which direct access to log files, it will not be as powerful as journald but the unikernel logic would be remain very minimal.
By Qubes servers do you mean like AppVM's?
donob4n
commented
May 26, 2018
|
Yes the idea is querying the log with another trusted VM which direct access to log files, it will not be as powerful as journald but the unikernel logic would be remain very minimal. By Qubes servers do you mean like AppVM's? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
May 26, 2018
Another option could be using the unikernel for saving raw json output from journald without parsing it. Maybe with a very basic parsing logic so it could dump something readable in the console. Then, if you want a detailed log analysys, you create a offline disposableVM which loads the desired logs from the read-only data (or a copy of it) in logVM.
This way the only vulnerable part is the disposableVM, if later appears some bug in journald you could load the unmodified original logs with a patched version. If some VM tried to exploit this bug you could detect it later.
donob4n
commented
May 26, 2018
•
|
Another option could be using the unikernel for saving raw json output from journald without parsing it. Maybe with a very basic parsing logic so it could dump something readable in the console. Then, if you want a detailed log analysys, you create a offline disposableVM which loads the desired logs from the read-only data (or a copy of it) in logVM. This way the only vulnerable part is the disposableVM, if later appears some bug in journald you could load the unmodified original logs with a patched version. If some VM tried to exploit this bug you could detect it later. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
See also related discussion from last year here |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
May 26, 2018
After reading it, I assume that journald support should be optional.
For an initial proof of concept what do you think about using 'journalctl -f' output and the @HW42 'qubes.AppendLog' service?
donob4n
commented
May 26, 2018
|
After reading it, I assume that journald support should be optional. For an initial proof of concept what do you think about using 'journalctl -f' output and the @HW42 'qubes.AppendLog' service? |
marmarek commentedMar 8, 2015
Reported by joanna on 25 Apr 2014 16:41 UTC
A VM to collect logs from other VMs via qrexec service. Allow tools to easy copy logs to other VMs, as well as do log processing (logs are untrusted, but the logvm should be considered not-sensitive).
Potentially allow more than one logvm for paranoid configurations, cofigurable via qrexec policy.
Migrated-From: https://wiki.qubes-os.org/ticket/830