cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Nielsb
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 1 of 22

Detection of hivenightmare aka serioussam

Jump to solution
1 Solution

Accepted Solutions
AdithyanT
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 20 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Hi @bodysoda@Nielsb@Daveb3d, @Former Member, @Former Member,

Thank you for your kind time and patience with us. The resolution is via Exploit rule just like @Daveb3d 's solution here. Please find this published KBA for your kind perusal:

McAfee coverage for July 2021 CVE-2021-36934 "HiveNightmare/SeriousSAM" vulnerability

Was my reply helpful?
If you find this post useful, Please give it a Kudos! Also, Please don't forget to select "Accept as a solution" if this reply resolves your query!

Thanks and regards,
Adithyan T

View solution in original post

21 Replies
Daveb3d
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 2 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Hasn't been tested for FPs yet.  I'll update as needed but definitely stops HiveNightmare.exe.

Rule {
	Process {
		Include OBJECT_NAME {
			-v "**"
		}
	}
	Target {
		Match FILE {
			Include OBJECT_NAME { -v "**\\HarddiskVolumeShadowCopy?\\Windows\\System32\\config\\SAM" }
			Include -access "READ"
		}
	}
}

 

Daveb3d
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 3 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

This rule stops "Users" from being able to read the SAM file directly.

Rule {
	Process {
		Include OBJECT_NAME { -v "**" }
		Include GROUP_SID { -v "S-1-5-32-545" }
	}
	Target {
		Match FILE {
			Include OBJECT_NAME { -v "c:\\Windows\\System32\\config\\SAM" }
			Include -access "READ"
		}
	}
}

 

Former Member
Not applicable
Report Inappropriate Content
Message 4 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Its worth noting that C:\windows\system32\config\SECURITY is also affected.

Daveb3d
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 5 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Yes, the logic can be extended.  Just add the same path with the different name.

1) I would expect a few possible false positives.  1) is in the OS and a couple of other third-party tools.  They are easy to exclude.  I won't say them to expose them as abuse targets. 

2) I would swap the ? wildcard with a *, in case you have more than 9 shadow copies. 

Dave

Former Member
Not applicable
Report Inappropriate Content
Message 6 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Hi Daveb3d ,


This rule not working for me. I understand the command in CMD when it call. So, I write rule and detect it. My rule is : 

 

Rule {
Process {
Include OBJECT_NAME { -v "**" }
Include PROCESS_CMD_LINE {-v "c:\Windows\System32\config\SAM" }
Include PROCESS_CMD_LINE {-v "c:\Windows\System32\config\SYSTEM" }
Include PROCESS_CMD_LINE {-v "c:\Windows\System32\config\SECURITY" }
}
Target {
Match FILE {
Include -access "READ WRITE EXECUTE"
}
}
}

I cant write rule detect:  

"**\\HarddiskVolumeShadowCopy?\\Windows\\System32\\config\\SAM"

 anyone help me? 

Tks you

Daveb3d
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 7 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Did you deploy both rules? What are you doing specifically when you say it doesn't work?  I ask because I validated it personally,  and have had another person confirm it works. 

I'm not sure what you want in your rule,  but be sure to use a double \\.

bodysoda
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 8 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution
Thanks for starting this post which benefits the rest of the community.
In case above information was useful or answered your question, please select "Accept as Solution" in my reply, or give a Kudo. Thanks!
Nielsb
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 9 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

Hi

I have response from the Labs present now.

The Exploit Prevention Rule 6143 protects the Systems against the mentioned Vulnerability of the SAM Database

Signature 6143: Attempt To Dump Password Hash From SAM Database
Description:
- This event indicates an attempt to dump the contents of the SAM
database of any Windows system. Malicious program accesses the
Security Access Manager (SAM), lowers its permissions, and then
outputs the password hashes to attacker’s screen (or a file, if
specified). The hashes can be used in combination with other
password-cracking tool to obtain the plain text password for the
system.

- This signature is Disabled by default.

https://www.mcafee.com/enterprise/en-us/assets/release-notes/exploit-prevention/mep-10-08-2019.pdf

 

 

Daveb3d
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 10 of 22

Re: Detection of hivenightmare aka serioussam

Jump to solution

It doesn't...  Not sure what they tested, but I'm running the POC with the rule on and it works fine without any events. See the attached. Perhaps it is simply because they are ignoring that the volume shadow copy has vulnerable copies in it.

Dave

 

 

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community