VeriSigma
Menu

Module 06 of 12

Windows Artifacts and Intrusion Evidence

Which Windows artifacts show how an intruder got in, what they ran and how they kept access, and how much weight each one will bear: accounts, logons, execution, persistence and the registry.

Objectives

What you will be able to do

  1. Tie activity to accounts using system and user-activity artifacts.
  2. Rebuild remote logons from the Security log and the Terminal Services logs.
  3. Show that a program ran, and rate the strength of each kind of execution evidence.
  4. Check the usual persistence points: services, run keys and scheduled tasks.
  5. Take any artifact row back to the file it came from and verify it there.

Knowledge check

Try this before you read

Pick an answer and write one sentence on why. The explanation appears once you have. Come back to it after the key ideas and see whether your reasoning changed.

On the domain controller you find no Prefetch file for a suspicious tool. What can you conclude?

Show the answer

Answer: Very little, because Prefetch is off by default on Windows Server; check the event logs, Amcache and ShimCache instead

Windows Server ships with Prefetch disabled, so its absence on a domain controller is not evidence either way. Look instead for 4688 process creation if auditing was on, a 7045 install or 7036 start for a service, and Amcache or ShimCache entries. Then say in the report which of those you relied on.

Key ideas

One idea at a time

  1. Start with an inventory

    You cannot say what a user did until you know who the users are and what each machine is. The SYSTEM and SOFTWARE hives give you the machine's name, its Windows version and build, when it was installed, and its time zone. The SAM hive gives local accounts with their RIDs, creation dates, last logon and logon count. Domain accounts live in NTDS.dit on the domain controller. Any account that logged on interactively, Remote Desktop included, gets a profile folder and its own NTUSER.DAT, and ProfileList ties SIDs to those folders. A profile that appears during the intrusion window is itself something to explain.

  2. Logons in the Security log

    Event 4624 records a successful logon, and the logon type tells you the route: 2 interactive, 3 network, 7 a locked workstation reopened, 10 Remote Desktop, 11 cached credentials. 4625 is a failure and includes a status code. 4634 and 4647 are logoffs. 4648 means explicit credentials were supplied. 4672 means the new logon got special privileges, so an administrator. 4720 is a new account, 4732 a new member of a security group, and 1102 a cleared audit log. Each 4624 carries a logon ID that links every later event in the session. A string of 4625s against one account from one address, then a 4624 from that address, is a guessed password. Note when the failures began and when the first success landed; the gap is how long the guessing took. What gets logged depends on audit policy, logs wrap when full, and an administrator can clear them. A missing event proves little. A gap should be explained.

  3. Remote Desktop leaves several traces

    An RDP session shows up in more than one log, which helps when one has wrapped. Security 4624 with logon type 10 gives the source address. TerminalServices-RemoteConnectionManager 1149 records the account authenticating to the RDP service. TerminalServices-LocalSessionManager 21, 24 and 25 record the session starting, disconnecting and reconnecting. On the machine the user connected from, their NTUSER.DAT keeps a Terminal Server Client list of hosts. Put that next to the destination's logs and you can show the hop between machines.

  4. No single artifact proves a program ran

    Each execution artifact records something narrower than “it ran”. Prefetch gives name, run count, last run times and loaded files, but servers have it switched off by default. Amcache shows the file existed and often that it ran, with path, SHA-1 and first-seen time. ShimCache shows Windows noticed the file; on Windows 10 that falls short of execution. UserAssist records a launch from the shell for one user. BAM gives a per-user last-run time on Windows 10. SRUM records network and resource use by the hour. In the event logs, Security 4688 records process creation if auditing was enabled, and System 7036 records a service starting. So a domain controller with no Prefetch file for a program tells you nothing about whether it ran.

  5. Persistence lives in a few places

    There are only a handful of common spots, so check every one on both machines. Services live under SYSTEM\...\Services, and System event 7045 fires when one is installed; note its image path and the account it runs under. Run and RunOnce keys exist in SOFTWARE, for all users, and in each user's NTUSER.DAT. Scheduled tasks are XML files in Windows\System32\Tasks, with the TaskScheduler log alongside. Startup folders exist for each user and for everyone. For each entry, chase the thing it starts: find the binary, record its hash, path and timestamps, and look for the same file on the second machine. Be wary of a service running from a folder ordinary users can write to, and of a binary with an official-sounding name sitting somewhere odd.

  6. A hive needs its transaction logs

    The system hives sit in Windows\System32\config, and every user also has an NTUSER.DAT and a UsrClass.dat. Windows records changes in the .LOG1 and .LOG2 transaction logs before committing them to the hive. A hive taken from a live or crashed system may therefore lack its newest changes, and only a parser that replays the logs will see them. When two tools give different registry values, first find out whether each one replayed the logs. Last-written times belong to keys, not values: they show that something under the key changed, not what. Report it as a key-level time, never as the moment a particular value was set.

  7. From artifact to source

    Each artifact row in VeriSigma names its source file. Open that file and confirm the row before the artifact goes into a finding. For every artifact you cite, record four things: the file's path and evidence item; where in the file the data sits, as a record, key or offset; the raw value before conversion; and the value VeriSigma displays. If the last two differ, explain why. Until you can, don't cite it.

  8. Validation lab

    Artifact coverage

    List the artifacts your reconstruction rests on. For each, record whether VeriSigma and the second tool parse it, how many records each finds, and whether the values match. Cover logon events, RDP events, services with their 7045 entries, Run keys, scheduled tasks, Amcache, ShimCache, desktop Prefetch, and registry values that depend on transaction logs. Look hard at timestamps, and at any registry value one tool might have read without replaying the logs.

Scope

Before you move on

Could you explain each item on the left to a colleague without looking back? If not, reread that idea. The right-hand list is where this module stops.

What this covers

  • System, account and profile inventory
  • Logon reconstruction from the Security log
  • Remote Desktop traces across several logs
  • Evidence of execution and its strength
  • Persistence locations, hives and transaction logs
  • Checking an artifact row against its source

What it does not

  • The answers to the practice case: the method is here, the case is yours to work
  • Malware that lived only in memory, and network traffic
  • Operating systems other than Windows

Have a matter that turns on evidence like this? VeriSigma examinations are quoted at a fixed fee.

Request a fixed-fee quote