Getting Started

Getting started with Dragnet v0.1 - This process will get simpler and more automated in future versions.
  1. git clone this repo to your development machine

  2. Initial Firebase Setup

    1. Create a Firebase account if you don't already have one

    2. Create a new project in Firebase

    3. Upgrade the project to the Blaze plan

    4. Choose "Cloud Firestore" as your database

    5. Make sure that Firestore Database rules are as follows:

      service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write : if request.auth != null; } } }

    6. Make sure that Firebase Storage rules are as follows:

      service { match /b/{bucket}/o { match /{allPaths=**} { allow read, write: if request.auth != null; } } }

    7. Head to Authentication > Sign-In Method, and enable the Email method

    8. Create an account for yourself with a NON-TEMPORARY EMAIL

  3. Initial VoIP Setup

    1. Choose a SIP Trunk provider that allows masking ( is used in this documentation)

    2. Purchase a DID number and some minutes

    3. Take proper precautions to harden this account

  4. Initial Admin Server Setup

    1. Spin up a new cloud VM running Ubuntu 18.04

      (You should be good with 4 GB Memory)

    2. Get Asterisk 15 installed

      (Here's a good starting point)

    3. Get Node 8.x installed

      curl -sL | sudo -E bash -
      sudo apt-get install -y nodejs
    4. Get set up for headless browsing

      sudo apt-get install -y xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps clang libdbus-1-dev libgtk2.0-dev libnotify-dev libgconf2-dev libasound2-dev libcap-dev libcups2-dev libxtst-dev libxss1 libnss3-dev gcc-multilib g++-multilib
    5. Get Tensorflow installed

      (Follow this guide, install for Python 3, use the venv method)

    6. Get https set up (yes, you'll need a domain name)

      (Here's a good starting point)

    7. git clone the Dragnet repo onto this cloud VM

    8. cp / mv the contents of the repo's "admin" folder so that your file structure is as follows:

      1. The repo files assume ~ is /root, although this is considered insecure and is only implied for the purposes of basic non-production PoC.

      2. tensorflow/ should already have venv content in it- simply copy the contents of the repo's tensorflow folder into your already existing tensorflow folder on the VM.

    9. Edit the contents of asterisk/sip.conf with your new SIP Trunk account info

    10. cp asterisk/sip.conf asterisk/extensions.conf /etc/asterisk/.

    11. Edit the contents of ~/ak/logUrl.txt with your Firebase details

    12. Edit the contents of endpoint/endpoint.js, replacing the following:

      domain: the domain name you set up during set 6 (4.6) above
      authPass: a strong password for use with Basic Auth
      authUser: a username for use with Basic Auth
      storageBucketUrl: the url of your Firebase storage bucket
    13. mkdir /endpoint/ak && mkdir /osint/ak && touch /endpoint/ak/ServiceAccountKey.json

    14. ServiceAccountKey.json (created above) should contain the contents downloaded from:

    15. cp ~/endpoint/ak/ServiceAccountKey.json ~/osint/ak/.

    16. npm install in ~/endpoint/and ~/osint/

    17. from ~, start each of these in a seperate screen:

      1. sudo asterisk && sudo asterisk -rvvvvv

        1. then, in the asterisk console:

          1. sip reload

          2. dialplan reload

      2. nodemon ./endpoint/endpoint.js

  5. Final development machine setup

    1. firebase deploy --only functions from the functions directory on your development machine

    2. If all went well, you can now npm run dev from your development machine where you git cloned the project initially. Then log in and get started!

If anything is unclear or you have any questions or comments, please post an issue. Pull requests welcome, though not necessary. Thank you!