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

proftpd12x.txt

proftpd12x.txt
Posted Oct 26, 2004
Site security.lss.hr

ProFTPD 1.2.x suffers from a vulnerability that allow for remote user enumeration. It is possible to determine which user names are valid, which are special, and which ones do not exist on the remote system. This can be accomplished by code execution path timing analysis attack at the ProFTPD login procedure.

tags | advisory, remote, code execution
SHA-256 | 2f9b4a192cb97ddf88d2f6a8b9f9136a5959de40a1d46bb06e05a1ac3cfe8582

proftpd12x.txt

Change Mirror Download

LSS Security Advisory #LSS-2004-10-2

http://security.lss.hr


---

Title : ProFTPD 1.2.x remote users enumeration bug
Advisory ID : LSS#2004-10-2
Date : October 14th, 2004
Advisory URL: : http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
Impact : Remote users enumeration
Risk level : Low
Vulnerability type : Remote
Vendors contacted : Proftpd.org, 09.09.2004.

---



==[ Overview

ProFTPD is a very popular FTP (File Transfer Protocol) server, included by
default in many Linux/Unix distributions. LSS Security Team discovered a
remote users enumeration bug in ProFTPD, which can be used to identify and
differentiate valid user accounts on the remote system. Vulnerabilities
similar to the one described here have already been discovered on many
other network servers.



==[ Vulnerability

It is possible to determine which user names are valid, which are special,
and which ones do not exist on the remote system. That is accomplished by
code execution path timing analysis attack at the ProFTPD login procedure.

There is a very small (but significant) difference in time delay of code
execution path between valid and non-valid user names. That can be used
to remotely determine the difference between existent and non-existent
users.

The time delay can be measured by using a simple FTP client that will
calculate elapsed time between 'USER' command sent by client, and the
server response. Because of the very short response period, elapsed time
should be measured in microseconds.
LSS has developed simple PoC exploit that is presented here:

Special user - root:

[ljuranic@diana ljuranic]$ ./a.out xxx.xxx.xxx.xxx root

Proftpd remote users discovery exploit
Coded by Leon / LSS Security
>-------------------------------------<
Login time: 720 | 493 | 446 | 444 | 443 | 441 | 441 | 442 |
Avrg: 483
.....
Login time: 732 | 462 | 445 | 442 | 445 | 442 | 442 | 442 |
Avrg: 481
.....
Login time: 725 | 470 | 450 | 447 | 446 | 447 | 446 | 446 |
Avrg: 484

Average login time for the special user (root) is about 480 usec. All other
special users will have approximately the same login time delay.


Normal user - ljuranic:

[ljuranic@diana ljuranic]$ ./a.out xxx.xxx.xxx.xxx ljuranic
Proftpd remote users discovery exploit
Coded by Leon / LSS Security
>-------------------------------------<
Login time: 885 | 634 | 617 | 615 | 614 | 613 | 615 | 738 |
Avrg: 666
.....
Login time: 892 | 701 | 623 | 617 | 618 | 618 | 618 | 616 |
Avrg: 662
.....
Login time: 927 | 658 | 622 | 619 | 617 | 616 | 617 | 616 |
Avrg: 661

Average login time for normal user (ljuranic) is about 660 usec. All other
normal users will have approximately the same login delay.


Non existent user - non-existent:

[ljuranic@diana ljuranic]$ ./a.out xxx.xxx.xxx.xxx non-existent
Proftpd remote users discovery exploit
Coded by Leon / LSS Security
>-------------------------------------<
Login time: 656 | 417 | 401 | 398 | 398 | 395 | 396 | 397 |
Avrg: 432
.....
Login time: 647 | 418 | 401 | 400 | 400 | 399 | 399 | 399 |
Avrg: 432
.....
Login time: 647 | 413 | 401 | 400 | 400 | 400 | 400 | 400 |
Avrg: 432

Average login time for non existent user is about 430 usec.

The time difference between three types of user accounts is evident, making
it easy to determine other valid, non-valid, and special user accounts.
This vulnerability can be used to launch more efficient brute-force
attacks.



===[ Affected versions

Vulnerability was successfully tested on ProFTPD versions 1.2.8 and 1.2.10,
but other versions may be vulnerable as well. Test server was placed on the
local Ethernet 10/100 network, and tests were conducted over the Internet.



===[ Fix

Pseudo-random usleep() at the login procedure that will obfuscate time leak.
Something like this:

proftpd-1.2.10/modules/mod_auth.c
1867a1868,1877
> {
> unsigned int randa;
> struct timeval tv;
> struct timezone tz;
> gettimeofday (&tv, &tz);
> srand(tv.tv_usec);
> randa = rand() % 20000;
> usleep(randa);
> }
>

After this simple patch is applied, it is impossible to tell which users do
and don't exist:

[ljuranic@diana ljuranic]$ ./a.out xxx.xxx.xxx.xxx root
Proftpd remote users discovery exploit
Coded by Leon / LSS Security
>-------------------------------------<
Login time: 14954 | 29854 | 19939 | 20024 | 20044 | 19931 | 29988 | 30009|
Avrg: 23092
.....
Login time: 11677 | 19802 | 20042 | 29941 | 20093 | 19899 | 20005 | 30015|
Avrg: 21434
.....
Login time: 18027 | 20062 | 19877 | 20006 | 20050 | 30049 | 19906 | 29989|
Avrg: 22245



===[ PoC Exploit

http://security.lss.hr/Poc/



===[ Credits

This vulnerability was found by Leon Juranic (ljuranic@LSS.hr).



===[ LSS Security Contact

LSS Security Team, <eXposed by LSS>

WWW : http://security.lss.hr
E-mail : security@LSS.hr
Tel : +385 1 6129 775

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
    0 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