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/modules/exploits/multi/hams/steamed.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = ManualRanking
8
9
def initialize(info = {})
10
super(
11
update_info(
12
info,
13
'Name' => 'Steamed Hams',
14
'Description' => "but it's a Metasploit Module",
15
'License' => MSF_LICENSE,
16
'Author' => [ 'bcook-r7' ],
17
'DisclosureDate' => '2018-04-01',
18
'References' => [['URL', 'https://www.youtube.com/watch?v=mkX3dO6KN54']],
19
'Platform' => %w[android apple_ios bsd java js linux osx nodejs php python ruby solaris unix win mainframe multi],
20
'Arch' => ARCH_ALL,
21
'Targets' => [
22
[ 'An Unforgettable Luncheon', {
23
'script' => %q(
24
Q2FzdDogJXllbFvwn6SUXSAlYmx1W/CfmJNdICVncm5b8J+RqfCfjqRdICVncm5b8J+RtV0gJXJl
25
ZFvwn5qSXQpDaGFsbWVyczogV2VsbCwgU2V5bW91ciwgSSBtYWRlIGl0LSBkZXNwaXRlIHlvdXIg
26
ZGlyZWN0aW9ucy4KU2tpbm5lcjogQWguIFN1cGVyaW50ZW5kZW50IENoYWxtZXJzLgpTa2lubmVy
27
OiBXZWxjb21lLgpTa2lubmVyOiBJIGhvcGUgeW91J3JlIHByZXBhcmVkIGZvciBhbiB1bmZvcmdl
28
dHRhYmxlIGx1bmNoZW9uLgpDaGFsbWVyczogWWVhaC4KU2tpbm5lcjogT2gsIGVnYWRzIQpTa2lu
29
bmVyOiBNeSByb2FzdCBpcyBydWluZWQuClNraW5uZXI6IEJ1dCB3aGF0IGlmIEkgd2VyZSB0byBw
30
dXJjaGFzZSBmYXN0IGZvb2QgYW5kIGRpc2d1aXNl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gbWFkZSBhIG1vbmtleSBvdXQgb2Yg
101
bWUhClRyb3k6IEkgbG92ZSB5b3UsIERyLiBaYWl1cyEK)
102
} ],
103
],
104
'DefaultTarget' => 0,
105
)
106
)
107
end
108
109
def exploit
110
cast = []
111
castmap = {}
112
Base64.decode64(target['script']).each_line do |line|
113
target, msg = line.split(':').map(&:strip)
114
if target == 'Cast'
115
cast = msg.split(' ')
116
castmap = Hash.new { |hash, key| hash[key] = cast.rotate![-1] }
117
else
118
t = datastore['VERBOSE'] ? " #{target}:" : ""
119
print_line("%bld#{castmap[target]}#{t}%clr #{msg}")
120
sleep(0.30 * msg.split(' ').length)
121
end
122
end
123
end
124
end
125
126