From d9cb052189747dcd48017c8acee57b3085c70381 Mon Sep 17 00:00:00 2001 From: William Vu Date: Fri, 5 Oct 2018 02:10:42 -0500 Subject: [PATCH] Fix improper use of the Ruby shovel operator (<<) junk would be modified and returned, and we just want to return the concatenated string. Practically doesn't matter, but it's incorrect. This was my first public module. I've been wanting to fix this since. I'm noticing it again now as I look for how I used Ret in a target. --- modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb b/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb index bc24157d7b..ad494d7be5 100644 --- a/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb +++ b/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb @@ -70,6 +70,6 @@ class MetasploitModule < Msf::Exploit jump = Rex::Arch::X86.jmp_short(66) padding = rand_text(66) # Pad past buffer corruption - junk << seh << jump << padding << payload.encoded + junk + seh + jump + padding + payload.encoded end end