Quantcast
Channel: Hacking Exposed Computer Forensics Blog
Viewing all 877 articles
Browse latest View live

Daily Blog #383: Daily Blog Schedule

$
0
0
Hello Reader,
         Well with the first post of this new year of daily blogging being a Sunday Funday challenge I haven't had a chance to tell you my planned schedule of blog posts. If you were reading the daily blogs the last time I did them four years ago you know that I took Lenny Zelter's idea of different days for different themed blogs. For this year or daily blogs I plan to follow the following schedule.

Sunday - Sunday Funday forensic challenge with answers due on Friday
Monday - Forensic post
Tuesday - Forensic post
Wednesday - Forensic post
Thursday - Forensic post
Friday - Either Forensic Lunch broadcast or Forensic Lunch Test Kitchen testing
Saturday - Solution Saturdays, posting the winner of that weeks Sunday Funday challenge

I used to do a post on Saturday's called Saturday Reading but with Phil Moore's comprehensive this week in forensics I don't see a need for those posts anymore.

I'm planning to do more write up of artifacts, the results of testing, dfir programming and business of forensic consulting. We will see how that goes, as I continue to post I might tweak the weekdays to put a theme to them but for now I want to leave them open to see what comes up.

If you have an idea for a particular day or want a specific topic covered, leave a comment below. Otherwise I hope you are ready for a year of learning together!

Daily Blog #384:Exploring Extended MAPI Part 1

$
0
0
Hello Reader,
          One thing that I've used for years and we've talked about before on the Forensic Lunch is Extended MAPI. Extended MAPI is a set of properties that are part of the message structure of any Outlook or Exchange stored email. In this first series of posts I thought it would be good to revisit the Extended MAPI data and provide some analysis scenarios and more information as many people still either seem confused by it or unaware of its existence.

To start with let's look at the property PR_LAST_VERB_EXECUTED. This Extended MAPI property records in email messages what the last action that occurred to the message itself. Most of the common entries here are actions like Reply, Reply All, Forward or Reply To Forward. Combined with PR_LAST_VERB_EXECUTION_TIME you can tell not just what last happened to the message but when it happened.

To read more about all of the possible values that can be set for the last verb executed go here :
https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtaglastverbexecuted-canonical-property

Now when I found that list of properties I wasn't expecting to see all the additional states relating to things other than email messages. It makes sense that other objects within the structure would have Extended MAPI properties but its not something i've tested. So my plan for the next several posts is to run a couple of different tests against different outlook items (email message, calendar item, etc...) and see what actions I can infer from the properties stored within them.

Talk to you tomorrow!

Daily Blog #385:Exploring Extended MAPI Part 2

$
0
0
Hello Reader,
           In the last post in this series we discussed the Extended MAPI data resident within Outlook and Exchange messages. In this post we will look at what within the Extended MAPI data changes when a user marks the message as unread but performs no other action against it.

First I made a new message and I sent it to myself, you can see the message below
As you can see from the above screenshot I have installed a Outlook extension called OutlookSpy which will expose all the Extended MAPI properties being stored within this message. If I
look at the Extended MAPI data within the iMessage store for this message I would see the following.


Notice that there is no PR_LAST_VERB_EXECUTED entry within this message, this because none of the tracked actions have occurred. This means that the PR_LAST_VERB_EXECUTED property is not created as part of the base message structure and instead is created when an action occurs. This is good to know because that would mean the presence of the LAST_VERB_EXECUTED regardless of what its storing means that at least one action occurred against this message.

This next part of the testing surprised me. I made the message unread and based on the fact that the PR_LAST_VERB_EXECUTED has an entry for Unread I assumed that this property would be set when I made a message unread. Here is the iMessage Extended MAPI data after making the message unread.


There is still no PR_LAST_VERB_EXECUTED, meaning that making an email unread is not a tracked agent, at least not from the base state of the message. I am going to attempt a couple of different actions against the message to see how this changes.

While it is true that there is no PR_LAST_VERB_EXECUTED property notice that the PR_LAST_MODIFICATION_TIME is set to 8:23PM 6/6/2018. This was interesting to me as you can see in the following screenshot the PR_CREATION_TIME which tracks when this message was stored within this message archive is set to 8:11PM 6/6/2018. All of these times are in UTC.



So based on the first round of testing it would appear as though making an item unread does not set an explicit property, but noticing a difference between the PR_LAST_MODIFICATION_TIME and the PR_CREATION_TIME is a clue that some change occurred to the message. IF that message is also in an unread state, meaning that if it hadn't been changed back to unread by the user and is in fact untouched, that it more than likely was made unread after the fact.

I am going to continue to test the actions that get recorded by Outlook and Exchange in this series. For your reference I am using Outlook 2016 32bit and Windows 10. 

Daily Blog #386:Exploring Extended MAPI Part 3

$
0
0
Hello Reader,
            In the prior post with the help of an Outlook plugin we examine the value of a single Extended MAPI property. Now that's great for my testing but what if in your work you need to prove that value exists within the structure and validate the tools output? I thought before we continued on our journey into Outlook/Exchange message interactions we should see how to work with the raw data.

The first thing you should know about the underlying message structure is that it is not just a text file like a RFC82 email message. This would be obvious if you opened up the message in a text editor and saw something like this



The message structure is actually a Compound File Binary Format, meaning a little file system exists within this message and the data we see loaded within the mail client is retrieved from streams of data stored within it. Viewing the same file with a tool that support CFBF like Structure Storage Viewer would show us this


Now we can see the streams of data as its stored. In future posts I am going to go more into the structure of these streams in future posts as it relates to our DFIR work, if you want to jump ahead to that go here https://blogs.msdn.microsoft.com/openspecification/2009/11/06/msg-file-format-part-1/.

The Extended MAPI data we were locating at yesterday is stored within the stream named __properties_version1.0. I saved this stream to my disk with structured storage viewer and then loaded the stream with 010 hex editor.


What you are seeing in 16 byte entries is all of the named properties we saw within the message and the extended MAPI data. Within this structure is our PR_CREATION_TIME and our PR_LAST_MODIFICATION_TIME values we looked at yesterday. To find them we need to lookup their tag as defined in the MSDN reference. Each extended MAPI property has a fixed tag value that lets use find the value in the structure but while its shown in big endian in the MSDN documentation its stored in little endian within the data structure itself.

So looking at PR_CREATION_TIME (https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagcreationtime-canonical-property) we can see that the tag is 0x3007. When you apply the last 4 bytes of the access mask 0040 for the property and the tag you are looking for is 0x30070040 which in little endian is 40007030 and serching for that will find that the third record down is our value.



The timestamp is in the next 8 bytes and is in windows 64 bit little endian filetime format.


Which if we copy out and put into a tool like DCODE. The timestamp we retrieved is not the same as we saw yesterday within the mailbox as I exported the message onto my desktop to get it loaded into structure storage viewer. The action of saving the message to my disk reset the PR_CREATION_TIME to when I saved it to my disk. I need to do more testing on this going forward to see what this really means for us.


We can do the same for the PR_LAST_MODIFICATION_TIME which we can see in the MSDN documentation for PR_LAST_MODIFICATION_TIME is tag 0x3008 which with the access bit is 0x30080040 and in little endian is  0x40008030.



Searching within the stream we can see the 4th entry within the structure is in fact the PR_LAST_MODIFICATION_TIME

and the following 8 bytes is the timestamp stored for PR_LAST_MODIFICATION_TIME

Which when decoded will match the creation as the structure was modified when I exported it to disk.


Now that we can locate these tags within the data itself that means we should be able to write some Python code with libolecf to parse this data out at scale once we've defined the use cases we want to analyze.

Much more to come so please keep reading with me as we journey together into the depths of Outlook/Exchange message interactions.


ETW Event Tracing for Windows and ETL Files

$
0
0
By Nicole Ibrahim

Hello reader,

      Looking for a "new" Windows artifact that is currently being under-utilized and contains a wealth of information? Event Tracing for Windows (ETW) and Event Trace Logs (ETL) may be your answer.

There's nothing new about them. They have existed for quite some time. However, their use from a forensics standpoint has been lacking. It's time to change that.
In this blog post we will cover what they are, where you can expect to find them, decoding ETL files, caveats associated with them and some interesting artifacts and forensically relevant data that ETL files can provide. Lastly at the bottom of this post you will find a link to our github repository for our python parser for ETLs.

ETW (Event Tracing for Windows)

ETLs or Event Trace Logs are ETW trace sessions that are stored to disk. Event Tracing for Windows was introduced in Windows 2000 and is still going strong up to Windows 10.
ETL files can contain a snapshot of events related to the state information at a particular time or contain events related to state information over time.

Triggered Events vs. Triggered Snapshots

Event Tracing is mainly used by Windows and application developers. For example, Windows uses ETW for tracing the shutdown and boot processes and application developers use ETW to debug their applications.

Some examples include:

  • Microsoft Office
  • Windows Shutdown and Boot
  • Windows SleepStudy
  • Skype, Lync (Skype for Business) and OneDrive
  • Power Efficiency Diagnostics
  • Explorer Start up

It is enabled by default, but what is enabled and when it is enabled depend on varying factors including OS version and applications installed.
Windows uses ETW, but anyone can tap into the API or enable ETW sessions on demand and utilize event tracing including developers of Windows applications, IR, researchers, and adversaries. Refer to Microsoft's page for additional information about ETW.

Event Trace Logs (ETLs) are trace event sessions stored to disk. These files have the filename extension .ETL and will the main topic of this discussion.

ETL files stored to disk vary in their volatility and the data they contain. When a trace session is first configured, the settings used determine how log files are to be stored and what data is to be stored in them. Some logs are circular with old data being overwritten with new data when the max file size is reached, others have triggers that result in the contents of the log file being obliterated and starting fresh, and others have multiple log files for each instance that the event trace session flushed events to disk.

Windows stores information into ETL files when the system is shutdown, booted, a second user has logged into the system, when performing updates and more.

Microsoft Lync, Office, OneDrive, SkyDrive and Skype can also maintain their own ETL files containing debugging and other information.

The information contained within ETL files can be used in forensics for a variety of scenarios. Determining files that were previously existing but have since been deleted, Microsoft Lync contact status and other Lync information, connected WiFi networks and detailed information about them, services and applications running, system configuration information including physical and logical drive information, FileIO, DiskIO, Runkey information, and much more.

ETL File Locations

ETL files can be found practically anywhere on a Windows system. Some ETL files worth noting are listed below. These files have been observed as existing on most systems and can contain a great deal of information ripe for analysis. Some of these files will be explained in more detail later.


A link to a list of additional observed file locations can be found below. Note that this list is not all inclusive and there may be more locations not documented here.

Also, the existence of these ETLs on a system depends on many factors. Therefore, some of these files might not exist on the system you are analyzing. In research, some of the files were empty and others contained copious amounts of data.
Observed_ETL_File_Locations.xlsx




ETL Files

 As previously mentioned, ETL files can be found in numerous locations on a Windows system and there may be hundreds of them, some empty and some containing data.

Decoding ETL Files

How event data stored within ETL files depends on the trace logging technology used. More information about Microsoft's tracing technologies.
There are several Microsoft tools available for viewing/parsing ETL log files.

- Windows Event Viewer
- Microsoft Message Analyzer
- TraceView
- TraceFmt
- SvcTraceView
- Netmon
- PerfView

Windows Event Viewer is not only for EVTs and EVTXs, it can also read an ETL file. After opening an ETL in Event Viewer, you can save the ETL in various formats including as a CSV file.

However, depending on the type of ETL file, Event Viewer may not decode the event payload data and may not report event specific fields.

Microsoft Message Analyzer does a better job at decoding event data.

If you wish to write your own tool in C# you can tap into the NuGet TraceEvent library to read events from an ETL file.

For python, a module named  PyETW allows you to access Event Tracing for Windows. You can use PyETW to read events from an ETL file .

Decoding Issues

It is important to note that when decoding an ETL on a system that is not the source system, information needed to properly decode event data might not be available.
When an event provider is registered on a system, it also registers information needed to decode the event data. If the event provider is not registered on the system you are using to decode an ETL file, the tool will not be able to properly parse the events.

Also, some ETL files require a separate PDB (program debugging database) to decode events. Microsoft Message Analyzer has an option that allows PDBs to be downloaded and used to decode ETL files. However, some ETL files require private PDBs that are not available for download.


ETL File Volatility

As previously mentioned, trace events are not always written to disk. When an event trace session is configured, how the data is logged is also configured. https://msdn.microsoft.com/en-us/library/windows/desktop/aa364080(v=vs.85).aspx

Event trace sessions that are configured to be circular will overwrite old events with new events when the max file/buffer size is reached. The old events that were overwritten are not recoverable. The WiFi.etl, BootCKCL.etl and ShutdownCKCL.etl files are examples of circular log files in testing.

Other event trace sessions can pre-allocate disk space and write events to disk when triggered. For example, Outlook when debug settings have been configured will write events to a log file when Outlook is closed.

For ETL files that use the new file option, when a maximum file size is reached a new file is created using an incrementing value as the new file’s name.

ETW and Live Monitoring

While this discussion focuses on offline forensics, there are numerous uses for ETW live monitoring.

In one example, a security research company published a proof of concept related to Logging Keystrokes with ETW.

Also check out Intrusion Detection with ETW for information related to using ETW for intrusion detection.

Interesting Logs and Events

The artifacts listed here just barely scratch the surface of what is stored within ETL files. Note that some logs mentioned in this section are not always present.

ShutdownCKCL and BootCKCL ETL Files

The ShutdownCKCL and BootCKCL are circular kernel context logs (CKCL) which contain information about the system that the event trace session knows at the time it was either shutdown or booted.

These log files are located in “%SystemRoot% \Windows\System32\WDI\LogFiles”.

Interesting events worth noting:


Scenario: Determine Activity of a Malicious Tool during Boot

In this scenario we have a suspicious piece of software and we need to determine what information the trace session captured at the time the system was booted. The source system that the ETL file was collected from was a virtual machine running Windows 10 where a known virus was purposefully executed. Not long after execution of the virus, the system was booted and the BootCKCL file was collected for analysis.

The name of the software is “TuvtEkxir.exe”, it is known to be a malicious backdoor virus according to virus scans.

Using ETL Viewer, we can search for references to the executable.
In Figure 1: Search results containing TuvtEkxir, we can see there are multiple types of events related to our executable.









Figure 1: Search results containing TuvtEkxir

Looking into the FileIO/FileCreate we can see the location of the executable and an associated prefetch file.




Figure 2: FileCreate events for Virus

Next lets take a look at what DLLs were loaded by the software by looking into the Image/Load event. In Figure 3: Virus Loading DLLs, some of the DLLs are listed. Note “shell32.dll” and “netutils.dll”.
















Figure 3: Virus Loading DLLs

Now let’s look at what disk reads were taking place. In Figure 4: Disk reads by virus, we can gather what file was being read, the offset, and the size of the read.











Figure 4: Disk reads by virus

Disk reads can be used to find out what section of the DLL or file was being read.

Energy NT Kernel Log

This log when present is located in “%SystemRoot%\ProgramData\Microsoft\Windows\Power Efficiency Diagnostics\energy-ntkl.etl”.

Interesting events worth noting:


Scenario: Determine Information about an attached external device

In this scenario, we will determine information about a WD My Passport drive that was connected to a Windows 2008 server using the energy-ntkl.etl file. In Figure 5: WD drive Physical Disk Information, the WD My Passport drive has been identified. Here we can gather the disk number, sector, track, cylinder and manufacturer information.











Figure 5: WD drive Physical Disk Information

Now that we know the disk number which in our scenario is 4, we can look into the event SystemConfig/LogDisk to gather more information. Here we can correlate the disk number, pull size information, drive letter, and free clusters.











Figure 6: WD drive Logical Disk Information

Next let’s determine the serial number, friendly name of the device, registry key, and other information. This can be found under the event SystemConfig/PNP. In Figure 7: PNP Information, we can correlate the friendly name to the manufacturer listed in Figure 5: WD drive Physical Disk Information.

We now have the registry key for this device, which also contains the serial number, vid, and the pid. The correlation can be tricky in scenarios where there are multiple entries with the same friendly name. In our scenario, there was only one device with the friendly name “WD My Passport 25E1 USB Device”.


Figure 7: PNP Information
Now that we have linked the information found within this ETL file, we now know the following about the WD external drive:







* Total bytes is calculated by BytesPerSector*SectorsPerCluster*NumberOfClusters

ExplorerStartupLog

This file appears to be created when the system boots. It is located in  
C:\Users\<UserName>\AppData\Local\Microsoft\Windows\Explorer\ExplorerStartupLog.etl.
There can be a large variety of events including ones that contain information related to ShellItems, network shares, applications requiring elevated privileges, and RunKey information. Also note that some of the events in this ETL can also be within the WDIContext

Interesting events worth noting:









In Figure 8: Some events in CDesktopFolder_ParseDisplayName/Start lists folders that were accessed on the 'D:\'. Note that the timestamp does not indicated when it was accessed. Instead it indicates the time the trace session recorded the events.







Figure 8: Events in CDesktopFolder_ParseDisplayName/Start

CortanaTrace

The CortanaTrace1.etl may also contain information of interest. Voice searches using Cortana have been observed in this ETL.
Location:
C:\Users\<username>\AppData\Local\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\TempState\Traces\CortanaTrace1.etl

In the example below I had conducted two voice searches.


Caveats

The timestamp field for event records does not necessarily indicate the time that an event occurred. Further research is needed to understand what the timestamp represents.
For example, for the BootCKCL.etl file, events listed in the FileIO/FileCreated category may or may not have been created at the time the system was booted and the timestamp represented for the event does not necessarily indicate that the file was created at that time. The timestamp instead indicates that this information was captured by the session at the time the trace was created.

ETL files can be volatile. Their volatility depends on how trace logging is configured for each session.

Tools that parse ETL files may not parse all the data including Microsoft specific tools. This is because the information needed to decode events are not always stored within the ETL file. For example, some ETL files use one or more PDBs (Program Debugging Databases) to decode events.

Tool Download

We have developed a command line tool that can parse multiple ETL files within a folder and output to a CSV and SQLite database.

https://github.com/gcpartners/ETLParser

Daily Blog #387:Forensic Lunch 6/8/18 live from the DFIR Summit

$
0
0
Hello Reader,
           It's Friday which means I'm either posting a Forensic Lunch or a Test Kitchen video. This week it's a Forensic Lunch we recorded live from the DFIR Summit. I apologize for the background audio but hopefully you'll find this rundown of what to expect from the talks that are being uploaded from the DFIR Summit to Youtube!

On this broadcast we had Lee Whitfield, Rob Lee, Matt Seyer and myself talking about the DFIR Summit!


Daily Blog #388: Soltuion Saturday 6/9/18

$
0
0
Hello Reader,
           It's Saturday and based on the new blog schedule that means it's Solution Saturday where we reveal the winner of the week's Sunday Funday contest. I wanted to try this new format to give people more time to participate in the challenges and while I saw alot of people viewing and discussing the challenge I actually only received one entry! So that means Phill Moore automatically won this week regardless of what he sent in.

As a reminder here was this weeks Challenge:

The Challenge:
One of the things I've noticed when people talk about psexec execution is the prefetch file it creates when running psexecsvc. There are many more artifacts that we've seen in our research so now it's time for you to show all of us what you know. 

List out with a description:
1. Every location where psexecsvc would be logged as executed on Windows 10 with the most current update
2. Every location where psexecsvc would be logged as existing on Windows 10 with the most current update
3. Every location that would be created and or modified based on psexecsvc executing 


Here is the winning submission from Phil Moore:


1. Event logs
Registry - services
Appcompatcache 
ETL 
Srum

2. Mft, logfile, usnjrnl

3. I don't know 

Done with no testing, entirely guess work. 

As you can see sometimes just submitting can lead to winning and in Phill's case it won him a $100 amazon giftcard. 

I'll be exploring the full answer in the blog as the daily blogging continues so make sure to keep reading and get ready for tomorrow's Sunday Funday when a new challenge will be posted!

Daily Blog #389: Sunday Funday 6/10/18

$
0
0
Hello Reader,
             Another week begins and with it comes a new challenge. You will have a five days to try to complete this challenge now that answers are not due till Friday. Send in your answer as you have it and you are allowed to update your submission if you find new information.

This week we've been talking about Extended MAPI, let's see what you can determine in this week's email related challenge.


The Prize:
$100 Amazon Giftcard

The Rules:

  1. You must post your answer before Friday 6/15/18 7PM CST (GMT -5)
  2. The most complete answer wins
  3. You are allowed to edit your answer after posting
  4. If two answers are too similar for one to win, the one with the earlier posting time wins
  5. Be specific and be thoughtful 
  6. Anonymous entries are allowed, please email them to dcowen@g-cpartners.com. Please state in your email if you would like to be anonymous or not if you win.
  7. In order for an anonymous winner to receive a prize they must give their name to me, but i will not release it in a blog post



The Challenge:
 Extended MAPI records metadata around what actions occur against an email message inside of Exchange and Outlook. What within an email message sent from Outlook and connected to an Exchange server would allow an examiner to determine when an email was sent from the system they are examining presuming they found the message in the sent folder within the mailbox.

Daily Blog #390: Exploring Extended MAPI part 4

$
0
0
Hello Reader,
                In our last post in this series we looked at how to find the raw values that make up the Extended MAPI we found within Outlook Spy. In order to get this data we had to export out the message out of Outlook and into a MSG file on my desktop. I had to do this to get the MSG file loaded into structured storage viewer and as a byproduct you should have noticed that our PR_CREATION_TIME timestamp got reset to the time of export.

Now this to me was interesting, that means that PR_CREATION_TIME relates not to when the MSG structure was first made and stored but each iteration of the message will reset the PR_CREATION_TIME as seen below.



So we can determine when exactly someone exported the message out of the mailbox and onto the disk. Tomorrow we can do some testing on copying this MSG to external storage devices to find out if this time gets reset or if it gets preserved (my hypothesis is that it will remain even after the MSG creation time gets reset from the copy). Today though I want to show you we can still determine when the message was originally received and stored in the mailbox it was sent to.

We can see this in PR_MESSAGE_DELIVERY_TIME as shown below


PR_MESSAGE_DELIVERY_TIME is still showing the original creation date we saw in part 2 of this blog series. Further testing is needed to see what effects these dates but within an exported MSG that would appear to be a reliable set of dates.

Tomorrow more MSG experiments and then onward into other Extended MAPI fields.

Daily Blog #391: Exploring Extended MAPI part 5

$
0
0
Hello Reader,
           In the prior post we went thought what dates were preserved when a message was exported out of a mailbox and into a PST. I put forth the question to myself what would happen if I then took that exported message and copied it to another volume, what would change within the message?

I copied the MSG file to an external drive with an exFAT file system using the explorer copy/paste operation. Here is what the file system metadata looked like.



Looking at the message copied onto the external storage volume i checked the PR_CREATION_TIME first and found the original creation date when the message was exported out of the mailbox was preserved even though the file system creation time had been updated to the time of copy.


In addition the PR_LAST_MODIFICATION_TIME also retained the original date even though the file system modification time was updated.


I've noticed some other interesting mapi attributes including the names of the and sid's of the users who modified a message. Next let's see how those are set and updated.

Daily Blog #392: Exploring Extended MAPI part 6

$
0
0
Hello Reader,
        I will continue my testing next week with multiple user accounts modifying a message but one thing has caught my attention. I have noticed that for Office 365 atleast the X-Originating IP header has returned and id also present in the Extended MAPI data.

As seen below the test message I have been working with and replying to has an X-Originating IP header set.


This is interesting to me as for some time most services have been dropping this header or placing the IP address of the mail server in its place. In this case its showing the IP address of the Tmobile NAT gateway since I was connected to my phone's hotspot when I sent this message.

I need to test this again using the web interface but I'm always happy when old useful headers come back to life.

Daily Blog #393: Exploring Extended MAPI part 7

$
0
0
Hello Reader,
          I've been wondering in the last several posts about what happens to exported messages when different users edit the message. I finally got a chance to test this today and document my results here. To do this I exported a message from my SANS FOR500 instructor laptop on to a USB external storage device.

Once I exported the message I loaded up the message on my SANS instructor laptop and with Outlook spy inspected the last modification time and name.



Next I took that external storage device and I plugged it into my surface book where I usually write these blog posts and opened up the message from the external storage drive to see if just opening it as another user would change this data.


As you can see nothing changed which is what I was hoping would be true.

However what happened next surprised me. In order to try to modify the message and get the Extended MAPI fields to update with my work email address of dcowen@g-cpartners.com I did the following:

1. I set a follow up flag as completed
2. I replied to the message
3. I removed a file attachment from the message

After I did each step I checked the Extended MAPI and found that the values didn't change! This is what the Extended MAPI fields looked like after I did all three things.


Notice that PR_LAST_MODIFIER_NAME_W and PR_LAST_MODIFICATION_TIME have not changed from the prior screenshot. However notice that PR_LAST_VERB_EXECUTED was set to a reply value (102) and that the PR_LAST_VERB_EXECUTION_TIME had been updated to reflect when i replied to the message on my surface book.

Now I was doing these against the exported message directly without bringing it back into Outlook. Next week I will attempt to import a message into Outlook from an exported message from another mailbox and see if this behavior changes.


Daily Blog #394: Forensic Lunch 6/15/18

$
0
0
Hello Reader,
            Today we had another episode of the Forensic Lunch! This week Matthew and I talked to Jaco_ZA about the Magnet User Summit CTF he won and we created. Watch below to see how Jaco approached the problems and ultimately clutched victory with seconds left!

If you are interested in playing our next CTF make sure to come to Defcon where we will be running another Unofficial DFIR CTF!

Daily Blog #395: Solution Saturday 6/16/18

$
0
0
Hello Reader,
         Well this weeks challenge had a lot of submissions! It was very tough picking a winner but as the rules state the most complete answer wins. When it comes to complete answers this week Kevin Pagano did the most testing of extended mapi attributes in his testing with screenshots and a follow up email to fill in even more.

What I liked about Kevin's answer that put him over the top is that he not only submitted PR_CLIENT_SUBMIT_TIME as most people did. He also went in and found other Extended MAPI entries that could be related even testing a deferred delivery mechanism I haven't even thought to test yet!

So well done Kevin Pagano you are this weeks winner.

Here was this weeks challenge:

The Challenge:
 Extended MAPI records metadata around what actions occur against an email message inside of Exchange and Outlook. What within an email message sent from Outlook and connected to an Exchange server would allow an examiner to determine when an email was sent from the system they are examining presuming they found the message in the sent folder within the mailbox. 

Here is Kevin Pagano's winning submission. 
 

In a test by sending an email to myself, the PR_LAST_MODIFICATION_TIME matched that of the PR_CREATION_TIME field. Since sending an email creates a brand new email entry in your mailbox, thus syncing the creation time of the email with when it was last modified before it being sent out. All of these times are in UTC.

In another test marking a Sent email to unread this did update the PR_LAST_MODIFICATION_TIME field to reflect when it was set to unread.


A third test for curiosity sake was done. While selecting to do a delay delivery of an email, we see that the PR_MESSAGE_DELIVERY_TIME is set to when the user hit send on the email, while the PR_CREATION_TIME is set to when the email was created in the Sent Folder (2 minutes later). You can also see the PR_DEFERRED_DELIVERY_TIME as well when the user set it to be sent.



This would seem to indicate that the PR_MESSAGE_DELIVER_TIME is when the user hit send in Outlook while the PR_CREATION_TIME would be your closest match to when the email was officially sent through Exchange creating the Sent email in the Inbox.


In doing more research, the PR_CLIENT_SUBMIT_TIME field seems to be a better indicator when the user submits an email to be sent. While the PR_MESSAGE_DELIVERY_TIME matched times when the emails were sent this could be different in other instances where the network connection is slower and has more hops to jump between Exchange servers.
 



Daily Blog #396: Sunday Funday 6/17/18

$
0
0
Hello Reader,
             We had a large number of great submissions last week and I hope we continue that trend this week! You will have a five days to try to complete this challenge now that answers are not due till Friday. Send in your answer as you have it and you are allowed to update your submission if you find new information.

Zone.Identifiers have come up on conversations recently both in my time teaching SANS FOR500 and in Phil Moore's recent tweets. Let's see what you know about them.


The Prize:
$100 Amazon Giftcard

The Rules:

  1. You must post your answer before Friday 6/22/18 7PM CST (GMT -5)
  2. The most complete answer wins
  3. You are allowed to edit your answer after posting
  4. If two answers are too similar for one to win, the one with the earlier posting time wins
  5. Be specific and be thoughtful 
  6. Anonymous entries are allowed, please email them to dcowen@g-cpartners.com. Please state in your email if you would like to be anonymous or not if you win.
  7. In order for an anonymous winner to receive a prize they must give their name to me, but i will not release it in a blog post



The Challenge:
Zone.Identifier alternate data streams have been around for awhile please answer the following questions.
1. What version of Windows introduced zone.identifier
2. What data is contained with in a zone.identifier
3. What sets the zone.identifier
4. what conditions causes them to be created
5. What are the limitations of zone.identifier

Daily Blog #397: Exploring Extended MAPI part 8

$
0
0
Hello Reader,
                   In this post I wanted to look at more actions and their effect on Extended MAPI. Today I'm looking at what a forward does to a message.

After forwarding the message you can see that within Outlook it is notifying me that the message was forwarded and when.



This data we know is stored in the PR_LAST_VERB_EXECUTED extended mapi flag and inspecting those values does confirm this



Notice that this time is being stored UTC within the extended mapi property but displayed to the user in local time.

The same is true for the other timestamp that has been updated which is PR_LAST_MODIFICATION_TIME



PR_LAST_MODIFICATION_TIME is also reflecting that it is stored in UTC and is being updated because the LAST_VERB_EXECUTED values have been set.

In my review of the message I forwarded those were the only two timestamps that were altered. Tomorrow let's look at the received message to see if anything was retained.

Daily Blog #398: Exploring Extended MAPI part 9

$
0
0
Hello Reader,
           As I write this I'm flying over Canada and on my way to Sydney via Dubai. Satellite inflight internet really is an amazing thing!

In this post I was going to talk about what was set on the message I forwarded and received yesterday but as I was looking at the extended MAPI fields in OutlookSpy I noticed that several had no description next to them but had dates:



This was interesting to say the least which sent me on some extensive Googling where I ran across yet another interesting piece of data. There is a MAPI property only set on sent messages that records the type of Client connection that existed when the message was sent.

This was the Client connection type for the message I forwarded to myself sitting in my sent box:

I found an exchange blog from 2016 about this field: https://gsexdev.blogspot.com/2016/02/mining-clientinfo-property-in-messages.html?view=classic

Now what is interesting to me is three fold:
1. The property tag has changed since 2016 from 0x866F to 0x84A6, which means some reading up on MSDN is order to figure out if there was a reason why
2. My ClientInfo property is showing I sent this using the ExchangeRPC connection from Outlook.
3. The blog post I referenced above showed not just Exchange or OWA but also useragent data from web browsers!

I think this is something we could profile sent messages in a mailbox from. Not only to see messages sent via mobile versus desktop, but also to profile and find all the messages an attacker forwarded or replied to when they were accessing someones mailbox.

I plan to do some testing on this property this week, but I'll need a bit more bandwidth than what this satellite wifi connection can do to do so. So until tomorrow, thanks for reading!


Daily Blog #399: Exploring Extended MAPI part 10

$
0
0
Hello Reader,
          In yesterdays post, i'm in the middle of a 37 hour journey to Sydney so its all a blur to me, we talked about the ClientInfo propert within the extended MAPI data. I was talking about how this property could be found in sent messages but didn't consider that MAPI data from a sender would be carried over to the receiver in terms of how the message was sent.

Well, I was wrong! It turns out in my testing that atleast messages sent within an exchange server retain the ClientInfo property of the sender on the messages received and stored by the recipients. I went though emails I received from my coworkers and when I did I found a range of ClientInfo strings two of which I'm going to talk about in the post.

The first is one of my coworkers emailing me from his phone:


As you can see not only did it provide the method of connection, in this case ActiveSync meaning it was sent from a phone, but also the email address associated with the ActiveSync connection.

In this example one of coworkers was using OWA and rather than try to make a screenshot of a long string I just copied it out of the property:

"Client=OWA;Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/66.0.3359.181Safari/537.36;"

Here I can tell it was sent via Webmail (OWA) the version of Windows (Windows 10) and what web browser (Chrome) and profile all the messages they've sent me. 

My first instinct was this must be some new X-mpailer entry and this data must be in the header. So I loaded up the header and did not find a X-mailer header entry or any entry that appears to store this data. I saw this but there are multiple base64 encoded entries in the headers now that I will start going through tomorrow, but on its face this ClientInfo property is not in the headers and it is being populated/provided within an Exchange server organization.

So how would I use this in a case? Let's say I'm trying to identify when an internal user stared sending emails from an attacker who lets just say was trying to get a wire transfer sent out. Well alot of the good attackers will delete their sent messages, so now you can get through all the messages the employees received and identify even faster which ones came from the attacker by isolating which Clients which employees were using and which the attacker was using.

As this series continues I'll be writing python code to automate this analysis and I'm looking forward to finding out what all we can mine out!





Daily Blog #400 - Forensic challenge image for the Magnet User Summit

$
0
0
Hello Reader,
        If you watched last Friday's Forensic Lunch you would have heard that we are releasing the forensic image we used for the Magnet User Summit challenge so you can try it for yourself.


Here is the a dropbox link to the images:
https://www.dropbox.com/sh/85v4wsawyijxd9r/AAAa75lptg8oF0tpO2zPnXSna?dl=0

Download the images and we are going to work on getting the scoreboard open so you can see the questions and attempt to get a perfect score.


Daily Blog #401: Magnet User Summit CTF is now open to the public

$
0
0
Hello Reader,
              Yesterday we released the evidence files and today since I am on a train going to Canberra at the moment and can't exactly record a Test Kitchen and subject a train full of people to that I am opening up the CTF site for public access.

Go here:
https://magnetctf.ctfd.io/challenges

Register a team and start submitting!

Have fun!
Viewing all 877 articles
Browse latest View live