News for hackers. Stuff that matters.
Re:Broken by design: systemd by peterwwillis on Monday February 10, 2014 @09:54AM (#7211344)
Fallacy: having owned the user that writes logs, I cannot fuck with your logs if journaled.

Reality: if I owned the user writing logs, I can do anything I want with the logs, no matter how they're stored.

Re:Broken by design: systemd by hdevalence on Monday February 10, 2014 @10:39AM (#7211567)
No, you cannot do anything you want with the logs.

Here is something you cannot do: you cannot alter the logs without anyone noticing, since log entries have a rolling hash.

This prevents an attacker from being able to modify logs without detection, and was implemented in systemd after the postmortem on the kernel.org breakin, i.e., it was developed to counter an actual threat.

I would suggest you read up on what log attestation actually does.

Re:Broken by design: systemd by peterwwillis on Monday February 10, 2014 @11:48AM (#7212011)
Logs can be modified in real time by being intercepted during writes to the buffer before the new hash is applied. Because of this, only the logs up to the intrusion can be preserved, and even then if the old message/hash/key/etc is still in memory, the old messages can be modified.

The only truly secure way to record messages up to the point of break-in is a one-way remote log. Any new messages after break-in is subject to falsification.

Re:Broken by design: systemd by bct on Monday February 10, 2014 @11:59AM (#7212089)
> The only truly secure way to record messages up to the point of break-in is a one-way remote log.

And if you have this then you don't need a fancy cryptographic syslogd to detect tampering.

Re:Broken by design: systemd by peterwwillis on Monday February 10, 2014 @02:09PM (#7212967)
The fancy cryptologic syslogd is fallible as I mentioned previously, so why depend on it? And really if you really want to cover your tracks you can just cause random disk corruption over the whole disk (and just happen to damage the journal in the process). Things will start failing rapidly, fsck will later show itself fixing the disk corruption, and it will be assumed to be a hardware error and the incident ignored.

Security half-measures do not mean you are secure. If it can be hacked, it will be hacked, and then what was the point of sacrificing your whole system's init system?

(Also you could just replace syslogd with a journaled syslogd, rather than replacing your entire init system... but I guess that's off-topic?)

Re:Broken by design: systemd by bct on Monday February 10, 2014 @04:10PM (#7213853)
I'm agreeing with you.
Re:Broken by design: systemd by Fasebook on Monday February 10, 2014 @02:39PM (#7213173)
>rolling hash

FAIL. You just wrote outdated software. Under this dumbass idea of journaling, which by defition is there to allow editing.., the best thing you can do is built a rolling function, which basically means coping the data, which basically means increasing your attack surface.

Re:Broken by design: systemd by andor on Monday February 10, 2014 @11:02AM (#7211730)
The journal sealing provides forward security. The sealing keys are exchanged regularly, and the old keys are deleted safely. A verification key, which is stored on another device or offline, can be used to calculate the sealing key for any given moment. While an attacker can change the logs, this will always be visible in an audit.

http://lwn.net/Articles/512895/

https://eprint.iacr.org/2013/397.pdf

Re:Broken by design: systemd by d0 on Monday February 10, 2014 @11:08AM (#7211762)
the old keys are deleted safely

Assuming nothing has managed to redirect those unlinks for example...

Re:Broken by design: systemd by andor on Monday February 10, 2014 @03:25PM (#7213543)
I guess you're right. The mechanism is forward-secure, which means for an attacker that tampering the logs is the first thing to do, not the last ;-)

As soon as the attacker manages to extract the state of the key generator from memory at one point of time, the log entries from that and the following sealing periods can be modified and cleanly sealed.

Re:Broken by design: systemd by asabjorn on Monday February 10, 2014 @10:53AM (#7211656)
From what I understand systemd can optionally store a copy of the logs on a remote server. The key to modify the logs on the remote server is changed in such a way that even if a system is compromised the log copy on the remote system can not be changed.

These remote copies of the logs could actually be used to detect log-tampering and 0day exploits.

Re:Broken by design: systemd by Fasebook on Monday February 10, 2014 @03:27PM (#7213566)
>From what I understand systemd can optionally store a copy of the logs on a remote server.

anything can have any feature, what matters is how it's built.