SlideShare a Scribd company logo
CNIT 152:
Incident
Response


64
12 Investigating Windows System
s

(Part 1) Updated 10-28-21
Ch 12 Part 1
Ch 12 Part 2
Ch 12 Part 3
NTFS and File System
Analysis
NTFS and FAT
• FAT was the old
fi
le system used by MS-DOS,
Windows 95, Windows 9
8

• NTFS was the replacement
Master File Table


(MFT)
• De
fi
nes how disk space is allocated and
utilize
d

• How
fi
les are created and delete
d

• How metadata is stored and updated
MFT Contents
• Primary source of metadata in NTF
S

• Contains or references everything about a
fi
l
e

• Timestamp
s

• Siz
e

• Attributes (such as permissions
)

• Parent director
y

• Contents
The Evidence
• Each NTFS volume has its own MF
T

• Stored in the volume root as a
fi
le named $MF
T

• You need raw disk access to acquire $MF
T

• It's not accessible through Windows Explorer
or standard API calls
$MFT in
Velociraptor
MFT Structure
• On a standard hard drive with 512-byte
sector
s

• A series of 1024-byte records or "entries
"

• One for each
fi
le and directory on a
volum
e

• First 16 entries are reserved for essential
NTFS artifact
s

• $MFT itself, $LogFile, and more
MFT in WinHex
MFT Entry Contents
• Record type (
fi
le or directory
)

• Record # (integer
)

• Parent record
#

• Active/Inactive
fl
a
g

• Deleted
fi
les are inactiv
e

• Attributes (metadata)
Attributes
• $STANDARD_INFORMATIO
N

• $FILE_NAM
E

• $DATA
MFT Records in Velociraptor


and Deleted File Recovery
Deleted Files
• Deleting a
fi
le causes its MFT record to be marked
"inactive
"

• Nothing else is changed, until this record is re-
use
d

• The
fi
le's contents and its metadata can be
recovere
d

• But NTFS will always re-use an existing MFT entry
before creating a new on
e

• So inactive entries only last for seconds or
minutes on the operating system volume
Timestamps
• MACE timestamp
s

• Modi
fi
ed, Accessed, Created, Entry Modi
fi
e
d

• An MFT entry will always have at least two
sets of attributes containing MACE
timestamp
s

• STANDARD_INFORMATION (also known as
$SIA or $SI
)

• FileName (also known as FNA, FILE_NAME,
or $FN)
•These are Standard
Information ($SI)
timestamp
s

•Create
d

•Accesse
d

•Modi
fi
e
d

•Entry Modi
fi
ed
timestamp not
visible in Windows
Explore
r

•Forensic tools like
SleuthKit, EnCase,
and FTK show it
MACE Timestamps
Accessed Timestamp
• Versions of Windows after Windows XP no
longer update the Accessed timestamp by
defaul
t

• It can be enabled with a registry change, but
even when it's enabled, NTFS may delay
updates by up to an hou
r

• Link Ch 12a
$FN Timestamps
• Refer to the MFT entry for the
fi
lename itsel
f

• NTFS actually maintains multiple sets of
fi
le
name attribute
s

• Full, case-sensitive long
fi
lenam
e

• MS-DOS 8.3 short
fi
le name
Time-Stomping
• Only the $SI timestamps are available to user
applications through the Windows AP
I

• Programs can only alter those timestamp
s

• A processes called "time-stomping
"

• Setmace can alter all the timestamps (link Ch
12b
)

• Malware droppers and installers often
automate this process, inserting timestamps
from system
fi
les to hide in the timeline
$SI and $FN Timestamps
• $SI timestamps are easily altere
d

• $FN timestamps require a complex and indirect
process to modif
y

• Inconsistencies may remain between the $SI
and $FN timestamps
• Link Ch 12c
Ch 12a-1
Data Runs
• $DATA attribute lists all clusters with the
fi
le's
content
s

• May not be contiguous (fragmented
fi
le
)

• Lists "data runs" that must be assembled
together to get the complete
fi
le
Resident Data
• MFT entry contains 1024 byte
s

• That's enough room to store complete data for
small
fi
les (up to 700 or 800 bytes) in the MF
T

• These are called "Resident
fi
les"
 

• Set the Resident
fl
ag in the MFT entry
MFT Slack Space
• MFT may contain leftovers from previously
resident dat
a

• This happens if a
fi
le was small enough to be
resident and then expanded to be too large to
remain resident
Alternate Data Streams
• Additional named $DATA attributes in a
fi
le's
MFT entr
y

• Each can point to an unique set of cluster run
s

• All the data streams share the same Standard
Information and Filename attribute
s

• So they all share the same timestamps
Known Alternate Stream
Names
• Browsers append a stream to downloaded
fi
le
s

• Named Zone.Identi
fi
e
r

• Windows Explorer uses this data to determine
the origin of a
fi
le and enforce security controls
on i
t

• Link Ch 12c
MFT Analysis Tools
INDX Attributes
• Used to make
fi
le searches faste
r

• Often contains metadata from deleted
fi
le
s

• Links Ch 12h, 12i
Ch 12a-2
Change Logs
• $LogFile tracks all transactions that change the
structure of a volum
e

• File or directory creation/copy/delet
e

• Changes to
fi
le metadata or INDX record
s

• $UsnJrnl (Update Sequence Number) journa
l

• Tracks less data but has a longer history
Volume Shadow Copies
• Automatically generated backups of Windows
fi
le
s

• Manage with the vssadmin and mklink
command-line tools (link Ch 12k)
Shadow Copy
• A mirror of the volume's entire
fi
le system at the
time of the snapsho
t

• Available within the linked director
y

• Other tools:
Shadow Copies in
Velociraptor
File System Redirector
• Windows 32-bit on Windows 64-bit (WoW64
)

• Redirects some folders elsewhere when 32-bit
programs run on 64-bit Windows, lik
e

• %SYSTEMROOT%system32 redirects to 

C:WindowsSysWOW6
4

• 32-bit tools may not see the whole
fi
le system
Windows Prefetch
C:WindowsPrefetch
Contains
• NTOSBOOT-BooDFAAD.pf (system boot
prefetch) -- only
fi
le existing on Windows Server
by defaul
t

• Layout.ini (for disk defragmenter
)

• Appname-########.pf (up to 128 application-
speci
fi
c prefetch
fi
les)
Value
• A record of programs executed on a syste
m

• Even if the executable has been delete
d

• Shows when application was
fi
rst run, when it
most recently ran, and how many times it was
ru
n

• Also shows each component loaded
WinPrefetchView
• Link Ch 12l
Prefetch in Velociraptor
Event Logs
Event Logs Enable these
Tasks
Types of Logs
• Core event logs in all Windows version
s

• Applicatio
n

• Errors and info from apps; antivirus and host-
based IPS log
s

• Syste
m

• Events from core Windows services; changes
in time, driver loads, network con
fi
guration
issue
s

• Securit
y

• Login and logoff attempts, changes to audit
policy
Acquiring Logs
• Log
fi
le locations are speci
fi
ed in this Registry
key:
HKLMSYSTEMCurrentControlSetServicesEventl
o
g

• For Vista and later, the logs are in these XML
fi
les:
Applications and Services
Logs
• EVTX
fi
les in %SYSTEMROOT%
System32WinevtLogs


• Logs for Task scheduler, Windows Firewall,
AppLocker, Terminal Services, User Access
Control
Event ID
• Each event is labelled with its Source and Event
ID numbe
r

• Good resource: eventid.ne
t

• Vista and later often have EventIDs that are 4096
larger than the EventID from Windows XP
Logon Events
From


Event


Viewer
Fields
Lateral Movement
• Attackers use stolen credentials to move from
system to syste
m

• Often use a common administrator accoun
t

• Or a domain or domain administrator account
Example
In Command Shell as ACMEEve
Events Logged
Changes to Accounts and
Security Settings: Security Logs
Process Auditing
• Not on by defaul
t

• Turn it on in local audit policy or Group Polic
y

• Puts an event in the Security log every time a
process is executed or terminate
d

• Generates a lot of log events
Service Events
• System logs record every time a service starts
or stop
s

• A common persistence mechanism for malware
Logs for PsExec
Suspicious Things
• Abnormal usernames using PsExe
c

• Known-bad service name
s

• Errors from malicious binaries that were
deleted, but still referenced by a service
Log Analysis Tips
• Check Application log for AV alert during period
of interes
t

• Increase log
fi
le sizes to retain a longer histor
y

• If log
fi
les in the old binary format are corrupt,
use FixEVT (link Ch 12m)
Tools
Sysmon in Velociraptor
Event Logs in Velociraptor
Scheduled Tasks
The "at" Command
• Requires administrator privilege
s

• Uses local tim
e

• Run as SYSTEM
The "schtasks" Command
• More complex forma
t

• Rarely used by attackers
.job Files
• Con
fi
guration data for scheduled task
s

• One
fi
le per tas
k

• In %SYSTEMROOT%Tasks


• Files persist until shutdown or reboot of system
Task Scheduler Logs
• %SYSTEMROOT%TasksSchedLgU.tx
t

• Records start time and completion of task
s

• Also Event Logs, includin
g

• Microsoft-Windows-
TaskScheduler%4Operational.evt
x

• Security log
Analyzing .job Files
• A binary
fi
l
e

• Strings will show user information and
fi
le path
Job File Parser
• Link Ch
12n
Scheduled Tasks Log
Windows
Task
Scheduler
Operational
Log in Event
Viewer
Scheduled Tasks in
Velociraptor
Ch 12a-3

More Related Content

What's hot

CNIT 121: 2 IR Management Handbook
CNIT 121: 2 IR Management HandbookCNIT 121: 2 IR Management Handbook
CNIT 121: 2 IR Management Handbook
Sam Bowne
 
CNIT 121: 17 Remediation Introduction (Part 1)
CNIT 121: 17 Remediation Introduction (Part 1)CNIT 121: 17 Remediation Introduction (Part 1)
CNIT 121: 17 Remediation Introduction (Part 1)
Sam Bowne
 
Windows 10 Forensics: OS Evidentiary Artefacts
Windows 10 Forensics: OS Evidentiary ArtefactsWindows 10 Forensics: OS Evidentiary Artefacts
Windows 10 Forensics: OS Evidentiary Artefacts
Brent Muir
 
Windows 8.x Forensics 1.0
Windows 8.x Forensics 1.0Windows 8.x Forensics 1.0
Windows 8.x Forensics 1.0
Brent Muir
 
4 Getting Started & 5 Leads
4 Getting Started & 5 Leads4 Getting Started & 5 Leads
4 Getting Started & 5 Leads
Sam Bowne
 
CNIT 152: 6 Scoping & 7 Live Data Collection
CNIT 152: 6 Scoping & 7 Live Data CollectionCNIT 152: 6 Scoping & 7 Live Data Collection
CNIT 152: 6 Scoping & 7 Live Data Collection
Sam Bowne
 
Disk forensics
Disk forensicsDisk forensics
Disk forensics
Chiawei Wang
 
Understanding the Event Log
Understanding the Event LogUnderstanding the Event Log
Understanding the Event Log
chuckbt
 
NTFS Forensics
NTFS Forensics NTFS Forensics
NTFS Forensics
nullowaspmumbai
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory Forensics
Andrew Case
 
Windows Forensic 101
Windows Forensic 101Windows Forensic 101
Windows Forensic 101
Digit Oktavianto
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
Sam Bowne
 
CNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World IncidentsCNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World Incidents
Sam Bowne
 
MacOS forensics and anti-forensics (DC Lviv 2019) presentation
MacOS forensics and anti-forensics (DC Lviv 2019) presentationMacOS forensics and anti-forensics (DC Lviv 2019) presentation
MacOS forensics and anti-forensics (DC Lviv 2019) presentation
OlehLevytskyi1
 
Live data collection_from_windows_system
Live data collection_from_windows_systemLive data collection_from_windows_system
Live data collection_from_windows_systemMaceni Muse
 
1. Mobile Application (In)security
1. Mobile Application (In)security1. Mobile Application (In)security
1. Mobile Application (In)security
Sam Bowne
 
Ntfs forensics
Ntfs forensicsNtfs forensics
File system
File systemFile system
File system
Harleen Johal
 

What's hot (20)

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: 17 Remediation Introduction (Part 1)
CNIT 121: 17 Remediation Introduction (Part 1)CNIT 121: 17 Remediation Introduction (Part 1)
CNIT 121: 17 Remediation Introduction (Part 1)
 
Windows 10 Forensics: OS Evidentiary Artefacts
Windows 10 Forensics: OS Evidentiary ArtefactsWindows 10 Forensics: OS Evidentiary Artefacts
Windows 10 Forensics: OS Evidentiary Artefacts
 
Windows 8.x Forensics 1.0
Windows 8.x Forensics 1.0Windows 8.x Forensics 1.0
Windows 8.x Forensics 1.0
 
4 Getting Started & 5 Leads
4 Getting Started & 5 Leads4 Getting Started & 5 Leads
4 Getting Started & 5 Leads
 
CNIT 152: 6 Scoping & 7 Live Data Collection
CNIT 152: 6 Scoping & 7 Live Data CollectionCNIT 152: 6 Scoping & 7 Live Data Collection
CNIT 152: 6 Scoping & 7 Live Data Collection
 
Disk forensics
Disk forensicsDisk forensics
Disk forensics
 
Understanding the Event Log
Understanding the Event LogUnderstanding the Event Log
Understanding the Event Log
 
NTFS Forensics
NTFS Forensics NTFS Forensics
NTFS Forensics
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory Forensics
 
Windows Forensic 101
Windows Forensic 101Windows Forensic 101
Windows Forensic 101
 
CNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic DuplicationCNIT 121: 8 Forensic Duplication
CNIT 121: 8 Forensic Duplication
 
Module 02 ftk imager
Module 02 ftk imagerModule 02 ftk imager
Module 02 ftk imager
 
CNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World IncidentsCNIT 152: 1 Real-World Incidents
CNIT 152: 1 Real-World Incidents
 
MacOS forensics and anti-forensics (DC Lviv 2019) presentation
MacOS forensics and anti-forensics (DC Lviv 2019) presentationMacOS forensics and anti-forensics (DC Lviv 2019) presentation
MacOS forensics and anti-forensics (DC Lviv 2019) presentation
 
Live data collection_from_windows_system
Live data collection_from_windows_systemLive data collection_from_windows_system
Live data collection_from_windows_system
 
1. Mobile Application (In)security
1. Mobile Application (In)security1. Mobile Application (In)security
1. Mobile Application (In)security
 
Ntfs forensics
Ntfs forensicsNtfs forensics
Ntfs forensics
 
Windowsforensics
WindowsforensicsWindowsforensics
Windowsforensics
 
File system
File systemFile system
File system
 

Similar to CNIT 152 12 Investigating Windows Systems (Part 1 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
Sam Bowne
 
CNIT 152: 10 Enterprise Services
CNIT 152: 10 Enterprise ServicesCNIT 152: 10 Enterprise Services
CNIT 152: 10 Enterprise Services
Sam Bowne
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
Sam Bowne
 
CNIT 152 12. Investigating Windows Systems (Part 3)
CNIT 152 12. Investigating Windows Systems (Part 3)CNIT 152 12. Investigating Windows Systems (Part 3)
CNIT 152 12. Investigating Windows Systems (Part 3)
Sam Bowne
 
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
Sam Bowne
 
Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3CTIN
 
CNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X SystemsCNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X Systems
Sam Bowne
 
System Event Logs
System Event LogsSystem Event Logs
System Event Logs
primeteacher32
 
Powering up on power shell avengercon - 2018
Powering up on power shell   avengercon - 2018Powering up on power shell   avengercon - 2018
Powering up on power shell avengercon - 2018
Fernando Tomlinson, CISSP, MBA
 
Chap1_Part2.pptx
Chap1_Part2.pptxChap1_Part2.pptx
Chap1_Part2.pptx
NMohd3
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
Shay Cohen
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
HelpWithAssignment.com
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
Fernando Tomlinson, CISSP, MBA
 
Security tools
Security toolsSecurity tools
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideErica StJohn
 
Windows Forensics- Introduction and Analysis
Windows Forensics- Introduction and AnalysisWindows Forensics- Introduction and Analysis
Windows Forensics- Introduction and Analysis
Don Caeiro
 
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)
Sam Bowne
 
Daemons
DaemonsDaemons
Daemons
christina555
 
Os
OsOs
CNIT 121: 12 Investigating Windows Systems (Part 3)
CNIT 121: 12 Investigating Windows Systems (Part 3)CNIT 121: 12 Investigating Windows Systems (Part 3)
CNIT 121: 12 Investigating Windows Systems (Part 3)
Sam Bowne
 

Similar to CNIT 152 12 Investigating Windows Systems (Part 1 of 3) (20)

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: 10 Enterprise Services
CNIT 152: 10 Enterprise ServicesCNIT 152: 10 Enterprise Services
CNIT 152: 10 Enterprise Services
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
 
CNIT 152 12. Investigating Windows Systems (Part 3)
CNIT 152 12. Investigating Windows Systems (Part 3)CNIT 152 12. Investigating Windows Systems (Part 3)
CNIT 152 12. Investigating Windows Systems (Part 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
 
Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3Windows 7 forensics -overview-r3
Windows 7 forensics -overview-r3
 
CNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X SystemsCNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X Systems
 
System Event Logs
System Event LogsSystem Event Logs
System Event Logs
 
Powering up on power shell avengercon - 2018
Powering up on power shell   avengercon - 2018Powering up on power shell   avengercon - 2018
Powering up on power shell avengercon - 2018
 
Chap1_Part2.pptx
Chap1_Part2.pptxChap1_Part2.pptx
Chap1_Part2.pptx
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
 
Security tools
Security toolsSecurity tools
Security tools
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Windows Forensics- Introduction and Analysis
Windows Forensics- Introduction and AnalysisWindows Forensics- Introduction and Analysis
Windows Forensics- Introduction and Analysis
 
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)
 
Daemons
DaemonsDaemons
Daemons
 
Os
OsOs
Os
 
CNIT 121: 12 Investigating Windows Systems (Part 3)
CNIT 121: 12 Investigating Windows Systems (Part 3)CNIT 121: 12 Investigating Windows Systems (Part 3)
CNIT 121: 12 Investigating Windows Systems (Part 3)
 

More from Sam Bowne

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

More from 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
 
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)
 
10 RSA
10 RSA10 RSA
10 RSA
 
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
 
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
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 

CNIT 152 12 Investigating Windows Systems (Part 1 of 3)

  • 1. CNIT 152: Incident Response 64 12 Investigating Windows System s (Part 1) Updated 10-28-21
  • 3. Ch 12 Part 2 Ch 12 Part 3
  • 4. NTFS and File System Analysis
  • 5. NTFS and FAT • FAT was the old fi le system used by MS-DOS, Windows 95, Windows 9 8 • NTFS was the replacement
  • 6. Master File Table (MFT) • De fi nes how disk space is allocated and utilize d • How fi les are created and delete d • How metadata is stored and updated
  • 7. MFT Contents • Primary source of metadata in NTF S • Contains or references everything about a fi l e • Timestamp s • Siz e • Attributes (such as permissions ) • Parent director y • Contents
  • 8. The Evidence • Each NTFS volume has its own MF T • Stored in the volume root as a fi le named $MF T • You need raw disk access to acquire $MF T • It's not accessible through Windows Explorer or standard API calls
  • 10. MFT Structure • On a standard hard drive with 512-byte sector s • A series of 1024-byte records or "entries " • One for each fi le and directory on a volum e • First 16 entries are reserved for essential NTFS artifact s • $MFT itself, $LogFile, and more
  • 12. MFT Entry Contents • Record type ( fi le or directory ) • Record # (integer ) • Parent record # • Active/Inactive fl a g • Deleted fi les are inactiv e • Attributes (metadata)
  • 14. MFT Records in Velociraptor 
 and Deleted File Recovery
  • 15. Deleted Files • Deleting a fi le causes its MFT record to be marked "inactive " • Nothing else is changed, until this record is re- use d • The fi le's contents and its metadata can be recovere d • But NTFS will always re-use an existing MFT entry before creating a new on e • So inactive entries only last for seconds or minutes on the operating system volume
  • 16. Timestamps • MACE timestamp s • Modi fi ed, Accessed, Created, Entry Modi fi e d • An MFT entry will always have at least two sets of attributes containing MACE timestamp s • STANDARD_INFORMATION (also known as $SIA or $SI ) • FileName (also known as FNA, FILE_NAME, or $FN)
  • 17. •These are Standard Information ($SI) timestamp s •Create d •Accesse d •Modi fi e d •Entry Modi fi ed timestamp not visible in Windows Explore r •Forensic tools like SleuthKit, EnCase, and FTK show it
  • 19. Accessed Timestamp • Versions of Windows after Windows XP no longer update the Accessed timestamp by defaul t • It can be enabled with a registry change, but even when it's enabled, NTFS may delay updates by up to an hou r • Link Ch 12a
  • 20. $FN Timestamps • Refer to the MFT entry for the fi lename itsel f • NTFS actually maintains multiple sets of fi le name attribute s • Full, case-sensitive long fi lenam e • MS-DOS 8.3 short fi le name
  • 21. Time-Stomping • Only the $SI timestamps are available to user applications through the Windows AP I • Programs can only alter those timestamp s • A processes called "time-stomping " • Setmace can alter all the timestamps (link Ch 12b ) • Malware droppers and installers often automate this process, inserting timestamps from system fi les to hide in the timeline
  • 22. $SI and $FN Timestamps • $SI timestamps are easily altere d • $FN timestamps require a complex and indirect process to modif y • Inconsistencies may remain between the $SI and $FN timestamps
  • 23.
  • 24. • Link Ch 12c
  • 26. Data Runs • $DATA attribute lists all clusters with the fi le's content s • May not be contiguous (fragmented fi le ) • Lists "data runs" that must be assembled together to get the complete fi le
  • 27. Resident Data • MFT entry contains 1024 byte s • That's enough room to store complete data for small fi les (up to 700 or 800 bytes) in the MF T • These are called "Resident fi les" • Set the Resident fl ag in the MFT entry
  • 28. MFT Slack Space • MFT may contain leftovers from previously resident dat a • This happens if a fi le was small enough to be resident and then expanded to be too large to remain resident
  • 29. Alternate Data Streams • Additional named $DATA attributes in a fi le's MFT entr y • Each can point to an unique set of cluster run s • All the data streams share the same Standard Information and Filename attribute s • So they all share the same timestamps
  • 30.
  • 31. Known Alternate Stream Names • Browsers append a stream to downloaded fi le s • Named Zone.Identi fi e r • Windows Explorer uses this data to determine the origin of a fi le and enforce security controls on i t • Link Ch 12c
  • 32.
  • 33.
  • 35. INDX Attributes • Used to make fi le searches faste r • Often contains metadata from deleted fi le s • Links Ch 12h, 12i
  • 37. Change Logs • $LogFile tracks all transactions that change the structure of a volum e • File or directory creation/copy/delet e • Changes to fi le metadata or INDX record s • $UsnJrnl (Update Sequence Number) journa l • Tracks less data but has a longer history
  • 38. Volume Shadow Copies • Automatically generated backups of Windows fi le s • Manage with the vssadmin and mklink command-line tools (link Ch 12k)
  • 39.
  • 40. Shadow Copy • A mirror of the volume's entire fi le system at the time of the snapsho t • Available within the linked director y • Other tools:
  • 42. File System Redirector • Windows 32-bit on Windows 64-bit (WoW64 ) • Redirects some folders elsewhere when 32-bit programs run on 64-bit Windows, lik e • %SYSTEMROOT%system32 redirects to 
 C:WindowsSysWOW6 4 • 32-bit tools may not see the whole fi le system
  • 44. C:WindowsPrefetch Contains • NTOSBOOT-BooDFAAD.pf (system boot prefetch) -- only fi le existing on Windows Server by defaul t • Layout.ini (for disk defragmenter ) • Appname-########.pf (up to 128 application- speci fi c prefetch fi les)
  • 45. Value • A record of programs executed on a syste m • Even if the executable has been delete d • Shows when application was fi rst run, when it most recently ran, and how many times it was ru n • Also shows each component loaded
  • 49. Event Logs Enable these Tasks
  • 50. Types of Logs • Core event logs in all Windows version s • Applicatio n • Errors and info from apps; antivirus and host- based IPS log s • Syste m • Events from core Windows services; changes in time, driver loads, network con fi guration issue s • Securit y • Login and logoff attempts, changes to audit policy
  • 51. Acquiring Logs • Log fi le locations are speci fi ed in this Registry key: HKLMSYSTEMCurrentControlSetServicesEventl o g • For Vista and later, the logs are in these XML fi les:
  • 52. Applications and Services Logs • EVTX fi les in %SYSTEMROOT% System32WinevtLogs • Logs for Task scheduler, Windows Firewall, AppLocker, Terminal Services, User Access Control
  • 53. Event ID • Each event is labelled with its Source and Event ID numbe r • Good resource: eventid.ne t • Vista and later often have EventIDs that are 4096 larger than the EventID from Windows XP
  • 56.
  • 58. Lateral Movement • Attackers use stolen credentials to move from system to syste m • Often use a common administrator accoun t • Or a domain or domain administrator account
  • 60. In Command Shell as ACMEEve
  • 62. Changes to Accounts and Security Settings: Security Logs
  • 63. Process Auditing • Not on by defaul t • Turn it on in local audit policy or Group Polic y • Puts an event in the Security log every time a process is executed or terminate d • Generates a lot of log events
  • 64. Service Events • System logs record every time a service starts or stop s • A common persistence mechanism for malware
  • 66. Suspicious Things • Abnormal usernames using PsExe c • Known-bad service name s • Errors from malicious binaries that were deleted, but still referenced by a service
  • 67. Log Analysis Tips • Check Application log for AV alert during period of interes t • Increase log fi le sizes to retain a longer histor y • If log fi les in the old binary format are corrupt, use FixEVT (link Ch 12m)
  • 68. Tools
  • 70. Event Logs in Velociraptor
  • 72. The "at" Command • Requires administrator privilege s • Uses local tim e • Run as SYSTEM
  • 73. The "schtasks" Command • More complex forma t • Rarely used by attackers
  • 74. .job Files • Con fi guration data for scheduled task s • One fi le per tas k • In %SYSTEMROOT%Tasks • Files persist until shutdown or reboot of system
  • 75. Task Scheduler Logs • %SYSTEMROOT%TasksSchedLgU.tx t • Records start time and completion of task s • Also Event Logs, includin g • Microsoft-Windows- TaskScheduler%4Operational.evt x • Security log
  • 76. Analyzing .job Files • A binary fi l e • Strings will show user information and fi le path
  • 77. Job File Parser • Link Ch 12n