Do you want to setup  hackathon at your place?  Are you confident in doing it? But failed to have a start….Right?

Wait! I have a solution . That’s FBCTF! Wondering whats that??? …… I will explain.

FBCTF – “Capture the Flag” is an open source platform to conduct Hackathon powered by FACEBOOK. Written in HACK language. It uses enough applications to setup environment, maintain security, load balancing and efficient processing. So we do not have to bother much about anything!

Is this interface seems interesting? Its Secure and featured too..! [Courtesy :: Facebook]

HOW TO INSTALL. 

Go, Read byheart This :: README. Over all give this page only second preference.

Before getting into it, beginners have to know something. Every better codes are preparing to be used in trial modes.

  • DEVELOPMENT MODE
  • TESTING MODE
  • PRODUCTION MODE.

Here we have 2 of them DEVELOPMENT MODE AND PRODUCTION MODE

I PREFER TO USE PRODUCTION MODE RATHER THAN DEVELOPMENT MODE IN THIS CASE.

Another thing we have to knew is about Vagrant. Vagrant is actually an application which encapsulate the whole programming environment configurations, such that, by unpacking the environment back via vagrant, the screen shot of same development platform can be regenerated. But i wont prefer to use it. If you want you can install vagrant and virtual box before next step and proceed via that way. 

  1. sudo apt-get install virtualbox
  2. sudo apt-get install vagrant
  3. cd /path/to/fbctf/
  4. vagrant up       (did not tried personally)

 Come to our point. Relax at one thing, you don’t have to know any coding for this. Though it is, don’t think it as complicated. Get your copy of CTF from GitHub/Facebook/FB-CTF. I expect everyone know our most popular code repository – Github

Now we want a fresh copy of Ubuntu 14.04 LTS. Take Care about verson. Currently FBCTF supports only at verson 14.04 LTE. 

Preferrably DONOT install anything in it. Open Terminal { using  `[ [CTRL] [ALT] [T] ]` } or open {CLI by `[ [CTRL][F1] ]` }   (To return to GUI `[ [CTRL][F7] ]` )

  1. sudo apt-get update
  2. sudo apt-get install git
  3. git clone https://github.com/facebook/fbctf/

Then minimise the window. Get into Home folder. 

there you see a folder named fbctf-master. rename it as  fbctf.   Open /home/fbctf/extra/provision.sh in gedit. there u have some lines to change.

set MODE = prod

comment out “git -C $CTF_PATH/ config core.filemode false“     //( Not recommented until not showing error in provisioning.)

set CODE_PATH  as /home//fbctf/

set CTF_PATH  as /var/www/fbctf/

If you are not using vagrant Find a word unison and comment this line. Unison is an application  which is used to keep live  file synchronization. in virtual machine and host machine. I ll explain scenario later. You can add a '#' in front of a line to comment it out.

okey, now almost of our provision.sh is ready.

now  GO TO TERMINAL, type:

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

setup will start installing these softwares. Sit back and relax!!

If you get any error on file/folder access on new terminal:

sudo chmod -R 0777 /path/to/folder/or/file

this enables Read/Write/Execuite permission to file / folder to owner, group and other users


Interested in Knowing What Happens in Provisioning??  Check Here.


HOPE YOUR INSTALLATION  IS OVER IN A GOOD MANNER.

Wait….!

Got to Browser: https://localhost/

Still you see error 502 on screen? Thats because of upgraded version of hhvm.

check  your hhvm verson.

hhvm –verson

 if its above 3.14.5! Try downgrade your hhvm!

sudo apt-get autoremove hhvm &&
wget http://dl.hhvm.com/ubuntu/pool/main/h/hhvm/hhvm_3.14.5~trusty_amd64.deb &&
sudo dpkg -i hhvm_3.14.5~trusty_amd64.deb

sudo apt-get -f install

[courtesy : ` https://github.com/facebook/fbctf/issues/215 ` ]


IF YOU HAVE ERRORS.

ubuntu have default log at

/var/log/hhvm/error.log

/var/log/hhvm/access.log

`/var/log/nginx/access.log`

`/var/log/nginx/error.log`

still getting?

” sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/var/run/hhvm/sock:”, host: “localhost” ”  –   This error at  nginx error log is probably HHVM hadn’t got its correct path on HHBC .  Read this


CHANGING LANGUAGE AND TEXT!!

Wanna customize interface???

var/www/fbctf/src/language/lang_en.php and modify the file.

The file will be in format.

(“key” =>”value”)

careful.. dont touch keys because they are the one which is referred in web page. change only second parameters.

Change not gettinf reflected to your site? fbctf feeling language not loading? Read this

Advertisements