• Stars
    star
    887
  • Rank 51,070 (Top 2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created 9 months ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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".

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.

Running

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>

Important

Note that when running the Terrapin Vulnerability Scanner inside a Docker container, the tool will bind to the container's localhost when specifying --listen with port only. To avoid connectivity issues, add 0.0.0.0 as its bind address and map the container's port to the host via Docker's -p argument.

The following command will make the Terrapin Vulnerability Scanner available at port 2222 on the host system's localhost:

docker run --rm -it -p localhost:2222:2222 ghcr.io/rub-nds/terrapin-scanner --listen 0.0.0.0:2222

Building

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
}

More Repositories

1

PRET

Printer Exploitation Toolkit - The tool that made dumpster diving obsolete.
Python
3,821
star
2

WS-Attacker

WS-Attacker is a modular framework for web services penetration testing. It is developed by the Chair of Network and Data Security, Ruhr University Bochum (https://nds.rub.de/ ) and the Hackmanit GmbH (https://www.hackmanit.de/).
Java
469
star
3

CORStest

A simple CORS misconfiguration scanner
Python
387
star
4

Metadata-Attacker

A tool to generate media files with malicious metadata
PHP
124
star
5

BurpSSOExtension

An extension for BurpSuite that highlights SSO messages in Burp's proxy window..
Java
115
star
6

PDF101

Artifacts for the Black Hat talk.
Python
97
star
7

REST-Attacker

REST-Attacker is designed as a proof-of-concept for the feasibility of testing generic real-world REST implementations. Its goal is to provide a framework for REST security research.
Python
78
star
8

xsinator.com

XS-Leak Browser Test Suite
JavaScript
68
star
9

alpaca-code

Artifacts to the ALPACA attack.
C
60
star
10

DTD-Attacks

Tests for different parsers from Ruby, Python, .NET, PHP, Perl, Java
Java
57
star
11

Johnny-You-Are-Fired

Artifacts for the USENIX publication.
57
star
12

MS-RMS-Attacks

Breaking the security of Microsoft's RMS
C++
51
star
13

Terrapin-Artifacts

This repository contains the artifacts for the paper "Terrapin Attack: Breaking SSH Channel Integrity By Sequence Number Manipulation".
Python
46
star
14

JOSEPH

Java
32
star
15

OpenID-Attacker

Java
28
star
16

PrOfESSOS

PrOfESSOS is our open source implementation for fully automated Evaluation-as-a-Service for SSO. PrOfESSOS introduces a generic approach to improve the security of OpenID Connect implementations by systematically detecting vulnerabilities.
Java
27
star
17

pdf-attacker

Python
22
star
18

SAML-XXE-Test

Simple XXE test suite generated specifically for SAML interfaces
Python
21
star
19

thesis_layout

Latex template for students writing a bachelor or master thesis
TeX
18
star
20

ikev1-psk-main-mode-dict-attacker

Proof-of-Concept Dictionary Attacker against IKEv1 PSK in Main Mode
Python
16
star
21

SocketProxy

Simple proxy designed to intercept and modify connections on the transport level. This means you can also modify TLS raw bytes.
Java
16
star
22

Office-Security

Artifacts for the WOOT publication.
HTML
14
star
23

FutureTrust

FutureTrust analyzes electronic identification (eID) services in Europe and beyond. It is funded within the EU Framework Programme for Research and Innovation (Horizon 2020).
Java
11
star
24

DISTINCT

Dynamic In-Browser Single Sign-On Tracer Inspecting Novel Communication Techniques
JavaScript
10
star
25

OOXML_Signature_Security

USENIX 2023 Artifacts
10
star
26

AutoLeak

Find XS-Leaks in the browser by diffing DOM-Graphs in two states
JavaScript
10
star
27

your-sop.com

PHP
9
star
28

SOAP-Test-Webservices

SOAP webservices of different SOAP frameworks including samples for WS-Security.
Java
8
star
29

Covert-Content-Attacks

Artifacts for the DEF CON talk.
6
star
30

exposee_layout

Latex template for students writing an exposé for a seminar or thesis
TeX
6
star
31

WS-TLS-Scanner

The TLS-Scanner for the SIWECOS Project
Java
6
star
32

CVE-2020-2655-DemoServer

Java
5
star
33

SECRET

A Secure, Efficient, and Collaborative Real-Time Web Editor
CoffeeScript
5
star
34

Gridcoin-Attacks

The source code of our attacking tool described in the paper "Breaking and Fixing Gridcoin" published at WOOT'17, see also:
C++
5
star
35

JavaCryptoExamples

Examples for using Java Crypto
Java
4
star
36

Terrapin-Website

This repository hosts the public website for the paper "Terrapin Attack: Breaking SSH Channel Integrity By Sequence Number Manipulation" via GitHub Pages.
HTML
4
star
37

RKE

Implementation of ratcheted key exchange protocol (Poettering and Rösler, CRYPTO 2018, https://ia.cr/2018/296) by Marco Smeets
Java
4
star
38

WS-Attacker-Plugin_Denial_of_Service

Denial_of_Service - A git submodule for WS-Attacker
Java
3
star
39

SyncEnc-Keyserver

A Key Management Server for SyncEnc
JavaScript
2
star
40

WS-Attacker-Library_Intelligent_Denial_of_Service_Library

Intelligent_Denial_of_Service_Library - A git submodule for WS-Attacker
Java
2
star
41

PDF-Tester

PDF Tester can be used to evaluate the signature status of a PDF document under different PDF applications.
C#
2
star
42

JsseTLS

Java
2
star
43

BouncyCastleTLS

BouncyCastle TLS examples
Java
2
star
44

WS-Attacker-Library_Signature_Faking_Library

Signature_Faking_Library - A git submodule for WS-Attacker
Java
1
star
45

alpaca-attack

HTML
1
star
46

AKE-Cryptoverif-Tutorial

HTML
1
star
47

Mitigation-of-Attacks-on-Email-E2E-Encryption

Research Artifacts for the Publication "Mitigation of Attacks on Email End-to-End Encryption"
Python
1
star
48

IPsec-StateMachineExtractor

Extract the state machine of an IKEv1/IKEv2 implementation
Java
1
star
49

SyncEnc-App

Java
1
star
50

WS-Attacker-Library_XML_Encryption_Attack_Library

XML_Encryption_Attack_Library - A git submodule for WS-Attacker
Java
1
star
51

Single-Sign-On-Libraries

Java
1
star
52

ShareJSXML

Library to allow concurrent editing of XML documents using Operational Transforms based on ShareJS 0.6
CoffeeScript
1
star
53

SyncEnc-Demonstrator

A Demonstrator for Collaborative Encrypted Editing
JavaScript
1
star
54

WS-Attacker-Plugin_SoapAction_Spoofing

SoapAction_Spoofing - A git submodule for WS-Attacker
Java
1
star
55

WS-Attacker-Plugin_Signature_Wrapping

Signature_Wrapping - A git submodule for WS-Attacker
Java
1
star
56

WS-Attacker-Plugin_XML_Encryption_Attack

XML_Encryption_Attack - A git submodule for WS-Attacker
Java
1
star
57

WS-Attacker-Plugin_Intelligent_Denial_of_Service

Intelligent_Denial_of_Service - A git submodule for WS-Attacker
Java
1
star
58

XMLSec-WebCrypto

An implementation for the XML Security Standard using the W3C WebCrypto API
CoffeeScript
1
star
59

oidc-docker-libs

Python
1
star
60

medfuzz

Fuzzing plattform for medical protocols
C++
1
star
61

DocumentSignatureValidator

Automation tool for evaluating the signature status of office documents
C++
1
star
62

WS-Attacker-Library_SoapHttpClient

SoapHttpClient - A git submodule for WS-Attacker
Java
1
star
63

WS-Attacker-Library_Signature_Wrapping

Signature_Wrapping_Library - A git submodule for WS-Attacker
Java
1
star
64

WS-Attacker-Plugin_WS_Addressing_Spoofing

WS_Addressing_Spoofing - A git submodule for WS-Attacker
Java
1
star
65

WS-Attacker-Library_XML_Utilities

WS-Attacker-Library_XML-Utilities- A git submodule for WS-Attacker
Java
1
star
66

WS-Attacker-Plugin_OptionsTesterPlugin

OptionsTesterPlugin - A git submodule for WS-Attacker
Java
1
star
67

WS-Attacker-Library_Schema_Analyzer

Schema_Analyzer_Library - A git submodule for WS-Attacker
Java
1
star