Skip to content

refractionPOINT/garage-datastudio-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

garage-datastudio-dashboard

Example of using Google Data Studio to build LimaCharlie dashboards.

Idea

The idea behind this garage-project is to create beautiful dashboards and/or nice widgets to be embedded into customers websites or SOC content management systems.

An example of how the code can be embedded can be found here, together with a minimalistic web page template.

This approach will also allow you to have a granular control of the permissions related to users authorised to access the dashboard, and even schedule periodic reports that will automatically land in users mailbox.

With a bit more of coding (slightly advanced), it will be also possible to create alerts based on Google Big Query.

How to

We can leverage the power of LimaCharlie webhook outputs, Google Cloud and Google data studio.

Google Cloud Function

If you are not familiar with Google Cloud Functions, I created a basic one here. Once authenticated in Google Cloud Platform, let's create a new Node.js Cloud Function as per the example we just mentioned.

Get started with Google Cloud

STEP 1 ► Create a new Google Cloud project

Create a nre Google Cloud project

STEP 2 ► Create a new Google Cloud function

Create a new Google Cloud function

Create a new Google Cloud function

And you can just use the small piece of Node.js code shared in this repo as mentioned before:

Create a new Google Cloud function

With the cloud function deployed you are ready to go to the next step:

Create a new Google Cloud function

STEP 3 ► Now that you have a Cloud Function set, you can move to the tab TRIGGER, this will show you a Trigger URL:

Create a new Google Cloud function

This is the URL we should pass to app.limacharlie.io as core parameter of a new output:

Create a new Google Cloud function

LimaCharlie

STEP 4 ► Create a new LimaCharlie Output: Add Output → Choose Detection Output Stream → Choose Webhook as Output Destination:

Create a new LimaCharlie Output

In the field Output Destination paste the Trigger URL of your Google Cloud Function:

Create a new LimaCharlie Output

For this experiment I flagged the following parameters:

  • Wrap JSON Event with Event Type
  • Flatten JSON to a single level

As soon as you will save the new output, all the detections that will fire in the related LimaCharlie ORG, will trigger the Google Cloud Function.

You can test the output looking at the Output Samples directly from the web UI:

Create a new LimaCharlie Output

IMPORTANT: It's now time to check that your detection data are landing into Google Cloud Platform Logs, for doing this you can leverage the Log Explorer under the Logging Operations tab, and use the traditional SQL syntax to perform a query. A basic one from the Log Explorer can be "author" or whatever terms you are expecting to be in your Detections Output (in this example we will hunt for "powershell" activities):

Logging

If events are not flowing, you cannot go forward with further steps.

STEP 5 ► Create a Sink:

Google Cloud Platform → Log Router

Navigate to the log router and CREATE SINK:

Create a sink

The sink creation procedure is very intuitive, and it is assisted by a very nice wizard, but you need to be sure to choose the following configuration between the several steps:

Step Field Option
Sink Destination Select Sink Service BigQuery dataset
Sink Destination Select BigQuery dataset Create a new BigQuery dataset
Choose logs to include in sink Create an inclusion filter Your SQL query

Create a sink

Create a sink

Now that the new sink is created, as soon as a new event will be logged AND it will match the inclusion filter you created, the new BigQuery dataset will be automatically populated:

Create a sink

CONGRATULATIONS: LimaCharlie is now connected to BigQuery!

Create a sink

You can now leverage all the power of BigQuery with LimaCharlie:

LimaCharlie and BigQuery

HINT: To test the environement, you can simulate attacks with LimaCharlie leveraging our Atomic Red Team integration (https://www.youtube.com/watch?v=oL6D30IeZ7c):

LimaCharlie / Atomic Red Team detections

Google Data Studio

STEP 6 ► Create a new Data Studio project:

LimaCharlie and Google Data Studio

Now that we have our BigQuery dataset and table set as part of our Google Cloud project, we can easily connect it to Google Data Studio as a datasource that will "give life" to the components of our dashboards and reports:

LimaCharlie and Google Data Studio

When the Connect to data window will appear, we just need to select the BigQuery option, and follow the swim-lane (Project → Dataset → Table → Configuration) until we reach our desired data source. The option Use timestamp as a data range dimension is recommended but not mandatory:

LimaCharlie and Google Data Studio

We can create a new report, insert the desired components on our preferred layout and then, keeping the focus on the element we want to connect to our data, add a new data source to it:

LimaCharlie and Google Data Studio

LimaCharlie and Google Data Studio

LimaCharlie and Google Data Studio

Add you favourite search criteria control:

LimaCharlie and Google Data Studio

Finally select ADD , and since then your component in the dashboard is ready to show the data with the option and the style you want to apply!

LimaCharlie and Google Data Studio

Schedule a report delivery via email or just manage access to dashboard link:

LimaCharlie and Google Data Studio

STEP 7 ► Have fun!

About

Example of using Google Data Studio to build LimaCharlie dashboards.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published