Computer Forensics Presentation
Computer Forensics Presentation
@paulacqure
@CQUREAcademy
CONSULTING
Agenda
08:00 – 08:30 Coffee & Croissant
08:30 – 10:00 Session 1
10:00 – 10:15 Coffee break
10:15 – 12:00 Session 2
12:15 – 13:00 Lunch
13:00 – 14:20 Session 3
14:20 – 14:35 Coffee break
14:35 – 15:45 Session 4
15:45 – 16:00 Wrap Up & Closing
What was your score in our Windows Security QUIZ - share
in the comment section!
CQURE Profile
→ Incident response emergency services → Delivered all around the world only by a CQURE
– immediate reaction! Team: training authors
→ Forensics investigation
→ Security awareness
info@cqure.us
For management and employees
Module 01: Introduction to
Incident Response Handling
@paulacqure
@CQUREAcademy
CONSULTING
Standardisation bodies
▪ ISO/IEC - Wide scope of coverage, focusing on standardization, more general framework
▪ IETF – Focuses on Internet related technical Security requirements
▪ NIST-CSRC (http://www.nist.gov/) – Wide scope of coverage for both government and enterprise needs. Many
relevant documents that can be leveraged
▪ OASIS (http://www.oasis-open.org/) - Application Vulnerability Description Language (AVDL)
▪ OGSF (Open Group Security Forum, http://www.opengroup.org/security/) - specifications, tools, guidelines and
best practices for businesses, responsibilities, liabilities and trust relationships; started Intrusion Attack and
Response Workshop
▪ Best practices and recommendations
▪ CERT/CC (http://www.cert.org/) – a center of Internet security expertise; recommendations, advisories,
practices, research
▪ SANS (System Administration, Networking, and Security) Institute –http://www.sans.org/, focuses on SysAdmin,
Audit, Network, and Security research and education.
▪ ISACA (http://www.isaca.org/) – Most noted for CoBIT, provides a comprehensive framework for IT
Governance, including security
▪ ISSA (http://www.issa.org/) – comprehensive coverage of security issues and solutions for InfoSec practitioners,
GAISP (Generally Accepted Information Security Principles)
Why is it Important?
▪ Sooner or later an incident is going to occur
▪ Do you know what to do?
▪ The fact that an incident has occurred may mean a law has been broken
Incidents
▪ Definition
▪ A violation or imminent threat of violation of computer security policies,
acceptable use policies, or standard security practices
▪ Examples
▪ Denial of service attack causes web server to crash
▪ Malware installed from a phishing attack infects user computers and establishes
connections with an external host
▪ An attacker obtains sensitive data and demands ransom from your CEO to prevent
release
▪ Sensitive information from your company is being disseminated through peer-to-
peer file sharing services
Types of Incidents
▪ Bombings, Explosions
▪ Earthquakes, Fires, Floods
▪ Power outages, Storms
▪ Hardware/software failures
▪ Strikes, Employees unavailable
▪ Hazard material spills
▪ Cyber-theft, Intellectual property theft
▪ Viruses, worms or other malicious software
▪ Unauthorized use
▪ Intrusions, Internal or external attack
▪ Denial of Service
What is an Event?
▪ An .event. is any observable occurrence in a system
and/or network.
▪ Examples of events include:
▪ System boot sequence
▪ System crash
▪ Packet flooding within a network
@paulacqure
@CQUREAcademy
CONSULTING
SECURED SECURED
DEFENDING DEVICES IDENTITIES
AGAINST MODERN
SECURITY THREATS
THREAT INFORMATION
RESISTANCE PROTECTION
Operating System Accountability
Areas of Focus
Problem:
Too much information to control
Solution:
Select areas with high probability of infection
DLLs
Services
Executables
Drivers
Permissions
▪ Should be audited
▪ Should be set up as a part of NTFS, not as a part of shares
BackupRead / BackupWrite
▪ Copy operation that is more important than ACLs
▪ Used by backup software
Best Practices for File Permissions
HKLM\SECURITY\Policy\Secrets
HKLM\SECURITY\Cache
HKLM\SECURITY\Policy\Secrets
DPAPI-NG:
Key derivation: SP800_108_CTR_HMAC (SHA512),
KDF_SP80056A_CONCAT (client)
Chasing the obvious: NTDS.DIT, SAM
:)
Healthy User Receives User Lured to Device
Computer Email Malicious Site Infected with
Malware
:)
Healthy User Receives User Lured
HelpDesk Logsto Device
Identity Stolen,
Computer Email Malicious Site
into Device Infected Has
Attacker with
Malware
Increased Privs
ceives User Lured to Device HelpDesk Logs Identity Stolen,
il Malicious Site Infected with into Device Attacker Has
Malware Increased Privs
“PASS THE HASH”
ATTACKS
Today’s security challenge
TODAY’S
SECURITY
CHALLENGE
Code Integrity
Apps
Local Security
Auth Service
Hyper-Visor
Virtual TPM
Kernel
Windows
Hypervisor
Hardware
Windows 10:
Local Account
Windows 10:
Domain Account
How to enable VSM?
1. Enable Secure Boot and UEFI in BIOS, enable TPM
How to enable VSM?
2. Configure Windows 10: join the machine to the
domain (VSM only protects domain credentials)
3. Install the Hyper-V feature in Windows 10
4. Configure the BCD in Windows 10 to start VSM:
bcdedit /set vsmlaunchtype auto
How to enable VSM?
5. Enable the Virtual Secure
Mode (VSM) GPO setting:
Computer Configuration/
Administrative Templates/
System/
Device Guard/
Turn on Virtualization Based
Security
…and reboot the machine
VSM Enabled Windows 10:
VSM Enabled
SMB Relay
@paulacqure
@CQUREAcademy
CONSULTING
Incident handling
▪ Overall process similar for most incidents
▪ With minor incident-specific variations
▪ More productive
▪ Identify basic steps common to all events
▪ Plan execution of each of these steps
Incident preparation components
▪ Peacetime activity
▪ Incident response policy
▪ Incident response team
▪ Supporting team
▪ Incident communication
▪ Compliance
▪ Hardware and software
▪ Training
Incident response policy
▪ Description of standard methods used by
organization for handling information Security
Incidents
▪ Benefits of policy
▪ Helps focus on incident as a whole, from start to finish
▪ Without getting diverted by media and organizational pressures
▪ Discussions provide management with understanding of issues they may have to
deal with during an actual incident
▪ Impacts of planned controls can be assessed by stakeholders
▪ May not be anticipated by IT team
▪ Reassurance for users
Incident response team
▪ Staff designated to respond to incidents
▪ Develop experience over time about expectations of organization during incidents
▪ Often cross-departmental
▪ Managers have to spare IRT members when needed
▪ Responsibilities
▪ Quickly identifying threats to the campus data infrastructure
▪ Assessing the level of risk
▪ Taking immediate steps to mitigate risks
▪ Notifying management of the event and associated risk
▪ Notifying local personnel of any incident involving their resources
▪ Issuing a final report as needed, including lessons learned
▪ Outbound communications
▪ Notifications to affected people
• IT Personnel
• Direct • Management
Report
•
•
Anonymous
Help Desk
IRT Outbound
•
•
End Users
Compliance
• Self Audit Related
• Media
Inbound communications
▪ Direct Report
▪ Asset owner or custodian may report the incident
▪ E.g. observing unusual computer behavior
▪ Anonymous Report
▪ Web forms to report an issue anonymously without fear of reprisal
▪ E.g. Allegations that a high ranking University official is printing pornographic material on University printers
▪ Public relations risk, sexual harassment lawsuits
▪ Help Desk
▪ Problem resolution may reveal problems
▪ E.g. misconfiguration of shared network drives
▪ Self-Audit
▪ Periodical vulnerability assessment and log analysis may identify breaches
▪ E.g. a forgotten FTP process
▪ Being used as a mp3 file server
Outbound communications
▪ Affected people are curious
▪ IT Personnel and the IT Help Desk
▪ Users quickly overwhelm Help Desk when essential assets are affected
▪ Immediate updates to remove exploited vulnerability
▪ Detection methods
▪ Use prior preparation to detect ongoing incidents
▪ Analysis
▪ Identify damage
▪ Performance monitoring
▪ E.g. excessively slow computer performance
▪ PII monitoring
▪ E.g. Google alerts
▪ www.google.com/alerts
▪ Internal investigations
▪ E.g. Internal audit
Analysis
▪ Begins with incident detection
▪ Discover all adverse events that compose the incident
▪ Manage the next phase of the cycle
▪ Containment and Eradication
▪ Want to avoid containment without analysis
▪ Identify stakeholders
▪ Identify restricted or essential assets affected by incident
▪ Primary targets for protection and eradication
Incident containment, eradication and recovery
▪ Containment
▪ The act of preventing the expansion of harm
▪ Typically involves disconnecting affected computers from the network
▪ May involve temporary shutdown of services
▪ Hence needs careful thought
Contain Eradicate
▪ BCP and DR involve and are often led by entities other than IT
▪ HR may require all individuals to stay home in a hurricane level 4 or higher
▪ IT may need employees to physically be present to shut down machines
▪ Co-ordination between these groups will ensure that appropriate actions are performed
Disaster – contd.
▪ Business Impact Analysis (BIA)
▪ An important part of BCP
▪ Identification of services and products that are critical to the organization
@paulacqure
@CQUREAcademy
CONSULTING
Techniques for malware discovery
Signature-based
Behavior-based
Attempts to open, view, delete, and/or modify files
Attempts to format disk drives and other unrecoverable disk
operations
Modifications to the logic of executable files, scripts of macros
Modification of critical system settings, such as start-up settings
Scripting of e-mail and instant messaging clients to send
executable content
Initiation of network communications
1- Evasion Techniques Used by Malware
Wrapping
ttaches the malicious payload (the installer or the
malware itself) to a legitimate file.
2- Evasion Techniques Used by Malware
Reflective PE Loader
Custom code
Firefox GET
Firefox RCE+payload
Connect 888
Victim
Remote session 888: download files
Attacker
Remote session 888: SCHTASKS: elevate, 777
Connect 777
Connect 666
Scenario 1: Techniques used
1.
2.
3.
Scenario 2: Techniques used
1.
2.
3.
4.
5.
6.
AMSI
Antimalware Scan Interface (AMSI)
It is a generic interface standard that allows applications and
services to integrate with any antimalware product
Techniques used
It supports a calling structure allowing for file and memory or
stream scanning, content source URL/IP reputation checks, and
other techniques
@paulacqure
@CQUREAcademy
CONSULTING
Windows Forensic Monitoring Limitations
▪
▪
▪
▪
▪
▪
▪
Sysinternals Sysmon (System Monitor)
▪
▪
▪
▪
▪
▪
▪
Sysmon Command-Line Usage
▪
▪
▪
▪
▪
▪
▪
Sample Sysmon Events (depends on version)
Category Event ID
Process Create 1
Process Terminated 5
Driver Loaded 6
Image Loaded 7
File Creation Time Changed 2
Network Connection 3
CreateRemoteThread 8
RawAccessRead* 9
Sysmon Service State Change 4
Error 255
Basic Configuration Options
▪
▪
Option Description
-h [SHA1] [MD5] [SHA256] [IMPHASH] [*] Hash algorithm(s)
▪
Advanced Configuration
▪
▪
▪ FileCreateTime
▪ NetworkConnect
DriverLoad
ImageLoad
CreateRemoteThread
<tag onmatch=“include”> RawAccessRead
<include filter/> <tag onmatch=“exclude”>
… <exclude filter/>
</tag> …
</tag>
Event Tags With No Filters
▪
▪
▪
▪
▪
▪
▪
Sysmon Architecture
▪
▪
▪
Sysmon
Sysmon (Cmd)
(Service)
User Mode
Kernel Mode
SysmonDrv
Advanced Filtering
▪
▪
▪ ConditionType
is
Is not
contains
excludes
begin with
end with
less than
more than
image
ProcessCreate ProcessTerminate
Process Events UtcTime UtcTime
ProcessGuid ProcessGuid
▪ ProcessId ProcessId
Image Image
CommandLine
CurrentDirectory
User
▪
LogonGuid
▪ LogonId
TerminalSessionId
▪ IntegrityLevel
Hashes
ParentProcessGuid
ParentProcessId
ParentImage
ParentCommandLine
Image and Driver Loaded
▪
▪
▪ ImageLoaded
▪ UtcTime DriverLoaded
▪ ProcessGuid UtcTime
ProcessId ImageLoaded
Image Hashes
ImageLoaded Signed
Hashes Signature
Signed
Signatures
File Events
▪
▪
▪ ProcessGuid
ProcessId
▪
Image
▪ TargetFileName
CreationUtcTime
PreviousCreationUtcTime
Network Connection Detected
▪ SourceProcessGuid
SourceProcessId
▪
SourceImage
▪ TargetProcessGuid
TargetProcessId
▪ TargetImage
▪
NewThreadId
▪
StartAddress
StartModule
StartFunction
Disk/Volume Read Events
▪ RawReadAccess Detected
UtcTime
ProcessGuid
ProcessId
▪ Image
Device
▪
Filter Examples
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
Splunk
▪
▪
(https://github.com/splunk/TA-microsoft-sysmon):
▪
▪
▪
▪
sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 NOT User="NT AUTHORITY\\SYSTEM" |
stats values(User) as User,values(CommandLine) as CommandLine,values(ProcessId) as
ProcessId,values(ParentProcessId) as ParentProcessId values(ParentCommandLine) as ParentCommandLine by LogonGuid
▪
▪
▪
▪
Auditing AD
▪ You must enable auditing in a domain-level GPO, with no
override, to ensure every system in your domain is tracking
important events.
▪ You should audit failed logons, successful and failed account
management, object access, and policy change.
▪ Use the same GPO to boost the security log size, because with
the increased auditing you’ll need it.
▪ You should try to rid yourself of LM (Lan Manager) password
hashes if possible.
Classic Data Protection API
Based on the following components:
Password, data blob, entropy
B. CREDHIST
1. pwdhash = MD4(password) or SHA1(password)
2. pwdhash_key = HMACSHA1(pwdhash, user_sid)
3. PBKDF2(…, pwdhash_key,…), another elements from the file. Windows 10 no domain: SHA512,
AES-256, 8000 rounds
4. Control – HMACSHA512
G$BCKUPKEY_PREFERRED
DPAPI
G$BCKUPKEY_940db612-ee8f-4a31-84b3-8f80c25be855
Scenario: offline
changed user password
or local masterkey can’t
01 00 00 00 d0 8c 9d df 01 15 d1 11 8c 7a 00 c0
be decrypted
4f c2 97 eb 01 00 00 00 ......
DPAPI-PROTECTED BLOB
Cached Logons: It used to be like this…
HKEY_LOCAL_MACHINE\SECURITY\Cache
DWORD (32) NL$IterationCount
LSASRV.DLL
LSASS.EXE
MEMORY
LSASRV.DLL, LSASS.EXE, etc. G$BCKUPKEY_PREFERRED
G$BCKUPKEY_940db612-ee8f-4a31-84b3-8f80c25be855
LSASRV.DLL
LSASS.EXE
MEMORY
G$BCKUPKEY_PREFERRED
G$BCKUPKEY_940db612-ee8f-4a31-84b3-8f80c25be855
??
??
?
? ?
AD secret? HOW?!
GoldenKey.pfx
CQLsassSecretsDumper
DPAPI-AD: How (the hell) did we do it?
DomainKey contains some GUID and Dude, look in
256-byte len secret – RSA?? the AD...
Demo:
What about KeePass?
DPAPI in pictures
Example: KeePass ProtectedUserKey.bin
DPAPI-NG
A. RootKey Algorithms Key derivation function:
SP800_108_CTR_HMAC (SHA512) Secret agreement: Diffie-Hellman
B. DPAPI blob Key derivation: KDF_SP80056A_CONCAT
After getting the key, there is a need for decryption: Key wrap
algorithm: RFC3394 (KEK -> CEK) Decryption: AES-256-GCM (CEK,
Blob)
DPAPI-NG: Data encryption flow
CLIENT AD SERVER
RPC Call
Local LSASS process GetKey(SID, L0, L1, L2 params) LSASS process
CNG DPAPI
NCryptUnprotectSecret()
RootKeyData?
Group key
RootKey
ACTIVE DIRECTORY
SID-PROTECTED BLOB
DPAPI-NG: Protected data encoded as ASN.1 blob
• KEK (Key Encryption
Looks familiar? It should! Key)
stored as DPAPI blob
It’s DPAPI blob!
• Forced by protection
descriptor
LOCAL=user
Protection descriptor: LOCAL=user
• Key Wrap (RFC3394)
contains encrypted CEK
(Content Encryption
Key)
▪
▪
▪
▪
Advantages of Live Forensics
▪
▪
▪
▪
Risks of Live Forensics
▪
▪
▪
Imaging the Hard Drive
▪
▪
▪
When Live Forensics is the Best Option
▪
▪
▪
▪
▪
▪
Live Imaging
▪
▪
▪
▪
▪
Live incident response: Details
▪ Collection of both volatile and non-volatile data while the system is up
▪ Volatile data
▪ Data that would be lost on a reboot of the system
▪ E.g. running processes, volatile memory content, current TCP and UDP connections, etc
▪ E.g. systeminfo
▪ Non-volatile data
▪ Data stored in permanent storage devices, such as hard drives
▪ Systeminfo
▪ Usually one of the first commands used by hackers
▪ Find out how powerful the machine is and how much storage is available
▪ Also specifies which patches have been applied to the system
Live incident response – contd.
▪ Collected data must be shipped off the machine to another
workstation
▪ Called forensics workstation
▪ Popular applications used to send data include netcat and cryptcat
▪ Netcat sends data over a TCP connection
▪ Cryptcat is the encrypted version of netcat
▪ Systeminfo
▪ Usually one of the first commands used by hackers
▪ Find out how powerful the machine is and how much storage is available
▪ Also specifies which patches have been applied to the system
▪ Restore files
▪ Obtaining files used in an attack
▪ E.g. binaries used and logs generated by hackers
Minimizing Impact
▪
▪
▪
▪
Incident Response
▪
▪
▪
▪
▪
Incident Response
▪
▪
▪
▪
▪
Malware Analysis
▪
▪
▪
Encrypted Systems
▪
▪
▪
▪
Nonsupported File Systems
▪
▪
▪
▪
Nonsupported File Systems
▪
▪
▪
▪
Memory Dumping
▪
▪
▪
▪
How to make a memory dump?
▪
▪
▪
▪
▪
Memory Analysis Tools
▪
▪
▪
▪
▪
▪
▪
▪
Live Disk Imaging Tools
▪
▪
▪
▪
▪
▪
Live Disk Imaging Tools
▪
▪
▪
▪
▪
▪
▪
▪
Advantages of Postmortem Forensics
▪
▪
▪
▪
▪
Risks of Postmortem Forensics
▪
▪
▪
▪
▪
Core Dumps
▪
▪
▪
▪
▪
Hibernation Files
▪
▪
▪
▪
What to search for?
Processes UserAssist
Threads Shellbags
Modules ShimCache
Handles Event Logs
Registry Registry (again)
Apihooks Timeline
Services
Handles: More Than Files
YARA and Other Tools
Logs
Windows Explorer
Searching for a Trace: Disk
Disk
Techniques for Hiding vs. Recovering Data
Searching for a Trace: Memory
Memory
Handles
Processes
Hidden Processes (ActiveProcessLinks)
Files that can be extracted
Threads
Modules
Registry
API Hooks
Services
UserAssist
Shellbags
ShimCache
Event Logs
Timeline
Log analysis
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
Windows logs
▪ Referred to as “Event Logs”
▪ Home screen
▪ Center
Event viewer home screen
▪ Summary of Administrative Events Pane
▪ This pane contains a breakdown on the number of
events per event type. If the administrator expands
the event type by clicking on the “+” button next to
the type, the number of events under that particular
event type is further broken down by Event ID. Event
IDs are classes of events under a specific type.
Event viewer home screen
▪ Summary of Administrative Events Pane
▪ Contains a breakdown of the number of events per event type
▪ Node for each type can be expanded
▪ Shows number of events under that particular event type
▪ Further broken down by Event ID
▪ Event IDs are classes of events under a specific type
Event viewer home screen – contd.
▪ Recently viewed nodes pane
▪ Latest event log files viewed
▪ Contains
▪ Description of the view (when available)
▪ Date the log file (node) was last modified
▪ When the file was originally created
▪ Blank date lines indicate that the file was never created
▪ Or log entries have never been appended to the file
Event viewer home screen – contd.
▪ Log summary
▪ Describes attributes of each log file currently kept by Windows
▪ Size/Maximum Column
▪ How much space is left for growth in the log file
▪ Files nearing maximum indicate that records are rotating
▪ Therefore likely being lost
▪ Need to consider log life
Types of event log files
▪ Default since Windows XP
▪ Application log
▪ Logging information from 3rd party applications, and
▪ MS applications not part of OS core distribution
▪ E.g. video game log information, MS Office logs
▪ Security file
▪ Default - login and logout attempts
▪ Can be configured to log data file activity
▪ File creation, opening or closing
▪ System event log file
▪ Holds operating system log messages
▪ E.g. network connection problems and video card driver errors
Types of event log files – contd.
▪ Windows 8 / 10
▪ Adds 2 more log files
▪ Setup node
▪ Stores logging information regarding installation of software applications
▪ Exported log
▪ Therefore more event details not available
▪ However included information points to “VirusScan Enterprise” as culprit
▪ System administrator in organization would know
▪ AV engine version at the time of this incident was 5.4.1
▪ Compared with the 5.3.0 shown in the log
▪ Hence virus scanner was not up to date on this particular machine
▪ Follow up
▪ Was antivirus software application running on this machine at all?
Event criticality
▪ Log messages tagged with labels indicating their level
of urgency
▪ Custom View folder
▪ “Administrative Events” Custom View
▪ Installed by default
▪ Provides view of all the “Critical,” “Error” and “Warning” events from all
administrative logs
Event criticality – contd.
▪ Criticality levels defined by Windows
▪ Information
▪ Describes successful operation of a task
▪ E.g. application, driver, or service
▪ e,g. .when a network driver loads successfully
▪ Warning
▪ Not necessarily a significant event
▪ However, may indicate the possible occurrence of a future problem
▪ E.g, when disk space starts to run low
▪ Error
▪ Describes a significant problem
▪ E.g. failure of a critical task
▪ E.g. a service fails to load during startup
Event criticality – contd.
▪ Criticality levels defined by Windows – contd.
▪ Success Audit (Security log)
▪ Event that describes successful completion of an audited security event
▪ E.g. a user logs on to the computer
▪ Action
▪ Specifies what needs to be done when a matching message is generated
▪ Could be
▪ A filename, such as /var/adm/messages
▪ A forward to the syslog service on another host
▪ E.g. @hostname
▪ Write the log information to the user’s screen
▪ Specifying the username
▪ * for all users
Syslog configuration example
*.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure
mail.* /var/log/maillog
cron.* /var/log/cron
*.emerg *
Line 1
▪ All messages classified as info or higher priority, regardless of facility (*.info) will be written to /var/log/messages
▪ Exceptions to this rule are messages from mail, authpriv and cron facilities
▪ None priority
Lines 2-4
▪ All messages from specified facilities are written to their respective log files
Line 5
▪ All messages with the priority of emerg
▪ Typically only used if a system shutdown is eminent
▪ Written to the screen of all users currently logged into the server (*)
Syslog configuration example
▪ Syslog configuration allows administrator to specify
location of logs
▪ May choose locations different from the conventional location
▪ /var/log
▪ In an investigation
▪ /var/log directory and its contents are empty
▪ Does not mean someone removed them
▪ Or that system does not log activity
▪ Administrator may have put logs in a different location
Standard log files
▪ Messages or syslog
▪ /var/log/messages or /var/log/syslog
▪ Default location of syslog service messages
▪ Messages are designed for parsing by standard UNIX utilities
▪ Authentication log
▪ /var/log/secure or /var/log/auth.log
▪ Records connection attempts and results of such attempts
▪ Can indicate brute force connection attempts
wtmp
▪ /var/log/wtmp
▪ Historical login and logout information
▪ Binary file
▪ Located in
▪ /var/run, or
▪ /var/adm
▪ w command
▪ From column output is very useful
▪ If an unknown host is seen
▪ Enter incident response mode
Web server logs
▪ Web servers are probably xxx.2xx.89.16 - - [09/May/2016:11:41:37 -0400] "GET /login HTTP/1.1" 404 338
xxx.2xx.89.16 - - [09/May/2016:11:41:37 -0400] "GET /sws/data/sws_data.js HTTP/1.1" 404 353
path recently
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET / HTTP/1.1" 200 14257
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET /authenticate/login HTTP/1.1" 404 352
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET /tmui/ HTTP/1.1" 404 339
▪ Accessible to attackers
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET /admin/login.do HTTP/1.1" 404 348
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET /dms2/Login.jsp HTTP/1.1" 404 348
xxx.2xx.97.183 - - [09/May/2016:11:41:37 -0400] "GET /login HTTP/1.1" 404 339
▪ First task
▪ Determine the audience
▪ Who will be interested in seeing the logs?
▪ Is there a compliance issue that requires the logs to be set up and record a specific activity? E.g.
▪ Legal requirement to record any and all access to Social Security Numbers stored in database?
▪ Legal requirement to maintain log information for a certain number of days?
General log configuration and maintenance
▪ Example
▪ Security event log
▪ Records all successful logins
▪ Log will fill up quickly
▪ And rotate
▪ Options
▪ Increase log file size
▪ Do not log successful logins
▪ Miss attacker history
▪ Rotate and archive old files
Log consolidation
▪ Exporting logs from the original machine to a central box
dedicated to log collection Server A
Access
Log manipulations
Erasing logs
Playing with data
Dual booting
Absent data
Dirty Games
Keeping data secret
▪ Extension change
▪ Joining files
▪ Alternative data streams
▪ Embedding
▪ Playing with the content
▪ Steganography
▪ Hiding data
▪ Encryption
MAC times
▪ Modification, Access and Creation times
▪ Associated with data files
▪ Modification Time
▪ Indicates the time the file was last modified
▪ Access Time
▪ Points to the time the file was last accessed or read
▪ Not very trustworthy
▪ Affected by virus scanners, disk defrag applications etc
▪ Hence often disabled by system administrators to improve file system performance
▪ Creation Time
▪ Time when the file was created
MAC times – contd.
▪ Assume netflow logs reveal a suspicious SSH
connection to a server
▪ Netflow log gives timestamp associated with the connection
▪ Also reveals lot of data was dropped on the system
▪ Need to identify “what” was dropped
▪ How to search?
▪ Build server file timeline
▪ Determine files created around the time found on the netflow logs
▪ File → right click → Properties
▪ Or Windows Explorer for a whole directory
Good practices
Filter out uninteresting events (image loads etc.)
Make sure event log is big enough
Centralize the events in a separate server
@paulacqure
@CQUREAcademy
CONSULTING