Git Product home page Git Product logo

borisgerretzen / sentinel Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 72 KB

Sentinel monitors certificate transparency logs for various services that allow anonymous access

License: GNU General Public License v3.0

Dockerfile 1.52% C# 98.48%
certificate certificate-transparency certificate-transparency-abuse certificate-transparency-logs certificates certstream internet-scanning scanning

sentinel's Introduction

Sentinel

Sentinel monitors certificate transparency logs and looks for services that have not configured authentication correctly.

I recommend using a vpn while running this service.

Currently, the following services are supported:

  • MongoDB
  • Mongo-Express
  • Elasticsearch
  • Mysql
  • It is possible to add more services/labels by registering them in SentinelLib.

Instructions

  1. Connect to a VPN, this is not required but recommended so your IP does not show up in any logs.
  2. Download and install MongoDB, make sure authentication is disabled and the server is listening on 127.0.0.1.
  3. Restore Nuget packages and build solution.
  4. Run built executable.
  5. Wait...

How it works

Sentinel uses certstream to get a live feed of certificates added to CT logs. It extracts the domain names from these certificates and checks the first label of these domain names. If the label is one of the recognized labels, a connection is attempted with a client of the corresponding service. For example, mongo.example.com will be treated as a MongoDB host and thus a MongoDB connection will be attempted.

If this connection is successful, a callback method is called where you can deal with the results. Sentinel by default stores them in a locally hosted MongoDB instance. Authentication is disabled, very nice.

Every service that requires a specific connection type will need its own scanner. An abstract class is provided for these scanners. Custom scanners can be implemented by extending this base class and registering them in ScannerProvider. If no custom scanners are required, ScannerProvider.DefaultProvider will suffice.

Why?

My BSc. thesis was about information leakage through certificate transparency. During my research I found that a considerable percentage of services that announce their presence through domain name labels do not have authentication enabled or allow guest access.

My thesis used an older dataset, specifically the Google Argon 2021 dataset. Because this is a relatively old dataset, a lot of the domains listed no longer exist or the owners had time to fix their mistakes. This got me curious what differences could be observed when using more recent, near realtime CT logs.

Future work

  • Increased result handling flexibility e.g. config for MongoDB instance.
  • More configuration options
  • Callback for open ports, regardless of scan result
  • CI/CD
  • Better logging
  • Nuget package of SentinelLib

sentinel's People

Contributors

borisgerretzen avatar

Watchers

 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.