Osquery exposes an OS as a relational database. This allows you to write SQL queries to explore operating system data. With osquery, SQL tables represent abstract concepts such as running processes, loaded kernel modules, open network connections, browser plugins, hardware events or file hashes.
A Security Information And Event Management (SIEM) solution supports threat detection, compliance and security incident management through the collection and analysis (both near real-time and historical) of security events, as well as a wide variety of other event and contextual data sources.
Architecture
Challenges
We already have a SIEM in our company. Is it not enough?
Are you monitoring 100, 1000, or 10000 hosts?
Do you have budget for commercial tools?
How heterogeneous is your infrastructure?
Are you just looking for security alerts, or do you also need persistent event logging for auditing purposes?
Why do you get that many false positives/negatives? Are you investing time in customizing the alarms?
What response time do you wish to achieve? Do you need real time notifications?
Do you have time to improve/tune your solution or do you need something working 100% ASAP?
A centralized team in a single organization that monitors the information technology environment for vulnerabilities, unauthorized activity, acceptable use/policy/procedure violations, intrusions into and out of the network, and provides direct support of the cyber incident response process.
SOC Services
Reactive:
Monitoring and alerts
Incident Response
Forensics / eDiscovery
Proactive:
Threat Hunting
Health Monitoring
Trained personal
Highly skilled people can produce more accurate and timely results with a moderate product than novices with an expensive toolset.
Getting into the hunt
Assume that there is a likely compromise, become detection oriented and proactively mine data looking for patterns of intrusion and misbehaviour.
Define metrics
Number of data sources
MTT close an alarm
Implemented Use Cases
number of not-reviewed alerts after 24 hours
...
What makes good SOCs good
The SOC analyst
A day as a SOC analyst
Alarm triage
Dashboard review
Review security state
System health
Active threat hunting
Review intelligence data
Dashboard
Indicators of Compromise (IoC)
An artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion.
I've had 3 calls so far today (it's not even 10) about defending against Russian cyber ops. I'm tired of having the same call... so... here's what I've told everyone. This is the playbook you need... but it's not going to be what you think it will be. Ready? Lets go!
Feb 23, 2022
Watch your egress. Firewalls work both ways. Carefully monitor outbound traffic. DMZ servers RESPOND to external requests. Look for DMZ systems initiating outbound. This is what "phoning home" (aka C2) looks like.
you will have a handful of DMZ servers initiating outbound. File xfer systems, any mail server (you likely shouldn't be running your own). Some web services may also initiate outbound.
Don't get too hung up on IP address blocks. Geo blocking has some advantages, but the only time Russian groups come from Russian IP space is when they want to rub it in. Start treating the entire internet as hostile... because it is.
You 100% must know what is "normal" exes on your systems. App control (used to be call white listing) is no longer a "nice to have" it's IMO table stakes. Anyone who claims otherwise is giving dated & dangerous advice. Use native logging functions to know the apps that are running on systems.
EDR
Windows SRUM. It has a 30 day rolling view of EVERY exe run
auditd or sysmon
Because many orgs over rely on EDR and SIEM now, LOL attacks are highly successful. Attackers blend in. They are using core parts of the OS against you. None of your tools will stop these. You likely already have exclusions for the ports and protocols these tools use.
Don't buy vendor tools to catch the attackers. No matter how good the demo is... it's a demo.
If your IR plan doesn't have a rapid (host and network level) isolation workflows. Make it just after the stuff I've talked about in prior tweets. Drill it. You're going to need to work at a speed you likely haven't before.
Increase your logging, while both filtering out stuff you don't care about at your aggregators, and SHORTENING the retention length for the data you don't need long term.
The playbooks we've been following for too long are now being used against us. You can either accept that, or be beaten before you even show up to fight.
That said, you can win this fight. Once the attackers are in, you only need to detect them once. You can do stuff like make MSFT an untrusted publisher on a Windows box by allowing ONLY what is listed in SRUM analysis.
Your hosts tell you how they're being used and abused. Start listening. Prevent isn't possible. Try anyway. Move to a detect and respond model. That's our path to victory.
But it's rare.
Most orgs? Your exception list will fit on a single sheet of paper.
A windows network might be very complex, with tens of thousand of devices talking to each other. Some services must be centralized in the Active Directory
The Active Directory (AD) is the central console to manage Windows systems inside a network.
The AD centralizes authentication and permissions
Each user has different permissions on a Windows endpoint
- local user / admin can access only this computer
- domain users can access any computer in the network
- domain admins manage the AD, they are not expected to access a computer... most of the time
- SYSTEM: kernel level. Similar to root in Linux, but it does not have an assotiated user
The objective of the attackers: control a domain account
There are automatic tools to run some of these processes:
- vulnerability scanner: nessus, qualys, sentinel... https://owasp.org/www-community/Vulnerability_Scanning_Tools
- threat managements: threatq (IOC management)...
- threat intelligence: blueliv, cybelangel...
The link takes to a SANS poster with lots of information about the artifacts you can check to learn about the activity on a system: opened files, applications... It is a wonderful resource for information, updated often
- Windows events are not designed with security in mind
- They are complex and not very well documented
Important applications, such as svchost (host of system services) has a very well know behaviour
Any deviation is an alarm
Can we monitor this behaviour