Giter Site home page Giter Site logo

jojiiofficial / scanbanserver Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 8.96 MB

The server for the triplink-system to collect hackers and webscanner across the internet

Home Page: https://www.triplink.tech/

License: GNU Affero General Public License v3.0

Go 98.94% Dockerfile 1.06%
triplink security security-automation blocking ipsec database filter

scanbanserver's Introduction

ScanBanServer

This is a REST-API server for the tripwire system. If you own multiple server on the internet which get scanned all over the time, this is the perfect ip-banning-network for you. It is created to log portscans and "report" them to your REST server(this repository on one of your server). If you want to block those scanner you can automatically generate IP-blocklists based on a filter to protect your machines against internet scanner like shodan.io

What!? I need an example!

Lets explain this repo with a short example:
Lets assume you have 5 server but you don't want known-portscanner to scan all your ports and services and publish the data on their websites, you can install tripwire and tripwire reporter on all of your server and configure them to report all IPs which tried to connect to port x (with tripwire you can also use ports which are already bound to a diffirent service). Then you can configue that tripwire fetches all IPs from your ScanBanServer which were for example reported at least two times. So if machine 1 and 2 were scanned by ip x.x.x.x then machine 3,4 and 5 will block the ip x.x.x.x (Of course you can create a filter matching your imagination)

Install

  • Install go1.13
  • Setup a mysql server (you can also use an existing mysql server)
  • Create a new database
  • Import the database.sql from this repo
  • Build the server binary wih go get and go build -o scanban
  • Run ./scanban install
  • Fill the config.json with the database credentials (you can leave "keyfile" and "certfile" empty if you don't need TLS)
    • If you want to fetch some third party data you can set the "ipdataAPIkey" with an API key from ipdata.co
  • Run ./scanban install again to automatically cerate a systemd service
    • Alternatively you can use ./scanban run to run the server without a service
  • Done!

User permissions

The permission system is like filepermissions in unix:
1 - fetch IPs
2 - push IPs
4 - view reports
For example 7 = allow everything or 3 = allow Fetch & Push

Dynamic IP

If your server has a dynamic IP address, you can create a dyn.ip file and let a cronjob update this file with your external ip. This prevents the server reporting itself after ip change. If the file is avaliable and contains a valid IP address, it will be used instead of the external ip.

scanbanserver's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nestorwheelock

scanbanserver's Issues

Handle dynamic ips

Create list with dyn ip ranges if IP is in this range set a flag in blockedIp list to autoremove them after a specified amount of time

Add known scanner table

Use a table to store known domains/hostnames. If an IP has this hostname it should be validated automatically

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.