Skip to content

Commit b2cc8e2

Browse files
committed
Fix rapid7#7569, Fix warbird check for missing text section
Fix rapid7#7569
1 parent 7b5c819 commit b2cc8e2

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)