Hamid retweeted
Coming up on my 1 year anniversary with @HuntressLabs !
Taking this opportunity to go over some things myself and the team have seen in intrusions and drop some tips on basic things you can do to make your network more immune to compromise.
Let's start with initial access
- We see so much VPN compromise, it's by far our number 1 initial access vector - yes 0days for VPN appliance are there, but most of the time the compromise is a result of good ol' fashion credential stuffing or brute force.
- Some VPN appliances have decent log retention, others do not and it really sucks when only ~1 hour worth of logs are available - if you're standing up a SIEM or any kind of log collection effort in your org, make sure that devices which are externally exposed are sending their telemetry to the SIEM. If your VPN appliance has different logging settings, check them out and enable as needed - this telemetry is gold during intrusions.
- In addition to VPN appliances, we see a lot of RDP / RDS machines get compromised - same story here, no fancy 0days, just weak credentials in use. In some cases, MFA is in use, but has either been bypassed for the compromised user or has "failed open" - if you use RDP for your org, make sure that MFA is enabled somehow on it, if it is enabled, test to see what happens when the process that handles MFA crashes or is turned off. Also, make sure you have good procedures in place for turning MFA bypasses back off when they're applied.
- Remember to keep an eye on your web applications, deserialization attacks aren't super common, but happen fairly often. Turn on IIS logging and enable POST request logging if possible. Remember that a standard penetration test often does not deep dive into custom web applications, invest in a good Appsec focused test if you have a custom application exposed externally.
Turning to lateral movement
- Once inside networks, threat actors move very quickly and unfortunately do not run into a lot of resistance. We typically see multiple accounts compromised in rapid succession, suggesting weak or shared passwords in use. You have no idea how happy it makes me to see "LOGON_TYPE_NOT_GRANTED" in the logs - Yes I know segmenting your network is probably a pain, but its a very effective security control.
- In most cases we see, RDP is used for lateral movement and unfortunately, there is often no controls to prevent users from RDP'ing into servers they have no business need to RDP into. Check your Active Directory permissions and see what users can RDP into your file servers and domain controllers, you might be very surprised by what you find!
- Impacket & impacket-related tooling is very popular for lateral movement, if you are in charge of defending a network and have telemetry and a lab environment, try to use WMIExec etc for yourself and compare the telemetry you see versus normal activity, this is a great way to build high-fidelity alerts. Aside from that, remove local admin where possible. Local admin rights enable credential access and lateral movement avenues that would be shut right down were a non-admin account in use.
Looking at Execution / Impact
- Do threat actors use fancy 0days ? Yes of course, but in the cases we work, we rarely see it. Most of the time, "just enough tradecraft" is employed, all a TA needs is FileZilla and 7Zip to ruin your day.
- Tunneling tools like ngrok and plink are very popular, most often, these tools are being used to make RDP externally available to the TA - everyone loves a GUI I guess.
How do adversaries get credentials ?
- Registry credential dumping is extremely popular, same with LSASS credential dumping. Threat actors will also search local file systems and network shares for credentials and - guaranteed - will find them. By segmenting your network, limiting local admin access and hardening authentication silos within your AD environment ( things like a three-tiered admin model, or as close to it as you can get ) will limit the impact of credential theft drastically.
- Brute forcing is old and boring I get it, but unfortunately it works, especially for less-monitored environments, some cases we've seen hundreds of thousands brute force attempts for hours before an account is successfully compromised. Don't sleep on brute forcing, ensure you have account lock out policies in place and some kind of monitoring for brute force attacks.
Miscellaneous tidbits
- Please, please, please - change your default Windows log sizes via GPO. By default, these log channels do not hold a lot of data, if a threat actor undertakes a brute force in the environment, security-relevant telemetry will be clobbered hampering any investigation efforts.
- Have a standard naming convention for your organizations' workstations and servers, this makes it so much easier to orientate everything during an investigation and very often bubbles up malicious activity for workstations that don't fit the standard naming convention.
- Have a plan in place in case of an incident, it's bound to happen and it's better to be prepared. What happens if certain hosts need to be offline, who do you call to get a potential insurance claim started? What is the threshold for a formal IR engagement - deciding all these things under pressure from an incident is not ideal.
I think this post is long enough 😅 so I'll wrap it up 💙
Hamid retweeted
Introducing 🚀Eventlog Compendium 🚀
A new Streamlit app, that aims to be the go-to resource for understanding and playing with Windows Event Logs.
Explore it 👉 eventlog-compendium.streamli…
Includes the following utilities and docs
⚙️ Build your own Advanced Audit Policy based on different data points making your policy data driven.
🧭EventID to Audit Policy mapping as well MITRE ATT&CK to Event ID explorer
📊Leveraging the EVTX-ETW-Resources project, you can explore the different ETW providers by build, version and filter down on key message strings.
📄 EVTX Baseline Search & Match - Explore the evtx-baseline project in a visual way. Where you can paste logs and check if they match in real time
🧮Event Field Decoder - Decode common Windows Security Event fields such as Logon Types, Access Masks, Active Directory GUIDs and SIDs
🔒Built-in SACL Explorer - leveraging SACL Scanner from Alexander DeMine, you can explore the built-in SACLs on a windows system.
And much more to come. Stay tuned
I just published Practical Threat Hunting: A Walkthrough of the Temple Lab on SecDojo Platform.
Step-by-step guide to investigating a cyber attack in a Windows environment using the Temple threat hunting lab on SecDojo.
medium.com/p/practical-threa…
135
Hamid retweeted
🚨 Detect C2 Beacons!
New Microsoft Defender for Endpoint telemetry provides new opportunities for threat detection!
🔗
academy.bluraven.io/blog/bea…
#ThreatHunting #DetectionEngineering #MDE
Detecting IPv6 DNS Takeover!
I just dropped my first short blog on Medium about the detection of IPv6 DNS Takeover attack. The blog provides an easy method to detect this attack using Windows event logs.
Check it out 😄 and let me know your feedback! 💬
medium.com/@ninnesoturan/det…
286
Hamid retweeted
Detection engineering is all about understanding normal behavior and crafting rules to identify the abnormal
Hamid retweeted
Detection Baselines are like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it — Me
Enjoy the read! #DetectionEngineering
detect.fyi/baselines-101-bui…
Hamid retweeted
Because I talked recently about my "Seven Sins," here is another classic: An external entity informed our customer that their network was compromised (and also delivered evidence that the attackers might still be inside the network).
In the initial call, we asked if the customer observed malicious behavior and or received critical AV alerts. The answer was no... until we checked the AV logs for ourselves.
Yes - multiple Cobalt Strike detections! On multiple (critical) endpoints, among other offensive tooling.
Which brings me to Sin #3: Ignoring or misinterpreting AV alerts [1]
All I wrote in that thread is still relevant - plus, I would argue that "cleaned", "contained", or "quarantined" must be taken with a grain of salt. In many cases, the AV could not remediate the threat fully, resulting in the malicious code still running on the infected machine despite the AV reporting that the threat could be eliminated.
Because AV logs are such a goldmine, I always start with these logs in a new Incident Response case. We find compromised users, staging directories, tools (with hashes) etc. This information is not only helpful post-morten, but you should proactively use it to detect a threat in your environment.
Good luck ☘️
[1] nitter.cf/malmoeb/status/1…
1/ Another day, another Sin.
Today's #3: Ignoring or misinterpreting AV alerts.
If I had received a dime for every time I mentioned Florian's cheat sheet, I wouldn't have to work anymore. 😂
🧵 #CyberSecurity
Hamid retweeted
24 new behavior detections added
github.com/elastic/protectio…
#opensecurity
Hamid retweeted
certain detections are noisy by design & require env context, a gd example of this is DCSync detection based on winlog, the New Term rule type is a cool addition to Elastic SIEM 8.4+ helps to reduce majority of the noisy while preserving same rule logic
github.com/elastic/detection…
Hamid retweeted
nice find and great analysis! most of the key TTPs detected (UAC bypass, BYOVD, abuse of websvc, Persistence, Evasion via rundll32).
Read our analysis of #EnigmaStealer, a malware that showcases the use of advanced techniques for obfuscation and evasiveness and incorporates CI/CD principles for ongoing development in modular malware. research.trendmicro.com/3Ih1…
Hamid retweeted
I love Sigma; it's amazing for sharing detection rules. Although, I thought that it could also be used to share #ThreatHunting query logic.
I've created a section in my GitHub repo to start sharing TH-focused sigma rules. They may have a wider scope as opposed to DE rules...👇
Hamid retweeted
🕵️Zscaler ThreatLabz has observed a campaign targeting a government organization with a new post exploitation framework named #Havoc. During this attack, the threat actors have made several #opsec failures: zscaler.com/blogs/security-r…
IOCs are available here: github.com/threatlabz/iocs/t…
Hamid retweeted
If you are a user of Microsoft Defender for Endpoint or are considering it you might find this series useful. A 🧵
The first edition covers the differences between #MDE and #Sysmon and telemetry acquisition
1 - Sysmon vs Microsoft Defender for Endpoint
medium.com/falconforce/sysmo…
Hamid retweeted
New blog post - hunting for malicious dlls
Check out the latest #ElasticSecurityLabs research from @SBousseaden, a deep-dive into hunting for malicious DLLs for #threatdetection: go.es.io/3jMg8rL
Hamid retweeted
New post in the threat hunting series, this time focusing on threat emulation for #threat_hunting.
✅ Setting goals
✅ Steps of the threat emulation
✅ Finding unique indicators
✅ Building queries for threat hunting
✅ Eliminate False Positives
& more...
kostas-ts.medium.com/threat-…






























