def base_world(app_config, agent_config): BaseWorld.clear_config() BaseWorld.apply_config('main', app_config) BaseWorld.apply_config('agents', agent_config) yield BaseWorld BaseWorld.clear_config()
def base_world(): BaseWorld.apply_config( name='main', config={ 'app.foo': 'foo', 'app.bar': 'bar', 'auth.baz': 'not an app. item' } ) yield BaseWorld BaseWorld.clear_config()
def base_world(): BaseWorld.clear_config() BaseWorld.apply_config( name='main', config={ 'users': { 'red': {'reduser': '******'}, 'blue': {'blueuser': '******'} } } ) yield BaseWorld BaseWorld.clear_config()
def base_world(): BaseWorld.clear_config() BaseWorld.apply_config( name='main', config={ CONFIG_API_KEY_RED: 'abc123', 'users': { 'red': {'reduser': '******'}, 'blue': {'blueuser': '******'} } } ) yield BaseWorld BaseWorld.clear_config()
def base_world(): main_conf = { 'app.contact.dns.domain': 'mycaldera.caldera', 'app.contact.dns.socket': '0.0.0.0:8853', 'app.contact.html': '/weather', 'app.contact.http': 'http://0.0.0.0:8888', 'app.contact.tcp': '0.0.0.0:7010', 'app.contact.tunnel.ssh.socket': '0.0.0.0:8022', 'app.contact.udp': '0.0.0.0:7013', 'app.contact.websocket': '0.0.0.0:7012', 'exfil_dir': '/tmp/caldera', 'plugins': ['stockpile', 'atomic'], 'reports_dir': '/tmp', 'host': '0.0.0.0', 'auth.login.handler.module': 'default', 'users': { 'red': { 'red': 'password-foo' }, 'blue': { 'blue': 'password-bar' } } } agents_conf = { 'sleep_min': '30', 'sleep_max': '60', 'untrusted_timer': '90', 'watchdog': '0', 'implant_name': 'splunkd', 'deadman_abilities': ['this-is-a-fake-ability'], 'bootstrap_abilities': ['this-is-another-fake-ability'] } BaseWorld.clear_config() BaseWorld.apply_config('main', main_conf) BaseWorld.apply_config('agents', agents_conf) yield BaseWorld BaseWorld.clear_config()
def base_world(): BaseWorld.clear_config() BaseWorld.apply_config(name='main', config={'app.contact.ftp.host': '0.0.0.0', 'app.contact.ftp.port': '2222', 'app.contact.ftp.pword': 'caldera', 'app.contact.ftp.server.dir': 'ftp_dir', 'app.contact.ftp.user': '******', 'plugins': ['sandcat', 'stockpile'], 'crypt_salt': 'BLAH', 'api_key': 'ADMIN123', 'encryption_key': 'ADMIN123'}) BaseWorld.apply_config(name='agents', config={'sleep_max': 5, 'sleep_min': 5, 'untrusted_timer': 90, 'watchdog': 0, 'implant_name': 'splunkd', 'bootstrap_abilities': [ '43b3754c-def4-4699-a673-1d85648fda6a' ]}) yield BaseWorld BaseWorld.clear_config()
def base_world(): BaseWorld.apply_config( name='main', config={ CONFIG_API_KEY_RED: cakr, 'users': { 'red': { 'reduser': '******' }, 'blue': { 'blueuser': '******' } }, 'crypt_salt': 'thisisdefinitelynotkosher', # Salt for file service instantiation 'encryption_key': 'andneitheristhis' # fake encryption key for file service instantiation }) yield BaseWorld BaseWorld.clear_config()