-
-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI bug fix and increased web logging
- Loading branch information
1 parent
11bfff6
commit 9852d5d
Showing
19 changed files
with
250 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.3.1-rc7 | ||
3.3.1-rc8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
jupyter-docker/jupyter/MythicExamples/AgentMessages.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "78922966-f039-4bde-baed-893afbc6492a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from mythic import mythic" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6fdb246e-7fd0-4660-9ad0-01431ea1e435", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"mythic_instance = await mythic.login(\n", | ||
" username=\"mythic_admin\",\n", | ||
" password=\"mythic_password\",\n", | ||
" server_ip=\"mythic_nginx\",\n", | ||
" server_port=7443,\n", | ||
" timeout=-1\n", | ||
" )" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "bb78634e-0127-48bf-b366-d033768841c3", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"## Send a JSON agent message as though it came from a certain callback and parse the response ###\n", | ||
"# This currently only works with 36 character UUID Strings and no translation containers\n", | ||
"# Must specify a C2 Profile and the Agent Callback ID so Mythic can look up the right crypto\n", | ||
"resp = await mythic.send_callback_agent_message_dict(mythic=mythic_instance,\n", | ||
" c2_profile=\"http\",\n", | ||
" agent_callback_id=\"69ed4277-4832-4d94-8536-d4137b97d7a0\",\n", | ||
" message={\n", | ||
" \"action\": \"update_info\",\n", | ||
" \"user\": \"bob\"\n", | ||
" })\n", | ||
"print(resp)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fef01140-4201-406e-bc69-e1b756035705", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"## Take a JSON message that a callback would send, encrypt it, and optionally include the UUID + base64 encode ##\n", | ||
"encryptedMsg = await mythic.local_encrypt_agent_message(mythic=mythic_instance,\n", | ||
" agent_callback_id=\"69ed4277-4832-4d94-8536-d4137b97d7a0\",\n", | ||
" include_uuid=True,\n", | ||
" base64_result=True,\n", | ||
" message={\n", | ||
" \"action\": \"update_info\",\n", | ||
" \"user\": \"heracles\"\n", | ||
" }\n", | ||
" )\n", | ||
"print(encryptedMsg)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "a3dc3c6f-296b-4bd8-9839-bab1acf7e8e3", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"## Take an existing, base64 message that an agent would send and forward it to Mythic, optionally processing the response ##\n", | ||
"resp = await mythic.send_callback_agent_message_base64(mythic=mythic_instance,\n", | ||
" c2_profile=\"http\",\n", | ||
" message=encryptedMsg,\n", | ||
" agent_callback_id=\"69ed4277-4832-4d94-8536-d4137b97d7a0\",\n", | ||
" decrypt_response=True)\n", | ||
"print(resp)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "b31bcf1c-7cc4-48ee-a539-b9a86373dcaa", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.3.1-rc7 | ||
3.3.1-rc8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.