GithubHelp home page GithubHelp logo

andrewbeard / telnetlogger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robertdavidgraham/telnetlogger

0.0 1.0 0.0 61 KB

Simulates enough of a Telnet connection in order to log failed login attempts.

Makefile 0.52% C 99.48%

telnetlogger's Introduction

telnetlogger

This is a simple program to log login attempts on Telnet (port 23).

It's designed to track the Mirai botnet. Right now (Nov 4, 2016) infected Mirai machines from around the world are trying to connect to Telnet on every IP address REALLY OFTEN. This program logs both which IP addresses are doing the attempts, and which passwords they are using.

I wrote it primarily because installing telnetd on a Raspberry Pi wasn't sufficient. For some reason, the Mirai botnet doesn't like the output from Telnet, and won't try to login. So I needed something that produced the type of Telnet is was expecting. While I was at it, I also wrote some code to parse things and extract the usernames/passwords.

Usage

Just run the program in order to see passwords and IP addresses appear on stdout.

telnetlogger

To log the information to a log file, use the -o option.

telnetlogger -o output.csv

To listen on another port (for testing and whatnot), use -l.

telnetlogger -l 2323

Note that on many systems, you'll get an "access denied" error message, because programs that open ports below 1024 need extra privileges. So you may need to sudo the program.

Compiling

Type make or:

gcc telnetlogger.c -o telnetlogger -lpthread

It'll also compile/run on Windows.

Output

The program prints a single line in CSV format:

1478281930, 220.134.232.209,'root','dreambox'

This represents the UNIX-time when the login was attempted, the source IP address, and the quoted form of the attempted username and password.

telnetlogger's People

Contributors

jedisct1 avatar robertdavidgraham 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.