Scripting Credentials

What does this hook into?

Scripting tasking involves the following RESTful endpoints on an instance of Mythic. This means you need to create a new Mythic instance (i.e. mythic = Mythic(username="blah" ... ) and then call these functions like mythic.get_all_tasks():
1
async def get_all_credentials(self) -> MythicResponse:
2
"""
3
Get all of the credentials associated with the user's current operation
4
:return:
5
"""
6
7
async def create_credential(self, credential: Credential) -> MythicResponse:
8
"""
9
Create a new credential associated with the user's current operation
10
:return:
11
"""
12
13
async def update_credential(self, credential: Credential) -> MythicResponse:
14
"""
15
Create a new credential associated with the user's current operation
16
:return:
17
"""
Copied!

How to create new credentials

Credential's type must be one of the following:
  • plaintext
  • certificate
  • hash
  • key
  • ticket
  • cookie
  • hex
To create a credential, you must supply a type, a realm (this is your domain if you're doing Windows), a credential (this is the actual credential value), and an account (who does this credential belong to). You can also optionally add a comment:
1
cred = mythic_rest.Credential(type="plaintext",
2
account="bob",
3
credential="my cred",
4
realm="my domain",
5
comment="yo new credz")
6
resp = await mythic.create_credential(cred)
7
await mythic_rest.json_print(resp)
Copied!