SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
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

Mais conteúdo relacionado

Semelhante a Reversing & malware analysis training part 2 introduction to windows internals

Reversing & malware analysis training part 12 rootkit analysis
Reversing & malware analysis training part 12   rootkit analysisReversing & malware analysis training part 12   rootkit analysis
Reversing & malware analysis training part 12 rootkit analysis
Abdulrahman Bassam
 
Reversing & malware analysis training part 3 windows pe file format basics
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
Abdulrahman Bassam
 
Reversing & malware analysis training part 10 exploit development basics
Reversing & malware analysis training part 10   exploit development basicsReversing & malware analysis training part 10   exploit development basics
Reversing & malware analysis training part 10 exploit development basics
Abdulrahman Bassam
 
Virtualization auditing & security deck v1.0
Virtualization auditing & security deck v1.0Virtualization auditing & security deck v1.0
Virtualization auditing & security deck v1.0
Concentrated Technology
 
Reversing & malware analysis training part 8 malware memory forensics
Reversing & malware analysis training part 8   malware memory forensicsReversing & malware analysis training part 8   malware memory forensics
Reversing & malware analysis training part 8 malware memory forensics
Abdulrahman Bassam
 
Salesforce Internship Presentation (Summer 2012)
Salesforce Internship Presentation (Summer 2012)Salesforce Internship Presentation (Summer 2012)
Salesforce Internship Presentation (Summer 2012)
Nitin Jain
 
Reversing & malware analysis training part 7 unpacking upx
Reversing & malware analysis training part 7   unpacking upxReversing & malware analysis training part 7   unpacking upx
Reversing & malware analysis training part 7 unpacking upx
Abdulrahman Bassam
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
webhostingguy
 
136 latest dot net interview questions
136  latest dot net interview questions136  latest dot net interview questions
136 latest dot net interview questions
sandi4204
 

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

Reversing & malware analysis training part 12 rootkit analysis
Reversing & malware analysis training part 12   rootkit analysisReversing & malware analysis training part 12   rootkit analysis
Reversing & malware analysis training part 12 rootkit analysis
 
Reversing malware analysis training part11 exploit development advanced
Reversing malware analysis training part11 exploit development advancedReversing malware analysis training part11 exploit development advanced
Reversing malware analysis training part11 exploit development advanced
 
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]Reversing & Malware Analysis Training Part 11 - 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 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
 
Reversing & malware analysis training part 10 exploit development basics
Reversing & malware analysis training part 10   exploit development basicsReversing & malware analysis training part 10   exploit development basics
Reversing & malware analysis training part 10 exploit development basics
 
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
Advanced Malware Analysis Training Session 6  - Malware Sandbox AnalysisAdvanced Malware Analysis Training Session 6  - Malware Sandbox Analysis
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
Virtualization auditing & security deck v1.0
Virtualization auditing & security deck v1.0Virtualization auditing & security deck v1.0
Virtualization auditing & security deck v1.0
 
Reversing & malware analysis training part 8 malware memory forensics
Reversing & malware analysis training part 8   malware memory forensicsReversing & malware analysis training part 8   malware memory forensics
Reversing & malware analysis training part 8 malware memory forensics
 
Salesforce Internship Presentation (Summer 2012)
Salesforce Internship Presentation (Summer 2012)Salesforce Internship Presentation (Summer 2012)
Salesforce Internship Presentation (Summer 2012)
 
Reversing & malware analysis training part 7 unpacking upx
Reversing & malware analysis training part 7   unpacking upxReversing & malware analysis training part 7   unpacking upx
Reversing & malware analysis training part 7 unpacking upx
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Advanced malware analysis training session8 introduction to android
Advanced malware analysis training session8 introduction to androidAdvanced malware analysis training session8 introduction to android
Advanced malware analysis training session8 introduction to android
 
Penetration testing dont just leave it to chance
Penetration testing dont just leave it to chancePenetration testing dont just leave it to chance
Penetration testing dont just leave it to chance
 
Advanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to AndroidAdvanced Malware Analysis Training Session 8 - Introduction to Android
Advanced Malware Analysis Training Session 8 - Introduction to Android
 
Bridging the Gap
Bridging the GapBridging the Gap
Bridging the Gap
 
Bridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial TradecraftBridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial Tradecraft
 
A Beard, An App, A Blender
A Beard, An App, A BlenderA Beard, An App, A Blender
A Beard, An App, A Blender
 
136 latest dot net interview questions
136  latest dot net interview questions136  latest dot net interview questions
136 latest dot net interview questions
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 

Último

+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@
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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