Skip to content

Commit

Permalink
adjustments so that plugins do not start the same c2 channels. all va… (
Browse files Browse the repository at this point in the history
mitre#820)

* adjustments so that plugins do not start the same c2 channels. all valid c2s are started after all the plugins have been loaded

* adjustments so that plugins do not start the same c2 channels. all valid c2s are started after all the plugins have been loaded
  • Loading branch information
brianedmonds90 authored and david committed Nov 22, 2019
1 parent 82d335f commit 8aa7c20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/service/app_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ async def resume_operations(self):
for op in await self.get_service('data_svc').locate('operations', match=dict(finish=None)):
self.loop.create_task(self.run_operation(op))

async def start_c2(self, app):
for c2 in await self.get_service('data_svc').locate('c2'):
c2.start(app)

async def run_operation(self, operation):
try:
self.log.debug('Starting operation: %s' % operation.name)
Expand Down
1 change: 1 addition & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def init(app, config, services):
app.router.add_route('POST', '/file/upload', services.get('file_svc').upload_exfil)

await app_svc.load_plugins()
await app_svc.start_c2(app)

runner = web.AppRunner(app)
await runner.setup()
Expand Down

0 comments on commit 8aa7c20

Please sign in to comment.