Coder Social home page Coder Social logo

ctrlaltdev / illegal-auth-attempts Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 1.0 6.34 MB

๐Ÿ”’ Lists of IPs making illegal auth attempts and users used doing so

Home Page: https://ctrlalt.dev/IAA

License: Mozilla Public License 2.0

Shell 41.86% Python 21.43% HTML 4.06% CSS 2.14% JavaScript 30.52%
ip user auth ssh login scan security infosec

illegal-auth-attempts's Introduction

GitHub release licence Python Bash

This set of scripts aims to extract from auth attempts or device scanning IPs and users used for those auth attempts.

IPS

The top 10 IPs are:

IP Count
103.27.239.2 11209
116.31.116.2 11122
116.31.116.27 10805
123.183.209.139 10079
216.117.56.68 9535
103.99.0.188 5760
59.63.166.104 5505
61.177.172.64 5505
18.217.140.251 5064
59.63.188.32 4808

Map

Map of first 1000 IPs

Users

The top 10 users are:

User Count
test 10587
admin 8576
user 7008
ubuntu 5348
pi 4460
ftpuser 4375
oracle 4147
postgres 3831
guest 3343
nagios 2495

Files

If you didn't use the fetch script to get you IPs.log and users.log, you can put your auth.log or secure files in import/sources/ (those files are ignored by git, so it won't be uploaded) - then you have to import them - refer to importing section

If you used the fetch script, put your IPs.log and users.log files in import/ and prefix them to distinguish them from other users' files and devices (please only use letters, numbers, dash and underscore in the prefix - I use a githubusername_devicename pattern)

How and what

Fetching

The fetch/fetch.sh script get from /var/log/auth.log the IPs and users of the previous day lines of the log. Hence it has to be run only once a day to get everything and to not duplicate data.

Moreover, for it to work, the cron has to be able to read /var/log/auth.log or /var/log/secure.

Importing

If you're fetching IPs and Users on several devices and want to centralize everything on one, you can put your auth.log or secure files in import/sources/.

Please prefix your auth.log or secure files per device in order to distinguish them, I use a githubusername_devicename pattern (only use letters, numbers, dash and underscore in the prefix, or it won't work).

Counting and sorting

Once enough data gathered, and the IPs.log and users.log are created in import/, the IAA.sh will create unique IPs and users lists, as well as lists with count of their occurences in the original logs, sorted descendingly.

Prerequisites

  • An /var/log/auth.log (or the fetch script will have to be adaptated to your auth logging)
  • Python 3

Contributing

You can run this script on your public facing devices to collect the IPs and users too, and if you want to contribute, please refer to Import section. Once you're done, run ./import.sh if needed, and ./IAA.sh - commit and then create a pull request.

Note that you will need git lfs for src/ and import/.

illegal-auth-attempts's People

Contributors

ctrlaltdev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

nullimago

illegal-auth-attempts's Issues

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.