SlideShare a Scribd company logo
www.SecurityXploded.com
Disclaimer
The Content, Demonstration, Source Code and Programs presented here is "AS IS"
without any warranty or conditions of any kind. Also the views/ideas/knowledge
expressed here are solely of the trainer’s only and nothing to do with the company or
the organization in which the trainer is currently working.
However in no circumstances neither the trainer nor SecurityXploded is responsible for
any damage or loss caused due to use or misuse of the information presented here.
www.SecurityXploded.com
Acknowledgement
 Special thanks to null & Garage4Hackers community for their extended support and
cooperation.
 Thanks to all the trainers who have devoted their precious time and countless hours to
make it happen.
www.SecurityXploded.com
Reversing & Malware Analysis Training
This presentation is part of our Reverse Engineering & Malware Analysis Training
program. Currently it is delivered only during our local meet for FREE of cost.
For complete details of this course, visit our Security Training page.
www.SecurityXploded.com
Who am I #1
Amit Malik (sometimes DouBle_Zer0,DZZ)
 Member SecurityXploded
 Security Researcher @ McAfee Labs
 RE, Exploit Analysis/Development, Malware Analysis
 Email: m.amit30@gmail.com
www.SecurityXploded.com
Who am I #2
Swapnil Pathak
 Member SecurityXploded
 Security Researcher @ McAfee Labs
 RE, Malware Analysis, Network Security
 Email: swapnilpathak101@gmail.com
www.SecurityXploded.com
Course Q&A
 Keep yourself up to date with latest security news
 http://www.securityphresh.com
 For Q&A, join our mailing list.
 http://groups.google.com/group/securityxploded
www.SecurityXploded.com
Windows Architecture
www.SecurityXploded.com
Memory Management
 Virtual Memory
- An invisiblelayerbetween a softwareand physicalmemory
- Every process first get loaded into its virtual memory address space
- Small units called “pages”are used to do mapping between physicalmemory and virtual
memory.
 Paging
- Memory managementschemethat stores and retrieves datafrom secondary storageforuse
in main memory
- Uses same size blocks called pages
- Pagetable is used to translatevirtualaddresses in physicalmemory addresses
www.SecurityXploded.com
Memory Management Cont.
 UserAddressSpace
- Allocatedfor user mode applications.
- All processes executein theirown virtual space.
- Useoperating system dlls to interact with kernel
 Kernel AddressSpace
- Strictlyreserved forkernel, devicedrivers and operatingsystemexecutive.
- No user mode applicationcan directly interactwith thekernel.
www.SecurityXploded.com
Kernel & UserAddress Space
www.SecurityXploded.com
Process and Thread
 Process
- Executinginstanceofan application.
- Isolatedaddress space
- PEB data structurestoreinformationabout process
- PEB is an user space data structure
 Threads
- Multiplethreads sharethe same address spacein the process.
- Each process has at least a single executingthread.
- TEBdata structurestoreinformation aboutthread
www.SecurityXploded.com
PEB (Process Environment Block)
An opaque data structure that store information about process in user
space
www.SecurityXploded.com
PEB Cont.
www.SecurityXploded.com
TEB (Thread Environment Block)
TEB is a data structure that store information about thread
www.SecurityXploded.com
Application Programming Interface
 API
- Includesfunctions,classes, datastructures and variables
- Interfacebetween varioussoftwarecomponents to communicatewith each other.
- WindowsAPIs areused to interact with kernel or othermodules.
 MSDN
- Providesdocumentationforvarious APIfunctions.
 System Dlls
- ntdll.dll, kernel32.dll, user32.dll, advapi32.dll, hal.dll etc
www.SecurityXploded.com
System Service Dispatching
www.SecurityXploded.com
System Service Dispatching Cont.
www.SecurityXploded.com
Important API
 File and Directories
- CreateFile, GetSystemDirectory, ReadFile, WriteFile etc
 Network
- socket, send, recv, URLDownloadToFile etc
 Registry
- RegOpenKey, RegSetValue, RegQueryValue etc
www.SecurityXploded.com
Important API Cont.
 Processes, Threads, Synchronization using mutex, semaphore.
- CreateProcess, ReadProcessMemory,
WriteProcessMemory,CreateRemoteThread, CreateMutex etc
 Memory
- VirtualAlloc, VirtualProtect ,HeapAlloc, LocalAlloc etc
www.SecurityXploded.com
Reference
 Complete Reference Guide for Reversing & Malware Analysis Training
www.SecurityXploded.com
Thank You !
http://SecurityXploded.com

More Related Content

PPTX
Reversing & malware analysis training part 2 introduction to windows internals
PPTX
Reversing & malware analysis training part 3 windows pe file format basics
PPTX
Reversing malware analysis training part2 introduction to windows internals
PDF
Reversing & malware analysis training part 1 lab setup guide
PPTX
Reversing & malware analysis training part 1 lab setup guide
PDF
Reversing & malware analysis training part 5 reverse engineering tools basics
PPTX
Reversing malware analysis training part1 lab setup guide
PDF
Reversing & malware analysis training part 11 exploit development advanced
Reversing & malware analysis training part 2 introduction to windows internals
Reversing & malware analysis training part 3 windows pe file format basics
Reversing malware analysis training part2 introduction to windows internals
Reversing & malware analysis training part 1 lab setup guide
Reversing & malware analysis training part 1 lab setup guide
Reversing & malware analysis training part 5 reverse engineering tools basics
Reversing malware analysis training part1 lab setup guide
Reversing & malware analysis training part 11 exploit development advanced

Similar to Reversing & malware analysis training part 2 introduction to windows internals (20)

PDF
Reversing & malware analysis training part 12 rootkit analysis
PPTX
Reversing malware analysis training part11 exploit development advanced
PPTX
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
PDF
Reversing & malware analysis training part 3 windows pe file format basics
PDF
Reversing & malware analysis training part 10 exploit development basics
PPTX
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
ODP
Pyramid patterns
PPTX
Virtualization auditing & security deck v1.0
PDF
Reversing & malware analysis training part 8 malware memory forensics
PPT
Salesforce Internship Presentation (Summer 2012)
PDF
Reversing & malware analysis training part 7 unpacking upx
PDF
MySQL and memcached Guide
PPTX
Advanced malware analysis training session8 introduction to android
PPTX
Penetration testing dont just leave it to chance
PDF
Multicore Software Development Techniques Applications Tips and Tricks 1st Ed...
PPTX
Advanced Malware Analysis Training Session 8 - Introduction to Android
PPTX
Bridging the Gap
PPTX
Bridging the Gap: Lessons in Adversarial Tradecraft
PPTX
A Beard, An App, A Blender
DOC
136 latest dot net interview questions
Reversing & malware analysis training part 12 rootkit analysis
Reversing malware analysis training part11 exploit development advanced
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 10 exploit development basics
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
Pyramid patterns
Virtualization auditing & security deck v1.0
Reversing & malware analysis training part 8 malware memory forensics
Salesforce Internship Presentation (Summer 2012)
Reversing & malware analysis training part 7 unpacking upx
MySQL and memcached Guide
Advanced malware analysis training session8 introduction to android
Penetration testing dont just leave it to chance
Multicore Software Development Techniques Applications Tips and Tricks 1st Ed...
Advanced Malware Analysis Training Session 8 - Introduction to Android
Bridging the Gap
Bridging the Gap: Lessons in Adversarial Tradecraft
A Beard, An App, A Blender
136 latest dot net interview questions
Ad

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
cuic standard and advanced reporting.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cuic standard and advanced reporting.pdf
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Ad

Reversing & malware analysis training part 2 introduction to windows internals

  • 2. Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions of any kind. Also the views/ideas/knowledge expressed here are solely of the trainer’s only and nothing to do with the company or the organization in which the trainer is currently working. However in no circumstances neither the trainer nor SecurityXploded is responsible for any damage or loss caused due to use or misuse of the information presented here. www.SecurityXploded.com
  • 3. Acknowledgement  Special thanks to null & Garage4Hackers community for their extended support and cooperation.  Thanks to all the trainers who have devoted their precious time and countless hours to make it happen. www.SecurityXploded.com
  • 4. Reversing & Malware Analysis Training This presentation is part of our Reverse Engineering & Malware Analysis Training program. Currently it is delivered only during our local meet for FREE of cost. For complete details of this course, visit our Security Training page. www.SecurityXploded.com
  • 5. Who am I #1 Amit Malik (sometimes DouBle_Zer0,DZZ)  Member SecurityXploded  Security Researcher @ McAfee Labs  RE, Exploit Analysis/Development, Malware Analysis  Email: m.amit30@gmail.com www.SecurityXploded.com
  • 6. Who am I #2 Swapnil Pathak  Member SecurityXploded  Security Researcher @ McAfee Labs  RE, Malware Analysis, Network Security  Email: swapnilpathak101@gmail.com www.SecurityXploded.com
  • 7. Course Q&A  Keep yourself up to date with latest security news  http://www.securityphresh.com  For Q&A, join our mailing list.  http://groups.google.com/group/securityxploded www.SecurityXploded.com
  • 9. Memory Management  Virtual Memory - An invisiblelayerbetween a softwareand physicalmemory - Every process first get loaded into its virtual memory address space - Small units called “pages”are used to do mapping between physicalmemory and virtual memory.  Paging - Memory managementschemethat stores and retrieves datafrom secondary storageforuse in main memory - Uses same size blocks called pages - Pagetable is used to translatevirtualaddresses in physicalmemory addresses www.SecurityXploded.com
  • 10. Memory Management Cont.  UserAddressSpace - Allocatedfor user mode applications. - All processes executein theirown virtual space. - Useoperating system dlls to interact with kernel  Kernel AddressSpace - Strictlyreserved forkernel, devicedrivers and operatingsystemexecutive. - No user mode applicationcan directly interactwith thekernel. www.SecurityXploded.com
  • 11. Kernel & UserAddress Space www.SecurityXploded.com
  • 12. Process and Thread  Process - Executinginstanceofan application. - Isolatedaddress space - PEB data structurestoreinformationabout process - PEB is an user space data structure  Threads - Multiplethreads sharethe same address spacein the process. - Each process has at least a single executingthread. - TEBdata structurestoreinformation aboutthread www.SecurityXploded.com
  • 13. PEB (Process Environment Block) An opaque data structure that store information about process in user space www.SecurityXploded.com
  • 15. TEB (Thread Environment Block) TEB is a data structure that store information about thread www.SecurityXploded.com
  • 16. Application Programming Interface  API - Includesfunctions,classes, datastructures and variables - Interfacebetween varioussoftwarecomponents to communicatewith each other. - WindowsAPIs areused to interact with kernel or othermodules.  MSDN - Providesdocumentationforvarious APIfunctions.  System Dlls - ntdll.dll, kernel32.dll, user32.dll, advapi32.dll, hal.dll etc www.SecurityXploded.com
  • 18. System Service Dispatching Cont. www.SecurityXploded.com
  • 19. Important API  File and Directories - CreateFile, GetSystemDirectory, ReadFile, WriteFile etc  Network - socket, send, recv, URLDownloadToFile etc  Registry - RegOpenKey, RegSetValue, RegQueryValue etc www.SecurityXploded.com
  • 20. Important API Cont.  Processes, Threads, Synchronization using mutex, semaphore. - CreateProcess, ReadProcessMemory, WriteProcessMemory,CreateRemoteThread, CreateMutex etc  Memory - VirtualAlloc, VirtualProtect ,HeapAlloc, LocalAlloc etc www.SecurityXploded.com
  • 21. Reference  Complete Reference Guide for Reversing & Malware Analysis Training www.SecurityXploded.com