GithubHelp home page GithubHelp logo

mock's Introduction

MITRE Caldera Plugin: Mock

The mock plugin adds simulated agents to Caldera, which can be used in normal operations. These simulated agents use mock responses, which can be added for any ability.

mock's People

Contributors

argaudreau avatar brianedmonds90 avatar cdjellen avatar christophert avatar clenk avatar elegantmoose avatar heatonk avatar iguannalin avatar mshkolnik22 avatar privateducky avatar uruwhy avatar wbooth avatar

Stargazers

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

Watchers

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

mock's Issues

Mock - No GUI Component for this plugin

When using the mock plugin, here is the error displayed

image

Just figured out, there is actually no GUI as it pops new fake agents. Would be nice to have a clear statement.

IndexError issue from Mock plugin

Describe the bug
When I ran an operation with the default sandcat agent (deployed locally) and default discovery adversary, everything seems normal. But the terminal showed a bunch of index out of range errors:

Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
2020-10-18 01:33:44 - ERROR (rest_svc.py:238 validate) <HTTPBadRequest Bad Request not prepared>
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None
Traceback (most recent call last):
  File "/home/yulizhou/caldera/plugins/mock/app/simulation_svc.py", line 36, in run
    agent = (await self.data_svc.locate('agents', match=dict(paw=str(agent.paw))))[0]
IndexError: list index out of range
None

I added every plugin to the default.yml. The operation ran normally and every ability succeeded. But I'm wondering if there's some config I missed and the errors may appear in the future operation.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a sandcat agent
  2. run an operation with discovery adversary

Desktop (please complete the following information):

  • OS: Ubuntu 1804
  • Browser: Firefox
  • Version: 2.8.1

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.