From: Kevin Darbyshire-Bryant Date: Wed, 7 Sep 2016 16:23:51 +0000 (+0100) Subject: dropbear: hide dropbear version X-Git-Tag: v17.01.0-rc1~1469 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=commitdiff_plain;h=96f0bbe91d2176284324c4d9b4839b6878148602 dropbear: hide dropbear version As security precaution and to limit the attack surface based on the version reported by tools like nmap mask out the dropbear version so the version is not visible anymore by snooping on the wire. Version is still visible by 'dropbear -V' Based on a patch by Hans Dedecker Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: Felix Fietkau [remove trailing _] --- diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 36bcb4ab7b..b80f4d5c81 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -105,6 +105,10 @@ define Build/Configure mv $(PKG_BUILD_DIR)/options.h.new $(PKG_BUILD_DIR)/options.h || exit 1; \ done + # remove protocol idented software version number + $(SED) 's,^#define LOCAL_IDENT .*$$$$,#define LOCAL_IDENT "SSH-2.0-dropbear",g' \ + $(PKG_BUILD_DIR)/sysoptions.h + # Enforce rebuild of svr-chansession.c rm -f $(PKG_BUILD_DIR)/svr-chansession.o endef