Replies: 1 comment
-
There's only a Unix socket on the host for the control channel of swtpm. The file descriptor for the data channel gets passed from QEMU to swtpm via SCM_RIGHTS message, so it's inaccessible to the outside world and with this the data channel is also inaccessible to the outside world and you cannot spy on TPM messages sent between QEMU and swtpm. The only way to listen in on the traffic would be via the a log but by default, at least with libvirt starting swtpm and QEMU, there's no log parameter passed to swtpm, either. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all, I hope this an appropriate place ask for your advice.
I am using swtpm [1] as a virtual TPM for my qemu instance [2] and I would like to trace all issued TPM2 commands in an easily readable and processable way. I noticed that Wireshark has some really useful TPM2 decoders built in [3], but I can use it only if swtpm is configured to communicate through a TCP socket (as for example supported by VirtualBox). To my understanding, qemu is only able to work with swtpm over a Unix socket though.
I considered redirecting the Unix sockets through
socat
into a TCP socket and back into a Unix socket, but this yielded errors in swtpm and no immediate success.What's in your experience the best way to capture TPM-only traffic from swtpm/libtpms (i.e. skip the control plane)?
Thanks in advance for any hints,
Christian
[1]
[2]
[3]
Beta Was this translation helpful? Give feedback.
All reactions