Giter Site home page Giter Site logo

sorokinvld / terrapin-scanner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rub-nds/terrapin-scanner

0.0 1.0 0.0 60 KB

This repository contains a simple vulnerability scanner for the Terrapin attack present in the paper "Terrapin Attack: Breaking SSH Channel Integrity By Sequence Number Manipulation".

Home Page: https://terrapin-attack.com

License: Apache License 2.0

Go 95.94% Dockerfile 4.06%

terrapin-scanner's Introduction

Terrapin Vulnerability Scanner

The Terrapin Vulnerability Scanner is a small utility program written in Go, which can be used to determine the vulnerability of an SSH client or server against the Terrapin Attack. The vulnerability scanner requires a single connection with the peer to gather all supported algorithms. However, it does not perform a fully fledged SSH key exchange, will never attempt authentication on a server, and does not perform the attack in practice. Instead, vulnerability is determined by checking the supported algorithms and support for known countermeasures (strict key exchange). This may falsely claim vulnerability in case the peer supports countermeasures unknown to this tool.

Building

For convenience, we are providing pre-compiled binaries for all major desktop platforms. These can be found on the Release page. We have also provided a Docker image that supports most of the major architectures. This image can be run as:

docker run --rm -it ghcr.io/rub-nds/terrapin-scanner <args>

However, we understand that you might prefer building tools, that connect to your SSH server, yourself. To do this, ensure that you have at least Go v1.18 installed. To compile and install the Terrapin Vulnerability Scanner Go package, run the command below.

go install github.com/RUB-NDS/Terrapin-Scanner@latest

This will download, compile, and install the Go package for your local system. The compiled binary will become available at $GOBIN/Terrapin-Scanner. If the GOBIN environment variable is not set, Go will default to using $GOPATH/bin or $HOME/go/bin, depending on whether the $GOPATH environment variable is set.

You can also build the Docker image yourself by running the commands below.

git clone https://github.com/RUB-NDS/Terrapin-Scanner.git
docker build -t terrapin-scanner Terrapin-Scanner

Usage

# Scan the SSH server available at localhost port 2222
./Terrapin-Scanner --connect localhost:2222

# If no port is specified, the tool will default to port 22 instead
./Terrapin-Scanner --connect localhost

# To scan an SSH client, specify the listen command instead
# After running the command, you will need to connect with your SSH client to port 2222
./Terrapin-Scanner --listen 0.0.0.0:2222

# When binding to localhost, you can omit the interface address
# The following command will listen for incoming connections on 127.0.0.1:2222
./Terrapin-Scanner --listen 2222

The scanner supports outputting the scan result as json. To do so, provide the --json flag when calling the scanner. The output is structured as follows:

{
    "RemoteAddr": "127.0.0.1:22",
    "IsServer": true,
    "Banner": "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.5",
    "SupportsChaCha20": true,
    "SupportsCbcEtm": false,
    "SupportsStrictKex": true,
    "Vulnerable": false
}

terrapin-scanner's People

Contributors

trueskrillor avatar pythoncoderas avatar sollie avatar zirakrezovic avatar felixonmars avatar brookst avatar ajcollins0 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.