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 Nov 13, 2014 · 73 revisions

IN THE PROCESS OF UPDATING DOC FOR ALPHA.6 PLZ CHECK BACK LATER


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

Generating a token

  1. Generate a cif-smrt token:
$ /opt/cif/bin/cif-tokens --username cif-smrt --new --write
  1. configure /etc/cif/cif-smrt.yml
client:
    remote: http://localhost:5000
    token: xxxxxxxxxxxxxxxxxxxxxx
  1. Generate a user token:
$ /opt/cif/bin/cif-tokens --username me@example.com --new --read --write
  1. Configure ~/.cif.yml
client:
    remote: https://localhost
    token: xxxxxxxxxxxxxxxxxxxxxx
    no_verify_ssl: true

note: cif-smrt points to localhost:5000 to avoid dealing with the apache2 proxy since we're already on the localhost.

Testing

  1. test connectivity to the router
$ cif -p
roundtrip: 0.518286 ms
roundtrip: 0.487317 ms
roundtrip: 0.47499 ms
roundtrip: 0.518493 ms
  1. perform an initial cif-smrt test run
$ sudo /opt/cif/bin/cif-smrt --testmode -d
[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
$ cif --cc CN
  1. checkout the SDK Guides to setup a client locally.
Clone this wiki locally