News for hackers. Stuff that matters.
Re:Facebook Stored Hundreds of Millions of User Passwords in... by sethammons on Thursday March 21, 2019 @12:33PM (#19454245)
I doubt someone wrote "log.print(user.creds)". They probably wrote "log.print(req.args)" in a (what they felt) was an unrelated section of code. Sucks, but could easily happen.

I'd be interested in a system or tooling that could identify that something sensitive made it into a log. I think it is practically impossible, but would be interesting.

Re:Facebook Stored Hundreds of Millions of User Passwords in... by tzs on Thursday March 21, 2019 @06:18PM (#19457916)
> I'd be interested in a system or tooling that could identify that something sensitive made it into a log. I think it is practically impossible, but would be interesting.

Have all strings printed to logs go through a common checking routine. That checking routine simply checks for the presence of certain hard coded sequences, and raises an alarm if they are found.

Whenever a production system is updated, run a test suite. The tests includes logging in to a test account whose password is one of the aforementioned hard coded sequences. If your system accepts payments, the tests can include a test purchase using a test credit card number that is one of the aforementioned hard coded sequences. In general, for each type of sensitive information, have a test that supplies sensitive information of that type, with that information being one of the hard coded sequences the log checkers checks for.

This won't stop you from accidentally logging sensitive data in production, but it should catch it during the post-deployment tests so you can fix it quickly.

Re:Facebook Stored Hundreds of Millions of User Passwords in... by solidasparagus on Friday March 22, 2019 @12:05AM (#19459523)
Interesting, but way harder than it sounds. Very often log systems live as a service for multiple microservices that do real world work. Propagating sentinel data through each of those systems is a nightmare because:

- those systems often have real-world secondary effects

- they sometimes have a tendency to validate away sentinel data prior to logging because the data is no good (e.g. a credit card number that isn't real or a password for a user that doesn't exist), although that can depend on scale and cost

- cross-team coordination of how to handle the sentinel data introduces coupling across teams/services which is contrary to the goal of microservices.