H3XaByT3 / fugl

A warrant canary system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fugl

Fugl ("bird" in Danish) is a warrant canary solution/system. The project attempts to mitigate problems with existing canary solutions:

We have seen canaries that are updated on a daily basis and canaries which are updated once per year. We have seen canaries that were created once and then never updated again. Again, the fact that canaries are non-standard makes it difficult to automatically monitor them for changes or takedowns.

  • EFF (Canary Watch – One Year Later)

The goal is to provide canaries which are:

  • Readable for humans
  • Easy to parse for machines
  • Simple to update and validate systematically

This allows users to automate the validation of canaries from hundreds of different companies, using a simple cron job.

Canaries and proofs

Canaries are JSON structures, which are PGP (clear) signed producing what we call a "proof".

Here is an example of such a proof:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

{
    "version": 0,
    "message": "",
    "previous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "deadline": "2017-05-16T18:42:42+02:00",
    "nonce": "RZdfJucHRpqRqQWrnsgExwl34oHm7Xho"
}
-----BEGIN PGP SIGNATURE-----

wsBcBAEBCAAQBQJYl1YCCRDp9yD8LUOi4gAAfUYIAInOhmxpqDe8BoOM2fFmNnhp
4zDCdPX/v2jPs5uQkoUNDEsQTUZoin6AwO4qRo3a492VrW0K+e3ZevxlPvQ+t2B3
8kJnY50sRcXj4QCdgSslDlS0fNVpjZ9Qvmi336IPuPlqj+QwY794RZzPfSxZHB8N
vVoz1ukc+6+9NQc5IX+f78CLwsVWbAc+5KQCGSAFg3F2zdTY5MOeikvdR92FModJ
vkcgTmPUsYnaYJgUVLn/8RlxS1NPH8akvJKgFR1sS9KVytSI0mLKW8Qpn8SN7UbA
x/5jheOQwMNYQwwzncX+wXyeG816YEsUv9oXFppuQumQKW/cr0OtfMDCCkOJDnM=
=ZY0x
-----END PGP SIGNATURE-----

The previous field is a sha256 hash of the previous proof (or any hash for the initial proof). The deadline field contains the latest time before which the next proof must be submitted. The format is still subject to change (suggestions are welcome) The message field can be used to send a message to those verifying the proofs (a notification will be shown, when they verify the proof); if you fill this field, you should do so for a good reason.

Proofs are generated by the client (see cmd/client) and saved to a file. This file can then be directly submitted to the server or moved across an air-gap and submitted from another machine. The submission process is a simply HTTP post request (see next section).

The server

The canary server is a simple self-contained HTTP server and does not rely on a database server. All proofs are verified upon submission (using a specified public key) and saved in a directory on the server (sorted by deadline). The server serves the proofs and the public key, allowing a client to start tracking the canary chain easily.

In addition the Fugl canary server can be used as digital Dead man's switch, by specifying an action (system command) which should be executed by the server if a canary has not been submitted before the next deadline.

Fugl was explicitly designed so that it does not rely on a single model of distribution. If you want to save and store the proofs on e.g. an FTP server this is also possible -- as long as clients know how to retrieve the proofs. The server is included to simplify automation.

Getting started

You can start using Fugl, by first setting up a go environment, then:

~> git clone https://github.com/rot256/fugl
~> cd fugl/cmd/client
~> go get
~> go build

And use the same procedure for the server.

If there is interest I will provide pre-compiled binaries (but given the setting I would advise against it).

Further documentation in the making.

Contributing

Fugl is still a work in progress (but close to being production ready), if you want to contribute the best way to do so is by:

  • Read the code (it is very short and quite readable)
  • Provide suggestions for Canary format/API changes

Simplicity is prioritised over new features!

This repo WILL NOT contain an automatic system for tracking the canaries, such a system should be easy to implement using the client (and I encourage people to do so).

About

A warrant canary system


Languages

Language:Go 100.0%