From 30228bcfe74938133ad0f6aea822bc9b3093a116 Mon Sep 17 00:00:00 2001 From: Mark Judice Date: Tue, 23 Dec 2014 22:27:44 -0600 Subject: [PATCH] Added underscore to user regex in smart_hashdump.rb to support usernames that contain underscores. Issue #4349. --- modules/post/windows/gather/smart_hashdump.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/post/windows/gather/smart_hashdump.rb b/modules/post/windows/gather/smart_hashdump.rb index cf62afdc32..4a1f6c4dba 100644 --- a/modules/post/windows/gather/smart_hashdump.rb +++ b/modules/post/windows/gather/smart_hashdump.rb @@ -323,7 +323,7 @@ class Metasploit3 < Msf::Post # skip if it returns nil for an entry next if h == nil begin - user = returned_hash[0].scan(/^[a-zA-Z0-9\-$.]*/).join.gsub(/\.$/,"") + user = returned_hash[0].scan(/^[a-zA-Z0-9_\-$.]*/).join.gsub(/\.$/,"") lmhash = returned_hash[2].scan(/[a-f0-9]*/).join next if lmhash == nil hash_entry = "#{user}:#{rid}:#{lmhash}:#{returned_hash[3]}"