diff --git a/net-mgmt/ettercap/Makefile b/net-mgmt/ettercap/Makefile index 67d6dca2a139..47d81b6e0a66 100644 --- a/net-mgmt/ettercap/Makefile +++ b/net-mgmt/ettercap/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= ettercap -PORTVERSION= 0.8.2 +PORTVERSION= 0.8.3 DISTVERSIONPREFIX= v -PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-mgmt security @@ -16,24 +15,25 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libnet.so:net/libnet -OPTIONS_DEFINE= DESKTOP DOCS GTK2 IPV6 NCURSES PCRE PLUGINS SSL UTF8 -OPTIONS_DEFAULT=GTK2 NCURSES PCRE PLUGINS SSL UTF8 +OPTIONS_DEFINE= DESKTOP DOCS GTK3 IPV6 NCURSES PCRE PLUGINS SSL UTF8 +OPTIONS_DEFAULT=GTK3 NCURSES PCRE PLUGINS SSL UTF8 OPTIONS_SUB= yes DESKTOP_DESC= Install ettercap.desktop NCURSES_DESC= Ncurses interface PCRE_DESC= Use PCRE in filters SSL_DESC= SSH1 and SSL decryption support +USES= bison cmake cpe iconv localbase:ldflags pkgconfig + CMAKE_ARGS= -DHAVE_PCAP=${LIBDIR} \ -DHAVE_RESOLV=${LIBDIR} \ -DINSTALL_SYSCONFDIR=${PREFIX}/etc \ -DMAN_INSTALLDIR=${PREFIX}/man -CMAKE_OFF= BUNDLED_LIBS +CMAKE_OFF= BUNDLED_LIBS ENABLE_GEOIP ENABLE_LUA ENABLE_PDF_DOCS ENABLE_TESTS LIBRARY_BUILD CMAKE_ON= HAVE_DLOPEN LDFLAGS+= ${ICONV_LIB} -lnet -lpcap MAKE_JOBS_UNSAFE= yes USE_LDCONFIG= yes -USES= bison cmake cpe iconv localbase:ldflags pkgconfig DOCS= AUTHORS CHANGELOG README README.BINARIES README.BUGS \ README.GIT README.PLATFORMS THANKS TODO TODO.TESTING \ @@ -48,9 +48,9 @@ DESKTOP_CMAKE_BOOL= INSTALL_DESKTOP DESKTOP_USES= desktop-file-utils NCURSES_CMAKE_BOOL= ENABLE_CURSES NCURSES_USES= ncurses -GTK2_CMAKE_BOOL= ENABLE_GTK -GTK2_USE= GNOME=gtk20 -GTK2_USES= gnome +GTK3_CMAKE_BOOL= ENABLE_GTK +GTK3_USE= GNOME=gtk30 +GTK3_USES= gnome IPV6_CMAKE_BOOL= ENABLE_IPV6 PCRE_CMAKE_BOOL= HAVE_PCRE PCRE_LIB_DEPENDS= libpcre.so:devel/pcre diff --git a/net-mgmt/ettercap/distinfo b/net-mgmt/ettercap/distinfo index 6e82cd6cd5e2..c630ee03b460 100644 --- a/net-mgmt/ettercap/distinfo +++ b/net-mgmt/ettercap/distinfo @@ -1,2 +1,3 @@ -SHA256 (Ettercap-ettercap-v0.8.2_GH0.tar.gz) = f38514f35bea58bfe6ef1902bfd4761de0379942a9aa3e175fc9348f4eef2c81 -SIZE (Ettercap-ettercap-v0.8.2_GH0.tar.gz) = 8082561 +TIMESTAMP = 1562166550 +SHA256 (Ettercap-ettercap-v0.8.3_GH0.tar.gz) = d561a554562e447f4d7387a9878ba745e1aa8c4690cc4e9faaa779cfdaa61fbb +SIZE (Ettercap-ettercap-v0.8.3_GH0.tar.gz) = 8381943 diff --git a/net-mgmt/ettercap/files/patch-CMakeLists.txt b/net-mgmt/ettercap/files/patch-CMakeLists.txt index 324ab0433a34..54a017dcbdb4 100644 --- a/net-mgmt/ettercap/files/patch-CMakeLists.txt +++ b/net-mgmt/ettercap/files/patch-CMakeLists.txt @@ -1,11 +1,11 @@ ---- CMakeLists.txt.orig 2015-03-14 13:43:11 UTC +--- CMakeLists.txt.orig 2019-06-27 23:08:24 UTC +++ CMakeLists.txt -@@ -108,7 +108,7 @@ set(INSTALL_LIBDIR ${INSTALL_PREFIX}/lib +@@ -112,7 +112,7 @@ set(INSTALL_LIBDIR ${INSTALL_PREFIX}/lib set(INSTALL_DATADIR ${INSTALL_PREFIX}/share CACHE PATH "Data installation directory") set(INSTALL_EXECPREFIX ${INSTALL_PREFIX} CACHE PATH "") set(INSTALL_BINDIR ${INSTALL_PREFIX}/bin CACHE PATH "Binary files installation directory") -if(OS_DARWIN OR OS_WINDOWS) -+if(OS_DARWIN OR OS_FREEBSD OR OS_WINDOWS) - set(POLKIT_DIR ${INSTALL_PREFIX}/share/polkit-1/actions/ CACHE PATH "Polkit installation directory") - else(OS_DARWIN OR OS_WINDOWS) ++if(OS_DARWIN OR OS_BSD_FREE OR OS_WINDOWS) + set(POLKIT_DIR ${INSTALL_PREFIX}/share/polkit-1/actions/ CACHE PATH "Polkit installation directory") + else() #at least on ubuntu, polkit dir couldn't be /usr/local/share, but should be /usr/share diff --git a/net-mgmt/ettercap/files/patch-src-dissectors-ec_ssh.c b/net-mgmt/ettercap/files/patch-src-dissectors-ec_ssh.c deleted file mode 100644 index 70c77babd764..000000000000 --- a/net-mgmt/ettercap/files/patch-src-dissectors-ec_ssh.c +++ /dev/null @@ -1,207 +0,0 @@ -Obtained from: https://github.com/LocutusOfBorg/ettercap/commit/f0d63b27c82df2ad5f7ada6310727d841b43fbcc - ---- src/dissectors/ec_ssh.c.orig 2015-03-14 13:43:11 UTC -+++ src/dissectors/ec_ssh.c -@@ -36,6 +36,10 @@ - #include - #include - -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) -+#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */ -+#endif -+ - #define SMSG_PUBLIC_KEY 2 - #define CMSG_SESSION_KEY 3 - #define CMSG_USER 4 -@@ -138,6 +142,11 @@ FUNC_DECODER(dissector_ssh) - char tmp[MAX_ASCII_ADDR_LEN]; - u_int32 ssh_len, ssh_mod; - u_char ssh_packet_type, *ptr, *key_to_put; -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ BIGNUM *h_n, *s_n, *m_h_n, *m_s_n; -+ BIGNUM *h_e, *s_e, *m_h_e, *m_s_e; -+ BIGNUM *h_d, *s_d, *m_h_d, *m_s_d; -+#endif - - /* don't complain about unused var */ - (void) DECODE_DATA; -@@ -383,12 +392,25 @@ FUNC_DECODER(dissector_ssh) - if (session_data->ptrkey == NULL) { - /* Initialize RSA key structures (other fileds are set to 0) */ - session_data->serverkey = RSA_new(); -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ s_n = BN_new(); -+ s_e = BN_new(); -+ RSA_set0_key(session_data->serverkey, s_n, s_e, s_d); -+#else - session_data->serverkey->n = BN_new(); - session_data->serverkey->e = BN_new(); -+#endif - - session_data->hostkey = RSA_new(); -+ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ h_n = BN_new(); -+ h_e = BN_new(); -+ RSA_set0_key(session_data->hostkey, h_n, h_e, h_d); -+#else - session_data->hostkey->n = BN_new(); - session_data->hostkey->e = BN_new(); -+#endif - - /* Get the RSA Key from the packet */ - NS_GET32(server_mod,ptr); -@@ -396,19 +418,37 @@ FUNC_DECODER(dissector_ssh) - DEBUG_MSG("Dissector_ssh Bougs Server_Mod"); - return NULL; - } -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ RSA_get0_key(session_data->serverkey, &s_n, &s_e, &s_d); -+ get_bn(s_e, &ptr); -+ get_bn(s_n, &ptr); -+#else - get_bn(session_data->serverkey->e, &ptr); - get_bn(session_data->serverkey->n, &ptr); -+#endif - - NS_GET32(host_mod,ptr); - if (ptr + (host_mod/8) > PACKET->DATA.data + PACKET->DATA.len) { - DEBUG_MSG("Dissector_ssh Bougs Host_Mod"); - return NULL; - } -+ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ RSA_get0_key(session_data->hostkey, &h_n, &h_e, &h_d); -+ get_bn(h_e, &ptr); -+ get_bn(h_n, &ptr); -+#else - get_bn(session_data->hostkey->e, &ptr); - get_bn(session_data->hostkey->n, &ptr); -+#endif - -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ server_exp = BN_get_word(s_e); -+ host_exp = BN_get_word(h_e); -+#else - server_exp = *(session_data->serverkey->e->d); - host_exp = *(session_data->hostkey->e->d); -+#endif - - /* Check if we already have a suitable RSA key to substitute */ - index_ssl = &ssh_conn_key; -@@ -424,7 +464,7 @@ FUNC_DECODER(dissector_ssh) - SAFE_CALLOC(*index_ssl, 1, sizeof(ssh_my_key)); - - /* Generate the new key */ -- (*index_ssl)->myserverkey = (RSA *)RSA_generate_key(server_mod, server_exp, NULL, NULL); -+ (*index_ssl)->myserverkey = (RSA *)RSA_generate_key_ex(server_mod, server_exp, NULL, NULL); - (*index_ssl)->myhostkey = (RSA *)RSA_generate_key(host_mod, host_exp, NULL, NULL); - (*index_ssl)->server_mod = server_mod; - (*index_ssl)->host_mod = host_mod; -@@ -443,11 +483,25 @@ FUNC_DECODER(dissector_ssh) - - /* Put our RSA key in the packet */ - key_to_put+=4; -+ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ RSA_get0_key(session_data->ptrkey->myserverkey, &m_s_n, &m_s_e, &m_s_d); -+ put_bn(m_s_e, &key_to_put); -+ put_bn(m_s_n, &key_to_put); -+#else - put_bn(session_data->ptrkey->myserverkey->e, &key_to_put); - put_bn(session_data->ptrkey->myserverkey->n, &key_to_put); -+#endif - key_to_put+=4; -+ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ RSA_get0_key(session_data->ptrkey->myhostkey, &m_h_n, &m_h_e, &m_h_d); -+ put_bn(m_h_e, &key_to_put); -+ put_bn(m_h_n, &key_to_put); -+#else - put_bn(session_data->ptrkey->myhostkey->e, &key_to_put); - put_bn(session_data->ptrkey->myhostkey->n, &key_to_put); -+#endif - - /* Recalculate SSH crc */ - *(u_int32 *)(PACKET->DATA.data + PACKET->DATA.len - 4) = htonl(CRC_checksum(PACKET->DATA.data+4, PACKET->DATA.len-8, CRC_INIT_ZERO)); -@@ -482,19 +536,34 @@ FUNC_DECODER(dissector_ssh) - key_to_put = ptr; - - /* Calculate real session id and our fake session id */ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ temp_session_id = ssh_session_id(cookie, h_n, s_n); -+#else - temp_session_id = ssh_session_id(cookie, session_data->hostkey->n, session_data->serverkey->n); -+#endif - if (temp_session_id) - memcpy(session_id1, temp_session_id, 16); -+ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ temp_session_id=ssh_session_id(cookie, m_h_n, m_s_n); -+#else - temp_session_id=ssh_session_id(cookie, session_data->ptrkey->myhostkey->n, session_data->ptrkey->myserverkey->n); -+#endif -+ - if (temp_session_id) - memcpy(session_id2, temp_session_id, 16); - - /* Get the session key */ - enckey = BN_new(); -+ - get_bn(enckey, &ptr); - - /* Decrypt session key */ -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ if (BN_cmp(m_s_n, m_h_n) > 0) { -+#else - if (BN_cmp(session_data->ptrkey->myserverkey->n, session_data->ptrkey->myhostkey->n) > 0) { -+#endif - rsa_private_decrypt(enckey, enckey, session_data->ptrkey->myserverkey); - rsa_private_decrypt(enckey, enckey, session_data->ptrkey->myhostkey); - } else { -@@ -534,7 +603,11 @@ FUNC_DECODER(dissector_ssh) - BN_add_word(bn, sesskey[i]); - } - -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ if (BN_cmp(s_n, h_n) < 0) { -+#else - if (BN_cmp(session_data->serverkey->n, session_data->hostkey->n) < 0) { -+#endif - rsa_public_encrypt(bn, bn, session_data->serverkey); - rsa_public_encrypt(bn, bn, session_data->hostkey); - } else { -@@ -716,7 +789,16 @@ static void rsa_public_encrypt(BIGNUM *o - u_char *inbuf, *outbuf; - int32 len, ilen, olen; - -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ BIGNUM *n; -+ BIGNUM *e; -+ BIGNUM *d; -+ RSA_get0_key(key, &n, &e, &d); -+ olen = BN_num_bytes(n); -+#else - olen = BN_num_bytes(key->n); -+#endif -+ - outbuf = malloc(olen); - if (outbuf == NULL) /* oops, couldn't allocate memory */ - return; -@@ -744,7 +826,16 @@ static void rsa_private_decrypt(BIGNUM * - u_char *inbuf, *outbuf; - int32 len, ilen, olen; - -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ BIGNUM *n; -+ BIGNUM *e; -+ BIGNUM *d; -+ RSA_get0_key(key, &n, &e, &d); -+ olen = BN_num_bytes(n); -+#else - olen = BN_num_bytes(key->n); -+#endif -+ - outbuf = malloc(olen); - if (outbuf == NULL) /* oops, couldn't allocate memory */ - return; diff --git a/net-mgmt/ettercap/files/patch-src-ec_sslwrap.c b/net-mgmt/ettercap/files/patch-src-ec_sslwrap.c deleted file mode 100644 index 71f2f3d3c77e..000000000000 --- a/net-mgmt/ettercap/files/patch-src-ec_sslwrap.c +++ /dev/null @@ -1,36 +0,0 @@ -Obtained from: https://github.com/LocutusOfBorg/ettercap/commit/f0d63b27c82df2ad5f7ada6310727d841b43fbcc - https://github.com/LocutusOfBorg/ettercap/commit/def7a62c542241367428223dc460906b0634dcd1 - ---- src/ec_sslwrap.c.orig 2015-03-14 13:43:11 UTC -+++ src/ec_sslwrap.c -@@ -53,6 +53,10 @@ - #define OPENSSL_NO_KRB5 1 - #include - -+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) -+#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */ -+#endif -+ - #define BREAK_ON_ERROR(x,y,z) do { \ - if (x == -E_INVALID) { \ - SAFE_FREE(z.DATA.disp_data); \ -@@ -974,9 +978,19 @@ static X509 *sslw_create_selfsigned(X509 - index = X509_get_ext_by_NID(server_cert, NID_authority_key_identifier, -1); - if (index >=0) { - ext = X509_get_ext(server_cert, index); -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ ASN1_OCTET_STRING* os; -+ os = X509_EXTENSION_get_data (ext); -+#endif - if (ext) { -+#ifdef HAVE_OPAQUE_RSA_DSA_DH -+ os->data[7] = 0xe7; -+ os->data[8] = 0x7e; -+ X509_EXTENSION_set_data (ext, os); -+#else - ext->value->data[7] = 0xe7; - ext->value->data[8] = 0x7e; -+#endif - X509_add_ext(out_cert, ext, -1); - } - } diff --git a/net-mgmt/ettercap/pkg-plist b/net-mgmt/ettercap/pkg-plist index fba0946b9080..c83573ff8082 100644 --- a/net-mgmt/ettercap/pkg-plist +++ b/net-mgmt/ettercap/pkg-plist @@ -1,5 +1,5 @@ bin/ettercap -%%DESKTOP%%%%GTK2%%bin/ettercap-pkexec +%%DESKTOP%%%%GTK3%%bin/ettercap-pkexec bin/etterfilter bin/etterlog @sample etc/etter.conf.sample @@ -40,9 +40,13 @@ bin/etterlog %%PLUGINS%%lib/ettercap/ec_smurf_attack.so %%PLUGINS%%lib/ettercap/ec_sslstrip.so %%PLUGINS%%lib/ettercap/ec_stp_mangler.so +%%PLUGINS%%lib/ettercap/ec_krb5_downgrade.so +lib/libettercap-ui.so +lib/libettercap-ui.so.0 +lib/libettercap-ui.so.0.8.2 lib/libettercap.so lib/libettercap.so.0 -lib/libettercap.so.0.0.0 +lib/libettercap.so.0.8.2 man/man5/etter.conf.5.gz %%DESKTOP%%man/man8/ettercap-pkexec.8.gz man/man8/ettercap.8.gz @@ -50,8 +54,8 @@ man/man8/ettercap_curses.8.gz %%PLUGINS%%man/man8/ettercap_plugins.8.gz man/man8/etterfilter.8.gz man/man8/etterlog.8.gz -%%DESKTOP%%%%GTK2%%share/appdata/ettercap.appdata.xml -%%DESKTOP%%%%GTK2%%share/applications/ettercap.desktop +%%DESKTOP%%%%GTK3%%share/appdata/ettercap.appdata.xml +%%DESKTOP%%%%GTK3%%share/applications/ettercap.desktop %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG %%PORTDOCS%%%%DOCSDIR%%/README @@ -86,5 +90,5 @@ man/man8/etterlog.8.gz %%DATADIR%%/etterfilter.cnt %%DATADIR%%/etterfilter.tbl %%DATADIR%%/etterlog.dtd -%%DESKTOP%%%%GTK2%%share/pixmaps/ettercap.svg -%%DESKTOP%%%%GTK2%%share/polkit-1/actions/org.pkexec.ettercap.policy +%%DESKTOP%%%%GTK3%%share/pixmaps/ettercap.svg +%%DESKTOP%%%%GTK3%%share/polkit-1/actions/org.pkexec.ettercap.policy