Hacking Windows Internals(2).pdf

(127 KB) Pobierz
Briefing for:
Hacking Windows Internals
Cesar Cerrudo
Argeniss
Hacking Shared Sections
Shared Section definition
Using Shared Sections
Tools
Problems
Searching for holes
Exploitation
Conclusions
References
www.appsecinc.com
Shared Section
Basically a Shared Section is a portion of memory
shared by a process, mostly used as an IPC (Inter
Process Communication) mechanism.
Shared Memory.
File Mapping.
Named or Unnamed.
www.appsecinc.com
Using Shared Sections
Loading binary images by OS.
Process creation.
Dll loading.
Mapping kernel mode memory into user address space !?.
Used to avoid kernel transitions.
Sharing data between processes.
GDI and GUI data, pointers !?, counters, any data.
www.appsecinc.com
Using Shared Sections
Creating a shared section
// handle to file (file
mapping)
//or 0xFFFFFFFF (shared
memory)
LPSECURITY_ATTRIBUTES lpAttributes,
// security
DWORD flProtect,
// protection
DWORD dwMaximumSizeHigh,
// high-order DWORD of size
DWORD dwMaximumSizeLow,
// low-order DWORD of size
LPCTSTR lpName
// object name (named)
//or NULL (unnamed)
);//returns
a shared section handle
HANDLE
CreateFileMapping(
HANDLE hFile,
www.appsecinc.com
Zgłoś jeśli naruszono regulamin