May 3, 2023, 3:07 p.m. | Jonathan Johnson

Security Boulevard securityboulevard.com

Introduction


Impersonation happens often natively in Windows, however, adversaries also use it to run code in the context of another user. Recently I was researching named pipe impersonation which naturally led me digging into the Win32 API ImpersonateNamedPipeClient. I had never really dug into how ImpersonateNamedPipeClient worked under the hood, so I wanted to do so. During analysis, I saw that a call to NtFsControlFile was made:



NtFsControlFile is a function that allows the caller to send a value …

adversaries api code context driver filesystem impersonation introduction led research run under win32 windows

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

Director, Data Security Lead

@ Mastercard | London, England (Angel Lane)

Security Officer L1

@ NTT DATA | Texas, United States of America

Sr. Staff Application Security Engineer

@ Aurora Innovation | Seattle, WA

Senior Penetration Testing Engineer

@ WPP | Chennai

Cyber Security - Senior Software Developer in Test

@ BlackBerry | Bengaluru, Residency Road