nginxhhvmhacklang

install FB CTF from scratch


Can I get how to install FBCTF Mannually. which all software is needed for that. from the scratch including server software for hack, nginx and all.


Solution

  • FB CTF in an open source hackathon conducting platform which is specially coded for Ubuntu v14.04LTE TRUSTY in hacklang(Language Derived from PHP, actually not PHP). It itself set up required environment.

    Download FBCTF from www.github.com/facebook.com/fbctf and extracted into home folder as /home/<username>/fbctf/

    All code of Project is there on /fbctf/src/

    Line no 49 to 59 :: file /fbctf/extra/provision.sh

     MODE="dev"                            # dev / prod   ///PREFERRABLY PROD
     NOREPOMODE=false    
     TYPE="self"                           # CTF ITSELF PRODUCE ITS CERTIFICATE
     KEYFILE="none"
     CERTFILE="none"
     DOMAIN="localhost"                    # DOMAIN YOU ARE GOING TO INSTALL
     EMAIL="none"
     CODE_PATH="/home/<username>/fbctf"    # by default `/vagrant` change it to where the downloaded code is present     
     CTF_PATH="/var/www/fbctf"             # by default it is /var/www/  change it if u need to install to some other destination. (Make sure that this path is access able to nginx and hhvm) 
     HHVM_CONFIG_PATH="/etc/hhvm/server.ini"
    

    this can be done by passing parameter to file. ----------------------------------------------------------------------------

    ON COMMAND PROMPT :

     cd fbctf
     ./extra/provision.sh prod `pwd`
    

    it will start installing software of its own. including

    [+] GIT

    [+] CURL

    [+] English Language pack

    [+] Python setup tools

    [+] memcached

    [+] mysql

    [+] php5

    [+] HHVM (VIRTUAL MACHINE TO PROCESS HACKLANG)

    [+] PHP COMPOSER (TO SOLVE PHP DEPENDANCY DATA)

    [+] NPM (NODE JS PACKAGE MANAGER)

    [+] NODEJS-Legasy

    [+] RUN GRUNT

    [+] NGINX (LOAD BALANCER)

    [+] UNISON(if not setting up in vagrant; u can comment this by using #; #install_unison used to sync vagrant and host data live)

    [+] MAKE DATABASE READY.

    Possibly if there is no errore and All Sync are set up perfectly, then work on localhost

    POSSIBLE ERRORS.

    Usually NGinx AND APACHE GO FOR PORT 80 (UNLESS HTTPS; WHICH IS 443) AND COLASHING OCCOURS. SO CHANGE APACHE PORT 80 TO SOME OTHER SUCH AS 8080 AND SHUT DOWM APACHE

    sudo service apache2 stop [OK]

    sudo service nginx restart [OK]