Code Monkey home page Code Monkey logo

intelowlproject / intelowl Goto Github PK

View Code? Open in Web Editor NEW
3.7K 3.7K 423.0 140.94 MB

IntelOwl: manage your Threat Intelligence at scale

Home Page: https://intelowlproject.github.io

License: GNU Affero General Public License v3.0

Dockerfile 0.34% Python 72.74% Shell 0.79% HTML 0.16% JavaScript 25.87% SCSS 0.10%
cyber-security cyber-threat-intelligence cybersecurity dfir enrichment hacktoberfest honeynet incident-response intel-owl ioc malware-analysis malware-analyzer osint osint-python python security-tools threat-hunting threat-intelligence threathunting threatintel

intelowl's People

Contributors

0ssigeno avatar 0x0elliot avatar abheektripathy avatar acocheo avatar amanjiofficial avatar ashirrashid avatar benjaminh-sogeti avatar carellamartina avatar citizendot avatar cristinaascari avatar cypherpunksamurai avatar deepsource-autofix[bot] avatar dependabot[bot] avatar devmrfitz avatar drosetti avatar eshaan7 avatar federicofantini avatar fgibertoni avatar g4ze avatar hyprsyd avatar m0mosenpai avatar mlodic avatar moonpatel avatar ramnathkumar181 avatar rishabh-kumar-07 avatar shivam-purohit avatar sp35 avatar theguly avatar uzaxirr avatar yshaq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intelowl's Issues

FireHOL blocklists analyzer

http://iplists.firehol.org/

We could integrate an analyzer for the FireHOL blocklists. In this way, we could check if a specific IP was reported as malicious by one of those lists.

We should manage the download of these lists internally in the project. Then we should update these lists regularly to allow the IntelOwl users to get fresh results.

add indexes for searchable fields + change data retention

Matteo Lodi:

  • We could add indexes for the fields that are being used for search purposes.
    Obviously, for testing and for a "classic" usage of this project this is not necessary, but to let it scale we should index the most important ones. https://docs.djangoproject.com/en/2.2/ref/models/indexes/

  • Also, at the moment there is a cronjob in crons.py that performs a cleanup of old data. The retention days are hardcoded. We could move this value to the configuration and let the intel owl users decide the retention days.

Droidbox integration

We should integrate Droidbox as a new analyzer. As stated on the honeynet website,

Droidbox is a dynamic analysis platform for android applications. Droidbox was developed by Patrik Lantz as part of GSoc 2011. You can try it out by downloading Android Reverse Engineering virtual machine, which bundels droidbox as well as additional android malware analysis tools.

Dynamic configuration at time of requesting scan

ATM, there's no way to dynamically pass in a configuration for an analyzer at the time of requesting a scan. For any configuration changes, the user needs to edit the analyzer_config.json manually.

Breaking past this limit could be one of the most exciting and powerful features of Intel Owl.

Some use cases:

  • an option that allows requesting an analysis with X instances of a single analyzer with different/dynamic configuration.
  • ...

First Use Clarity

It's not really clear on first use what analyzers are available, or how the platform is to be used. For example, I try to search an MD5 once logged in (eg. Mimikatz) and get no results. Do I need to enable some more analyzers, or is there something else I must do to populate a local DB?

Base class for analyzers run function

Under script_analyzers/, we have too much duplicate code in each analyzer's run() function. For example, getting additional_config_params, verifying them, setting up report, catching and handling errors. Can't we take more of an Object oriented approach here ?

This is just a very basic overview of what I have in mind:

from abc import ABC, abstractmethod
import requests

class AnalyzerRunNotImplemented(Exception):
    detail = "run() is not implemented for analyzer {}"

class Analyzer(ABC):
    analyzer_name = None
    md5 = None
    observable_classification = None
    # and more variables
    ...

    @abstractmethod
    def run(self, *args, **kwargs):
        # this should be overwritten in 
        # child class
        raise AnalyzerRunNotImplemented(self.analyzer_name)

    def __init__(self, *args, **kwargs):
        # initialize shared variables
    
    def get_config(self, *args, **kwargs):
        # fetch additional_config_params
        # verify params, API keys, etc

    def set_report_and_cleanup(self, *args, **kwargs):
        # sets report logic
    def handle_error(self, *args, **kwargs):
        # handles error logic


class Shodan(Analyzer):
    analyzer_name = "shodan"
    observable_classification = "ip"
    url = "https://api.shodan.io/shodan/host/"
    
    def run(self):
        try:
            data = {"ip": self.observable_value}
            resp = requests.post(self.url, json=self.data)
            return super(self).set_report(resp)
        except Exception:
            return super(self).handle_error(resp)

Advantages:

  • reduce a lot of duplicate code
  • code looks more clean
  • makes it easier for new contributors to integrate an analyzer.
  • don't have to pass a bunch of variables to the run function, since we can just store them as member variables of the class. def run(analyzer_name, job_id, observable_name, observable_classification, additional_config_params) - This does not look good.
  • in some analyzers, the error/report handling is different - for those we can just overwrite the set_report_and_cleanup and handle_error functions too. But for all others, we don't need to.
  • We already have code for handling error, setting up report and all in general.py, we would mostly need to refactor it work with objects/classes.

f-strings everywhere

Using f-strings increases code readability and are known to be faster than str.format()

Incorrect analyzer name passed for HybridAnalysis Observable tests

In the tests/test_observables.py, For HybridAnalysis I noticed that we are passing HA_Get as the analyzer name in all 3 instances, shouldn't it be HybridAnalysis_Get_Observable, as defined in the analyzers_configuration.json ? or am I wrong?

All the 3 instances referenced:
https://github.com/certego/IntelOwl/blob/af05c109e253100ae9a2b0087c96676bdb19dae4/tests/test_observables.py#L93
https://github.com/certego/IntelOwl/blob/af05c109e253100ae9a2b0087c96676bdb19dae4/tests/test_observables.py#L157
https://github.com/certego/IntelOwl/blob/af05c109e253100ae9a2b0087c96676bdb19dae4/tests/test_observables.py#L244

Analyze Chrome browser extensions (CRX)

Browser extensions in Chrome are identified by an alphanumeric identifier.

For example, Google Keep has the following URL:

https://chrome.google.com/webstore/detail/google-keep-chrome-extens/lpcaedmchfhocbbapmcbpinfpgnhiddi

which leads to the extension ID lpcaedmchfhocbbapmcbpinfpgnhiddi.

Extension IDs are used to determine the installation folder, e.g.

C:\Users\[login_name]\AppData\Local\Google\Chrome\User Data\Default\Extensions\lpcaedmchfhocbbapmcbpinfpgnhiddi

Also, in normal mode (not in incognito windows) local resources injected by an extension inside web pages is loaded by using urls of this form:

chrome-extension://lpcaedmchfhocbbapmcbpinfpgnhiddi/resource-name.js

Knowing whether an extension is malicious or not is a very useful task in many cases, and several public services/APIs already exist for this purpose, for example:

Being able to analyze CRX IDs would be very useful IMHO.

Discussion: Traefik for self-hosted deployment + serverless deployment with celery

Hey @eshaan7. I'm a contributor on cookiecutter-django, and I think the way you've set up this project could take some inspiration from that repository.

For one, the compose files could be labeled a little better. Other things like the .env files could be in their own directory, the Dockerfiles can be in their own, and the requirements could be separated to make the Docker builds smaller.

The one main part is Traefik: auto-renewal of certs and easy to configure with compose. You can take a look at production.yml and compose/production/traefik for how we configure it. It may come useful for those looking for self deployment.

If people want to scale, I made a complete-walkthrough repository for those looking to do AWS ECS deployment via git push to GitHub. It can be made into fargate if you don't integrate celery. (Which is the other thing: I don't think using Fargate with this project would be wise since you're using celery. The first two answers in this SO makes it clear why.).

Celery cannot connect to rabbitmq

Issue I am facing:
When I create a new analyze request using the pyintelowl client, the job gets created but it keeps saying `status: "running" and the command hangs, see here:

And if I visit the server's GUI to query the database, this is what I get:

The job just hangs there finally throws me time-out error.

What I tried:

I have tried with different analyzers, different files and observables as well. I am facing the same issue.
There are no errors in my docker-compose terminal.

Any help would be appreciated.

Discussion: Env files should have .env extension

Some IDEs like having .env files because their extensions can easily digest those and show syntax errors. Additionally, it's just habit/conventional to have these "." files that are either unnecessary or "secretive" stay as . so that gitignore files can have something like:

.*
!.travis.yml
etc.

Improve the web interface

At the moment, IntelOwl can be used mainly via APIs because its major intent is to be integrated with other security tools.
So now we can find only a very basic interface that allow the users:

  • to authenticate
  • to query the database for analysis results
  • to view the results via a JSON file

We should start improving the web interface to allow the project to be more user friendly:

  • Add the chance to analyze an observable from the web interface
  • Add the chance to view the analyzer configuration and to change it
  • etc...more ideas are welcome

Tags Model

  • A tags column in the Job table in the database. That way, a user can distinguish between or group different jobs.

MISP connector

IntelOwl was designed to be integrated with other security tools very easily.
In particular, it is a perfect fit for Threat Intelligence Platforms because it can enrich the data available in those platform and can be customized on its own needs.

So, in order to help the community to achieve this result, we should add new connectors for the most used open source TIPs, for example: MISP

We should study their project and add a relative connector to integrate IntelOwl with MISP.
An idea could be to create a new expansion module (https://github.com/MISP/misp-modules) to allow MISP users to enrich an indicator via IntelOwl and integrate the results on the relative event.
We should leverage the official IntelOwl client for this purpose.

Thug integration

We should integrate Thug as a new analyzer: https://github.com/buffer/thug

Even if Thug can be easily installed with pip for python3, it really requires a lot of dependencies to be installed in the machine (in particular https://github.com/area1/stpyv8/). We need to try to study how to add it to the project without "poisoning" the base docker image too much. For this purpose we could just add the official Thug docker image (https://hub.docker.com/r/buffer/thug/dockerfile) to the docker-compose file but, then, we should expose that container to the main container to let it run Thug via API.

Some other requirements:

  • give the chance to setup custom proxy
  • give the chance to setup custom browser
  • give the chance to analyze only URLs or HTML files
  • use all DOM events as default

ClamAV integration

We should add a new analyzer to allow users to analyze files with ClamAV.

https://github.com/Cisco-Talos/clamav-devel.

It's important to:

  • if the license is permissive, add public-available rules by default

  • give the chance to customize the rules used to scan a file with ClamAV, in particular to run its own rules

ONYPHE API Integration

ONYPHE is a search engine for open-source and cyber threat intelligence data collected by crawling various sources available on the Internet or by listening to Internet background noise.

They have many scanning services available for an IP/Domain/URL.
Please take a look at API docs and suggest the ones we need.

There's a python client, pyonyphe available.
Plus, an expansion-plugin in MISP - MISP/....../expansion/onyphe.py

Should we try to integrate this with the MISP analzyer we have or use the python client available or just the API ?

OpenCTI connector

IntelOwl was designed to be integrated with other security tools very easily.
In particular, it is a perfect fit for Threat Intelligence Platforms because it can enrich the data available in those platform and can be customized on its own needs.

So, in order to help the community to achieve this result, we should add new connectors for the most used open source TIPs, for example: OpenCTI

We should study their project and add a relative connector to integrate IntelOwl with OpenCTI. A related issue was already opened: OpenCTI-Platform/connectors#43.
We should leverage the official IntelOwl client for this purpose

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.