Feedbacks on 10y of pentesting and DFIR How to increase your detection capabilities
24 April 2017 OWASP, Geneva Julien Bachmann @milkmix_
Feedbacks on 10y of pentesting and DFIR How to increase your - - PowerPoint PPT Presentation
Feedbacks on 10y of pentesting and DFIR How to increase your detection capabilities Julien Bachmann @milkmix_ 24 April 2017 OWASP, Geneva INTRO 1 24/04/2017 OWASP, Geneva ABOUT ME 3 Julien Bachmann Current CTO @ Hacknowledge Swiss
24 April 2017 OWASP, Geneva Julien Bachmann @milkmix_
24/04/2017 OWASP, Geneva
Current CTO @ Hacknowledge Swiss security monitoring solution Guest lecturer @ Swiss schools on software exploitation and dfir Past 10 years
Julien Bachmann
24/04/2017 OWASP, Geneva
3
4
No magic spell
Yet, techniques learned from the other side
24/04/2017 OWASP, Geneva
5
Companies still got owned
Mean time to discovery is still high
than a week… Discovery is often not due to the company own detection capabilities
24/04/2017 OWASP, Geneva
6
“Yeah but it’s those damn 0day! What could I do!”
shopping
But true that they can hit you
24/04/2017 OWASP, Geneva
24/04/2017 OWASP, Geneva
8
Before speaking about technical aspects
spoke with business people?
24/04/2017 OWASP, Geneva
9
Methods that help
24/04/2017 OWASP, Geneva
24/04/2017 OWASP, Geneva
11
Attacker compromised company’s infrastructure
Their goal
24/04/2017 OWASP, Geneva
12
How attackers got detected?
>> Called the ghostbusters ;) Morality
24/04/2017 OWASP, Geneva
13
Next step : gain persistence
Services
24/04/2017 OWASP, Geneva
14
From the blue team side of things this leaves plenty of traces! Execution
Logs
24/04/2017 OWASP, Geneva
15
Ok they got access and persistence now what?
Techniques that can be used
“Advanced” attacker
24/04/2017 OWASP, Geneva
16
Again, back on the blue team side Network probing implies
Bruteforce implies
Good reason to use old friends that are quite hype lately
24/04/2017 OWASP, Geneva
17
Last step, they want access to files
Probably not only on file shares but also on email accounts
24/04/2017 OWASP, Geneva
18
But the Blue team is still here watching! Access to files can be detected
Deploy files that callback once opened
24/04/2017 OWASP, Geneva
24/04/2017 OWASP, Geneva
2
Several ways to infect a machine
Everyone thought that macros problem was solved…
vectors
Analysis tools focused on binaries
24/04/2017 OWASP, Geneva
21
Detection on the network side is limited
Recent cases have made it even more so
24/04/2017 OWASP, Geneva
2 2
A common schema lately
24/04/2017 OWASP, Geneva
2 3
When attackers want to bypass UAC
Leveraging logic flaws in Windows signed binaries
24/04/2017 OWASP, Geneva
2 4
From a Blue team perspective several scenarios “We block all macros and Powershell scripts using it’s execution policy”
GPO Problem is that it is rarely deployed
24/04/2017 OWASP, Geneva
2 5
Taking a logs and detection approach “Standard ops w/ wscript.exe and powershell.exe processes ran from Word.exe?”
“ok, I will buy that EDR. <SecConfXYZ> had a floor full of them”
24/04/2017 OWASP, Geneva
2 6
Audit processes creation from the GPO
SysInternals Sysmon
24/04/2017 OWASP, Geneva
2 7
The rest is up to you: create detection rules by knowing attacker’s techniques
Powershell examples
http://www.gsdays.fr/wp-content/uploads/2011/09/RUFF-Se-proteger-contre-les-intrusions-gratuitement-0.2.pdf
24/04/2017 OWASP, Geneva
2 8
Audit what is executed on your infrastructure
24/04/2017 OWASP, Geneva
24/04/2017 OWASP, Geneva
3
Or if less lucky…
Once they obtained administrative privileges (left as an exercise)
Persist, access data and be stealth
24/04/2017 OWASP, Geneva
31
Even with more advances attackers, its possible to do something
Sysmon logs
Microsoft Advanced Threat Analytics
24/04/2017 OWASP, Geneva
3 2
Watch out for events on specific objects from the Active Directory
Logs cleared
https://speakerdeck.com/milkmix/import-module-incidentresponse
24/04/2017 OWASP, Geneva
3 3
Plenty of other techniques can be used
24/04/2017 OWASP, Geneva
3 4
Same for the Blue team, plenty of interesting topics
Don’t forget your cloud environments
Unfortunately, no time to cover everything in this talk
https://speakerdeck.com/milkmix/elasticsearch-incident-detection-use-cases-and-security-best-practices
24/04/2017 OWASP, Geneva
24/04/2017 OWASP, Geneva
3 6
Approach to follow?
24/04/2017 OWASP, Geneva
3 7
In fact, no need to log everything but better not miss things required afterward Be smart and study attackers techniques
Review Microsoft documentation and SysInternals tools
Choose security tools that can easily be integrated in larger workflow
24/04/2017 OWASP, Geneva
3 8
Approach to follow!
24/04/2017 OWASP, Geneva
3 9
Look at all recent security tools in the open source side of the fence
As said in intro, integrate your tools …
24/04/2017 OWASP, Geneva
See you soon