From 1a7525ba58c9dffd1ca4fa4c0b5081bb54b4da8d Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Fri, 24 Nov 2017 21:32:05 +0000 Subject: [PATCH] New port: security/py-ssh-audit: SSH server auditing PR: 223810 Submitted by: Piotr Kubaj Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13207 --- security/Makefile | 1 + security/py-ssh-audit/Makefile | 27 +++++++++++++++++++ security/py-ssh-audit/distinfo | 3 +++ .../py-ssh-audit/files/patch-ssh-audit.py | 20 ++++++++++++++ security/py-ssh-audit/pkg-descr | 18 +++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 security/py-ssh-audit/Makefile create mode 100644 security/py-ssh-audit/distinfo create mode 100644 security/py-ssh-audit/files/patch-ssh-audit.py create mode 100644 security/py-ssh-audit/pkg-descr diff --git a/security/Makefile b/security/Makefile index 704e0712cec3..cf7c1016f8f9 100644 --- a/security/Makefile +++ b/security/Makefile @@ -969,6 +969,7 @@ SUBDIR += py-slowaes SUBDIR += py-spake2 SUBDIR += py-ssh + SUBDIR += py-ssh-audit SUBDIR += py-sslstrip SUBDIR += py-stem SUBDIR += py-stix diff --git a/security/py-ssh-audit/Makefile b/security/py-ssh-audit/Makefile new file mode 100644 index 000000000000..52c696bd1f2c --- /dev/null +++ b/security/py-ssh-audit/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= ssh-audit +DISTVERSIONPREFIX= v +DISTVERSION= 1.7.0 +CATEGORIES= security +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= pkubaj@anongoth.pl +COMMENT= SSH server auditing + +LICENSE= MIT + +USES= python shebangfix +USE_GITHUB= yes +GH_ACCOUNT= arthepsy +USE_PYTHON= concurrent +NO_BUILD= yes +NO_ARCH= yes +SHEBANG_FILES= ssh-audit.py + +PLIST_FILES= bin/ssh-audit + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/ssh-audit.py ${STAGEDIR}${PREFIX}/bin/ssh-audit + +.include diff --git a/security/py-ssh-audit/distinfo b/security/py-ssh-audit/distinfo new file mode 100644 index 000000000000..b3e2cae76229 --- /dev/null +++ b/security/py-ssh-audit/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1511379690 +SHA256 (arthepsy-ssh-audit-v1.7.0_GH0.tar.gz) = cba29cc19ec2932e4f43c720b2c49a7d179219e23482476aeb472f7463713b68 +SIZE (arthepsy-ssh-audit-v1.7.0_GH0.tar.gz) = 30222 diff --git a/security/py-ssh-audit/files/patch-ssh-audit.py b/security/py-ssh-audit/files/patch-ssh-audit.py new file mode 100644 index 000000000000..7c00fb432d42 --- /dev/null +++ b/security/py-ssh-audit/files/patch-ssh-audit.py @@ -0,0 +1,20 @@ +--- ssh-audit.py.orig 2017-11-23 08:27:24 UTC ++++ ssh-audit.py +@@ -43,11 +43,12 @@ try: # pragma: nocover + from typing import Callable, Optional, Union, Any + except ImportError: # pragma: nocover + pass +-try: # pragma: nocover +- from colorama import init as colorama_init +- colorama_init() # pragma: nocover +-except ImportError: # pragma: nocover +- pass ++# colorama is only for Windows, posix systems support colors without it ++#try: # pragma: nocover ++# from colorama import init as colorama_init ++# colorama_init() # pragma: nocover ++#except ImportError: # pragma: nocover ++# pass + + + def usage(err=None): diff --git a/security/py-ssh-audit/pkg-descr b/security/py-ssh-audit/pkg-descr new file mode 100644 index 000000000000..f461752b7350 --- /dev/null +++ b/security/py-ssh-audit/pkg-descr @@ -0,0 +1,18 @@ +ssh-audit is a tool for ssh server auditing. + +Features: +* SSH1 and SSH2 protocol server support; +* grab banner, recognize device or software and operating system, + detect compression; +* gather key-exchange, host-key, encryption and + message authentication code algorithms; +* output algorithm information + (available since, removed/disabled, unsafe/weak/legacy, etc); +* output algorithm recommendations + (append or remove based on recognized software version); +* output security information (related issues, assigned CVE list, etc); +* analyze SSH version compatibility based on algorithm information; +* historical information from OpenSSH, Dropbear SSH and libssh; +* no dependencies, compatible with Python 2.6+, Python 3.x and PyPy. + +WWW: https://github.com/arthepsy/ssh-audit