From ffa340500f75c10621cd589a8778e7d5afa4fde9 Mon Sep 17 00:00:00 2001 From: Josh Hale Date: Sun, 10 Jul 2016 19:05:59 -0500 Subject: [PATCH] Tweek migration - Check rights to process before migrate --- plugins/beholder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/beholder.rb b/plugins/beholder.rb index 77dbadf27e..b05d8f4d40 100644 --- a/plugins/beholder.rb +++ b/plugins/beholder.rb @@ -180,8 +180,8 @@ class Plugin::Beholder < Msf::Plugin # Attempt to migrate, but flag that we tried either way self.state[sid][:migrated] = true - # Grab the first explorer.exe process we find - target_ps = ps.select{|x| x['name'].to_s.downcase == 'explorer.exe' }.first + # Grab the first explorer.exe process we find that we have rights to + target_ps = ps.select{|x| x['name'].to_s.downcase == 'explorer.exe' && x['user'].to_s != '' }.first unless target_ps # No explorer.exe process? session_log(sid, "no explorer.exe process found for automigrate")