Jimmy Astle

Launching msfconsole via Systemd

Discussion created by Jimmy Astle on Jun 29, 2017
Latest reply on Jun 29, 2017 by Null Security

Hi everyone,


Im trying to setup my Kali image so that when it boots up, systemd will launch some msf multi-handler listeners (on different ports).


Right now I have a shell script that launches things like so:

cd /resource/script/dir
msfconsole -q - r my-resource-script.rc


This script launches everything just fine when run in the foreground.

When I create a systemd service file and tell it to launch this script the listener never successfully starts up. Here is the example service file:


journalctl logs yield these results:

service errors.PNG

Im probably going about this all wrong.... Does anyone have any experience with this and doesn't mind sharing a hint or two