Petter Reinholdtsen: syslog-trusted-timestamp - chain of trusted timestamps for your syslog
Two years ago, I had
a
look at trusted timestamping options available, and among
other things noted a still open
bug in the tsget script
included in openssl that made it harder than necessary to use openssl
as a trusted timestamping client. A few days ago I was told
the Norwegian government office DIFI is
close to releasing their own trusted timestamp service, and in the
process I was happy to learn about a replacement for the tsget script
using only curl:
openssl ts -query -data "/etc/shells" -cert -sha256 -no_nonce \
curl -s -H "Content-Type: application/timestamp-query" \
--data-binary "@-" http://zeitstempel.dfn.de > etc-shells.tsr
openssl ts -reply -text -in etc-shells.tsr
This produces a binary timestamp file (etc-shells.tsr) which can be
used to verify that the content of the file /etc/shell with the
calculated sha256 hash existed at the point in time when the request
was made. The last command extract the content of the etc-shells.tsr
in human readable form. The idea behind such timestamp is to be able
to prove using cryptography that the content of a file have not
changed since the file was stamped.
To verify that the file on disk match the public key signature in
the timestamp file, run the following commands. It make sure you have
the required certificate for the trusted timestamp service available
and use it to compare the file content with the timestamp. In
production, one should of course use a better method to verify the
service certificate.
wget -O ca-cert.txt https://pki.pca.dfn.de/global-services-ca/pub/cacert/chain.txt openssl ts -verify -data /etc/shells -in etc-shells.tsr -CAfile ca-cert.txt -textWikipedia have a lot more information about trusted Timestamping and linked timestamping, and there are several trusted timestamping services around, both as commercial services and as free and public services. Among the latter is the zeitstempel.dfn.de service mentioned above and freetsa.org service linked to from the wikipedia web site. I believe the DIFI service should show up on https://tsa.difi.no, but it is not available to the public at the moment. I hope this will change when it is into production. The RFC 3161 trusted timestamping protocol standard is even implemented in LibreOffice, Microsoft Office and Adobe Acrobat, making it possible to verify when a document was created. I would find it useful to be able to use such trusted timestamp service to make it possible to verify that my stored syslog files have not been tampered with. This is not a new idea. I found one example implemented on the Endian network appliances where the configuration of such feature was described in 2012. But I could not find any free implementation of such feature when I searched, so I decided to try to build a prototype named syslog-trusted-timestamp. My idea is to generate a timestamp of the old log files after they are rotated, and store the timestamp in the new log file just after rotation. This will form a chain that would make it possible to see if any old log files are tampered with. But syslog is bad at handling kilobytes of binary data, so I decided to base64 encode the timestamp and add an ID and line sequence numbers to the base64 data to make it possible to reassemble the timestamp file again. To use it, simply run it like this:
syslog-trusted-timestamp /path/to/list-of-log-filesThis will send a timestamp from one or more timestamp services (not yet decided nor implemented) for each listed file to the syslog using logger(1). To verify the timestamp, the same program is used with the --verify option:
syslog-trusted-timestamp --verify /path/to/log-file /path/to/log-with-timestampThe verification step is not yet well designed. The current implementation depend on the file path being unique and unchanging, and this is not a solid assumption. It also uses process number as timestamp ID, and this is bound to create ID collisions. I hope to have time to come up with a better way to handle timestamp IDs and verification later. Please check out the prototype for syslog-trusted-timestamp on github and send suggestions and improvement, or let me know if there already exist a similar system for timestamping logs already to allow me to join forces with others with the same interest. As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address 15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.
Last month was relatively quiet for me in terms of uploads, as the
"squeeze" LTS period was over and "wheezy" is still in the hands of
the regular Debian security team. I carried over 7.25 hours from
Feburary and was assigned another 11 hours of work
by
Yesterday my contract with my university
My prime interests are academic work, that is research and teaching, where research is in a variety of fields, mostly mathematical logic, theoretical computer science, and formal methods. Recently I am working on an extension of the Curry-Howard correspondence to cover different calculi, in particular Hyper Sequent Calculi, and relate them to some kind of process algebra. For more details see the
Firefox has had support for Google's
Here is my monthly update covering a large part of what I have been doing in the free software world (
When I started contributing to
Julian has
As my readers probably are well aware, I wrote my
In January and February of 2016 I ran an Obnam user survey. I'm not a
statistician, but here is my analysis of the results.
Executive summary: Obnam is slow, buggy, and the name is bad. But
they'd like to buy stickers and t-shirts.
Method
I wrote up a long list of questions about things I felt were of
interest to me. I used Google Forms to collect responses, and exported
them as a CSV file, and analysed based on that.
I used Google Forms, even though it is not free software, as it was
the easiest service I got to work that also seemed it'd be nice for
people to use. I could have run the survey using
Propellor was recently ported to FreeBSD, by Evan Cofsky. This new feature
led me down a two week long rabbit hole to make it type safe. In particular,
Propellor needed to be taught that some properties work on Debian, others on
FreeBSD, and others on both.
The user shouldn't need to worry about making a mistake like this;
the type checker should tell them they're asking for something that can't
fly.
What happened in the
The fourth update in the 0.12.* series of
[I wrote this as part of
I am very very (very very very!) happy to confirm that...
This year, and after many years of not being able to, I will cross the Atlantic. To do this, I will take my favorite excuse: Attending DebConf!
So, yes, this image I am pasting here is as far as you can imagine from official promotional material. But, having bought my plane tickets, I have to start bragging about it ;-)
In case it is of use to others (at least, to people from my general geographic roundabouts), I searched for plane tickets straight from Mexico. I was accepting my lack of luck, facing an over-36-hour trip(!!) and at very high prices. Most routes were Mexico- central_europe -Arab Emirates-South Africa... Great for collecting frequent-flier miles, but terrible for anything else. Of course, requesting a more logical route (say, via Sao Paulo in Brazil) resulted in a price hike to over US$3500. Not good.
I found out that Mexico-Argentina tickets for that season were quite agreeable at US$800, so I booked our family vacation to visit the relatives, and will fly from there at US$1400. So, yes, in a 48-hr timespan I will do MEX-GRU-ROS, then (by land) Rosario to Buenos Aires, then AEP-GRU-JNB-CPT. But while I am at DebConf, Regina and the kids will be at home with the grandparents and family and friends. In the end, win-win with just an extra bit of jetlag for me ;-)
I *really* expect flights to be saner for USians, Europeans, and those coming from further far away. But we have grown to have many Latin Americans, and I hope we can all meet in CPT for the most intense weeks of the year!
See you all in South Africa!