Giter VIP home page Giter VIP logo

venus's Introduction

Venus, Greek goddess

Venus

Venus is a VS Code extension that acts as an agent for Mythic C2. It produces a zipped folder of VS Code extension source code, which currently must be packaged by the operator before delivering to target/test machines manually or via social engineering.

✅ Mythic v2.2+ compatible since v0.2.0
✅ Cross-platform (tested on macOS, Linux, Windows)
⚠️ Doesn't support encrypted payloads yet, always use TLS

Installation

From the top-level directory of Mythic on your C2 server, run the command:

$ sudo ./mythic-cli install github https://github.com/MythicAgents/venus

or to install a specific Git branch of Venus:

$ sudo ./mythic-cli install github https://github.com/MythicAgents/venus branchname

Usage

First, create a Venus Payload in Mythic and download it to your local machine. Make sure you have Node.js installed then get the vsce package and compile your extension like so:

$ npm install -g vsce
$ unzip venus.zip
$ cd venus
$ vsce package

The extension must then be manually installed on target in Visual Studio Code. This can be done from the editor UI or from the CLI with:

$ code --install-extension venus-0.0.1.vsix

Commands

Command Syntax Description
current_user current_user Uses the os Node.js package to get information about the current user.
exit exit Exit a callback.
hostname hostname Uses the os Node.js package to return the target's hostname.
pwd pwd Prints the current working directory for the agent.
shell shell [command] Uses the execSync() Node.js function to execute arbitrary shell commands.

Thank you

Venus icon made by Freepik

Disclaimer

This is an open source project meant to be used with authorization to assess security posture, and for research purposes. The authors of this project are not liable for any damage caused by its misuse.

venus's People

Contributors

dependabot[bot] avatar mattreduce avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

venus's Issues

Pre-built extension connects to Mythic

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.

Add support for 'kill date'

Must exit while running, or not continue execution on start, if the previously defined date/time has passed

Payload build returns installable, benign extension

When an operator creates a Venus paylaod in Mythic, it gives back a pre-built VSIX file that technically works but:

  1. Doesn't connect to Mythic C2
  2. Doesn't contain any custom malicious code ("Hello world" is sufficient)

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.

Update usage instructions in README

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. ✨

Parameter has crypto_type none, but venus has no translation_container and venus doesn't want Mythic to handle encryption

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

Extract command implementations from extension.js

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.

Build and package VS Code extension on Payload create

Rather than return the same pre-built VSIX for every Mythic Payload created:

  1. Make a new one the standard way with yo code <name>
  2. Copy over or modify files in place as necessary
  3. Then package it all for installation with vsce package.

Modifications

  • Payload UUID
  • VS Code Extension name
  • VS Code Extension display name
  • VS Code Extension description
  • VS Code Extension publisher
  • VS Code Extension repository
  • VS Code Extension version
  • Callback host
  • Callback port
  • POST Request URI
  • User Agent
  • Callback interval

Pre-built extension supports one agent command

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:

Add support for exit command

  • process.exit() doesn't seem to work
  • process.kill(process.pid, 'SIGTERM') stops the entire extension host, which pops an alert and very obviously breaks the editor:

extension-host-terminated

Just stop the C2 loop and allow the extension process to stay alive?

Venus does display as available

[] mythic-cli version: v0.2.22
[
] Mythic Server version: v3.2.20-rc11
[*] React UI Version: v0.1.86

PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"

Venus is not available in the UI under Payloads\C2 Services. CLI shows it installed.
Name ContainerStatus ImageBuilt DockerComposeEntry
apollo Up 5 hours true true
dns Up 5 hours true true
nimplant Up 5 hours true true
venus Up 5 hours true true
apfell N/A false true
athena N/A false true
dynamichttp N/A false true
http N/A false true
httpx N/A false true
thanatos N/A false true

Is there a fix I'm missing? Thanks!

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.