
Track the Bitcoin transactions with Falco
The number of plugins available for Falco continues to grow thanks to our wonderful community. Thank you all for your help!
You can find the list of available plugins here.
The vast majority of plugins developed allow Falco to ingest logs from different sources and raise alerts when suspicious elements are identified by its rules. In order to show that any event stream can be a source if you have the right plugin, and to have something fun to show users during my talks, I developed a Falco plugin to track Bitcoin transactions.
How does it work?
I discovered the site https://www.blockchain.com/ exposes a public flux, accessible via a websocket, by subscribing to it you can retrieve transactions carried out on the blockchain in real time. This is perfect for a Falco plugin as it allows you to test the ingestion of events via a websocket, and serve as a basis for other plugins.
I am not going to describe the internal workings of the plugin here, nor how it was developed. If you are interested, you can look at the code here.
Alternatively, read our documentation explaining how to create a plugin from A to Z: https://falco.org/docs/plugins/developers-guide/how-to-develop/.
Default rules
The plugin comes with its default set of rules, we will use them as a working example. You are free to play with it for your own needs, such as monitoring suspicious movements of your wallet.
You can find the Falco rules file provided here.
Installation of the plugin
We will see the 3 classic ways to install the plugin:
- via sources
- with falcoctl
- in kubernetes via Helm
Via sources
The prerequisites are:
- Golang >= 1.19
- make
- Falco >= 0.36
- Git
We will start by installing download the sources, build and install the plugin:
We will create a falco.yaml
file containing:
The plugin comes with a default set of rules which will be sufficient for testing. All that remains is to start Falco with this command:
We can clearly see transactions (sending and receiving) for amounts exceeding 1 BTC appearing in real time.
With falcoctl
The prerequisites are:
- Falco >= 0.36
- Falcoctl >= 0.6
- Git
Falcoctl is the CLI tool that we developed to facilitate the installation of artifacts around Falco, such as rules and plugins. To find out more, here is a blog article about it.
Both the plugin and the rules will be downloaded thanks to the dependency:
As with the installation via sources, the falco.org file should look like:
And Falco will be started by the command:
In Kubernetes via Helm
The prerequisites are:
- Helm
The installation will consist of just adapting the values in the values.yaml file. Everything will be automatically managed by the templates:
And the classic Helm command for installation:
After a few seconds, you should have the pod running:
And new events in falcosidekick-ui:
Conclusion
This plugin has no great purpose other than to dismantle the almost infinite possibilities that open up to Falco thanks to its plugin system. If you wish to be alerted on Telegram of a strange outgoing movement from your wallet, it is now possible with Falco!
Falco is no longer limited to securing Cloud environments. SaaS or others can also be used in a unified way. The Falco rules syntax has proven to benefit security practitioners in an ecosystem rich with numerous potential integration points.