Giter VIP home page Giter VIP logo

flare's Introduction


Flare is a network analytic framework designed for data scientists, security researchers, and network professionals. Written in Python, it is designed for rapid prototyping and development of behavioral analytics, and intended to make identifying malicious behavior in networks as simple as possible.

Getting Started

Currently supports python 2.7 and python 3

sudo pip install -r requirements.txt
python setup.py install

Core Features

  • Command and Control Analytics
    • Identify Beaconing in your environment (works with Suricata output and ElasticSearch)
  • Feature Extraction
    • Helper utility functions to filter out the noise.
  • Alexa, Umbrella, and Majestic Million (coming soon)
  • WHOIS IP Lookup
  • Pre-build machine learning classifiers
  • So much more...

Analytics

Beaconing

Designed for elasticsearch and Suricata, elasticBeacon will connect to your elasticsearch server, retrieve all IP addresses and identify periodic activity.

You may need to forward port 9200 to your localhost with ssh -NfL 9200:localhost:9200 [email protected]

from flare.analytics.command_control import elasticBeacon

eb = elasticBeacon(es_host='localhost')
beacons = eb.find_beacons(group=True, focus_outbound=True)

Also available in commandline:

flare_beacon --whois --focus_outbound -mo=100 --csv_out=beacon_results.csv

or

flare_beacon --group --whois --focus_outbound -c configs/elasticsearch.ini -html beacons.html

Domain Features

Alexa

from flare.tools.alexa import Alexa
alexa = Alexa(limit=1000000)

print alexa.domain_in_alexa('google.com') # Returns True
print alexa.subdomain_in_alexa('www') # Returns True

print alexa.DOMAINS_TOP1M #Displays domains (in this case top 100)

IP Utilities

from flare.tools.whoisip import WhoisLookup

whois = WhoisLookup()
whois.get_name_by_ip('8.8.8.8')

OUT: 'GOOGLE - Google Inc., US'

from flare.tools.iputils import hex_to_ip, ip_to_hex

ip_to_hex('8.8.8.8'), hex_to_ip('08080808')

OUT: (u'08080808', '8.8.8.8')
  • Convert Hex to IP and vice/versa
  • Check for Private, Multicast, or Reserved domains
  • Identify the owner of a public IP address

Data Science Features

from flare.data_science.features import dga_classifier

dga_c = dga_classifier()

print dga_c.predict('facebook')
Legit

print dga_c.predict('39al31ak3')
dga
from flare.data_science.features import entropy
from flare.data_science.features import ip_matcher
from flare.data_science.features import domain_extract
from flare.data_science.features import levenshtein
from flare.data_science.features import domain_tld_extract

# Entropy example
print entropy('akd93ka8a91a')
2.58496250072

# IP Matcher Example
print ip_matcher('8.8.8.8')
True

print ip_matcher('39.993.9.1')
False

# Domain Extract Example
domain_extract('longsubdomain.huntoperator.com')
'huntoperator'

# Domain TLD Extract
domain_tld_extract('longsubdomain.huntoperator.com')
'huntoperator.com'

# Levenshtein example
a = ['google.com']
b = ['googl3.com']
print levenshtein(a, b)
'Difference of:' 1

and many more features for data extraction...

flare's People

Contributors

austin-taylor avatar jonathanburkert avatar

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.