Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

PlatformUbuntu

wesyoung edited this page Oct 21, 2014 · 73 revisions

Overview

This installation generally takes 10-15min on hardware with more than 4 cores.

Setting up the Environment

Because @giovino is so awesome, the helper script will configure apache2, bind and install CIF to /opt/cif for you, as well as install any required dependencies too!

  1. Update your environment, pull down the master and bash the easy-button!
$ sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y htop build-essential automake autoconf git
$ git clone https://github.com/csirtgadgets/massive-octo-spice.git -b master
$ cd massive-octo-spice
$ bash autogen.sh
$ sudo bash ./hacking/platforms/easybutton.sh

Testing

  1. test connectivity to the router
$ curl -k -w "\n" -XGET 'https://localhost:443/ping?token=1234' -H "Accept: application/vnd.cif.v2+json"
{"timestamp":[1400585768,265584]}

note: if you get something other than the resulting timestamp, first stop then re-start apache2 and try again.

  1. perform an initial cif-smrt test run
$ sudo /opt/cif/bin/cif-smrt --testmode -d --token 1234 --no-verify-ssl
[2014-10-21T15:17:10,668Z][INFO][main:322]: cleaning up tmp: /var/smrt/cache
[2014-10-21T15:17:10,691Z][DEBUG][main:294]: id4.us - ssh
[2014-10-21T15:17:10,691Z][INFO][main:295]: processing: /opt/cif/bin/cif-smrt -d -r /etc/cif/rules/default/1d4_us.yml -f ssh
[2014-10-21T15:17:10,692Z][INFO][CIF::Smrt:92]: starting at: 2014-10-21T00:00:00Z
[2014-10-21T15:17:10,692Z][DEBUG][CIF::Smrt:97]: fetching...
[2014-10-21T15:17:10,692Z][DEBUG][CIF::Smrt::Fetcher:81]: pulling: http://1d4.us/archive/ssh-today.txt
[2014-10-21T15:17:10,963Z][DEBUG][CIF::Smrt::Fetcher:90]: status: 200 OK
[2014-10-21T15:17:10,963Z][DEBUG][CIF::Smrt:100]: cache: /var/smrt/cache/id4.us-ssh
[2014-10-21T15:17:10,963Z][DEBUG][CIF::Smrt:103]: decoding..
[2014-10-21T15:17:10,964Z][DEBUG][CIF::Smrt:76]: data is of type: application/octet-stream
[2014-10-21T15:17:10,964Z][DEBUG][CIF::Smrt:107]: parsing...
[2014-10-21T15:17:10,964Z][INFO][CIF::Smrt:119]: processing events: 32
[2014-10-21T15:17:10,972Z][INFO][CIF::Smrt:136]: processed events: 32
[2014-10-21T15:17:10,972Z][INFO][main:307]: sending 32 observables...
[2014-10-21T15:17:11,055Z][INFO][main:311]: submission accepted, processing may take time
[2014-10-21T15:17:11,055Z][DEBUG][main:294]: alexa.com - top10
[2014-10-21T15:17:11,056Z][INFO][main:295]: processing: /opt/cif/bin/cif-smrt -d -r /etc/cif/rules/default/alexa.yml -f top10
[2014-10-21T15:17:11,056Z][INFO][CIF::Smrt:92]: starting at: 2014-10-21T00:00:00Z
...
  1. start cif-smrt

    $ sudo service cif-smrt start
  2. test out a query:

$ cif --cc US -d --token 1234 --no-verify-ssl
$ cif --cc CN -d --token 1234 --no-verify-ssl
  1. checkout the SDK Guides to setup a client locally.
Clone this wiki locally