Plugin for CTFd that integrates a web based shell using docker containers.
There are a few manual configurations you will have to do in order to succesfully setup the plugin.
The web based shell is routed through an Apache web server with ssl enabled and then passed to the shellinabox container locally.
In order to setup the Apache web server for your ctf you have to make a few changes.
- Add
ServerName www.example.com
andServerAlias example.com
with your url to the
docker/apache-docker/default-ssl.conf
file. - Change
ProxyPass / http://192.168.1.68:4300/
andProxyPass /shell http://192.168.1.68:4300/
to the local/private address of your shell server.
Note:localhost
will not work as the address due to the web server being inside of a docker container. - Replace
apache.crt
andapache.key
with your own certificates.
The plugin files need a few changes in order for it to work properly for your ctf.
- In
ctfd-shell-plugin/shell-plugin/shell-templates/shell.html
changesrc="https://shell.ctf.tamu.edu/shell/"
to the public address of your shell server. - Replace
'localhost'
on line 27 inctfd-shell-plugin/shell-plugin/shell.py
with the local/private address of your shell server. - Replace
'localhost'
on line 5 inctfd-shell-plugin/server-scripts/shell_queue_recv.py
with the local/private address of your shell server. - Copy shell-plugin directory into to the plugins directory of CTFd
The final configuration needed is to just build and launch the docker containers.
Run ./setup.sh