Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .coveragerc

This file was deleted.

20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,30 @@ data/objectives/*
!data/objectives/.gitkeep
data/backup/*
!data/backup/.gitkeep
data/adversaries/*
data/adversaries/**/*.yml
!data/adversaries/.gitkeep
!data/adversaries/.gitkeep
data/operations/*
data/abilities/**/*.yml
!data/abilities/.gitkeep
!data/operations/.gitkeep
.tox/
node_modules/

plugins/mcp
plugins/automation
plugins/range
plugins/spp
mlruns/
mlruns.db
# coverage reports
htmlcov/
.coverage
.coverage.*
.coveragerc
*,cover
_*/
mlruns/
plugins/access/
plugins/response/
plugins/sandcat/
51 changes: 0 additions & 51 deletions .gitmodules

This file was deleted.

17 changes: 17 additions & 0 deletions AdversarySCHEMA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
adversary_id: 95cad57a-8e4f-4ba0-87cf-03d8a7cad0a0
name: TEST
description: ''
objective: 495a9828-cab1-44dd-a0ca-66e58177d8cc
atomic_ordering:
- ability_id: 36eecb80-ede3-442b-8774-956e906aff02
metadata:
executor_facts:
linux:
- trait: time.sleep
value: '10'
- ability_id: 36eecb80-ede3-442b-8774-956e906aff02
metadata:
executor_facts:
linux:
- trait: time.sleep
value: '3'
18 changes: 18 additions & 0 deletions app/api/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ async def enable(self):
self.app_svc.application.router.add_route('GET', '/file/download_exfil', self.download_exfil_file)
self.app_svc.application.router.add_route('GET', '/{tail:(?!plugin/|api/v2/).*}', self.handle_catch)

@check_authorization
async def enable_plugin(self, request):
Comment on lines 45 to +49
name = request.match_info['name']

plugin_manager = self.app_svc.get_service('plugin_manager')

await plugin_manager.enable_plugin(name)

plugin = (
await self.data_svc.locate('plugins', dict(name=name))
)[0]

plugin.enabled = True
await self.data_svc.store(plugin)

return web.json_response({'status': 'enabled'})


async def validate_login(self, request):
return await self.auth_svc.login_user(request)

Expand Down
Loading
Loading