SlideShare a Scribd company logo
1 of 18
Windows File System Filter Drivers
… plus a little about security …
A crash course in 15 minutes…
What are legacy filter drivers?
• Standard Windows
• Registers handlers / call backs during init
• Filters I/O requests for FSs or volumes
• Each I/O request is an I/O request packet (IRP)
• Their load order dictates where they filter
• … old clunky basically
What are file system mini filter drivers?
What are mini filter altitudes?
Filter 420000-429999
FSFilter Top 400000-409999
FSFilter Activity Monitor 360000-389999
FSFilter Undelete 340000-349999
FSFilter Anti-Virus 320000-329998
FSFilter Replication 300000-309998
FSFilter Continuous Backup 280000-289998
FSFilter Content Screener 260000-269998
FSFilter Quota Management 240000-249999
FSFilter System Recovery 220000-229999
FSFilter Cluster File System 200000-209999
FSFilter HSM 180000-189999
*FSFilter Imaging (ex: .ZIP) 170000-174999
FSFilter Compression 160000-169999
FSFilter Encryption 140000-149999
FSFilter Virtualization 130000-139999
FSFilter Physical Quota management 120000-129999
FSFilter Open File 100000-109999
FSFilter Security Enhancer 80000-89999
FSFilter Copy Protection 60000-69999
FSFilter Bottom 40000-49999
Why do we care?
Enumeration - fltmc
Enumeration - fltmc
Enumeration - sc
How it works - fltmc
How it works - fltmc
• Filter Manager is a legacy filter driver which exposes:
• .FltMgr
• Standard Windows APIs then
Mini filter attack surface – msg handling
• FltCreateCommunicationPort
• Registers handlers / call backs during initialization
Mini filter attack surface – msg handling
Mini filter attack surface – msg handling
• 64bit Windows calling conventions
Using the x64 convention, the first four integer arguments
(from left to right) are passed in 64-bit registers designated for
that purpose:
RCX: 1st integer argument
RDX: 2nd integer argument
R8: 3rd integer argument
R9: 4th integer argument
Integer arguments beyond the first four are passed on the
stack.
Mini filter attack surface – msg handling
Attacks to consider
• Logic issues / dangerous functionality in custom message
handling
• Information leakage vulnerabilities
• Memory corruption issues
• State machine problems (i.e. lack of locking / unlocking)
• Incorrect return values
• Poor handling of file system API parameters
• Issues listed on the Security Considerations for Filter Drivers
• http://msdn.microsoft.com/en-
gb/library/windows/hardware/ff556606(v=vs.85).aspx
• … the unloading of filters on breakout assessments …
Further reading
• User-Mode Library for Filter Manager
• http://msdn.microsoft.com/en-
gb/library/windows/hardware/ff557247(v=vs.85).aspx
• FltXxx (Minifilter Driver) Routines
• http://msdn.microsoft.com/en-us/library/ff544617(v=vs.85).aspx
• Enumerating Minifilter Callbacks
• http://www.inreverse.net/?p=1334
• Windows Driver Kit Samples
• http://code.msdn.microsoft.com/windowshardware/site/search?f%5B0%5D.Typ
e=Technology&f%5B0%5D.Value=File%20System
• Filter Driver Development Guide
• http://download.microsoft.com/download/e/b/a/eba1050f-a31d-436b-9281-
92cdfeae4b45/filterdriverdeveloperguide.doc
UK Offices
Manchester - Head Office
Cheltenham
Edinburgh
Leatherhead
London
Thame
North American Offices
San Francisco
Chicago
Atlanta
New York
Seattle
Boston
Australian Offices
Sydney
European Offices
Amsterdam - Netherlands
Munich – Germany
Zurich - Switzerland
Thanks! Questions?
Ollie Whitehouse
ollie.whitehouse@nccgroup.com

More Related Content

Viewers also liked

Viewers also liked (14)

From Problem to Solution: Enumerating Windows Firewall-Hook Drivers
From Problem to Solution: Enumerating Windows Firewall-Hook DriversFrom Problem to Solution: Enumerating Windows Firewall-Hook Drivers
From Problem to Solution: Enumerating Windows Firewall-Hook Drivers
 
Finding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesFinding The Weak Link in Windows Binaries
Finding The Weak Link in Windows Binaries
 
Securing your supply chain & vicarious liability (cyber security)
Securing your supply chain & vicarious liability (cyber security)Securing your supply chain & vicarious liability (cyber security)
Securing your supply chain & vicarious liability (cyber security)
 
Windows io manager
Windows io managerWindows io manager
Windows io manager
 
Assuring the Security of the Supply Chain - Designing best practices for cybe...
Assuring the Security of the Supply Chain - Designing best practices for cybe...Assuring the Security of the Supply Chain - Designing best practices for cybe...
Assuring the Security of the Supply Chain - Designing best practices for cybe...
 
Countering the Cyber Threat
Countering the Cyber ThreatCountering the Cyber Threat
Countering the Cyber Threat
 
NCC Group Pro-active Breach Discovery: Network Threat Assessment
NCC Group Pro-active Breach Discovery: Network Threat AssessmentNCC Group Pro-active Breach Discovery: Network Threat Assessment
NCC Group Pro-active Breach Discovery: Network Threat Assessment
 
Red Teaming and the Supply Chain
Red Teaming and the Supply ChainRed Teaming and the Supply Chain
Red Teaming and the Supply Chain
 
Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems Practical Security Assessments of IoT Devices and Systems
Practical Security Assessments of IoT Devices and Systems
 
Technical Challenges in Cyber Forensics
Technical Challenges in Cyber ForensicsTechnical Challenges in Cyber Forensics
Technical Challenges in Cyber Forensics
 
Cyber Incident Response & Digital Forensics Lecture
Cyber Incident Response & Digital Forensics LectureCyber Incident Response & Digital Forensics Lecture
Cyber Incident Response & Digital Forensics Lecture
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
Private sector cyber resilience and the role of data diodes
Private sector cyber resilience and the role of data diodesPrivate sector cyber resilience and the role of data diodes
Private sector cyber resilience and the role of data diodes
 
Introduction to Advanced Persistent Threats (APT) for Non-Security Engineers
Introduction to Advanced Persistent Threats (APT) for Non-Security EngineersIntroduction to Advanced Persistent Threats (APT) for Non-Security Engineers
Introduction to Advanced Persistent Threats (APT) for Non-Security Engineers
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

2013 01-03 --ncc_group_-_crash_course_-_windows_filter_driver_security

  • 1. Windows File System Filter Drivers … plus a little about security … A crash course in 15 minutes…
  • 2. What are legacy filter drivers? • Standard Windows • Registers handlers / call backs during init • Filters I/O requests for FSs or volumes • Each I/O request is an I/O request packet (IRP) • Their load order dictates where they filter • … old clunky basically
  • 3. What are file system mini filter drivers?
  • 4. What are mini filter altitudes? Filter 420000-429999 FSFilter Top 400000-409999 FSFilter Activity Monitor 360000-389999 FSFilter Undelete 340000-349999 FSFilter Anti-Virus 320000-329998 FSFilter Replication 300000-309998 FSFilter Continuous Backup 280000-289998 FSFilter Content Screener 260000-269998 FSFilter Quota Management 240000-249999 FSFilter System Recovery 220000-229999 FSFilter Cluster File System 200000-209999 FSFilter HSM 180000-189999 *FSFilter Imaging (ex: .ZIP) 170000-174999 FSFilter Compression 160000-169999 FSFilter Encryption 140000-149999 FSFilter Virtualization 130000-139999 FSFilter Physical Quota management 120000-129999 FSFilter Open File 100000-109999 FSFilter Security Enhancer 80000-89999 FSFilter Copy Protection 60000-69999 FSFilter Bottom 40000-49999
  • 5. Why do we care?
  • 9. How it works - fltmc
  • 10. How it works - fltmc • Filter Manager is a legacy filter driver which exposes: • .FltMgr • Standard Windows APIs then
  • 11.
  • 12. Mini filter attack surface – msg handling • FltCreateCommunicationPort • Registers handlers / call backs during initialization
  • 13. Mini filter attack surface – msg handling
  • 14. Mini filter attack surface – msg handling • 64bit Windows calling conventions Using the x64 convention, the first four integer arguments (from left to right) are passed in 64-bit registers designated for that purpose: RCX: 1st integer argument RDX: 2nd integer argument R8: 3rd integer argument R9: 4th integer argument Integer arguments beyond the first four are passed on the stack.
  • 15. Mini filter attack surface – msg handling
  • 16. Attacks to consider • Logic issues / dangerous functionality in custom message handling • Information leakage vulnerabilities • Memory corruption issues • State machine problems (i.e. lack of locking / unlocking) • Incorrect return values • Poor handling of file system API parameters • Issues listed on the Security Considerations for Filter Drivers • http://msdn.microsoft.com/en- gb/library/windows/hardware/ff556606(v=vs.85).aspx • … the unloading of filters on breakout assessments …
  • 17. Further reading • User-Mode Library for Filter Manager • http://msdn.microsoft.com/en- gb/library/windows/hardware/ff557247(v=vs.85).aspx • FltXxx (Minifilter Driver) Routines • http://msdn.microsoft.com/en-us/library/ff544617(v=vs.85).aspx • Enumerating Minifilter Callbacks • http://www.inreverse.net/?p=1334 • Windows Driver Kit Samples • http://code.msdn.microsoft.com/windowshardware/site/search?f%5B0%5D.Typ e=Technology&f%5B0%5D.Value=File%20System • Filter Driver Development Guide • http://download.microsoft.com/download/e/b/a/eba1050f-a31d-436b-9281- 92cdfeae4b45/filterdriverdeveloperguide.doc
  • 18. UK Offices Manchester - Head Office Cheltenham Edinburgh Leatherhead London Thame North American Offices San Francisco Chicago Atlanta New York Seattle Boston Australian Offices Sydney European Offices Amsterdam - Netherlands Munich – Germany Zurich - Switzerland Thanks! Questions? Ollie Whitehouse ollie.whitehouse@nccgroup.com