Skip to content

Commit 619a284

Browse files
authored
Land #20156, modules/post: Resolve RuboCop violations and typos
Land #20156, modules/post: Resolve RuboCop violations and typos
2 parents 509ade7 + 81a4053 commit 619a284

24 files changed

+27
-26
lines changed

modules/post/firefox/gather/xss.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def js_payload
6363
6464
hiddenWindow.location = 'about:blank';
6565
var src = (#{JSON.unparse({ src: js })}).src;
66-
var key = "#{Rex::Text.rand_text_alphanumeric(rand(8..19))}";
66+
var key = "#{Rex::Text.rand_text_alphanumeric(8..19)}";
6767
6868
hiddenWindow[key] = true;
6969
hiddenWindow.location = "#{datastore['URL']}";

modules/post/linux/gather/f5_loot_mcp.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def initialize(info = {})
3131
],
3232
'DisclosureDate' => '2022-11-16',
3333
'Notes' => {
34-
'Stability' => [],
34+
'Stability' => [CRASH_SAFE],
3535
'Reliability' => [],
3636
'SideEffects' => []
3737
}

modules/post/linux/gather/mimipenguin.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def initialize(info = {})
4242
'DisclosureDate' => '2018-05-23',
4343
'DefaultTarget' => 0,
4444
'Notes' => {
45-
'Stability' => [],
45+
'Stability' => [CRASH_SAFE],
4646
'Reliability' => [],
4747
'SideEffects' => []
4848
},

modules/post/linux/gather/rancher_audit_log_leak.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info = {})
3333
],
3434
'DisclosureDate' => '2024-02-08',
3535
'Notes' => {
36-
'Stability' => [],
36+
'Stability' => [CRASH_SAFE],
3737
'Reliability' => [],
3838
'SideEffects' => []
3939
}

modules/post/linux/manage/disable_clamav.rb

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
##
55

66
class MetasploitModule < Msf::Post
7-
Rank = ExcellentRanking
87
include Msf::Post::File
98
include Msf::Post::Unix
109

modules/post/multi/gather/dbeaver.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(info = {})
2525
'Platform' => [ 'linux', 'win', 'osx', 'unix'],
2626
'SessionTypes' => [ 'meterpreter', 'shell', 'powershell' ],
2727
'Notes' => {
28-
'Stability' => [],
28+
'Stability' => [CRASH_SAFE],
2929
'Reliability' => [],
3030
'SideEffects' => []
3131
}

modules/post/multi/gather/electerm.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(info = {})
2424
'Platform' => [ 'linux', 'win', 'osx', 'unix'],
2525
'SessionTypes' => [ 'meterpreter', 'shell', 'powershell' ],
2626
'Notes' => {
27-
'Stability' => [],
27+
'Stability' => [CRASH_SAFE],
2828
'Reliability' => [],
2929
'SideEffects' => []
3030
}

modules/post/multi/gather/firefox_creds.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def do_decrypt
118118

119119
omnija = nil # non meterpreter download
120120
org_file = 'omni.ja' # key file
121-
new_file = Rex::Text.rand_text_alpha(rand(5..7)) + '.ja'
121+
new_file = Rex::Text.rand_text_alpha(5..7) + '.ja'
122122
temp_file = 'orgomni.ja' # backup of key file
123123

124124
# Sets @paths

modules/post/multi/gather/minio_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(info = {})
2121
'Platform' => [ 'win', 'linux', 'osx', 'unix' ],
2222
'SessionTypes' => %w[meterpreter powershell shell],
2323
'Notes' => {
24-
'Stability' => [],
24+
'Stability' => [CRASH_SAFE],
2525
'Reliability' => [],
2626
'SideEffects' => []
2727
}

modules/post/multi/gather/wlan_geolocate.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def run
229229
rescue Rex::TimeoutError, Rex::Post::Meterpreter::RequestError => e
230230
vprint_error(e.message)
231231
rescue StandardError => e
232-
print_status("The following Error was encountered: #{e.class} #{e}")
232+
print_status("The following error was encountered: #{e.class} #{e}")
233233
end
234234

235235
end

modules/post/multi/gather/wowza_streaming_engine_creds.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info = {})
2323
'Platform' => %w[win linux osx unix],
2424
'SessionTypes' => %w[meterpreter powershell shell],
2525
'Notes' => {
26-
'Stability' => [],
26+
'Stability' => [CRASH_SAFE],
2727
'Reliability' => [],
2828
'SideEffects' => []
2929
}

modules/post/multi/general/close.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def initialize(info = {})
1616
'Platform' => %w[linux osx unix win],
1717
'SessionTypes' => [ 'shell', 'meterpreter' ],
1818
'Notes' => {
19-
'Stability' => [],
19+
'Stability' => [CRASH_SERVICE_DOWN],
2020
'SideEffects' => [],
2121
'Reliability' => []
2222
}

modules/post/multi/manage/screensaver.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def initialize(info = {})
2222
],
2323
'Platform' => [ 'linux', 'osx', 'win', 'unix', 'solaris' ],
2424
'SessionTypes' => [ 'shell', 'meterpreter' ],
25+
'DefaultAction' => 'LOCK',
2526
'Actions' => [
2627
[ 'LOCK', { 'Description' => 'Lock the current session' } ],
2728
[ 'UNLOCK', { 'Description' => 'Unlock the current session' } ],
@@ -33,8 +34,8 @@ def initialize(info = {})
3334
],
3435
'Notes' => {
3536
'Reliability' => [ ],
36-
'Stability' => [ ],
37-
'SideEffects' => [ ]
37+
'Stability' => [CRASH_SAFE],
38+
'SideEffects' => [SCREEN_EFFECTS]
3839
}
3940
)
4041
)

modules/post/osx/gather/enum_keychain.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(info = {})
2424
'SessionTypes' => [ 'meterpreter', 'shell' ],
2525
'Notes' => {
2626
'Stability' => [CRASH_SAFE],
27-
'SideEffects' => [ARTIFACTS_ON_DISK],
27+
'SideEffects' => [ARTIFACTS_ON_DISK, SCREEN_EFFECTS],
2828
'Reliability' => []
2929
}
3030
)

modules/post/windows/gather/bloodhound.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(info = {})
2525
'Notes' => {
2626
'AKA' => ['sharphound'],
2727
'SideEffects' => [ARTIFACTS_ON_DISK],
28-
'Stability' => [],
28+
'Stability' => [CRASH_SAFE],
2929
'Reliability' => []
3030
}
3131
)

modules/post/windows/gather/credentials/moba_xterm.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize(info = {})
2828
'Platform' => [ 'win' ],
2929
'SessionTypes' => [ 'meterpreter' ],
3030
'Notes' => {
31-
'Stability' => [],
31+
'Stability' => [CRASH_SAFE],
3232
'Reliability' => [],
3333
'SideEffects' => []
3434
},

modules/post/windows/gather/credentials/navicat.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ class MetasploitModule < Msf::Post
1111
include Msf::Post::File
1212
# secret_key = Digest::SHA1.digest('3DC5CA39')
1313
SECRET_KEY = "B\xCE\xB2q\xA5\xE4X\xB7J\xEA\x93\x94y\"5C\x91\x873@".freeze
14+
1415
def initialize(info = {})
1516
super(
1617
update_info(
1718
info,
1819
'Name' => 'Windows Gather Navicat Passwords',
19-
'Description' => %q{ This module will find and decrypt stored Navicat passwords },
20+
'Description' => %q{ This module will find and decrypt stored Navicat passwords. },
2021
'License' => MSF_LICENSE,
2122
'References' => [
2223
[ 'URL', 'https://github.com/HyperSine/how-does-navicat-encrypt-password'],
@@ -29,7 +30,7 @@ def initialize(info = {})
2930
'Platform' => [ 'win' ],
3031
'SessionTypes' => [ 'meterpreter', 'shell'],
3132
'Notes' => {
32-
'Stability' => [],
33+
'Stability' => [CRASH_SAFE],
3334
'Reliability' => [],
3435
'SideEffects' => []
3536
}

modules/post/windows/gather/credentials/securecrt.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(info = {})
3030
'SessionTypes' => [ 'meterpreter' ],
3131
'Notes' => {
3232
'Reliability' => [],
33-
'Stability' => [],
33+
'Stability' => [ CRASH_SAFE ],
3434
'SideEffects' => [ IOC_IN_LOGS ]
3535
},
3636
'Compat' => {

modules/post/windows/gather/credentials/viber.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MetasploitModule < Msf::Post
3535
path: 'AppData',
3636
dir: 'ViberPC',
3737
artifact_file_name: '*.jpg',
38-
description: 'Collects all images of contacts and sent recieved',
38+
description: 'Collects all images of contacts and sent received',
3939
credential_type: 'image'
4040
}
4141
]

modules/post/windows/gather/credentials/xchat.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MetasploitModule < Msf::Post
1919
path: 'AppData',
2020
dir: 'X-Chat 2',
2121
artifact_file_name: '*.txt',
22-
description: 'Collects all chatting conversations of sent and recieved',
22+
description: 'Collects all chatting conversations of sent and received',
2323
credential_type: 'text',
2424
regex_search: [
2525
{

modules/post/windows/gather/forensics/recovery_files.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def go_over_mft(logc, offset, handle, files)
252252
end
253253
end
254254

255-
# Recieve the MFT data runs and list/save the deleted files
255+
# Receive the MFT data runs and list/save the deleted files
256256
# Useful cheat_sheet to understand the MFT structure: http://www.writeblocked.org/resources/ntfs_cheat_sheets.pdf
257257
# Recap of each of the attributes: http://runenordvik.com/doc/MFT-table.pdf
258258
def deleted_files(data_runs, handle, files)

modules/post/windows/manage/kerberos_tickets.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def initialize(info = {})
6161
],
6262
'DefaultAction' => 'DUMP_TICKETS',
6363
'Notes' => {
64-
'Stability' => [],
64+
'Stability' => [CRASH_SAFE],
6565
'Reliability' => [],
6666
'SideEffects' => []
6767
},

modules/post/windows/wlan/wlan_current_connection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def query_current_connection(wlan_handle, guid)
189189
signal = @host_process.memory.read(pointer, 4)
190190
connection['signal'] = signal.unpack('V')[0]
191191

192-
# Grabs the recieve rate value
192+
# Grabs the receive rate value
193193
pointer = (pointer + 4)
194194
rxrate = @host_process.memory.read(pointer, 4)
195195
connection['rxrate'] = rxrate.unpack('V')[0]

modules/post/windows/wlan/wlan_disconnect.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def query_current_connection(wlan_handle, guid)
225225
signal = @host_process.memory.read(pointer, 4)
226226
connection['signal'] = signal.unpack('V')[0]
227227

228-
# Grabs the recieve rate value
228+
# Grabs the receive rate value
229229
pointer = (pointer + 4)
230230
rxrate = @host_process.memory.read(pointer, 4)
231231
connection['rxrate'] = rxrate.unpack('V')[0]

0 commit comments

Comments
 (0)