Skip to content

Commit aa93c6e

Browse files
author
certcc-ghbot
committed
Merge remote-tracking branch 'upstream/master'
2 parents cea0fd1 + 8858537 commit aa93c6e

13 files changed

Lines changed: 232 additions & 122 deletions

File tree

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
metasploit-framework (6.4.125)
4+
metasploit-framework (6.4.126)
55
aarch64
66
abbrev
77
actionpack (~> 7.2.0)
@@ -497,7 +497,7 @@ GEM
497497
rex-core
498498
rex-struct2
499499
rex-text
500-
rex-core (0.1.35)
500+
rex-core (0.1.36)
501501
rex-encoder (0.1.8)
502502
metasm
503503
rex-arch

LICENSE_GEMS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ base64, 0.3.0, "ruby, Simplified BSD"
2727
bcrypt, 3.1.20, MIT
2828
bcrypt_pbkdf, 1.1.1, MIT
2929
benchmark, 0.4.1, "ruby, Simplified BSD"
30-
bigdecimal, 3.2.3, "ruby, Simplified BSD"
30+
bigdecimal, 3.3.1, "ruby, Simplified BSD"
3131
bindata, 2.4.15, "Simplified BSD"
3232
bootsnap, 1.18.4, MIT
3333
bson, 5.1.1, "Apache 2.0"
@@ -97,7 +97,7 @@ memory_profiler, 1.1.0, MIT
9797
metasm, 1.0.5, LGPL-2.1
9898
metasploit-concern, 5.0.5, "New BSD"
9999
metasploit-credential, 6.0.20, "New BSD"
100-
metasploit-framework, 6.4.125, "New BSD"
100+
metasploit-framework, 6.4.126, "New BSD"
101101
metasploit-model, 5.0.4, "New BSD"
102102
metasploit-payloads, 2.0.242, "3-clause (or ""modified"") BSD"
103103
metasploit_data_models, 6.0.15, "New BSD"
@@ -167,8 +167,8 @@ reline, 0.6.2, ruby
167167
require_all, 3.0.0, MIT
168168
rest-client, 2.1.0, MIT
169169
rex-arch, 0.1.19, "New BSD"
170-
rex-bin_tools, 0.1.10, "New BSD"
171-
rex-core, 0.1.35, "New BSD"
170+
rex-bin_tools, 0.1.15, "New BSD"
171+
rex-core, 0.1.36, "New BSD"
172172
rex-encoder, 0.1.8, "New BSD"
173173
rex-exploitation, 0.1.44, "New BSD"
174174
rex-java, 0.1.8, "New BSD"

db/modules_metadata_base.json

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47416,7 +47416,7 @@
4741647416
"https"
4741747417
],
4741847418
"targets": null,
47419-
"mod_time": "2024-12-29 17:25:12 +0000",
47419+
"mod_time": "2026-04-02 10:52:57 +0000",
4742047420
"path": "/modules/auxiliary/scanner/http/wp_perfect_survey_sqli.rb",
4742147421
"is_install_path": true,
4742247422
"ref_name": "scanner/http/wp_perfect_survey_sqli",
@@ -49287,7 +49287,7 @@
4928749287
"autofilter_ports": [],
4928849288
"autofilter_services": [],
4928949289
"targets": null,
49290-
"mod_time": "2026-02-09 15:17:23 +0000",
49290+
"mod_time": "2026-04-01 20:34:46 +0000",
4929149291
"path": "/modules/auxiliary/scanner/misc/cups_browsed_info_disclosure.rb",
4929249292
"is_install_path": true,
4929349293
"ref_name": "scanner/misc/cups_browsed_info_disclosure",
@@ -261289,43 +261289,6 @@
261289261289
"adapted_refname": "windows/x64/download_exec",
261290261290
"staged": false
261291261291
},
261292-
"payload_cmd/windows/powershell/x64/encrypted_shell/reverse_tcp": {
261293-
"name": "Powershell Exec, Windows Command Shell, Encrypted Reverse TCP Stager",
261294-
"fullname": "payload/cmd/windows/powershell/x64/encrypted_shell/reverse_tcp",
261295-
"aliases": [],
261296-
"rank": 300,
261297-
"disclosure_date": null,
261298-
"type": "payload",
261299-
"author": [
261300-
"Spencer McIntyre",
261301-
"Matt Graeber",
261302-
"Shelby Pace"
261303-
],
261304-
"description": "Execute an x64 payload from a command via PowerShell.\n\nSpawn a piped command shell (staged).\n\nConnect to MSF and read in stage",
261305-
"references": [],
261306-
"platform": "Windows",
261307-
"arch": "cmd",
261308-
"rport": null,
261309-
"autofilter_ports": null,
261310-
"autofilter_services": null,
261311-
"targets": null,
261312-
"mod_time": "2022-05-27 16:41:25 +0000",
261313-
"path": "/modules/payloads/adapters/cmd/windows/powershell/x64.rb",
261314-
"is_install_path": true,
261315-
"ref_name": "cmd/windows/powershell/x64/encrypted_shell/reverse_tcp",
261316-
"check": false,
261317-
"post_auth": false,
261318-
"default_credential": false,
261319-
"notes": {},
261320-
"session_types": false,
261321-
"needs_cleanup": false,
261322-
"payload_type": 8,
261323-
"adapter_refname": "cmd/windows/powershell/x64",
261324-
"adapted_refname": "windows/x64/encrypted_shell/reverse_tcp",
261325-
"staged": true,
261326-
"stage_refname": "windows/x64/encrypted_shell",
261327-
"stager_refname": "windows/x64/encrypted_reverse_tcp"
261328-
},
261329261292
"payload_cmd/windows/powershell/x64/exec": {
261330261293
"name": "Powershell Exec, Windows x64 Execute Command",
261331261294
"fullname": "payload/cmd/windows/powershell/x64/exec",
@@ -288622,7 +288585,7 @@
288622288585
"autofilter_ports": null,
288623288586
"autofilter_services": null,
288624288587
"targets": null,
288625-
"mod_time": "2026-03-19 10:23:07 +0000",
288588+
"mod_time": "2026-03-31 11:39:58 +0000",
288626288589
"path": "/modules/payloads/stagers/windows/x64/encrypted_reverse_tcp.rb",
288627288590
"is_install_path": true,
288628288591
"ref_name": "windows/x64/encrypted_shell/reverse_tcp",
@@ -288656,7 +288619,7 @@
288656288619
"autofilter_ports": null,
288657288620
"autofilter_services": null,
288658288621
"targets": null,
288659-
"mod_time": "2026-03-19 10:23:07 +0000",
288622+
"mod_time": "2026-03-31 11:39:58 +0000",
288660288623
"path": "/modules/payloads/singles/windows/x64/encrypted_shell_reverse_tcp.rb",
288661288624
"is_install_path": true,
288662288625
"ref_name": "windows/x64/encrypted_shell_reverse_tcp",

lib/metasploit/framework/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def self.get_hash
3232
end
3333
end
3434

35-
VERSION = "6.4.125"
35+
VERSION = "6.4.126"
3636
MAJOR, MINOR, PATCH = VERSION.split('.').map { |x| x.to_i }
3737
PRERELEASE = 'dev'
3838
HASH = get_hash

lib/msf/core/author.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,14 @@ def from_s(str)
161161
end
162162
end
163163

164-
self.name.strip! if self.name.present?
165-
166164
# The parse succeeds only when a name is found
167165
self.name.present?
168166
end
169167

170168
# Sets the name of the author and updates the email if it's a known author.
171169
# @param name [String] the name to set
172170
def name=(name)
171+
name = name.strip if name.present?
173172
if KNOWN.has_key?(name)
174173
self.email = KNOWN[name]
175174
end

lib/rex/proto/proxy/socks5/server.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: binary -*-
22

33
require 'thread'
4+
require 'rex/io/relay_manager'
45
require 'rex/socket'
56

67
module Rex
@@ -22,6 +23,7 @@ def initialize(opts={})
2223
@clients = ::Array.new
2324
@running = false
2425
@server_thread = nil
26+
@relay_manager = Rex::IO::RelayManager.new
2527
end
2628

2729
#
@@ -100,6 +102,7 @@ def remove_client(client)
100102
end
101103

102104
attr_reader :opts
105+
attr_reader :relay_manager
103106
end
104107
end
105108
end

lib/rex/proto/proxy/socks5/server_client.rb

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -12,61 +12,6 @@ module Proxy
1212
# A client connected to the proxy server.
1313
#
1414
module Socks5
15-
#
16-
# A mixin for a socket to perform a relay to another socket.
17-
#
18-
module TcpRelay
19-
#
20-
# TcpRelay data coming in from relay_sock to this socket.
21-
#
22-
def relay(relay_client, relay_sock)
23-
@relay_client = relay_client
24-
@relay_sock = relay_sock
25-
# start the relay thread (modified from Rex::IO::StreamAbstraction)
26-
@relay_thread = Rex::ThreadFactory.spawn("SOCKS5ProxyServerTcpRelay", false) do
27-
loop do
28-
closed = false
29-
buf = nil
30-
31-
begin
32-
s = Rex::ThreadSafe.select([@relay_sock], nil, nil, 0.2)
33-
next if s.nil? || s[0].nil?
34-
rescue
35-
closed = true
36-
end
37-
38-
unless closed
39-
begin
40-
buf = @relay_sock.sysread( 32768 )
41-
closed = buf.nil?
42-
rescue
43-
closed = true
44-
end
45-
end
46-
47-
unless closed
48-
total_sent = 0
49-
total_length = buf.length
50-
while total_sent < total_length
51-
begin
52-
data = buf[total_sent, buf.length]
53-
sent = self.write(data)
54-
total_sent += sent if sent > 0
55-
rescue
56-
closed = true
57-
break
58-
end
59-
end
60-
end
61-
62-
if closed
63-
@relay_client.stop
64-
::Thread.exit
65-
end
66-
end
67-
end
68-
end
69-
end
7015

7116
#
7217
# A client connected to the SOCKS5 server.
@@ -122,13 +67,13 @@ def start
12267

12368
# handle the request
12469
handle_command
125-
rescue => exception
70+
rescue StandardError => e
12671
# respond with a general failure to the client
12772
response = ResponsePacket.new
12873
response.command = REPLY_GENERAL_FAILURE
12974
@lsock.put(response.to_binary_s)
13075

131-
wlog("Client.start - #{$!}")
76+
elog('ServerClient#start - encountered a problem while processing the client connection', error:e)
13277
self.stop
13378
end
13479
end
@@ -259,15 +204,11 @@ def handle_command_udp_associate(request)
259204
end
260205

261206
#
262-
# Setup the TcpRelay between lsock and rsock.
207+
# Setup the relay between lsock and rsock.
263208
#
264209
def setup_tcp_relay
265-
# setup the two way relay for full duplex io
266-
@lsock.extend(TcpRelay)
267-
@rsock.extend(TcpRelay)
268-
# start the socket relays...
269-
@lsock.relay(self, @rsock)
270-
@rsock.relay(self, @lsock)
210+
@server.relay_manager.add_relay(@rsock, sink: @lsock, name: 'SOCKS5ProxyRelay-Remote', on_exit: method(:stop))
211+
@server.relay_manager.add_relay(@lsock, sink: @rsock, name: 'SOCKS5ProxyRelay-Local', on_exit: method(:stop))
271212
end
272213

273214
#
@@ -286,9 +227,13 @@ def stop
286227
rescue
287228
end
288229

289-
@client_thread.kill if @client_thread and @client_thread.alive?
290230
@server.remove_client(self)
291231
@closed = true
232+
233+
unless @client_thread == Thread.current
234+
@client_thread.join
235+
end
236+
@client_thread = nil
292237
end
293238
end
294239
end

modules/auxiliary/scanner/http/wp_perfect_survey_sqli.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ def get_sqli_object
6363
})
6464

6565
# Validate response
66-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res
67-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res.code == 200
66+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res
67+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless res.code == 200
6868

6969
html_content = res.get_json_document['html']
70-
fail_with(Failure::Unknown, 'HTML content is empty') unless html_content
70+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless html_content
7171

7272
# Extract data from response
7373
match_data = /survey_question_p">([^<]+)/.match(html_content)
74-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG unless match_data
74+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless match_data
7575

7676
extracted_data = match_data.captures[0]
77-
return GET_SQLI_OBJECT_FAILED_ERROR_MSG unless extracted_data
77+
next GET_SQLI_OBJECT_FAILED_ERROR_MSG unless extracted_data
7878

7979
extracted_data
8080
end

modules/auxiliary/scanner/misc/cups_browsed_info_disclosure.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
##
24
# This module requires Metasploit: https://metasploit.com/download
35
# Current source: https://github.com/rapid7/metasploit-framework

modules/payloads/singles/windows/x64/encrypted_shell_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##
55

66
module MetasploitModule
7-
CachedSize = 4176
7+
CachedSize = 4608
88

99
include Msf::Payload::Windows
1010
include Msf::Payload::Single

0 commit comments

Comments
 (0)