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.comandServerAlias example.comwith your url to the
docker/apache-docker/default-ssl.conffile. - 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:localhostwill not work as the address due to the web server being inside of a docker container. - Replace
apache.crtandapache.keywith 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.htmlchangesrc="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.pywith the local/private address of your shell server. - Replace
'localhost'on line 5 inctfd-shell-plugin/server-scripts/shell_queue_recv.pywith 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