2\ The questions that I use to guide the analysis and prioritisation of analysis are:
1. How was the device accessed around the suspected behaviour?
2. Where was the user/device when this occurred?
3. Was the insider active on their system?
4. What did the user do?
3\ To answer the first question, I look at SRUM, specifically the App Timeline Provider details.
I pull:
> Execution time of the malicious thingz
> Duration of execution
> User SID
Then, I cross correlate that user info with their corresponding ActivitiesCache.db. #DFIRISS3XY
4\ Now we know the user, we need to address how the logon occurred.
I pull:
> Logon events
> System wake/hibernation times
> Network SSID it was connected to (SRUM + Software reg + evtx)
Generally logon is not remote & the SSID tells you the physical location they did this.
5\ Sometimes the users say they were on the system but not "active" ...*cries in awkward*
My fave artefact for this (amongst several) is AppSwitched under the "Feature Usage" registry key.
This tracks when a user ACTIVELY switches from one app to another in the taskbar.
6\ You might ask how common are insider threats? I would say around 10% of cases I worked in the past year were insider.
I am obviously not an industry white paper :P so I'm not the best source for this. Also i notice an automatic assumption that everything is an external TA..
7\ Lastly, this blog is NOT about the cases where a user just puts files on a usb or uploads it to the cloud when they quit or something.
We do not work those type of cases.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
This leaves OBVIOUS AF traces. Look for entries with zeros, and datetime defaulting to 1970. You can also review timestamps (covered in thread 4).
I highlighted in purple where you zero out the data in hex.
3\ Method 2: Overwriting the file
Overwrite the entire entry with a "cleaned" version. In this example I removed all lines pertaining to "sansforensics" logging in. Timestamp detection is the best method to discover this technique.
Look for processes in /proc/<PID>/exe where the path shows "(deleted)"
Here are two examples👇 1. BPFDoor deleted binary 2. An attacker abusing memfd_create() to exec their malware in RAM w/o dropping files to disk.
2\ To recover/extract these binaries running in memory - you can copying them out from this location:
/proc/<PID>/exe
Also as an FYI for memfd_create() abuse detection you can hunt for the "memfd: (deleted)" string directly.
3\ You can also review what command line spawned the pid by reviewing:
/proc/<PID>/cmdline
This screenshot shows the cmdline used for the memdf_create() reverse shell. There are a lot of other interesting things you can also review in /proc/PID
2\ Most IR analysts are taught to detect timestomping using two methods:
> Compare $FI vs $SI times in the MFT
> Look for 0s in timestamp nanoseconds
These two detections are NOT foolproof - they will catch simple cases. Attackers can set nanoseconds and modify $FN time!
3\ Why should you care?
Most forensic courses teach these 2 detections without introducing more variables. A lot of analysts treat what they are taught as the "bible" without questioning it and when it comes to detecting these anomalies... critical evidence may be missed.