Ne0nd0g / merlin

Merlin is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in golang.
GNU General Public License v3.0
5.03k stars 798 forks source link

Agent folder is created with wrong permissions #77

Closed dzervas closed 4 years ago

dzervas commented 5 years ago

Prerequisite

Expected Behavior

On new agent connect, a folder with its ID should be created (ex. data/agents/xxxx-xxxx-xxxx) with the agent_log.txt inside

Actual Behavior

A folder with the agent ID is created, but with incorrect permissions:

dzervas merlin> ls -la data/agents
drwxr-xr-x dzervas dzervas  4 KB Sat Jul 27 10:23:02 2019 ./
drwxr-xr-x dzervas dzervas  4 KB Fri Jul 26 17:31:52 2019 ../
d--------- dzervas dzervas  4 KB Sat Jul 27 10:21:31 2019 b4d72e27-2a68-4024-801d-b753e4fc71a0/
d--------- dzervas dzervas  4 KB Sat Jul 27 10:23:02 2019 d03f0107-4b4c-4602-acf3-10d26ec5f793/
d--------- dzervas dzervas  4 KB Fri Jul 26 18:17:36 2019 fda3db0e-ca68-4498-b61a-153965549dbd/
.rw-r--r-- dzervas dzervas 29 B  Fri Jul 26 17:31:52 2019 README.MD

Steps to Reproduce Behavior

Start server and an agent

Misc Information

Ne0nd0g commented 5 years ago

I have fixed this in Dev branch a couple of commits back. Should be pushed to master soon.

Ne0nd0g commented 5 years ago

https://github.com/Ne0nd0g/merlin/commit/a589180a2808ad34f0baab1bdecc3a31f66f9db5#diff-315d352652679d33810577d5789f3255R774

Ne0nd0g commented 5 years ago

C:\Users\bob\Downloads\merlinServer-Windows-x64-v0.8.0.BETA>merlinServer-Windows-x64.exe --help [!]there was an error changing the file permissions for the agent log: chmod C:\Users\bob\Downloads\merlinServer-Windows-x64-v0.8.0.BETA\data\log\merlinServerLog.txt: not supported by windows #################################################

MERLIN SERVER

################################################# Version: 0.8.0.BETA Build: 2c1146fa39f65c96b8ccbcd915383e16441af063