The capabilities of the leaked Chinese APT contractor "iOS Spyware" are accessing:
- basic mobile phone data
- GPS location
- Contacts
- Photos / multimedia files
- Recording sounds
If this sounds familiar, it should. These are settings accessible...Accessible ANY application requesting these permissions on a phone :)
This means, the delivery for the "spyware" would likely (my guess) be in the form of an application that the user installs on their device and must approve these permissions. If you've ever done mobile forensics, this is almost one of the first things you would check.
Oct 26, 2022 • 7 tweets • 3 min read
1\ #DFIR: Chrome Forensics - How to Recover CLEARED History
If a user just cleared their browser history, you can still recover everything they were just looking at from the session files:
inversecos.com/2022/10/recove…
2\ In some instances (more on this) the session and tab files inside that folder show the webkit/chrome date for when the session was exited.
This allowed me to put together a full timeline of what this naughty boy was doing *BONK*
Analyse the entries in these two files:
> filesystem.db
> filesystem.db-wal
Most writeups focus on detecting the use of "touch". But you can timestomp without using "touch". 😈
Check out my blog below 👇 inversecos.com/2022/08/detect…
2\ The file "filesystem.db" (enabled by default) tracks:
> fileCreated time
> fileLastAccessed time
Look for discrepancies in the fileCreated time in this DB file vs the times that "stat" show on a file.
There's also a correlating WAL that contains uncommitted data :3
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.
Apr 28, 2022 • 6 tweets • 2 min read
1\ How to detect file timestomping 👀
APT28, APT29, APT32, APT38 have all used this defence evasion technique to modify malicious file creation times. 😈
Did you also know it's possible to timestomp $FN time?
👇👇 BLOG & TL;DR BELOW 👇👇
bit.ly/3KsX1ua
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!
TL;DR 👇👇
2\ High level of how the technique works.....
Services are normally created through standard API calls to “CreateServiceA” using sc.exe/at.exe. This API is what EDR usually detects on.
Note that using svcscan.. Stuxnet isnt showing any of the malicious services ...why is that?
Mar 9, 2022 • 13 tweets • 5 min read
1\ How to detect what command line spawned a process with no EDR/AV? 👀 #DFIR
If you have a memory sample, this is how you can figure out what cmd spawned the processes by using volshell and memory forensics.
STEP BY STEP GUIDE BELOW
👇 👇 👇 👇
#MemoryForensics
2\ Each process in Windows is represented by an "EPROCESS" structure.
These EPROCESS blocks are joined in a doubly linked list structure. The flink (forward link) tells you the next process running and blink (backwards link) tells you the previous process.
Feb 17, 2022 • 7 tweets • 2 min read
1\ How to prove malicious macro was enabled & clicked? 👀 #DFIR
1\ #MalwareAnalysis: Detecting Process Hollowing
The first pattern to look for are any calls to create processes in a suspended state:
> CreateProcessA
"dwCreationFlags" set 0x04 CREATE_SUSPENDED
Purpose is to disguise malicious code in a legit exe by replacing the contents.
2\ Following the process being started in a suspended state... (usually svchost.exe but who's counting). Then there are API calls to native/non native APIs:
Tracked by IoS:
> When you arrived
> When you left
> Long/Lat
😝Photo is a parsed local.sqlite file
2\ In your iPhone the local.sqlite will render like this - as you can see I went to a grocery store 13 times. I was in lockdown don’t judge me.