+ All Categories
Home > Documents > Automation for everyone - JPCERT

Automation for everyone - JPCERT

Date post: 18-Dec-2021
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
65
Automation for everyone
Transcript
Page 1: Automation for everyone - JPCERT

Automation for everyone

Page 2: Automation for everyone - JPCERT

Agenda00:00 - 00:45 Introduction - What is Shuffle and security automation

01:00 - 01:45 Workflows: creation, using and sharing

02:00 - 02:45 Integrations: creation, using and sharing

03:00 - 03:45 Use-case solving: we’ll help solve your use-case in class

Page 3: Automation for everyone - JPCERT

Workshop goalsPlaybook editor App editor Organization control

Page 4: Automation for everyone - JPCERT

Shuffle - built from real-world experience ● Worked in multiple incident response & SOC environments● Developers in blueteams are “unicorns”● Built for accessibility and standardization● Started after a blogpost on NSA WALKOFF (2019)

Page 5: Automation for everyone - JPCERT

What is Shuffle today● Automation platform● Open Source Software● Workflow editor● Integrations builder● Code generator● Authentication overview● ...

Page 7: Automation for everyone - JPCERT

OODA driven SOAR

Page 8: Automation for everyone - JPCERT

Architecture

Page 9: Automation for everyone - JPCERT

Let’s get started

Page 10: Automation for everyone - JPCERT
Page 11: Automation for everyone - JPCERT

Workflows

Page 12: Automation for everyone - JPCERT

Apps

Page 13: Automation for everyone - JPCERT

Documentation

Page 14: Automation for everyone - JPCERT

OrganizationMulti-tenant control

Page 15: Automation for everyone - JPCERT

Organization

Page 16: Automation for everyone - JPCERT
Page 17: Automation for everyone - JPCERT
Page 18: Automation for everyone - JPCERT
Page 19: Automation for everyone - JPCERT
Page 20: Automation for everyone - JPCERT
Page 21: Automation for everyone - JPCERT

● Apps○ Actions○ Parameters○ Files

● App Creation○ GUI - OpenAPI○ CLI - Python

Recap● Organizations

○ Organization control○ Cloud access○ Users○ Environments○ Authentication○ Schedules○ Files

● Workflows○ Files○ Triggers

■ Webhook■ Schedule■ Subflow■ User input

○ Authentication○ Variables○ Conditions○ Autocompletion

Page 22: Automation for everyone - JPCERT

WorkflowsNo-code automation

Page 23: Automation for everyone - JPCERT

Use-case showcase● SIEM SSH alert -> Block IP in AWS Firewall● S3 honeypot -> Block IP and add to MISP● Schedule mail -> TheHive alert with attachments

Page 24: Automation for everyone - JPCERT

Workflows● What are they● Who can make them● How are they made● How are they shared

Page 25: Automation for everyone - JPCERT

Downloading workflows

Page 26: Automation for everyone - JPCERT

Your first Workflow

Page 27: Automation for everyone - JPCERT
Page 28: Automation for everyone - JPCERT

Features● Save & Execute● See executions● Startnode● Workflow configuration● Execution Argument● Triggers● Variables● Delete nodes

● Apps○ Actions○ Parameters○ Files○ Autocompletion○ Authentication

Page 29: Automation for everyone - JPCERT

Execute● Manual● Execution Argument● Variables● Triggers

○ Schedule○ Webhook

● Executions

Page 30: Automation for everyone - JPCERT

Apps● Draggable● Contains actions

○ Containing arguments○ Authentication

Page 31: Automation for everyone - JPCERT

Variables● Execution Argument● Triggers● Previous actions

○ Successful○ Failed

● Workflow Variables● Execution Variables

Page 32: Automation for everyone - JPCERT

Actions● Name● Authentication● Environment● Parameters

○ Required○ Optional

Page 33: Automation for everyone - JPCERT

Conditions● If statements● AND● Loops

Page 34: Automation for everyone - JPCERT
Page 35: Automation for everyone - JPCERT

Variable● Triggers - $exec● Apps - $node_name● Variables - $variable_name● JSON

Page 36: Automation for everyone - JPCERT

Nested variables (JSON)● JSON

$exec = {"name": "Fredrik", "product": {"name": "Shuffle"}}

How do we get these?

● Fredrik● Shuffle

Page 37: Automation for everyone - JPCERT

Nested variables (JSON) 2$exec = {"name": "Fredrik", "product": {"name": "Shuffle"}}

Fredrik: $exec.name

Shuffle: $exec.product.name

{"hashes": [ "7c401bde8cafc5b745b9f65effbd588f", "177ae9a7fc02130009762858ad182678"]}

Page 38: Automation for everyone - JPCERT

Loops● {"hashes": [

"7c401bde8cafc5b745b9f65effbd588f", "177ae9a7fc02130009762858ad182678", "52f05ee28bcfec95577d154c62d40100"]}

● $exec.hashes.#

Page 39: Automation for everyone - JPCERT

Triggers - $exec ● Webhook

○ Best for instant workflow trigger integrations (e.g. from TheHive)

● Shuffle Workflow

○ Behaves like an Action

● User Input

○ Waits for user before continue

● Schedule

○ Executes workflow on a user-defined schedule

Page 40: Automation for everyone - JPCERT

Sub workflows● Sub-flows - why? ● Use-case:

○ Many emails -> many attachments○ Loop(s) within loop(s)

● Reusability

Page 41: Automation for everyone - JPCERT

Authentication● Developer defined

actions

● Organization wide

Page 42: Automation for everyone - JPCERT

Files● Created by apps

● Abstracted by away ID

● Organization controlled

Page 43: Automation for everyone - JPCERT

Executions● Why look at it again?● Result exploration● Result listing● Trigger-view

Page 44: Automation for everyone - JPCERT

Executions - 2● Movable● Popout● Discovery

Page 45: Automation for everyone - JPCERT

Executions - 3 ● Buttons○ Success○ Error○ See execution○ Close

● General:○ Copy values○ Copy autocompletion

Page 46: Automation for everyone - JPCERT

● Dashboard○ Import○ Export○ Cloud download○ Executions○ Execution results

● Workflow ○ Save○ Execute○ Global Configuration○ Execution Argument○ Variables○ Node management○ Execution exploration

Recap - Workflows● Files

○ List○ Upload○ Download

● Conditions○ Variables○ Nested JSON○ Loops

● Apps○ Actions○ Arguments○ Files○ Autocompletion○ Authentication

● Variables○ Workflow variables○ Execution variables

Page 47: Automation for everyone - JPCERT

Apps

Page 48: Automation for everyone - JPCERT
Page 49: Automation for everyone - JPCERT

App downloads

Page 50: Automation for everyone - JPCERT

● Manually created (python)

● Generated by Shuffle

● Active (usable) app

● Inactive app

Page 51: Automation for everyone - JPCERT

App exploration

Page 52: Automation for everyone - JPCERT

App activation

Page 53: Automation for everyone - JPCERT

App activation - 1

Page 54: Automation for everyone - JPCERT

App activation - 2

Page 55: Automation for everyone - JPCERT

App activation - 3

Page 56: Automation for everyone - JPCERT

App activation - 4

App ready to build

App building

Page 57: Automation for everyone - JPCERT

App usage

Build finished:

instantly usable

Page 58: Automation for everyone - JPCERT

Further development● Download app● Edit app● Delete app

Requirements:

● Basic HTTP understanding

Page 59: Automation for everyone - JPCERT

App development - add action● Actions

○ POST○ GET○ DELETE○ …

● Name & Description

Virustotal File search

Page 60: Automation for everyone - JPCERT

App development - autocomplete

● https://developers.virustotal.com/reference#file-search

Copy curl

Page 61: Automation for everyone - JPCERT

App development - finishing touches

Page 62: Automation for everyone - JPCERT

● App Listing○ OpenAPI○ Python○ Tags○ Import○ Export○ Active / Inactive○ Search

Recap - Apps● App Editor

○ Name○ Description○ Image○ Base URL○ Authentication

■ Header■ Query

○ Tags

● App Editor Actions○ Name○ Description○ GET/POST/DELETE/…○ URL Path

● Selected App○ Edit○ Delete○ Activate○ Actions○ Parameters

Page 63: Automation for everyone - JPCERT
Page 64: Automation for everyone - JPCERT

What we did NOT cover● Debugging in depth

○ Docker containers○ Execution issues○ Build issues○ Development issues

● Manual app creation○ Python○ Api.yaml <-> src/app.py ○ Dockerfiles○ Hot Loading apps○ Testing apps

● Contributing○ Main repo○ Apps○ Workflows

● Shuffle cloud○ What’s different?○ How is it useful for you?

● Configuration○ How to deploy○ How to configure it for scale

● Roadmap

Page 65: Automation for everyone - JPCERT

Use-case solvingSolving use-cases in class


Recommended