GithubHelp home page GithubHelp logo

dismissedguy / ssh-fuck-you Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 1.47 MB

Deliver an extensive "fuck you" to whoever is trying to get into your server.

License: GNU General Public License v3.0

Python 100.00%

ssh-fuck-you's Introduction

SSH-Fuck-You

Deliver an extensive "fuck you" to whoever is trying to get into your server.

This script simulates a regular SSH server to anyone scanning your network, and will happily ask them for a password. However, after n (unsuccessful) attempts, the server will let them in and start streaming any video file as ASCII art to their terminal, with no way out except by killing their SSH client.

Demo

Low frame rate is due to recording. It's better in person, I promise ;)

Show GIF Demo GIF

Features

  • Simulates regular OpenSSH server to make it appear less suspicious
  • Very configurable, various options can be modified in config.ini
  • Able to achieve near-original frame rates
  • Always fills the full terminal window
  • Automatically generates the necessary SSH keys for you (though you can also supply your own!)

Installation

$ git clone https://github.com/DismissedGuy/ssh-fuck-you
$ cd ssh-fuck-you

$ python3 -m venv venv
$ . ./venv/bin/activate
$ pip3 install -r -U requirements.txt

$ python3 server.py

Running on a non-privileged port

Since I do not recommend setting this up on a privileged port (since that would require running the script with root), you can run it on some port > 1023 and then add an following iptables rule like the following:

$ iptables -t nat -A OUTPUT -o lo -p tcp --dport 22 -j REDIRECT --to-port 5022
$ iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 22 -j REDIRECT --to-port 5022

Make sure to swap the ports and interfaces out with your values. This will forward any connection attempts to port 22 to the server running on port 5022, on both eth0 and your loopback interface.

Nmap scan output

The server spoofs SSH's version string to make it appear as a regular OpenSSH server. Here's the output of an nmap scan on my local machine:

$ nmap -sC -sV 192.168.1.146 -p 22
Starting Nmap 7.80 ( https://nmap.org ) at 2022-04-11 21:25 CEST
Nmap scan report for pop-os-mike (192.168.1.146)
Host is up (0.00011s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13 (Ubuntu Linux; protocol 2.0)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 30.53 seconds

The version string is also configurable in config.ini.

ssh-fuck-you's People

Contributors

imgbotapp avatar malmeloo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

itheras

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.