CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/post/meterpreter/extensions/extapi/extapi.rb
Views: 11791
1
# -*- coding: binary -*-
2
3
require 'rex/post/meterpreter/extensions/extapi/tlv'
4
require 'rex/post/meterpreter/extensions/extapi/command_ids'
5
require 'rex/post/meterpreter/extensions/extapi/window/window'
6
require 'rex/post/meterpreter/extensions/extapi/service/service'
7
require 'rex/post/meterpreter/extensions/extapi/clipboard/clipboard'
8
require 'rex/post/meterpreter/extensions/extapi/adsi/adsi'
9
require 'rex/post/meterpreter/extensions/extapi/ntds/ntds'
10
require 'rex/post/meterpreter/extensions/extapi/pageant/pageant'
11
require 'rex/post/meterpreter/extensions/extapi/wmi/wmi'
12
13
module Rex
14
module Post
15
module Meterpreter
16
module Extensions
17
module Extapi
18
19
###
20
#
21
# This meterpreter extension contains an extended API which will allow for more
22
# advanced enumeration of the victim.
23
#
24
###
25
class Extapi < Extension
26
27
def self.extension_id
28
EXTENSION_ID_EXTAPI
29
end
30
31
def initialize(client)
32
super(client, 'extapi')
33
34
client.register_extension_aliases(
35
[
36
{
37
'name' => 'extapi',
38
'ext' => ObjectAliases.new(
39
{
40
'window' => Rex::Post::Meterpreter::Extensions::Extapi::Window::Window.new(client),
41
'service' => Rex::Post::Meterpreter::Extensions::Extapi::Service::Service.new(client),
42
'clipboard' => Rex::Post::Meterpreter::Extensions::Extapi::Clipboard::Clipboard.new(client),
43
'adsi' => Rex::Post::Meterpreter::Extensions::Extapi::Adsi::Adsi.new(client),
44
'ntds' => Rex::Post::Meterpreter::Extensions::Extapi::Ntds::Ntds.new(client),
45
'pageant' => Rex::Post::Meterpreter::Extensions::Extapi::Pageant::Pageant.new(client),
46
'wmi' => Rex::Post::Meterpreter::Extensions::Extapi::Wmi::Wmi.new(client)
47
})
48
},
49
])
50
end
51
52
end
53
54
end; end; end; end; end
55
56