Path: blob/master/modules/auxiliary/vsploit/malware/dns/dns_zeus.rb
19567 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary67def initialize8super(9'Name' => 'VSploit Zeus DNS Query Module',10'Description' => 'This module queries known Zeus Botnet DNS records.',11'Author' => 'MJC',12'License' => MSF_LICENSE,13'References' => [14[ 'URL', 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist']15],16'Notes' => {17'Stability' => [CRASH_SAFE],18'SideEffects' => [IOC_IN_LOGS],19'Reliability' => []20}21)22register_options(23[24OptString.new('DNS_SERVER', [false, 'Specifies a DNS server']),25OptInt.new('COUNT', [false, 'Number of intervals to loop', 1]),26OptInt.new('DELAY', [false, 'Delay in seconds between intervals', 3])27]28)29end3031def run32@res = Net::DNS::Resolver.new3334domain = [35'allspring.net', 'antifoher.biz', 'asdfasdgqghgsw.cx.cc',36'ashnmjjpoljfnl.info', 'atlaz.net', 'b3l.org', 'back.boroborogold.ru',37'bandwithcheckstart.com', 'batmanrobinho.com', 'bellicbridge.ru',38'bestfihteerdr.com', 'bestprice2you.net', 'billyd.com.au',39'bitschoonerop.com', 'blackskullbg.sytes.net', 'botikov.eu.tf',40'botnetdown.gicp.net', 'boutique.vcm-mode.it', 'brandc.name',41'bxkkuskgdjskdn.com', 'c0re.su', 'cdvqvnjqqtkqhsoo.info',42'christmassuper.com', 'ciritas.ru', 'citi-spb.ru', 'clavn.ru',43'client.trackups.org', 'client.upsclients.net', 'cnewsus.ru',44'cnnus.ru', 'concapow.in', 'consoleencydd.com', 'cqoqgzqmkpkrmlo.com',45'ctllutheran.org', 'currencytradechat.com', 'cyytmmlxsthywst.com',46'damaka.com', 'datacricketuf.ru', 'deimingames.com',47'dfhhdkdddqjda.start.tl', 'djerk.info', 'djpeterblue.com.br',48'dlmsonisfzksioqq.org', 'domio.pwomega.ru', 'favdstgssdqdsfg.start.tl',49'favoritopilodjd.com', 'favqnornkwvkwfxv.biz', 'fdhjkfhskas.com',50'federalreserve-report.com', 'federetoktyt.net'51]5253if datastore['DNS_SERVER']54@res.nameservers = datastore['DNS_SERVER']55end5657count = 05859while count < datastore['COUNT']6061domain.each do |name|62query = @res.query(name, 'A')63time = Time.new64time = time.strftime('%Y-%m-%d %H:%M:%S')65print_status("#{time} - DNS Query sent for => #{name}")66if query.answer.empty?67print_error("#{time} - #{name} => No Record Found")68else69a = query.answer[0].to_s.split(/[\s,]+/)70print_good("#{time} - #{name} => #{a[-1]}")71end72end73unless count == (datastore['COUNT'] - 1)74time = Time.new75time = time.strftime('%Y-%m-%d %H:%M:%S')76print_status("#{time} - Waiting #{datastore['DELAY']} seconds to query")77select(nil, nil, nil, datastore['DELAY'])78end79count += 180end81end82end838485