Closed scmanjarrez closed 4 years ago
Are you saying that you have msf inside of a docker container and want to execute the commands in the container, or that the docker image with AS is bad?
@NullArray we could just add a --docker
flag and if it's passed don't use the sudo
keyword when executing the command. We could also check if the user is inside a docker container before executing just in case and if we determine they are we can either disallow them execution or automatically associate the flag as True
. What do you think?
Are you saying that you have msf inside of a docker container and want to execute the commands in the container, or that the docker image with AS is bad?
Correct, I'm trying to execute AutoSploit from a container without user input, using -e and -f arguments.
@scmanjarrez what do you think of the docker flag idea above? Or do you think it would work better to detect if the user is inside a docker container and go from there?
@scmanjarrez what do you think of the docker flag idea above? Or do you think it would work better to detect if the user is inside a docker container and go from there?
it's ok for me to use the --docker flag, right now I'm detecting if autosploit is running inside a docker container, but it would be better to make it general so it'll work regardless the container tool.
it's ok for me to use the --docker flag, right now I'm detecting if autosploit is running inside a docker container, but it would be better to make it general so it'll work regardless the container tool.
Alright I’ll create a way to determine if we’re inside a rocker container, that should make it more portable instead of creating a flag that will have to be passed.
Basically what I’ll do is just check if we’re inside a container, if we are, I’ll get it to run without sudo. It’ll be up to you to pass the path though (if needed)
fixed via https://github.com/NullArray/AutoSploit/commit/03020fd08bf6869ee240cf5d7d3499cd03452846 look for it in the next merge
Running information
- What branch did you download? Master - Clone, or docker run? Docker - What OS are you running? Kali GNU/linux rolling in host, Ubuntu 18.04.3 in docker # Exploit module informationProgram information
I have run AutoSploit in docker and it isn't working correctly. You can see that exploiter.py is executing the command "sudo msfconsole ...". In the docker machine there is no "sudo", so it fails the execution, then, "msfconsole" is not in PATH so it won't work either. After removal of "sudo"
and addition of msfconsole to path (or using --msf-path), it works flawlessly
Meanwhile, I'm adding these workarounds to my entrypoint.sh.