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 & Garage4Hackers
     Security Researcher
     RE, Exploit Analysis/Development, Malware Analysis
     Email: m.amit30@gmail.com




                            www.SecurityXploded.com
Who am I #2
Swapnil Pathak
      Member SecurityXploded
      Security Researcher
      RE, Malware Analysis, Network Security
      Email: swapnilpathak101@gmail.com




                         www.SecurityXploded.com
Windows Architecture




        www.SecurityXploded.com
Memory Management
   Virtual Memory

-   An invisible layer between a software and physical memory

-   Every process first get loaded into its virtual memory address space

-   Small units called “pages” are used to do mapping between physical memory
    and virtual memory.

   Paging

-   Memory management scheme that stores and retrieves data from secondary
    storage for use in main memory

-   Uses same size blocks called pages

-   Page table is used to translate virtual addresses in physical memory
    addresses
                                www.SecurityXploded.com
Memory Management Cont.
   User Address Space

-   Allocated for user mode applications.

-   All processes execute in their own virtual space.

-   Use operating system dlls to interact with kernel

   Kernel Address Space

-   Strictly reserved for kernel, device drivers and operating system
    executive.

-   No user mode application can directly interact with the kernel.




                               www.SecurityXploded.com
Kernel & User Address Space




            www.SecurityXploded.com
Process and Thread
   Process
-   Executing instance of an application.
-   Isolated address space
-   PEB data structure store information about process
-   PEB is an user space data structure
   Threads
-   Multiple threads share the same address space in the process.
-   Each process has at least a single executing thread.
-   TEB data structure store information about thread


                              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
-   Includes functions, classes, data structures and variables
-   Interface between various software components to communicate
    with each other.
-   Windows APIs are used to interact with kernel or other modules.
   MSDN
-   Provides documentation for various API functions.
   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
Advanced Malware Analysis Training Session 5 - Reversing Automation
PPTX
Reversing & malware analysis training part 3 windows pe file format basics
PPTX
Primer on password security
PPTX
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
PPTX
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
PPTX
Reversing & malware analysis training part 1 lab setup guide
PPTX
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
PPTX
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwares
Advanced Malware Analysis Training Session 5 - Reversing Automation
Reversing & malware analysis training part 3 windows pe file format basics
Primer on password security
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Reversing & malware analysis training part 1 lab setup guide
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwares

What's hot (20)

PPTX
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
PPTX
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2
PPTX
Anti-Virus Evasion Techniques and Countermeasures
PPTX
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
PPTX
Advanced Malware Analysis Training Session 7 - Malware Memory Forensics
PPTX
Anatomy of Exploit Kits
PPTX
Reversing & Malware Analysis Training Part 13 - Future Roadmap
PPTX
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
PPTX
Advanced malware analysis training session 7 malware memory forensics
PPTX
Reversing & Malware Analysis Training Part 6 - Practical Reversing (I)
PPTX
Advanced malwareanalysis training session2 botnet analysis part1
PPTX
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
PPTX
Advanced malware analysis training session5 reversing automation
PPTX
Hunting Rootkit From the Dark Corners Of Memory
PPTX
Reversing malware analysis training part6 practical reversing
PPTX
Reversing malware analysis training part11 exploit development advanced
PPTX
Reversing malware analysis training part3 windows pefile formatbasics
PPTX
Automating Malware Analysis
PPTX
Reversing malware analysis trainingpart9 advanced malware analysis
PPTX
Reversing malware analysis training part7 unpackingupx
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2
Anti-Virus Evasion Techniques and Countermeasures
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
Advanced Malware Analysis Training Session 7 - Malware Memory Forensics
Anatomy of Exploit Kits
Reversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
Advanced malware analysis training session 7 malware memory forensics
Reversing & Malware Analysis Training Part 6 - Practical Reversing (I)
Advanced malwareanalysis training session2 botnet analysis part1
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
Advanced malware analysis training session5 reversing automation
Hunting Rootkit From the Dark Corners Of Memory
Reversing malware analysis training part6 practical reversing
Reversing malware analysis training part11 exploit development advanced
Reversing malware analysis training part3 windows pefile formatbasics
Automating Malware Analysis
Reversing malware analysis trainingpart9 advanced malware analysis
Reversing malware analysis training part7 unpackingupx
Ad

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

PDF
Reversing & malware analysis training part 2 introduction to windows internals
PPTX
Reversing malware analysis training part2 introduction to windows internals
PDF
Reversing & malware analysis training part 12 rootkit analysis
PDF
Reversing & malware analysis training part 3 windows pe file format basics
PPTX
Advanced malware analysis training session8 introduction to android
PPTX
Threat Modeling a Batch Job System - AWS Security Community Day
PDF
Design Decisions For Understanding Software Architecture
PPT
Ch11 system administration
PDF
12 core technologies you should learn, love, and hate to be a 'real' technocrat
PDF
CS9222 Advanced Operating System
PPTX
Advanced Malware Analysis Training Session 8 - Introduction to Android
PDF
Reversing & malware analysis training part 5 reverse engineering tools basics
PDF
Linux Assignment 3
PPTX
Anatomy of a Drupal Hack - TechKnowFile 2014
DOCX
My first Operating System Presentation
PDF
Reversing & malware analysis training part 10 exploit development basics
PDF
amrapali builders@@@@hacking windows internals.pdf
PPTX
Some more Concepts of DOT cvcvcvNET.pptx
PDF
Multicore Software Development Techniques Applications Tips and Tricks 1st Ed...
Reversing & malware analysis training part 2 introduction to windows internals
Reversing malware analysis training part2 introduction to windows internals
Reversing & malware analysis training part 12 rootkit analysis
Reversing & malware analysis training part 3 windows pe file format basics
Advanced malware analysis training session8 introduction to android
Threat Modeling a Batch Job System - AWS Security Community Day
Design Decisions For Understanding Software Architecture
Ch11 system administration
12 core technologies you should learn, love, and hate to be a 'real' technocrat
CS9222 Advanced Operating System
Advanced Malware Analysis Training Session 8 - Introduction to Android
Reversing & malware analysis training part 5 reverse engineering tools basics
Linux Assignment 3
Anatomy of a Drupal Hack - TechKnowFile 2014
My first Operating System Presentation
Reversing & malware analysis training part 10 exploit development basics
amrapali builders@@@@hacking windows internals.pdf
Some more Concepts of DOT cvcvcvNET.pptx
Multicore Software Development Techniques Applications Tips and Tricks 1st Ed...
Ad

More from securityxploded (20)

PPTX
Fingerprinting healthcare institutions
PDF
Hollow Process Injection - Reversing and Investigating Malware Evasive Tactics
PDF
Buffer Overflow Attacks
PPTX
Malicious Client Detection Using Machine Learning
PDF
Understanding CryptoLocker (Ransomware) with a Case Study
PDF
Linux Malware Analysis using Limon Sandbox
PPT
Introduction to SMPC
PPTX
Breaking into hospitals
PPTX
Bluetooth [in]security
PPTX
Basic malware analysis
PPTX
Reverse Engineering Malware
PPTX
DLL Preloading Attack
PPTX
Partial Homomorphic Encryption
PPTX
Return Address – The Silver Bullet
PPTX
Defeating public exploit protections (EMET v5.2 and more)
PPTX
Hunting Ghost RAT Using Memory Forensics
PPTX
Malicious Url Detection Using Machine Learning
PPTX
MalwareNet Project
PPTX
Reversing and Decrypting the Communications of APT Malware (Etumbot)
PPTX
Dissecting BetaBot
Fingerprinting healthcare institutions
Hollow Process Injection - Reversing and Investigating Malware Evasive Tactics
Buffer Overflow Attacks
Malicious Client Detection Using Machine Learning
Understanding CryptoLocker (Ransomware) with a Case Study
Linux Malware Analysis using Limon Sandbox
Introduction to SMPC
Breaking into hospitals
Bluetooth [in]security
Basic malware analysis
Reverse Engineering Malware
DLL Preloading Attack
Partial Homomorphic Encryption
Return Address – The Silver Bullet
Defeating public exploit protections (EMET v5.2 and more)
Hunting Ghost RAT Using Memory Forensics
Malicious Url Detection Using Machine Learning
MalwareNet Project
Reversing and Decrypting the Communications of APT Malware (Etumbot)
Dissecting BetaBot

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Tartificialntelligence_presentation.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25-Week II
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Getting Started with Data Integration: FME Form 101
MIND Revenue Release Quarter 2 2025 Press Release
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Tartificialntelligence_presentation.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction

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 & Garage4Hackers  Security Researcher  RE, Exploit Analysis/Development, Malware Analysis  Email: [email protected] www.SecurityXploded.com
  • 6. Who am I #2 Swapnil Pathak  Member SecurityXploded  Security Researcher  RE, Malware Analysis, Network Security  Email: [email protected] www.SecurityXploded.com
  • 7. Windows Architecture www.SecurityXploded.com
  • 8. Memory Management  Virtual Memory - An invisible layer between a software and physical memory - Every process first get loaded into its virtual memory address space - Small units called “pages” are used to do mapping between physical memory and virtual memory.  Paging - Memory management scheme that stores and retrieves data from secondary storage for use in main memory - Uses same size blocks called pages - Page table is used to translate virtual addresses in physical memory addresses www.SecurityXploded.com
  • 9. Memory Management Cont.  User Address Space - Allocated for user mode applications. - All processes execute in their own virtual space. - Use operating system dlls to interact with kernel  Kernel Address Space - Strictly reserved for kernel, device drivers and operating system executive. - No user mode application can directly interact with the kernel. www.SecurityXploded.com
  • 10. Kernel & User Address Space www.SecurityXploded.com
  • 11. Process and Thread  Process - Executing instance of an application. - Isolated address space - PEB data structure store information about process - PEB is an user space data structure  Threads - Multiple threads share the same address space in the process. - Each process has at least a single executing thread. - TEB data structure store information about thread www.SecurityXploded.com
  • 12. PEB (Process Environment Block) An opaque data structure that store information about process in user space www.SecurityXploded.com
  • 13. PEB Cont. www.SecurityXploded.com
  • 14. TEB (Thread Environment Block) TEB is a data structure that store information about thread www.SecurityXploded.com
  • 15. Application Programming Interface  API - Includes functions, classes, data structures and variables - Interface between various software components to communicate with each other. - Windows APIs are used to interact with kernel or other modules.  MSDN - Provides documentation for various API functions.  System Dlls - ntdll.dll, kernel32.dll, user32.dll, advapi32.dll, hal.dll etc www.SecurityXploded.com
  • 16. System Service Dispatching www.SecurityXploded.com
  • 17. System Service Dispatching Cont. www.SecurityXploded.com
  • 18. Important API  File and Directories - CreateFile, GetSystemDirectory, ReadFile, WriteFile etc  Network - socket, send, recv, URLDownloadToFile etc  Registry - RegOpenKey, RegSetValue, RegQueryValue etc www.SecurityXploded.com
  • 19. Important API Cont.  Processes, Threads, Synchronization using mutex, semaphore. - CreateProcess, ReadProcessMemory, WriteProcessMemory,CreateRemoteThread, CreateMutex etc  Memory - VirtualAlloc, VirtualProtect ,HeapAlloc, LocalAlloc etc www.SecurityXploded.com
  • 20. Reference  Complete Reference Guide for Reversing & Malware Analysis Training www.SecurityXploded.com

Editor's Notes

  • #11: Picture is taken from : rootkit arsenal
  • #17: Picture is taken from : RootKit Arsenal (An awesome book)
  • #18: Picture source: http://www.codeproject.com/KB/system/hide-driver/NtCallScheme_small.png