hsasctf / lxctf

Attack/Defense CTF Framework forked from iCTF-Framework for use at HS AlbSig (Albstadt-Sigmaringen University of Applied Sciences)
GNU General Public License v2.0
2 stars 3 forks source link

Webserver not starting #36

Closed antfeh closed 4 years ago

antfeh commented 4 years ago

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      2986/mysqld     
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      9258/redis-server 1
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      383/sshd        
tcp6       0      0 :::22                   :::*                    LISTEN      383/sshd```
@c-goes on startup of the web container no webservice is executed.
Should the webserver be installed manually or is there an ansible role, but it is just not executed?

Ansible didn't return a error on startup.
antfeh commented 4 years ago

Trying to install the requirements manually results in this error:


Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 13, in <module>
    from pip.exceptions import InstallationError, CommandError, PipError
  File "/usr/lib/python2.7/dist-packages/pip/exceptions.py", line 6, in <module>
    from pip._vendor.six import iteritems
  File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
    vendored("cachecontrol")
  File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
    __import__(modulename, globals(), locals(), level=0)
  File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
  File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
  File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 3, in <module>
  File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/__init__.py", line 53, in <module>
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 54, in <module>
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'```
c-goes commented 4 years ago

Which webservice? There are two. Register app and app (for the rest). You must run everything manually in the correct order. For demonstration purpose there is the demo1.py script. Register app is neither documented nor finished (it’s working except for config download there is the register_tornado script for production use).

Use pip3 for all dependencies (should be installed already)

Use pip2 for all flag script dependencies

antfeh commented 4 years ago

Thanks for the quick reply!

Domiroh commented 4 years ago

Is there a complete documentation for starting a game? Or is it only necessary to start the demo.py? And how can the Dashboard be accessed after the game was started? Is there a specific VPN to connect to?

c-goes commented 4 years ago

Demo is for Development only. See development.md (some parts) and run_a_game.md for a Description. Connect with any team vpn config. The dashboard reads the team number from the IP address when opening http://10.38.1.1:5000

Sent with GitHawk

Domiroh commented 4 years ago

Thank you, we will try it :)

c-goes commented 4 years ago

When you read the demo script you should understand the whole process 🙂

Sent with GitHawk

c-goes commented 4 years ago

Is there a complete documentation for starting a game?

Now there is (https://github.com/hsasctf/lxctf/blob/master/docs/run_a_game.md) At least I hope it's complete now