Git Product home page Git Product logo

Comments (85)

qazbnm456 avatar qazbnm456 commented on August 19, 2024 4

I've tried to run in dev mode with docker, and it works perfectly :) If anyone here ran into some problems, maybe you can try my method instead.

Here is the repo: dockerized_fbctf

from fbctf.

qazbnm456 avatar qazbnm456 commented on August 19, 2024 1

@NeoVilsonWong Everything goes well on my docker, perhaps you can try again or pull my image on dockerhub. Further instructions updated just now.

@gsingh93 Okay, I'll get any issues sorted out a.s.a.p. with docker solution. Once I've done, I'll send a PR immediatly.

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024 1

Hello @dubiza

I actually have a Wiki which explains what you were having issues with,
https://github.com/mehnomy/FBCTF-Ubuntu-Setup/wiki/Installing-FBCTF

The issue you were having was because Ubuntu Desktop does indeed have a different html directory then a normal Ubuntu Server which the provision script is setup to look for.

Kind Regards,
Byron Fisher

from fbctf.

Hackalicious avatar Hackalicious commented on August 19, 2024 1

I was finally able to open it. I have listed the steps below:

  1. Don't use desktop version of Ubuntu. I used: ubuntu-14.04.4-server-amd64

  2. Install SSL Certs:
    REF: http://stackoverflow.com/questions/37169378/facebook-open-source-project-fbctf-not-starting-after-installation

  3. Followed @mehnomy instructions
    REF: https://github.com/mehnomy/FBCTF-Ubuntu-Setup

NOTE: Flowtype install failed, however, I was still able to hit the interface. Site seems fully functional

  1. Followed provided instructions:
    sudo apt-get install git
    git clone https://github.com/facebook/fbctf
    cd fbctf
    ./extra/provision.sh prod $PWD

NOTE: Be sure to document the password.

REQUEST: Please provide instruction to change admin p/w via CLI. T.Y.I.A.

I hope this helps someone.

~ V/R ~

( ͡° ͜ʖ ͡°)

from fbctf.

adampankow avatar adampankow commented on August 19, 2024

I was in the same boat, utterly lost as to how to access the admin panel. Anyone care to toss us a bone?

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

Are you using the vagrant VM or your own server?

The platform runs on port 80 on whatever server you provision it on. So if you navigate to that URL/IP, what do you see? Is it blank?

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

well, i "installed" it in a VM with ubuntu 14.04.... when i type the 10.10.10.5:80 in the browser...nothing happens....

from fbctf.

patricktm17 avatar patricktm17 commented on August 19, 2024

same here.. D;

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

What was the command you ran exactly? From inside the repo, did you run ./extra/provision.sh prodpwd``? If you do this you will need to provide SSL certs. You should replaceprodwith`dev` in that command, which will take care of all of that for you (but it uses self-signed certificates, so you should not use it in production).

I'll be updating the README later today clarifying these things. Let me know if provisioning in dev mode fixes it for you, and sorry about the confusion.

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

I ran that command and provided the paths for the certificates....... ill try the dev!! post the results in a moment!!

from fbctf.

patricktm17 avatar patricktm17 commented on August 19, 2024

@gsingh93 ooh so we have to create our own certs?
when i ran the code it was asking for a place to store the certs for the "prod" one

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

@patricktm17 I've built mine!!

from fbctf.

patricktm17 avatar patricktm17 commented on August 19, 2024

@hashtag29 it worked for you using dev instead?

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@patricktm17 Yea, in prod mode you need to create your own certs. You don't want to be using self-signed certs in production for security reasons.

In dev mode, using a self-signed cert is fine, so we generate it for you.

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

@patricktm17 it is not done yet....just a min!

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

@gsingh93 i've sent you an email...did u read that? it is about my doubt...

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@patricktm17 correct as @gsingh93 mentioned. We will fix the wording on the prod prompt so it is more explicit.

from fbctf.

adampankow avatar adampankow commented on August 19, 2024

You guys will not be able to access it at 10.10.10.5 unless you configured your IP address to be that on the VM/box you've installed it on, so be sure you set your IP to that.

My question still stands though @gsingh93 , I can access the web server just fine, but I couldn't seem to find anything stating how to get to the admin panel.

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

using dev... nothing happens on the browser using 10.10.10.5

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@hashtag29 did you see any errors during provisioning? Do you see any errors in /var/log/hhvm/error.log? Do you see any errors in the console for the browser you're using?

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

Some part of the deployment.... @gsingh93

/usr/local/bin/flow -> /usr/local/lib/node_modules/flow-bin/cli.js

> [email protected] postinstall /usr/local/lib/node_modules/flow-bin
> node lib/install.js

  ✖ No binary found matching your system. It's probably not supported.
  ✖ flow binary test failed
[email protected] /usr/local/lib/node_modules/flow-bin
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Running "force:eslint" (force) task

Running "force-internal:pre:eslint" (force-internal) task
>> Enable force mode for task eslint.

Running "eslint:dist" (eslint) task

/var/www/fbctf/src/static/js/plugins.js
  51:9  error  Move function declaration to function body root  no-inner-declarations

✖ 1 problem (1 error, 0 warnings)

Warning: Task "eslint:dist" failed. Used --force, continuing.

Running "force-internal:post:eslint" (force-internal) task
>> Reset force mode for task eslint.

Running "run:flow" (run) task
execvp(): No such file or directory

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)
Warning: non-zero exit code 8 Use --force to continue.

Aborted due to warnings.
[+] nginx is already installed. skipping.
[+] Deploying certificates
Generating a 2048 bit RSA private key
..............................+++
..........................................+++
writing new private key to '/etc/nginx/certs/dev.key'
-----
Signature ok
subject=/O=Facebook CTF
Getting Private key
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
......................................Running "watch" task
Waiting...
......................................................+...........+..........+...........................................+.................................+............................................................................................................................................................+................................................+..............................................+.........................................+............................................................................................+.....................................................................................+.............................................................................................................................................................................+.+....................................................................+................+...+...............................................................................+...................................................................................................................................................................................+........................................................................+.............................................+............................................................+...............................+.....................................+...........................+..........................................................................................................................................+........................................................................................................................................................+.......................................................................................+......................................................................................................................................................................................................................+..+...............................................................+......................................+.........................................................................................................................................+.......................................+.........................................................................+.................................................................................................................................+..................................................+..........................................................................................................+.....................................................................................................................................................................................................................................................................................................+..........................................+...............................+.........................+.............+............................................................................................................................................+.............................................................................+........................................................................................................................+.....+...................+...................................................................................................................+...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................+........................................................................................................................................................................................................................+...........................................................................................................................................................................................................................................................................................................................................................................+......................................................................................................................................................................................................................................................................................................................+.............................+................................................................................................................................................................................................................+..+...................................................................................................+..+...............................................................................................................................................................................................................................................................................................................................................................................................................................+.....+.........+.............................................................................................+.............................................................................................+.................................+.......................................................................................................+..........................................................................................................................................+...............................+..........+.................+.........................................................................................................................................................................................................................................................................+.............................................................................................................................................................................................................................................................................................+.................................+.................+..................................................................+.........................................................................................................+............................+.............................................................................+................................................................................................................+.....+.................................................+................................................................................................................................................................................................................................................................................................................+.....................+............................................+............................................................................................+...+..........................................................+.............................................................................................................................................+.....................................................................................................................................................................................+................................................................................................................................................................+.......................+........................+.............................................................................+..........................+....................+..............................+..............................................+.......+................................................................................................................+..........................................+.....................................+................................................................................................+.........................................+.........+...............+......................................................+..........+........................+..................................................................................................................................+.........................................+.....................................+.......+........+...........................................................................................................................................................................................................................................................+.........+.....................................................++*++*
[sudo] password for fbctf: 
# Do not send nginx version number in error pages or server header
server_tokens off;

add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self'; frame-src 'self'; object-src 'none'";

server {
  listen 80;
  rewrite ^ https://$host$request_uri? permanent;
}

server {
  listen 443;

  ssl on;
  ssl_certificate /etc/nginx/certs/dev.crt;
  ssl_certificate_key /etc/nginx/certs/dev.key;

  ssl_prefer_server_ciphers on;
  ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';

  ssl_dhparam /etc/nginx/certs/dhparam.pem;

  ssl_session_cache shared:SSL:10m;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_stapling on;
  ssl_stapling_verify on;
  resolver 8.8.8.8 8.8.4.4 valid=300s;
  resolver_timeout 5s;

  add_header X-Frame-Options DENY;
  add_header X-Content-Type-Options nosniff;
  add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";

  add_header Cache-Control "no-cache, no-store";
  add_header Pragma "no-cache";
  expires -1;

  root /var/www/fbctf/src;
  index index.php;
  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
  error_page 400 401 402 403 404 500 /error.php;
  client_max_body_size 25M;
}
rm: não foi possível remover “/etc/nginx/sites-enabled/default”: Arquivo ou diretório não encontrado
ln: falhou ao criar link simbólico “/etc/nginx/sites-enabled/fbctf.conf”: Arquivo existe
nginx: [warn] "ssl_stapling" ignored, issuer certificate not found
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
 * Restarting nginx nginx                                                [ OK ] 
[+] Installing Unison 2.48.3
[+] Remember install the same version of unison (2.48.3) in your host machine
[+] Creating DB - fbctf
ERROR 1007 (HY000) at line 1: Can't create database 'fbctf'; database exists
[+] Importing schema...
[+] Importing countries...
[+] Importing logos...
[+] Creating user...
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'ctf'@'localhost'
[+] DB Connection file
[+] Adding default admin user
[+] The password for admin is: 
/var/www/fbctf/extra/lib.sh: linha 176: hhvm: comando não encontrado
[+] fbctf deployment is complete! Ready in https://10.10.10.5

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

Tried the same thing issue23 is asking... https://localhost ... got a bad gateway message

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024
/usr/local/bin/flow -> /usr/local/lib/node_modules/flow-bin/cli.js

> [email protected] postinstall /usr/local/lib/node_modules/flow-bin
> node lib/install.js

  ✖ No binary found matching your system. It's probably not supported.
  ✖ flow binary test failed

Yea, that's the problem. If you don't have flow, the Flow won't be compiled into JavaScript won't be compiled.

I'm not sure why this would be happening on an Ubuntu 14.04 VM. Can you run npm install -g flow-bin to install flow again? Then run flow version.

This is one of the reasons we recommend using our Vagrant VM :)

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@adampankow

I can access the web server just fine, but I couldn't seem to find anything stating how to get to the admin panel.

I added this text to the README:

"Once you've provisioned the VM, go to the URL/IP of the server. Click the "Login" link at the top right, enter the admin credentials, and you'll be redirected to the admin page."

Is that what you tried?

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

@gsingh93 another error...

/usr/local/bin/flow -> /usr/local/lib/node_modules/flow-bin/cli.js

[email protected] postinstall /usr/local/lib/node_modules/flow-bin
node lib/install.js

✖ No binary found matching your system. It's probably not supported.
✖ flow binary test failed
[email protected] /usr/local/lib/node_modules/flow-bin
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
root@fbctf-VirtualBox:/home/fbctf# flow ver
execvp(): No such file or directory

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)

Ill try vagrant VM

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@hashtag29 ,i try generating and solve ssl problem but after surfing nothing you solve it?

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

Not yet @NeoVilsonWong

from fbctf.

notakay avatar notakay commented on August 19, 2024

Excuse me but I tried running ./extra/provision.sh dev 'pwd' . after a series of complicated lines, I get "[+] fbctf deployment is complete! Ready in https://10.10.10.5" I copy and pasted it in the browser but the page was blank

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@TheControlFreak could you provide us with a paste of the stdout/stderr after you run the script?
Also any console logs in your browser when you open the blank page?

We noticed people were having issues accessing https://10.10.10.5 when connected to certain VPNs. Are you on one?

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole ,i try using vps to install , btw i try access the ip its blank also

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole ,

here the log
fbctfinstall.log.txt

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@NeoVilsonWong I see that your locale settings might not be configured correctly.

Could you follow the steps to fix that in this thread (http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue) and try it again?

If you are still hitting the blank page, could you also paste the logs in /var/log/hhvm/error.log for us ?

from fbctf.

notakay avatar notakay commented on August 19, 2024

@mpomarole I went through my output again and I found the following problems
Error.txt

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole okay
screen shot 2016-05-12 at 3 15 56 pm

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole

new rerun log
rerunfbctfinstall.log.txt

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole
screen shot 2016-05-12 at 3 22 37 pm

fatal error missing

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@qazbnm456 ,
thanks but can it run in server ip?or just 10.10.10.5?

from fbctf.

qazbnm456 avatar qazbnm456 commented on August 19, 2024

@NeoVilsonWong You can bind ports to your host like -p 81:80, which means that you can access to internal fbctf server(port 80) through your host ip(port 81).

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@qazbnm456

here error
screen shot 2016-05-12 at 3 59 00 pm

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@qazbnm456 Dockerizing was on our roadmap, so a PR once you get any issues sorted out would be great!

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@NeoVilsonWong did you fix your locale settings before provisioning again?

from fbctf.

NeoVilsonWong avatar NeoVilsonWong commented on August 19, 2024

@mpomarole ,Yes

from fbctf.

imfht avatar imfht commented on August 19, 2024

Hello,everyone.I'm trying to install this on my vps. My step is:

  1. install git: apt-get install git
  2. get the source code: git clone https://github.com/facebook/fbctf
  3. install it as READ ME: cd fbctf && ./extra/provision.sh prod pwd
  4. when It show's

-> SSL Certificate file location?

I typed enter and the script continue run
5. Install completed, It shows

[+] Installing Unison 2.48.3
[+] Remember install the same version of unison (2.48.3) in your host machine
[+] Creating DB - fbctf
[+] Importing schema...
[+] Importing countries...
[+] Importing logos...
[+] Creating user...
[+] DB Connection file
[+] Adding default admin user
[+] The password for admin is: 0eb1a4e0380ac5c34aa6bcdf058b101d
[+] fbctf deployment is complete! Ready in https://10.10.10.5

And what show I do next? how can I visit the website.
I've tried w3m https://10.10.10.5 in the command line and visit https://myipaddress but the website did not work. May somebody helps me. Best wishes!

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@fiht you want to be running

./extra/provision.sh prod `pwd`

instead of

./extra/provision.sh prod pwd

If you are deploying in prod, you need to add the SSL certificate you have for your site when the provisioning script prompts you. If you do not have a certificate ready yet, you can just provision on dev mode (./extra/provision.sh dev pwd) and the script will issue self-signed certificates for you. Check issue #24 for improvements on this workflow.

from fbctf.

rafaeloliveira29-zz avatar rafaeloliveira29-zz commented on August 19, 2024

still not running.... :(

from fbctf.

adampankow avatar adampankow commented on August 19, 2024

@gsingh93 I tried logging in with the creds, but it just sat at the login screen.

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@adampankow what creds did you use to login?
In dev provision, the username is admin and password is password.
In prod, the username is admin and the password is printed at the very end of the provision script.

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@adampankow when you say "sat at the login screen", did the input fields turn red (indicating an incorrect username/password)?

If nothing happens, not even a change of color, do you see errors in /var/log/hhvm/error.log? Did you see any errors while provisioning?

from fbctf.

MrClever00 avatar MrClever00 commented on August 19, 2024

blank page in 10.10.10.5

from fbctf.

MrClever00 avatar MrClever00 commented on August 19, 2024

@mpomarole ./extra/provision.sh prodpwd``it stucks in somewhere

from fbctf.

 avatar commented on August 19, 2024

I get the following in **/var/log/hhvm/error.log

** [hphp] [7772:7f137a3ff700:1:000001] [] \nFatal error: require_once(../vendor/autoload.php): File not found in /var/www/fbctf/src/index.php on line 3

When I browse to the Ip of my server I get an nginx 500 error.

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@mjksec please try the suggestion I added on this issue: #28

I am going to guess your locale is not set correctly.

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@MrClever00 can you provide us with the output of you provision script so we can help you?

from fbctf.

 avatar commented on August 19, 2024

@mpomarole I tried your suggestion. Provisioned a new fresh system. First steps were to ensure that locale was set correctly before beginning.
Still same error.

Sat May 14 13:00:03 2016] [hphp] [8549:7f0689fff700:1:000001] [] \nFatal error: require_once(../vendor/autoload.php): File not found in /var/www/fbctf/src/index.php on line 3

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@mjksec could you paste the entire output of the provision script please ?

from fbctf.

MrClever00 avatar MrClever00 commented on August 19, 2024

Can't someone just add a video instructions ?? you know the easiest way

from fbctf.

qazbnm456 avatar qazbnm456 commented on August 19, 2024

@MrClever00 You forgot to quote pwd with backticks. You're supposed to type ./extra/provision.sh dev pwd``, and paste entire logs to pastebin if you still failed to deploy.

from fbctf.

MrClever00 avatar MrClever00 commented on August 19, 2024

@qazbnm456 http://pastebin.com/kM79Vxhy nope still i cant connect the site

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@MrClever00 are you running on a physical machine or on a VM? Have you tried using Vagrant?

from fbctf.

MrClever00 avatar MrClever00 commented on August 19, 2024

[Mon May 16 18:24:45 2016] [hphp] [1521:7f97be3ff700:2:000001] [] \nNotice: A session had already been started - ignoring session_start() in /var/www/fbctf/src/SessionUtils.php on line 32 why is this

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

@MrClever00 that warning isn't important. Are there no other errors in your log? Have you tried using Vagrant?

from fbctf.

dubiza avatar dubiza commented on August 19, 2024

I'm in the same boat as @MrClever00 I think. I'm just trying to provision in dev mode because I want to play around with FBCTF. I'm running Ubuntu 14.04 LTS in a VMWare VM on a Windows host so I'm trying to provision without using Vagrant and VBox. It runs through the whole process and says it's ready to go on IP 10.0.0.5 which isn't the IP of the VM. I try opening the CTF homepage using localhost or even the actual IP of the server and get a blank page.

When I checked the log I also see the error :
require_once(../vendor/autoload.php): File not found in /var/www/fbctf/src/index.php on line 3

I've also tried the locale fix thing but all seems okay there. Any other ideas @mpomarole ?

from fbctf.

marjoripomarole avatar marjoripomarole commented on August 19, 2024

@dubiza can you post the output of the provision script?

from fbctf.

TerenceTanWT avatar TerenceTanWT commented on August 19, 2024

I'm facing the exact same issue as @dubiza except that I'm running Ubuntu 14.04 LTS in a VirtualBox VM on an OSX host.

from fbctf.

Nimdy avatar Nimdy commented on August 19, 2024

Type exit from the terminal

then login with your user name and password (UBUNTU)

The Facebook CTF splash will show and display the IP address it is using.

Also type ifconfig and see what the IP is set in eth0.

The 10.10.10.5 is a LIE the CAKE is a LIE!!!

You can set your eth0 to that IP but if you have your network configurations within VMware software misconfigured it will not work. This is why I recommend doing a "Shared NAT" this option is found in the VMware VM networking configurations.

I installed this on VMware and share the NAT. My host machines IP was 192.168.0.100 and my VMware FBCTF IP was 192.168.168.123

I then accessed the FBCTF by typing in my host machine address bar 192.168.168.123 and I was able to access it.

Mind you, the prod script still said my FBCTF was 10.10.10.5 but the FBCTF splash screen said 192.168.168.123

I did have issues with SSL certs but the error logs in NGINX showed certs not found, that's when I copied them over and restarted the VM and everything worked.

Let me know

-Nimdy

FYI changed my name from nimdavirus to Nimdy

from fbctf.

dubiza avatar dubiza commented on August 19, 2024

@Nimdy - No joy. I'm not exactly sure what you mean by "then login with your user name and password (UBUNTU)" though. I'm already logged in and typing exit into terminal doesn't log out obviously.

from fbctf.

dubiza avatar dubiza commented on August 19, 2024

@mpomarole this is a really novice question but I'm not super familiar with Linux and working in terminal. I'm trying to pass the script output to a text file using the > operator after the provisioning command. When I do that it seems to have issues running through the provisioning script. If I leave that off it gets much further along. So basically I keep getting a different output when I use ./extra/provision.sh dev``pwd``> ../Desktop/fbctf.txt

from fbctf.

Nimdy avatar Nimdy commented on August 19, 2024

When you type exit in the terminal it should log you out. Unless you have entered into root. Keep typing exit until you see a login promote.

Also... I found better success installing using:

./extra/provision.sh prod pwd

Generate the SSL certs and copy them into the: (Name the files as fbctf.csr and fbctf.key)

/etc/nginx/certs/

fbctf.csr and fbctf.key

reboot the server

rerun the script

./extra/provision.sh dev pwd

access the IP address via browser (success?)

reboot the server

rerun the script

./extra/provision.sh prod pwd

access the IP address via browser (success?)

I have tested this for the 15th time in ubuntu-14.04.4-server-amd64 with no server packages installed.

Let me know

from fbctf.

dubiza avatar dubiza commented on August 19, 2024

I've been trying this in Ubuntu Desktop 14.04. I just switched over to Ubuntu Server now and repeated and it seems to now be working. I guess there are some required libraries or files or something not found in Desktop? Anway, it's working for me now.

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

i installed it on vagrant VM,but when I browse to the 10.10.10.5 I get an nginx 502 error

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024

Hello @evilchurch,

Could you please reframe from asking the same question in multiple issues, we can see you're having an issue and you posted the same exact word for word question in:
#94

quote MehNomy:
are you trying to build the Production deployment or the Development deployment?
is the provision script running without any errors?

Please reply back in this issue.

Kind Regards,
Byron Fisher

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

@mehnomy I'm sorry for asking the same question. I try to build the Development deployment. When i type cat /var/log/hhvm/error.log it tells no such file

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024

@evilchurch,

could you please copy and paste the provision output into a paste bin please.

Kind Regards,
Byron Fisher

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024

The password for the user admin will be printed in the console at the end of provisioning, as it is randomly generated everytime the CTF platform is provisioned. We will add a way to change this password from the command line in the near future (in the meantime, you can figure out how to do it manually by looking at the import_empty_db function in ./extra/lib.sh.

Kind Regards,
Byron Fisher

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

I installed it on my vps just now.
My steps are:
apt-get install git
git clone https://github.com/facebook/fbctf
cd fbctf
./extra/provision.sh prod $PWD
But i cant open it.I dont know i should type my vps's IP or 10.10.10.5 in browse.And when i type cat /var/log/nginx/error.log it shows
2016/05/20 11:47:56 [emerg] 9944#0: BIO_new_file("/etc/nginx/certs/fbctf.csr") failed (SSL: error:02001002: system library:fopen:No such file or directory:fopen('/etc/nginx/certs/fbctf.csr','r') error:2006D080:BIO r outines:BIO_new_file:no such file)
2016/05/20 11:47:56 [emerg] 9964#0: BIO_new_file("/etc/nginx/certs/fbctf.csr") failed (SSL: error:02001002: system library:fopen:No such file or directory:fopen('/etc/nginx/certs/fbctf.csr','r') error:2006D080:BIO r outines:BIO_new_file:no such file)
Anyone help me? Thanks

from fbctf.

arphanetx avatar arphanetx commented on August 19, 2024

i just installed the server in a VM, with Ubuntu 14.04, generate the crs and key, but when i hit https://myip i just get a security warning to add the exception, and after that just got a blank page... with out any Login option or anything else. Can someone help me? thanks

from fbctf.

arphanetx avatar arphanetx commented on August 19, 2024

@evilchurch just follow this to create the certs:
cd /etc/nginx/certs
openssl genrsa -des3 -out self-ssl.key 2048
openssl req -new -key self-ssl.key -out self-ssl.csr
cp -v self-ssl.{key,original}
openssl rsa -in self-ssl.original -out self-ssl.key
rm -v self-ssl.original
openssl x509 -req -days 4000 -in self-ssl.csr -signkey self-ssl.key -out self-ssl.crt
mv self-ssl.crt fbctf.csr
mv self-ssl.key fbctf.key

restart the service

Looks like the certificate file is missing - your nginx config says:

ssl_certificate /etc/nginx/certs/fbctf.csr;
ssl_certificate_key /etc/nginx/certs/fbctf.key;

check if those two files exist.

If they do not exist - just create them:

cd /etc/nginx/certs
openssl genrsa -des3 -out self-ssl.key 2048
openssl req -new -key self-ssl.key -out self-ssl.csr
cp -v self-ssl.{key,original}
openssl rsa -in self-ssl.original -out self-ssl.key
rm -v self-ssl.original
openssl x509 -req -days 4000 -in self-ssl.csr -signkey self-ssl.key -out self-ssl.crt
mv self-ssl.crt fbctf.csr
mv self-ssl.key fbctf.key

then restart your nginx server:

service nginx restart

is not mine, is a link i found to solve this http://stackoverflow.com/questions/37169378/facebook-open-source-project-fbctf-not-starting-after-installation

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024

@evilchurch please take a look at what arphanetx has provided you, a CSR file is not your CRT or KEY file. You should be typing in your VPS IP address, not 10.10.10.5. Could you please provide a copy of your provision output into a paste bin.

  • If you're using a VPS it is highly unrecommended to be using a self signed Certificate if you want a free Certificate you can get one from https://letsencrypt.org i would also recommend getting a domain name since some browsers look for a domain name even though you can use a IP address as the common name its not recommended as it may not work on some devices.
    • You can get cheap Domains from goDaddy (Not recommended they tend to sell your information) I would suggest using NameCheap they current have a $0.88 sale going on comes with a free Whois Guard (protects your information) and a real SSL Certificate is another $2 ontop which is pretty cheap. Domain Names & SSL Certificates both last 12months so for under $3 its not a bad deal.

@arphanetx are you using Ubuntu 14.04 64bit?
Please make sure you have completed everything which is listed in my guide:
The Guide

  • if your problem persists could you please copy and paste your provision output into a paste bin please.

Kind Regards,
Byron Fisher

from fbctf.

arphanetx avatar arphanetx commented on August 19, 2024

@mehnomy ok i did step by step ( ctr+c, ctrl+v ) all the manual and when i add the exception warning to get into the console i got a blank webpage, i will paste you the link for my logs https://github.com/arphanetx/Test/blob/master/log.txt, thanks a lot.

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

@mehnomy @arphanetx It woked! I made it just now. Thank you.

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

@mehnomy I cant register a team. I cant login. So it's a universal question? btw what's the management page?

from fbctf.

byronfisher avatar byronfisher commented on August 19, 2024

@evilchurch

  • login with username admin and the password was provided to you at the end of the output of the provision script.
  • registration might be disabled in the administrator backend, turn it on once you have logged in.

Regards,
Byron

from fbctf.

root2ch avatar root2ch commented on August 19, 2024

@mehnomy ok got it

from fbctf.

arphanetx avatar arphanetx commented on August 19, 2024

@mehnomy i got a new error, after leave this for the week end, i got a 502 error Nginx, i was checking my listen ports:

tcp 0 0 0.0.0.0:80 0.0.0.0:*
tcp 0 0 127.0.1.1:53 0.0.0.0:*
tcp 0 0 0.0.0.0:22 0.0.0.0:*
tcp 0 0 0.0.0.0:443 0.0.0.0:*
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
tcp6 0 0 :::22 :::*
tcp6 0 0 :::9000 :::*

and checking the .conf files some of them are trying to reach 127.0.0.1:9000 so i guess that is the issue, any chance to help me? thanks a lot!

*Edited:
i just start the nginx services and hhvm... and the 9000 port just open.. now when i try to access https://myip i just got a blank web page

from fbctf.

gsingh93 avatar gsingh93 commented on August 19, 2024

This issue has gotten fairly large. If you're still having a problem setting up the repo, make a new issue, and we'll help you individually there.

from fbctf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.