SlideShare una empresa de Scribd logo
1 de 63
Descargar para leer sin conexión
CNIT 152:
Incident
Response
12 Investigating Windows System
s

(Part 3)
Updated 11-11-21
Other Artifacts of Interactive
Sessions
Interactive Sessions
• For the purposes of this section, include
s

• Login with user at the consol
e

• Remote Desktop session
s

• Screen sharing (via VNC or similar software)
LNK Files
• Shortcuts to
fi
le
s

• Serve as extensions to Windows Explore
r

• Windows automatically creates LNKs for every
opened
fi
l
e

• To populate "Recent Files
"

• Separate list in each user pro
fi
le
Where the LNK Files Are
Evidence in LNK Files
Timeline
• LNK
fi
les can show just what a user di
d

• Which
fi
les were accessed, and in what order
Jump Lists
• Right-click a
taskbar icon to
show recently used
item
s

• Word shows recent
Word
fi
les, etc.
Where Jump Lists are
Stored
• Not human-readable, you need tool
s

• JumpLister for Windows 7-
8

• JLECmd for Windows 10 (link Ch 12t)
The Recycle Bin
• Located in $Recycle.Bi
n

• Contains
fi
les deleted from the hard dis
k

• But not if deleted from removable drive
s

• Or from the Command Promp
t

• Or with Shift+Delete
Ri
fi
uti2 Tool
• Link Ch 12u
Velociraptor
Memory Forensics
Evidence in RAM
Types of Memory
• Physical (RAM chips
)

• Page
fi
l
e

• Data moved out of RAM onto the hard dis
k

• %SYSTEMDRIVE%page
fi
le.sys
Crash Dumps
• Can be produced when Windows crashes with
the "Blue-Screen of Death
"

• Three level
s

• Kernel Memory Dump (default
)

• Small Memory Dump (Minidump
)

• Complete Memory Dump
Crash Dump Storage
• %LOCALAPPDATA%Crashdump
s

• Complete Memory Dump is most useful typ
e

• But it's rarely turned on
Hibernation Files
• Saves the full contents of RAM on dis
k

• %SYSTEMDRIVE%Hiber
fi
l.sy
s

• It's compressed and includes metadat
a

• Link Ch 8
t

• Volatility can parse it
Running Processes
• Volatility can recover
12c-1
Handles
• Used to access
fi
les, devices, and more from
softwar
e

• Can help when analyzing malwar
e

• Mutants or Mutexes are used for inter-process
communicatio
n

• To lock a resource so no other process
changes it while it's in us
e

• Used by malware to prevent re-infection
Handles for Zeus
• Mutant _AVIRA_2108 is a
fi
ngerprint of Zeu
s

• Link Ch 12u
Handles for Notepad
Velociraptor
Memory Sections
• Each process has a virtual address spac
e

• Including RAM and some disk space in the
page
fi
l
e

• The OS swaps data in and out of physical
memor
y

• Virtual Address Descriptor (VAD) tre
e

• A kernel data structure that shows how
memory is used by each process (link Ch 12v)
Memory Map for Notepad
Velociraptor
Detecting Malicious DLLs
• Check for valid digital signature
s

• Known-good or -bad hash value
s

• Evidence of process-tampering attack
s

• Malware loading a DLL surreptitiously or
running code in memory
DLLs for Notepad
Velociraptor
Other Memory Artifacts
• Network connection
s

• Loaded driver
s

• Runs in kernel, with elevated privilege
s

• Console command histor
y

• Strings in memor
y

• Credentials
Page
fi
le Analysis
• Has no intrinsic structur
e

• Can search for string
s

• Be careful: antivirus and host-based intrusion
detection systems leave signatures in the
page
fi
l
e

• Suspicious IP addresses, domain names,
and malware
fi
lename
s

• Windows can clear the page
fi
le on shutdown,
but this is not its default setting
Analyzing Common


In-Memory Attacks
• Process injectio
n

• Hooking
Process Injection
• A malicious injecting process causes a
legitimate process (injected) to load and
execute malicious cod
e

• In-memory attac
k

• Disk
fi
les do not chang
e

• Injected process has no evidence indicating
which process was responsible for the injection
Methods of Process
Injection
• Use Windows APIs (requires Administrator or
SYSTEM privileges
)

• Force target process to load a malicious DLL
from dis
k

• Directly write malicious code to target
process's memory and invoke a remote thread
to execute it
Process Replacement
• Malware launches a legitimate executable in a
suspended stat
e

• Then overwrite process memory with malicious
cod
e

• Unsuspend it to execute
Detecting Malicious
Injection
• Memory sections with Execute, Read and Write
permission
s

• Processes that don't match corresponding disk
fi
le
s

• Links Ch 12w, 12x
Sysmon Detecting Injection
https://letsdefend.io/blog/process-injection-detection-with-sysmon/
Finding Persistence
Mechanisms
• The injecting process needs a persistence
mechanism to survive reboot
s

• So it may be found i
n

• Auto-run keys, DLL load-order hijacking, etc.
Hooking
• Allows code within running processes to
intercept, modify, and view events such as
function calls and data they retur
n

• Windows provides many API mechanisms to do
thi
s

• Used by legitimate program
s

• Antivirus, host-based intrusion detection
systems, application inventory software
Malicious Hooking
• Rootkits use hooking to hide
fi
les, processes,
registry keys, or network connection
s

• Keyloggers may use SetWindowsHookEx to
cause a malicious DLL function to be called
whenever a keyboard event occur
s

• Or use GetAsyncKeyState to constantly check
the up/down state of keys
Types of Hooks
• Manipulate a process's Import Address Tabl
e

• So it calls malicious functions instead of
legitimate system function
s

• Hook kernel structures such as the Interrupt
Descriptor Table (IDT) and System Service
Dispatch Table (SSDT
)

• Prevented on modern Windows systems by
Kernel Patch Protection (KPP)
Zeus Hook
• The next slide shows the output of
"apihooks" (a Volatility plugin
)

• On a system infected with Zeu
s

• Shows an inline hook to the HttpSendRequestA
function imported from WinInet.dll within the
process space of lsass.exe
Volatility Detecting Hooks
Memory Analysis Tools
• Acquisition tool
s

• FTK Image
r

• DumpI
t

• Memoryz
e

• Velocirapto
r

• Analysis tool
s

• Memoryz
e

• Volatility
12c-2
Alternative Persistence
Mechanisms
Alternative Persistence
Mechanisms
• Startup folder
s

• Recurring task
s

• System binary modi
fi
catio
n

• The sticky keys attac
k

• DLL load-order hijacking
Startup Folders
• Any program or shortcut in this folder is
launche
d

• On startup or login
Recurring Tasks
• Use "at" or "schtasks" command
s

• To make a task that recurs at regular times or
days of the wee
k

• Future and recurring scheduled tasks persist as
.job
fi
les in %SYSTEMROOT%Tasks
System Binary Modi
fi
cation
• Modify existing Windows binar
y

• Typically one automatically loaded on bootup
or logi
n

• Add malicious cod
e

• Time-stom
p

• Will change MD5 hash and break signature, but
not all legitimate binaries are signed
Careful Modi
fi
cations
• Changes that cause Windows to crash or impair
user experience will limit the attacker's ability to
persis
t

• Attackers are more likely to replace noncritical
executables or libraries
Defenses
• Windows File Protection in older versions
of Windows (XP, 2000
)

• Easily bypassed by a local Administrato
r

• Replaced by Windows Resource Protection
(WRP) in Windows Vista and late
r

• Requires TrustedInstaller permissions to
alter WFP-governed resource
s

• More resistant to tampering
The Sticky Keys Attack
• Targets sethc.ex
e

• A
fi
le that provides accessibility feature
s

• Replace sethc.exe with cmd.ex
e

• Press Shift key
fi
ve times before logo
n

• A command shell opens with SYSTEM
privilege
s

• Even works during a Remote Desktop
Protocol session
• No longer works on Vista and later version
s

• But there's another way to get the same result
The Sticky Keys Attack
DLL Load-Order Hijacking
• DLLs are loaded when a program launche
s

• But DLLs might be in many different folder
s

• "KnownDLLs" registry key lists known system
DLLs and ensures that they are always loaded
from %systemroot%System32
Unknown DLL Search Order
DLL Load-Order Hijacking
Works When:
• ntshrui.dll is loaded by Windows Explorer and is
vulnerabl
e

• A malicious ntshrui.dll in %systemroot% will
launch when Explorer does
12c-3

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
 
CNIT 152: 3 Pre-Incident Preparation
CNIT 152: 3 Pre-Incident PreparationCNIT 152: 3 Pre-Incident Preparation
CNIT 152: 3 Pre-Incident Preparation
 
CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)
CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)
CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
 
CNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X SystemsCNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X Systems
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
 
CNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating ApplicationsCNIT 121: 14 Investigating Applications
CNIT 121: 14 Investigating Applications
 
CNIT 121: 11 Analysis Methodology
CNIT 121: 11 Analysis MethodologyCNIT 121: 11 Analysis Methodology
CNIT 121: 11 Analysis Methodology
 
CNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data Collection
CNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data CollectionCNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data Collection
CNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data Collection
 
CNIT 152: 6. Scope & 7. Live Data Collection
CNIT 152: 6. Scope & 7. Live Data CollectionCNIT 152: 6. Scope & 7. Live Data Collection
CNIT 152: 6. Scope & 7. Live Data Collection
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network Evidence
 
CNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World IncidentsCNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World Incidents
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network EvidenceCNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
CNIT 152 11 Analysis Methodology
CNIT 152 11 Analysis MethodologyCNIT 152 11 Analysis Methodology
CNIT 152 11 Analysis Methodology
 
CNIT 152 10 Enterprise Service
CNIT 152 10 Enterprise ServiceCNIT 152 10 Enterprise Service
CNIT 152 10 Enterprise Service
 
CNIT 152: 12 Investigating Windows Systems (Part 2 of 3)
CNIT 152: 12 Investigating Windows Systems (Part 2 of 3)CNIT 152: 12 Investigating Windows Systems (Part 2 of 3)
CNIT 152: 12 Investigating Windows Systems (Part 2 of 3)
 
CNIT 121: 2 IR Management Handbook
CNIT 121: 2 IR Management HandbookCNIT 121: 2 IR Management Handbook
CNIT 121: 2 IR Management Handbook
 
CNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident PreparationCNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident Preparation
 
3. Security Engineering
3. Security Engineering3. Security Engineering
3. Security Engineering
 

Similar a CNIT 152 12. Investigating Windows Systems (Part 3)

Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
EPAM Systems
 
Concepts of Malicious Windows Programs
Concepts of Malicious Windows ProgramsConcepts of Malicious Windows Programs
Concepts of Malicious Windows Programs
Natraj G
 

Similar a CNIT 152 12. Investigating Windows Systems (Part 3) (20)

Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware BehaviorPractical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware Behavior
 
CNIT 126 11. Malware Behavior
CNIT 126 11. Malware BehaviorCNIT 126 11. Malware Behavior
CNIT 126 11. Malware Behavior
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
CNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorCNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware Behavior
 
CNIT 152 12 Investigating Windows Systems (Part 2)
CNIT 152 12 Investigating Windows Systems (Part 2)CNIT 152 12 Investigating Windows Systems (Part 2)
CNIT 152 12 Investigating Windows Systems (Part 2)
 
Dominique
DominiqueDominique
Dominique
 
CNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows ProgramsCNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows Programs
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
 
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
 
unit 2 confinement techniques.pdf
unit 2 confinement techniques.pdfunit 2 confinement techniques.pdf
unit 2 confinement techniques.pdf
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
Windows Malware Techniques
Windows Malware TechniquesWindows Malware Techniques
Windows Malware Techniques
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
 
Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
Вячеслав Кабак "Microsoft Sysinternals-Useful Utilities"
 
Windows internals
Windows internalsWindows internals
Windows internals
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 
Application Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternativeApplication Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternative
 
Concepts of Malicious Windows Programs
Concepts of Malicious Windows ProgramsConcepts of Malicious Windows Programs
Concepts of Malicious Windows Programs
 

Más de Sam Bowne

Más de Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
10 RSA
10 RSA10 RSA
10 RSA
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 
6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)6 Analyzing Android Applications (Part 2)
6 Analyzing Android Applications (Part 2)
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

CNIT 152 12. Investigating Windows Systems (Part 3)

  • 1. CNIT 152: Incident Response 12 Investigating Windows System s (Part 3) Updated 11-11-21
  • 2.
  • 3. Other Artifacts of Interactive Sessions
  • 4. Interactive Sessions • For the purposes of this section, include s • Login with user at the consol e • Remote Desktop session s • Screen sharing (via VNC or similar software)
  • 5. LNK Files • Shortcuts to fi le s • Serve as extensions to Windows Explore r • Windows automatically creates LNKs for every opened fi l e • To populate "Recent Files " • Separate list in each user pro fi le
  • 6. Where the LNK Files Are
  • 8. Timeline • LNK fi les can show just what a user di d • Which fi les were accessed, and in what order
  • 9. Jump Lists • Right-click a taskbar icon to show recently used item s • Word shows recent Word fi les, etc.
  • 10. Where Jump Lists are Stored • Not human-readable, you need tool s • JumpLister for Windows 7- 8 • JLECmd for Windows 10 (link Ch 12t)
  • 11. The Recycle Bin • Located in $Recycle.Bi n • Contains fi les deleted from the hard dis k • But not if deleted from removable drive s • Or from the Command Promp t • Or with Shift+Delete
  • 16. Types of Memory • Physical (RAM chips ) • Page fi l e • Data moved out of RAM onto the hard dis k • %SYSTEMDRIVE%page fi le.sys
  • 17. Crash Dumps • Can be produced when Windows crashes with the "Blue-Screen of Death " • Three level s • Kernel Memory Dump (default ) • Small Memory Dump (Minidump ) • Complete Memory Dump
  • 18. Crash Dump Storage • %LOCALAPPDATA%Crashdump s • Complete Memory Dump is most useful typ e • But it's rarely turned on
  • 19. Hibernation Files • Saves the full contents of RAM on dis k • %SYSTEMDRIVE%Hiber fi l.sy s • It's compressed and includes metadat a • Link Ch 8 t • Volatility can parse it
  • 21.
  • 22. 12c-1
  • 23. Handles • Used to access fi les, devices, and more from softwar e • Can help when analyzing malwar e • Mutants or Mutexes are used for inter-process communicatio n • To lock a resource so no other process changes it while it's in us e • Used by malware to prevent re-infection
  • 24. Handles for Zeus • Mutant _AVIRA_2108 is a fi ngerprint of Zeu s • Link Ch 12u
  • 27. Memory Sections • Each process has a virtual address spac e • Including RAM and some disk space in the page fi l e • The OS swaps data in and out of physical memor y • Virtual Address Descriptor (VAD) tre e • A kernel data structure that shows how memory is used by each process (link Ch 12v)
  • 28. Memory Map for Notepad
  • 30. Detecting Malicious DLLs • Check for valid digital signature s • Known-good or -bad hash value s • Evidence of process-tampering attack s • Malware loading a DLL surreptitiously or running code in memory
  • 33. Other Memory Artifacts • Network connection s • Loaded driver s • Runs in kernel, with elevated privilege s • Console command histor y • Strings in memor y • Credentials
  • 34. Page fi le Analysis • Has no intrinsic structur e • Can search for string s • Be careful: antivirus and host-based intrusion detection systems leave signatures in the page fi l e • Suspicious IP addresses, domain names, and malware fi lename s • Windows can clear the page fi le on shutdown, but this is not its default setting
  • 35. Analyzing Common 
 In-Memory Attacks • Process injectio n • Hooking
  • 36. Process Injection • A malicious injecting process causes a legitimate process (injected) to load and execute malicious cod e • In-memory attac k • Disk fi les do not chang e • Injected process has no evidence indicating which process was responsible for the injection
  • 37. Methods of Process Injection • Use Windows APIs (requires Administrator or SYSTEM privileges ) • Force target process to load a malicious DLL from dis k • Directly write malicious code to target process's memory and invoke a remote thread to execute it
  • 38. Process Replacement • Malware launches a legitimate executable in a suspended stat e • Then overwrite process memory with malicious cod e • Unsuspend it to execute
  • 39. Detecting Malicious Injection • Memory sections with Execute, Read and Write permission s • Processes that don't match corresponding disk fi le s • Links Ch 12w, 12x
  • 41. Finding Persistence Mechanisms • The injecting process needs a persistence mechanism to survive reboot s • So it may be found i n • Auto-run keys, DLL load-order hijacking, etc.
  • 42. Hooking • Allows code within running processes to intercept, modify, and view events such as function calls and data they retur n • Windows provides many API mechanisms to do thi s • Used by legitimate program s • Antivirus, host-based intrusion detection systems, application inventory software
  • 43. Malicious Hooking • Rootkits use hooking to hide fi les, processes, registry keys, or network connection s • Keyloggers may use SetWindowsHookEx to cause a malicious DLL function to be called whenever a keyboard event occur s • Or use GetAsyncKeyState to constantly check the up/down state of keys
  • 44. Types of Hooks • Manipulate a process's Import Address Tabl e • So it calls malicious functions instead of legitimate system function s • Hook kernel structures such as the Interrupt Descriptor Table (IDT) and System Service Dispatch Table (SSDT ) • Prevented on modern Windows systems by Kernel Patch Protection (KPP)
  • 45. Zeus Hook • The next slide shows the output of "apihooks" (a Volatility plugin ) • On a system infected with Zeu s • Shows an inline hook to the HttpSendRequestA function imported from WinInet.dll within the process space of lsass.exe
  • 47. Memory Analysis Tools • Acquisition tool s • FTK Image r • DumpI t • Memoryz e • Velocirapto r • Analysis tool s • Memoryz e • Volatility
  • 48. 12c-2
  • 50. Alternative Persistence Mechanisms • Startup folder s • Recurring task s • System binary modi fi catio n • The sticky keys attac k • DLL load-order hijacking
  • 51. Startup Folders • Any program or shortcut in this folder is launche d • On startup or login
  • 52. Recurring Tasks • Use "at" or "schtasks" command s • To make a task that recurs at regular times or days of the wee k • Future and recurring scheduled tasks persist as .job fi les in %SYSTEMROOT%Tasks
  • 53. System Binary Modi fi cation • Modify existing Windows binar y • Typically one automatically loaded on bootup or logi n • Add malicious cod e • Time-stom p • Will change MD5 hash and break signature, but not all legitimate binaries are signed
  • 54. Careful Modi fi cations • Changes that cause Windows to crash or impair user experience will limit the attacker's ability to persis t • Attackers are more likely to replace noncritical executables or libraries
  • 55. Defenses • Windows File Protection in older versions of Windows (XP, 2000 ) • Easily bypassed by a local Administrato r • Replaced by Windows Resource Protection (WRP) in Windows Vista and late r • Requires TrustedInstaller permissions to alter WFP-governed resource s • More resistant to tampering
  • 56. The Sticky Keys Attack • Targets sethc.ex e • A fi le that provides accessibility feature s • Replace sethc.exe with cmd.ex e • Press Shift key fi ve times before logo n • A command shell opens with SYSTEM privilege s • Even works during a Remote Desktop Protocol session
  • 57. • No longer works on Vista and later version s • But there's another way to get the same result The Sticky Keys Attack
  • 58.
  • 59. DLL Load-Order Hijacking • DLLs are loaded when a program launche s • But DLLs might be in many different folder s • "KnownDLLs" registry key lists known system DLLs and ensures that they are always loaded from %systemroot%System32
  • 60.
  • 62. DLL Load-Order Hijacking Works When: • ntshrui.dll is loaded by Windows Explorer and is vulnerabl e • A malicious ntshrui.dll in %systemroot% will launch when Explorer does
  • 63. 12c-3