
Fix for undefined method each in Metasploit’s bailiwicked_domain.rb (CVE-2008-1447 DNS cache poisoning module)
Fix for undefined method each in Metasploit’s bailiwicked_domain.rb (CVE-2008-1447 DNS cache poisoning module)
While testing CVE-2008-1447 using Metasploit, the original module crashed with:
undefined method `each` for an instance of IPAddr (NoMethodError)
This happens because the code calls .each on an IPAddr object instead of an array.
The fix is to wrap the IP object in an array before iterating: line 253
Array(rr1.address).each do |ip|
res2 = Net::DNS::Resolver.new(nameservers: [ip.to_s],...
# original code logic
end
✅ This prevents the NoMethodError and allows the module to run successfully.
bailiwicked_domain.rb with the fixed one in this repo.
/usr/share/metasploit-framework/modules/auxiliary/spoof/dns/bailiwicked_domain.rbThis module exploits a known DNS vulnerability (CVE-2008-1447).
👉 Use only in a controlled lab environment for research and educational purposes.
✨ If this fix helped you, consider giving the repo a ⭐!