Ares 是一个 Python 远程访问工具。
警告:请仅根据您当前的法律法规使用本软件。滥用此软件可能会引发法律和道德问题,我不支持也不对此负责。
Ares 由两个主要程序组成:
Web 界面可以在任何运行 Python 的服务器上运行。代理可以使用 pyinstaller 编译为本机可执行文件。
安装 Python 依赖:
pip install -r requirements.txt
初始化数据库:
cd server
./ares.py initdb
为了在 Linux 上编译 Windows 代理,设置 wine(可选):
./wine_setup.sh
使用内置(调试)服务器运行:
./ares.py runserver -h 0.0.0.0 -p 8080 --threaded
或者使用 gunicorn 运行:
gunicorn ares:app -b 0.0.0.0:8080 --threads 20
现在可以通过 http://localhost:8080 访问服务器。
运行 Python 代理(根据需要更新 config.py):
cd agent
./agent.py
将新代理构建为独立的二进制文件:
./builder.py -p Linux --server http://localhost:8080 -o agent
./agent
要查看支持的选项列表,请运行 ./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.