Skip to content

Commit 01eea3e

Browse files
committed
fix: Caldera image config updates to improve offline use
* bump Caldera version * pre-install Caldera UI dependencies and build UI * pre-install additional plugin packages The last two bullets above help to speed up Caldera server start times, as well as operating as expected when there is no tap allowing internet access for an experiment (normally the UI and plugin dependencies are installed in real-time when the server is started).
1 parent 4b27dea commit 01eea3e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/go/api/config/default/caldera.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,36 @@ spec:
4444
&& ln -s /usr/local/go/bin/* /usr/local/bin \
4545
&& export GOROOT=/usr/local/go
4646
47-
mkdir -p /go/src /go/bin
48-
chmod -R 777 /go
49-
50-
git clone --recursive --branch 5.1.0 https://github.com/mitre/caldera.git /opt/caldera
47+
git clone --recursive --branch 5.2.0 https://github.com/mitre/caldera.git /opt/caldera
48+
cd /opt/caldera/plugins/magma && rm -f package-lock.json ; npm install ; npm run build
49+
cd /opt/caldera/plugins/sandcat && go install
5150
cd /opt/caldera && python3 -m pip install --break-system-packages -r requirements.txt
5251
5352
git submodule add -b facts https://github.com/activeshadow/caldera-modbus.git plugins/modbus
5453
git submodule add -b main https://github.com/activeshadow/caldera-dnp3.git plugins/dnp3
5554
git submodule add -b main https://github.com/activeshadow/caldera-ot.git plugins/ot
5655
git submodule add -b main https://github.com/activeshadow/caldera-phenix.git plugins/phenix
5756
57+
# Installing here to prevent Caldera from trying to reach out during startup.
58+
git clone --depth 1 https://github.com/redcanaryco/atomic-red-team.git /opt/caldera/plugins/atomic/data/atomic-red-team
59+
60+
# Installing here to prevent Caldera from trying to reach out during startup.
61+
go install github.com/jlaffaye/ftp@latest
62+
go install github.com/google/go-github/github@latest
63+
go install golang.org/x/oauth2@latest
64+
go install gopkg.in/natefinch/npipe.v2@latest
65+
go install github.com/aws/aws-sdk-go@latest
66+
go install github.com/aws/aws-sdk-go/aws@latest
67+
go install github.com/miekg/dns@latest
68+
5869
cat > /etc/systemd/system/caldera.service <<EOF
5970
[Unit]
6071
Description=CALDERA Framework
6172
6273
[Service]
6374
WorkingDirectory=/opt/caldera
64-
ExecStart=/usr/bin/python3 server.py --insecure --build --log INFO
75+
Environment=GOROOT=/root/go
76+
ExecStart=/usr/bin/python3 server.py --insecure --log INFO
6577
6678
[Install]
6779
WantedBy=multi-user.target

0 commit comments

Comments
 (0)