Skip to content

Commit 2a065cd

Browse files
David MaloneyDavid Maloney
authored andcommitted
Land rapid7#7591, sinn3r's warbird check fix
Lands sinn3r's fix to the warbird license verification check in the payload segment injector
2 parents f13d012 + b2cc8e2 commit 2a065cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/msf/core/exe/segment_injector.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ def is_warbird?(pe)
137137
# .text:004136C1 add eax, 0Ch
138138
pattern = "\x64\xA1\x30\x00\x00\x00\x2B\xCA\xD1\xF9\x8B\x40\x0C\x83\xC0\x0C"
139139
section = pe.sections.find { |s| s.name.to_s == '.text' }
140-
if section && section.encoded.pattern_scan(pattern).blank?
140+
if section.nil?
141+
return false
142+
elsif section && section.encoded.pattern_scan(pattern).blank?
141143
return false
142144
end
143145

0 commit comments

Comments
 (0)