Giter Site home page Giter Site logo

cossas / soarca Goto Github PK

View Code? Open in Web Editor NEW
51.0 51.0 7.0 6.43 MB

SOARCA - The Open Source CACAO-based Security Orchestrator!

Home Page: https://cossas.github.io/SOARCA/

License: Apache License 2.0

Dockerfile 0.12% Go 99.33% Makefile 0.55%
automation cacao cacao-playbooks cybersecurity soar

soarca's People

Contributors

aams-eam avatar dengelt avatar hackwerken avatar hidde-jan avatar lucamrgs avatar maartendekruijf avatar rabbitcybersec avatar xncz8h avatar yohanlegars avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

soarca's Issues

Fix naming inconsistency for return variables of capabilities

Describe the bug
Variable naming in ssh, http and openc2 is not consistent with that of playbooks
cacao.Variables{"__soarca_ssh_result__": {Name: "result", Value: string(response)}}
cacao.Variables{"__soarca_http_result__": {Name: "result", Value: string(response)}}
cacao.Variables{"__soarca_openc2_http_result__": {Name: "result", Value: string(response)}}

This should be:
cacao.Variables{"__soarca_ssh_result__": {Name: "__soarca_ssh_result__", Value: string(response)}}
cacao.Variables{"__soarca_http_result__": {Name: "__soarca_http_result__", Value: string(response)}}
cacao.Variables{"__soarca_openc2_http_result__": {Name: "__soarca_openc2_http_result__", Value: string(response)}}

Only update documentation from feature/docs/* branch and master

Documentation is updated for all pull request this is not a usable strategy as other pr do not update docs regularly.

The solution is to create feature/docs/ matcher to only allow these to update docs live until we have a development deployment available for documentation.

Docker image missing ca-certificates

Describe the bug
The docker image is missing ca-certificates, so it can't validate http calls and fail.

To Reproduce provide details logs and steps
run docker container and execute playbook
{"component":"soarca/models/decoder","level":"error","msg":"jsonschema https://raw.githubusercontent.com/opencybersecurityalliance/cacao-roaster/main/lib/cacao-json-schemas/schemas/playbook.json compilation failed: Get "https://raw.githubusercontent.com/opencybersecurityalliance/cacao-roaster/main/lib/cacao-json-schemas/schemas/playbook.json\": tls: failed to verify certificate: x509: certificate signed by unknown authority","time":"2024-03-18T10:45:37Z"}

Expected behavior
Playbook execution

Use-Cases Section not found

Is your feature request related to a problem? Please describe.
I am reading through the doc, specifically the vision and concepts section. The last line in the subsection 'Current state of SOARCA', the link to Use-Cases seems to be missing.

Additional context
useCases

Update executor documentation

Is your feature request related to a problem? Please describe.
Update executor documentation to implement all step types

Versioning of Stored Playbooks

Versioning of stored playbooks

Currently SOARCA does not support versioning for stored playbooks.

Feature request that has been received from the community:

This feature will be discussed internally with the team and put on the milestones.

Deploy docs on git tag push

Is your feature request related to a problem? Please describe.
The docs are not deployed on a git push of a tag this issue will fix that

Update http url field in agent target to address url

In CACAO V2 there is no http_url property in the agent/target object. The location for such information is in address[dname] (see section 7.8 in CACAO V2). At the moment our code still uses http_url.

Using http_url through the code and not address[dname] is also inconsistent with the official schemas (at https://github.com/oasis-open/cacao-json-schemas/blob/main/schemas/playbook.json), and fails validation with the official schemas.

The solution to this issue would be to

  • change the schema selection to the one officially maintained,
  • update all playbooks used for testing,
  • change the cacao playbook model for marshalling, and update the internal logic that refers to httpUrl

Document explicitly how to connect Fins

It is not yet evident from the documentation how and where to implement and connect fins.

The sequence for connecting a fin is roughly:

  1. SOARCA is run with enable_fins to true
  2. SOARCA interfaces an MQTT broker container to which a Fin process should connect
  3. any Fin process connects to the MQTT container, and registers as fin to SOARCA according to protocol (evtl. using our libraries)
  4. Playbooks which use the fin need to specify a soarca-fin agent. The "name" property of such fin agent should be consistent with the name of the Fin registered via protocol
  5. Now all is set to execute playbooks with SOARCA fins

It would be nice to have this process described explicitly in the documentation

Fix empty authentication info check

Authentication information is an optional property. Currently, no authentication information corresponds to an empty authentication information struct passed to the capability.Execute() function, so it is always passed as either a populated or empty authentication information struct.

Http.utils addAuthTo function checks if authentication information is passed, by checking if it has nil value, or not. If it has nil value, then no auth headers are added, and no further auth info checks are performed.

The bug is in the fact that authentication information will never be "nil", but either a completely empty struct, or a non-completely empty struct. Hence it is always != "nil", and subsequent checks fail.

In this MR, the check is changed to compare the authentication information (passed to Execute for http and OpenC2 capabilities) to an empty struct, instead of to nil value.

Fix docs according to feedback

Updates on the docs required:

Inconsistency between two pages regarding soarca agent type:

Reporting logic and documentation

Design and implement additions to the architecture to integrate reporting of playbook handling and execution.

Reporting functionality should be extendible to allow implementation of integrations to report on third party tools.

Expand executor interface

Is your feature request related to a problem? Please describe.
Expand executor interface to handle the playbook step types

Docker build produces a not executable container

Describe the bug
Docker build produces a not executable container

To Reproduce provide details logs and steps
Run the following docker compose:

version: '3.7' services: soarca: image: cossas/soarca:0.8.99-test-zip3 container_name: soarca_server environment: PORT: 8080 MONGODB_URI: "mongodb://mongodb_container:27017" DATABASE_NAME: "soarca" DB_USERNAME: "root" DB_PASSWORD: "rootpassword" PLAYBOOK_API_LOG_LEVEL: trace DATABASE: "false" ports: - 127.0.0.1:8080:8080

output:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./soarca": permission denied: unknown

Expected behavior

output:
soarca_server | {"component":"MAIN","level":"info","msg":"Version: 0.8.99-54-gbe76886","time":"2024-03-11T07:32:41Z"}
soarca_server |
soarca_server | _____ ____ _____ _____
soarca_server | / ___|/ __ \ /\ | __ \ / | /\
soarca_server | | (
| | | | / \ | |) | | / \
soarca_server | _
| | | |/ /\ \ | _ /| | / /\ \
soarca_server | ) | |__| / ____ | | \ | | / ____ \
soarca_server | |__/ _/
/ __| _\_____/
/ _
soarca_server |
soarca_server |
soarca_server |
soarca_server | [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
soarca_server | - using env: export GIN_MODE=release
soarca_server | - using code: gin.SetMode(gin.ReleaseMode)
soarca_server |
soarca_server | {"component":"MAIN","level":"info","msg":"Buildtime: 2024-03-10T11:26:29+0100","time":"2024-03-11T07:32:41Z"}
soarca_server | {"component":"MAIN","level":"warning","msg":"Failed to read env variable, but will continue","time":"2024-03-11T07:32:41Z"}
soarca_server | {"component":"soarca/internal/controller","level":"info","msg":"Testing if this works","time":"2024-03-11T07:32:41Z"}
soarca_server | [GIN-debug] GET /coa/ --> soarca/routes/coa.Helloworld (1 handlers)
soarca_server | [GIN-debug] POST /coa/:coa-id --> soarca/routes/coa.id_tester (1 handlers)
soarca_server | [GIN-debug] PUT /coa/:coa-id --> soarca/routes/coa.id_tester (1 handlers)
soarca_server | [GIN-debug] DELETE /coa/:coa-id --> soarca/routes/coa.id_tester (1 handlers)
soarca_server | [GIN-debug] GET /status/ --> soarca/routes/status.Helloworld (1 handlers)
soarca_server | [GIN-debug] GET /status/playbook/:id --> soarca/routes/status.id_tester (1 handlers)
soarca_server | [GIN-debug] GET /status/coa/:id --> soarca/routes/status.id_tester (1 handlers)
soarca_server | [GIN-debug] GET /status/history --> soarca/routes/status.Helloworld (1 handlers)
soarca_server | [GIN-debug] POST /operator/coa/:coa-id --> soarca/routes/operator.Helloworld (1 handlers)
soarca_server | [GIN-debug] POST /trigger/playbook --> soarca/routes/trigger.(*TriggerApi).Execute-fm (1 handlers)
soarca_server | [GIN-debug] GET /swagger/*any --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (1 handlers)
soarca_server | [GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
soarca_server | Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
soarca_server | [GIN-debug] Listening and serving HTTP on :8080

Environment information
Docker compose see reproduce

docker-compose.yml ENABLE_FINS error

When using sudo docker-compose up you get an error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.soarca.environment.ENABLE_FINS contains true, which is an invalid type, it should be a string, number, or a null

This is because ENABLE_FINS: true is not between "", the setting should be ENABLE_FINS: "true".

If you change this manually it works.

Fin controller

Describe the solution you'd like
Fin controller package to allow for fin registration

Additional context
SOARCA has a extensible architecture realised by so called Fins, these need to be managed.

Fin protocol authentication model needs to be map of uuid:autstruct

Describe the bug
A clear and concise description of what the bug is.

To Reproduce provide details logs and steps

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment information
For example, docker deployment, native run (platform).

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.