mythicagents / venus Goto Github PK
View Code? Open in Web Editor NEWA Visual Studio Code Extension agent for Mythic C2
License: BSD 3-Clause "New" or "Revised" License
A Visual Studio Code Extension agent for Mythic C2
License: BSD 3-Clause "New" or "Revised" License
VS Code's Clipboard API provides read/write capability and applies to the system clipboard, so we can make this work the way Apfell's clipboard
command does: https://code.visualstudio.com/api/references/vscode-api#Clipboard
Rather than return the same pre-built VSIX for every Mythic Payload created:
yo code <name>
vsce package
.Combining upload
and run
Then refactor to cleanup any overly-simple code from the first pass at command support
When an operator creates a Venus paylaod in Mythic, it gives back a pre-built VSIX file that technically works but:
Essentially a VSIX file needs to go in Payload_Types/venus/agent_code/
and get read and returned during the build process.
This confirms that all of the mechanics of installing the external Payload works, as well as getting an installable VS Code extension from the build process.
Doesn't really matter what it does. Still not building and packaging an extension on Payload creation.
Before moving on to a C2 loop and executing commands requested by an operator, we need some way of storing state at least to keep track of the callback UUID returned by Mythic on checkin, and probably other things. I would prefer to use something built into VS Code for stealth and durability, so I've decided to go with
ExtensionContext.globalState
, which is a global key/value store that persists across VS Code sessions. Docs on that:
Now that there are more than a couple of commands and complexity is increasing. Place each command's source into its own file then pull into extension.js
. Will need some sort of command name to function mapping.
Need to determine the correct way to do this with setInterval()
in Node.js
https://code.visualstudio.com/api/working-with-extensions/bundling-extension
Minify, as well ("compacts source code by removing whitespace and comments and by changing variable and function names into something ugly but short").
Depends on #15
Must exit while running, or not continue execution on start, if the previously defined date/time has passed
HTTP C2 parameter is called query_path_name
Using vscode.window.showInformationMessage()
ls
cat
rm
cd
Payload build process does not produce a .vsix
file—it returns a zipped folder of the extension's source, which should be modified and then packaged for installation by operators with vsce package
.
I plan to support both a finished .vsix
and source .zip
payload download in the future. ✨
Need to sort out Node.js build environment issues first
Write to the extension's section of VS Code global storage, or an arbitrary location (with a warning?)
Still not dynamically generating and packaging an extension with yo code <name>
and vsce package
, but the pre-built extension contains enough code to check in with Mythic and nothing else.
Currently vsce package
throws a warning that you need to acknowledge
Goes in documentation-payload/
Not being able to directly manipulate the values in global storage like a callback UUID makes some testing frustrating.
Memento API: https://code.visualstudio.com/api/references/vscode-api#Memento
Using a .vscodeignore
file
Depends on #15
Hey,
I'm using Mythic 2.3.7 and Venus 0.3.0 and I'm getting the following error when I try to generate a Venus payload:
"Parameter has crypto_type none, but venus has no translation_container and venus doesn't want Mythic to handle encryption"
I've tried changing some of the build and C2 parameters but I got the same error every time.
I also couldn't find any documentation regarding that error, so I would really appreciate any help or direction I can get in that matter.
I'm running my entire Mythic setup on an Ubuntu 20.04 VM.
Also worth mentioning that other Mythic payloads are installed and generated successfully (such as Merlin and Poseidon)
Thanks,
Bar
Are you planning to update Venus for Mythic 3.0?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.