Code Monkey home page Code Monkey logo

in0ri's Introduction

GitHub

In0ri is a defacement detection system utilizing a image-classification convolutional neural network.

Introduction

When monitoring a website, In0ri will periodically take a screenshot of the website then put it through a preprocessor that will resize the image down to 250x250px and numericalize the image before passing it onto the classifier. The core of the classifier is a convolutional neural network that is trained to detect the defacement of a website. If the monitored website is indeed, defaced, In0ri will send out warnings via email to the user.

Requirement

  • Python3 (version >=3.6)
  • Docker
  • Docker-compose

Installation

Cloning the repository

git clone https://github.com/J4FSec/In0ri.git
cd In0ri

Docker

You can also use In0ri via the official Docker container here.

Starting In0ri

docker-compose up -d

After running the In0ri, open an Internet browser to https://<serverIP>:8080/ to show WebUI.

Configuring email credentials to send notifications and agent keys from

Going to the WebUI and click tab "Setting" then select tag "Email" to configure email server.

Mail Server = "mail.example.com"
Username = "[email protected]"
Password = "$uper$ecurePa$$word"

Configure Telegram notification

Going to the WebUI and click tab "Setting" then select tag "Telegram" to configure Channel notifications on Telegram.

Chat ID= 'foo' # Channel ID to send notifications to
Token = 'bar' # Bot token retrieved from @BotFather

Usage

There are two ways to deploy and using In0ri:

  • Running off crontab by periodically visiting the url.
  • Internal agent running off the web server

First Method: URL Check

Visit the Dashboard tab on WebUI, click on "Add URLs" then fill in the form and submit it.

Second Method: Internal Agent

At the table listing all urls which were registered on WebUI, click on "Create Key" button at column Actions, the Active Key will send to your email or click "Details" button to show it.

On the web server that you wants to be monitored by In0ri, download the Agent folder from Github repository

Installing the required packages for the internal Agent

python3 -m pip install -r requirements.txt

Edit the file config.json in the same folder as agent

nano config.json

A key is sent to your email after registering the Agent on the WebUI rootPath is the root directory of the web application that you want to be monitored exludePath are the subfolders that you wants excluded from the scans apiServer is the URL to the API server of In0ri serverIP is the IP of the API server of In0ri

{
    "id":"01",
    "key":"123123123",
    "rootPath":"/var/www/html",
    "excludePath":"",
    "apiServer":"http://<serverIP>:8088/checkdeface"
}

And run the Agent:

python3 agent.py

References

Authors

In0ri is built by Echidna with the help of Cu64 and Klone.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GNU AGPLv3

in0ri's People

Contributors

cu64 avatar in0ri avatar watch-dog-man 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

Watchers

 avatar

in0ri's Issues

Cannot import name 'soft_unicode' from 'markupsafe'

Hello,

I just tried to deploy the project using docker. I got this error related to Flask.

Traceback (most recent call last):
  File "/opt/In0ri/api.py", line 6, in <module>
    from flask import Flask, request
  File "/usr/lib/python3/dist-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
  File "/usr/lib/python3/dist-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/usr/lib/python3/dist-packages/jinja2/nodes.py", line 23, in <module>
    from jinja2.utils import Markup
  File "/usr/lib/python3/dist-packages/jinja2/utils.py", line 656, in <module>
    from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/dist-packages/markupsafe/__init__.py)

Linked to the end of support of soft_unicode by markupsafe tha removed `soft_unicode' pallets/markupsafe#304 ; and
pallets/markupsafe#282

Could you please patch the software (or downgrade to markupsafe==2.0.1) ? and rebuild the docker container on docker hub ?

Thanks in advance

can you help me?

i'm trying to make a change a defacement detection like you, can you tell me how to create a model like in your repos? thank you so much!
my email: [email protected]

Not receiving any alerts on mail and telegram

After successfully running the app and setting up the SMTP setup , adding website URL to be monitored, I am not receiving any email alerts. After entering a valid Telegram chat id and bot token , it gives "Invalid token or chat id".
Another issue "url not captured"
image
image

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.