clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices
MIT License
4.6k stars 980 forks source link

Caldera.service not found and SSH exits #100

Closed ORRacl closed 6 years ago

ORRacl commented 6 years ago

Description of the issue:

I get the following error when trying to build the environment. Upon running vagrant reload logger --provision I get the same error over and over. Caldera seems to start find if I manually run caldera.py from inside the vm.

logger: 2018-05-30 21:11:37 (493 KB/s) - ‘/home/vagrant/caldera/dep/crater/crater/CraterMain.exe’ saved [17920/17920]
    logger: Failed to start caldera.service: Unit caldera.service not found.
    logger: Failed to execute operation: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
ORRacl commented 6 years ago

Looks like when it was trying to copy the local resource files to the Logger host it was failing. Presumably because there is no vagrant directory.

screenshot

logger: cp: 
    logger: cannot stat '/vagrant/resources/caldera/mongod.service'
    logger: : No such file or directory
    logger: cp: 
    logger: cannot stat '/vagrant/resources/caldera/caldera.service'
    logger: : No such file or directory

This line in the bootstrap.sh

# Create Systemd service for Caldera
cp /vagrant/resources/caldera/caldera.service /lib/systemd/system/caldera.service
ORRacl commented 6 years ago

Just as an update, I am having the same types of problems with provisioning the windows VMs that I was able to fix by manually copying the local scripts and resources folder to c:\vagrant\ on each Windows host.

clong commented 6 years ago

@ORRacl Sorry for the massively delayed response. It sounds like your machine is having problem syncing folders over vmware. Did you happen to notice any errors around here?

==> dc: Enabling and configuring shared folders...
    dc: -- /path/DetectionLab/Vagrant: /vagrant
clong commented 6 years ago

Hey @ORRacl - just wanted to check in here to see if you had a chance to look at my comment. I'll leave this open for another week or so, but will be closing this issue after that if there's no update.