Class: Msf::Exploit::Remote
- Inherits:
-
Exploit
- Object
- Exploit
- Msf::Exploit::Remote
- Includes:
- AutoTarget
- Defined in:
- lib/msf/core/exploit/remote.rb,
lib/msf/core/exploit/remote/unirpc.rb,
lib/msf/core/exploit/remote/http/nifi.rb,
lib/msf/core/exploit/remote/http/sccm.rb,
lib/msf/core/exploit/remote/http/gitea.rb,
lib/msf/core/exploit/remote/http/jboss.rb,
lib/msf/core/exploit/remote/http/typo3.rb,
lib/msf/core/exploit/remote/http/gitlab.rb,
lib/msf/core/exploit/remote/http/joomla.rb,
lib/msf/core/exploit/remote/http/moodle.rb,
lib/msf/core/exploit/remote/http/pihole.rb,
lib/msf/core/exploit/remote/http/splunk.rb,
lib/msf/core/exploit/remote/http/webmin.rb,
lib/msf/core/exploit/remote/http/flowise.rb,
lib/msf/core/exploit/remote/http/freepbx.rb,
lib/msf/core/exploit/remote/http/jenkins.rb,
lib/msf/core/exploit/remote/http/pretalx.rb,
lib/msf/core/exploit/remote/http/exchange.rb,
lib/msf/core/exploit/remote/java/rmi/util.rb,
lib/msf/core/exploit/remote/http/nagios_xi.rb,
lib/msf/core/exploit/remote/http/wordpress.rb,
lib/msf/core/exploit/remote/http/sharepoint.rb,
lib/msf/core/exploit/remote/java/rmi/client.rb,
lib/msf/core/exploit/remote/kerberos/client.rb,
lib/msf/core/exploit/remote/kerberos/ticket.rb,
lib/msf/core/exploit/remote/http/apache_solr.rb,
lib/msf/core/exploit/remote/http/beyondtrust.rb,
lib/msf/core/exploit/remote/http/http_cookie.rb,
lib/msf/core/exploit/remote/http/sitecore_xp.rb,
lib/msf/core/exploit/remote/http/smartermail.rb,
lib/msf/core/exploit/remote/java/rmi/builder.rb,
lib/msf/core/exploit/remote/http/complete_pbx.rb,
lib/msf/core/exploit/remote/http/flask_unsign.rb,
lib/msf/core/exploit/remote/http/web_enrollment.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx.rb,
lib/msf/core/exploit/remote/kerberos/client/pac.rb,
lib/msf/core/exploit/remote/http/http_cookie_jar.rb,
lib/msf/core/exploit/remote/kerberos/client/base.rb,
lib/msf/core/exploit/remote/http/kubernetes/error.rb,
lib/msf/core/exploit/remote/http/php_filter_chain.rb,
lib/msf/core/exploit/remote/http/kubernetes/client.rb,
lib/msf/core/exploit/remote/kerberos/client/pkinit.rb,
lib/msf/core/exploit/remote/java/rmi/client/registry.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx/server.rb,
lib/msf/core/exploit/remote/kerberos/client/ap_request.rb,
lib/msf/core/exploit/remote/kerberos/client/as_request.rb,
lib/msf/core/exploit/remote/kerberos/client/as_response.rb,
lib/msf/core/exploit/remote/kerberos/client/tgs_request.rb,
lib/msf/core/exploit/remote/kerberos/client/tgs_response.rb,
lib/msf/core/exploit/remote/relay/kerberos/relay_handler.rb,
lib/msf/core/exploit/remote/http/rails_active_storage_vips.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx/connection.rb,
lib/msf/core/exploit/remote/http/manage_engine_adaudit_plus.rb,
lib/msf/core/exploit/remote/java/rmi/client/registry/parser.rb,
lib/msf/core/exploit/remote/java/rmi/client/registry/builder.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx/server/parser.rb,
lib/msf/core/exploit/remote/relay/kerberos/target/http/client.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx/server/builder.rb,
lib/msf/core/exploit/remote/java/rmi/client/jmx/connection/builder.rb
Overview
The remote exploit class is a specialization of the exploit module class that is geared toward exploits that are performed against targets other than the local machine. This typically implies exploiting other machines via a network connection, though it is not limited to this scope.
Defined Under Namespace
Modules: AFP, Arkeia, Asterisk, AuthOption, AutoCheck, BrowserAutopwn, BrowserAutopwn2, BrowserExploitServer, BrowserProfileManager, CertRequest, CertificateTrace, CheckModule, DB2, DCERPC, DCERPC_EPM, DCERPC_LSA, DCERPC_MGMT, DNS, Dialup, Expect, FirefoxAddonGenerator, FirefoxPrivilegeEscalation, Ftp, FtpServer, Gdb, HTTP, HttpClient, HttpServer, Imap, Ip, Ipv6, Java, JndiInjection, Kerberos, LDAP, Log4Shell, MSSQL, MSSQL_COMMANDS, MSSQL_SQLI, MYSQL, MsGkdi, MsIcpr, MsLsad, MsLsat, MsSamr, MsWkst, NDMP, NDMPSocket, Nuuo, Pkcs12, Pop2, Postgres, RDP, RealPort, Relay, SIP, SMB, SMTPDeliver, SNMPClient, SSH, Smtp, SocketServer, SunRPC, TNS, Tcp, TcpServer, Telnet, TincdExploitClient, Udp, Unirpc, VIMSoap, WDBRPC, WDBRPC_Client, Web, WinRM, X11, ZeroMQ
Instance Attribute Summary collapse
-
#sockets ⇒ Object
protected
The list of sockets established by this exploit.
Instance Method Summary collapse
-
#abort_sockets ⇒ Object
This method is called once a new session has been created on behalf of this exploit instance and all socket connections created by this exploit should be closed.
-
#add_socket(sock) ⇒ Object
Adds a socket to the list of sockets opened by this exploit.
-
#exploit_type ⇒ Object
Returns the fact that this exploit is a remote exploit.
-
#initialize(info) ⇒ Remote
constructor
Initializes the socket array.
-
#remove_socket(sock) ⇒ Object
Removes a socket from the list of sockets.
Methods included from AutoTarget
#auto_target?, #auto_target_host, #auto_targeted_index, #filter_by_os, #filter_by_os_family, #filter_by_os_name, #filter_by_os_sp, #select_target
Constructor Details
#initialize(info) ⇒ Remote
Initializes the socket array.
16 17 18 19 20 |
# File 'lib/msf/core/exploit/remote.rb', line 16 def initialize(info) super self.sockets = Array.new end |
Instance Attribute Details
#sockets ⇒ Object (protected)
The list of sockets established by this exploit.
64 65 66 |
# File 'lib/msf/core/exploit/remote.rb', line 64 def sockets @sockets end |
Instance Method Details
#abort_sockets ⇒ Object
This method is called once a new session has been created on behalf of this exploit instance and all socket connections created by this exploit should be closed.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/msf/core/exploit/remote.rb', line 48 def abort_sockets sockets.delete_if { |sock| begin sock.close rescue ::Exception end true } end |
#add_socket(sock) ⇒ Object
Adds a socket to the list of sockets opened by this exploit.
32 33 34 |
# File 'lib/msf/core/exploit/remote.rb', line 32 def add_socket(sock) self.sockets << sock end |
#exploit_type ⇒ Object
Returns the fact that this exploit is a remote exploit.
25 26 27 |
# File 'lib/msf/core/exploit/remote.rb', line 25 def exploit_type Exploit::Type::Remote end |
#remove_socket(sock) ⇒ Object
Removes a socket from the list of sockets.
39 40 41 |
# File 'lib/msf/core/exploit/remote.rb', line 39 def remove_socket(sock) self.sockets.delete(sock) end |