Коротка відповідь: відкрийте Перегляд подій, клацніть правою кнопкою миші журнал, який вам потрібен (наприклад Журнали Windows → Безпека), виберіть Зберегти всі події як…, і залиште формат .evtx. З підвищеним командним рядком те ж саме можна зробити в один рядок: wevtutil epl Security C:logssecurity.evtx. Не копіюйте файли з C:WindowsSystem32winevtLogs за допомогою Провідника. Служба журналу подій тримає їх відкритими, тому зазвичай ви отримуєте помилку або нічого корисного.
EVTX варте на хвилину більше часу в порівнянні з текстовим експортом. Це рідний формат, тому кожне поле, ідентифікатори записів і точні UTC-мітки часу зберігаються. SIEM не може повернути це, оскільки він зберігає відрендерений текст. Prime Core має 11,632 правила sigma для журналів подій Windows, пов’язаних з 643 техніками MITRE ATT&CK. Вони варіюються від вгадування паролів (T1110) і шкідливих сервісів (T1543.003) до очищення журналів зловмисниками після себе (T1070.001). Нижче описано, як експортувати правильні журнали, очищати їх і безкоштовно розслідувати їх у LogTotal.
1 хвилина на проведення розслідування, Безкоштовно
Коротко
| Маршрут | Використовуйте, коли | Що вам потрібно |
|---|---|---|
| Перегляд подій → Зберегти всі події як | Одна машина, один або два журнали, у вас є десктопна сесія | Адміністративні права або права Читачів журналів подій для більшості журналів |
| wevtutil epl | Вам потрібен відфільтрований експорт, скрипт або сервер без GUI | Підвищений командний рядок |
| wevtutil з /r: або цикл PowerShell | Кілька журналів або віддалена машина | Адміністративні права на цільовому, плюс доступ до віддаленого журналу через брандмауер |
Перед початком
Три речі визначають, чи містить експорт те, що ви надієтеся він містить.
Права. Адміністратори можуть експортувати будь-який журнал. Члени локальної групи Читачів журналу подій можуть читати більшість журналів без повного адміністрування. Для журналу Безпеки підвищений командний рядок — надійний вибір. Деталі в нашому [посібнику з дозволів журналу подій Windows].
Політика аудиту. Windows реєструє тільки те, що йому вказали. Створення процесу (подія 4688) за замовчуванням не аудитується. Навіть коли його аудиторують, командний рядок записується лише якщо активовано окрему політику. Перевірте, перш ніж шукати події, які ніколи не записувалися:
auditpol /get /category:*
Розмір журналу та перезапис. Кожен журнал має максимальний розмір. За замовчуванням, Windows перезаписує найстаріші події, коли журнал переповнюється, а на зайнятому сервері або контролері домену це може означати всього кілька годин історії. Подивіться з чим ви працюєте:
wevtutil gl Security
Подивіться на maxSize і збереження. Якщо атака відбулася до найстарішої події в журналі, її там немає. Перевірте ваш SIEM або переслані події зами.
And the usual reminder: event logs are full of usernames, hostnames and IPs. LogTotal sanitizes uploads, but your data-handling policy still applies.
Which logs to export
“The Windows logs” is a few hundred channels on a modern system. For security work, these are the ones that usually carry the story:
| Log (channel name) | What it gives you | Notes |
|---|---|---|
| Security | Logons (4624, 4625), account changes (4720, 4728), log cleared (1102), process creation (4688) | 4688 only if auditing is on |
| System | New services (7045), service changes (7036), System log cleared (104) | |
| Microsoft-Windows-Sysmon/Operational | Process creation with hashes and command lines, network connections, and more | Only if Sysmon is installed |
| Microsoft-Windows-PowerShell/Operational | Script block logging (4104), the actual code that ran | Only if script block logging is enabled |
| Microsoft-Windows-Windows Defender/Operational | Detections (1116) and actions taken (1117) | |
| Microsoft-Windows-TaskScheduler/Operational | New scheduled tasks (106), a favorite persistence trick | |
| Microsoft-Windows-TerminalServices-LocalSessionManager/Operational | RDP session logon, disconnect, reconnect (21, 24, 25) |
Not sure what a machine has? wevtutil el lists every channel. Pipe it through findstr /i sysmon (or whatever you’re hunting for) to check a specific one.
Option 1: Event Viewer
Best for one machine and a couple of logs.
- Press Win+R, type eventvwr.msc, and run it as administrator.
- Find the log. The classic ones are under Windows Logs. Everything else lives under Applications and Services Logs → Microsoft → Windows. Sysmon, for example, is at …WindowsSysmonOperational.
- Right-click the log and choose Зберегти всі події як…
- Keep Event Files (*.evtx) as the type and give the file a name that says what it is, like dc-01_security_2026-10-20.evtx.
- Windows then asks about display information. That decides whether a LocaleMetaData folder with message text gets saved next to the file, which helps when someone opens it in Event Viewer on another machine. For a LogTotal upload, the .evtx file is what counts.
Need only part of the log? Use Filter Current Log… first (event IDs, time range), then Save Filtered Log File As…. The XML tab of that filter dialog shows the exact XPath query it built. Copy it; you’ll want it for wevtutil in a minute.
Option 2: wevtutil from the command line
wevtutil ships with every Windows version you’re likely to meet. It works without a GUI and can filter while it exports. Run it from an elevated prompt.
The whole log:
mkdir C:logs
wevtutil epl Security C:logsdc-01_security.evtx
Only the last 24 hours (the number is milliseconds):
wevtutil epl Security C:logsdc-01_security_24h.evtx /q:”*[System[TimeCreated[timediff(@SystemTime) <= 86400000]]]”
An exact window, in UTC:
wevtutil epl Security C:logsdc-01_security_1019.evtx /q:”*[System[TimeCreated[@SystemTime>=’2026-10-19T00:00:00.000Z’ and @SystemTime<‘2026-10-20T00:00:00.000Z’]]]”
Only logons, successful and failed:
wevtutil epl Security C:logsdc-01_logons.evtx /q:”*[System[(EventID=4624 or EventID=4625)]]”
Channel names with spaces need quotes:
wevtutil epl “Microsoft-Windows-Windows Defender/Operational” C:logsdefender.evtx
If the target file already exists, wevtutil refuses to overwrite it unless you add /ow:true. Writing XPath by hand gets old quickly. Build the filter in Event Viewer and copy the query from the XML tab, as described above.
On a domain controller, filter. An unfiltered Security export from a busy DC can run to gigabytes, and you’ll be uploading most of it for nothing.
Option 3: Several logs, or a remote machine
For triage, you usually want the same handful of logs from every host. This PowerShell snippet exports them into one folder per machine and skips any channel that doesn’t exist (no Sysmon, for example) instead of failing:
$out = “C:logs$env:COMPUTERNAME”
New-Item -ItemType Directory -Force -Path $out | Out-Null
$logs = ‘Security’, ‘System’,
‘Microsoft-Windows-Sysmon/Operational’,
‘Microsoft-Windows-PowerShell/Operational’,
‘Microsoft-Windows-Windows Defender/Operational’,
‘Microsoft-Windows-TaskScheduler/Operational’
foreach ($l in $logs) {
$file = Join-Path $out (($l -replace ‘[\/ ]’, ‘_’) + ‘.evtx’)
wevtutil epl $l $file /ow:true 2>$null
if ($LASTEXITCODE -ne 0) { Write-Warning “Skipped: $l” }
}
Remote machines. wevtutil accepts /r:<computer>, but there’s a catch people find the hard way: the export file is written on the remote machine’s disk, not yours. Plan to fetch it afterwards:
wevtutil epl Security C:logssrv-01_security.evtx /r:srv-01
copy \srv-01C$logssrv-01_security.evtx .
That needs admin rights on the target and the Remote Event Log Management firewall rules enabled there. If those rules are off and you’d rather not touch them, PowerShell remoting does the same job: run the snippet above through Invoke-Command, then pull the files back with Copy-Item -FromSession.
Upload and review in LogTotal
LogTotal reads EVTX natively, so there’s nothing to convert. It’s SOC Prime’s free service for running detection logic against a log file without setting anything up.
- Upload. Open logtotal.com and drop in the .evtx file. [PROOF: upload screen, size limit, whether several files can go in at once]
- Review. [PROOF: what the results screen shows and how findings map to rules and ATT&CK techniques]
What this looks like on real data. We used [PROOF: sample source, e.g. a Security.evtx from a throwaway Windows VM after a simulated attack chain: failed logons, a new local admin, a new service, then the Application log being cleared]. The file was [PROOF: N events, X MB]. LogTotal flagged [PROOF: actual findings, matched rules, ATT&CK techniques].
Want to try it first? [PROOF: link to the sample file] is the same file we used above.
When it goes wrong
| Symptom | Likely cause | Fix |
|---|---|---|
| Access is denied | Prompt isn’t elevated, or the account lacks rights to that log | Run as administrator |
| The specified channel could not be found | Typo in the channel name, or the component isn’t installed (Sysmon is the usual one) | Check with wevtutil el | findstr /i <name> |
| wevtutil complains that the file exists | It doesn’t overwrite by default | Add /ow:true, or pick a new file name |
| The specified query is invalid | XPath quoting or syntax | Build the filter in Event Viewer and copy it from the XML tab |
| Copying from winevtLogs fails with “in use by another process” | The Event Log service holds the live files open | Export with Event Viewer or wevtutil instead |
| No 4625 or 4688 events at all | That category isn’t audited | Check auditpol /get /category:*; this fixes future events, not past ones |
| The log only goes back a few hours | Log is full and overwriting | Check wevtutil gl Security; look for Archive-Security-*.evtx files if archiving is on |
| The RPC server is unavailable with /r: | Remote Event Log Management firewall rules are off | Enable them on the target, or use PowerShell remoting |
| Remote export “succeeded,” but there’s no file | /r: writes the file on the remote machine | Look on the target’s disk, e.g. \srv-01C$logs |
FAQ
Where are EVTX files stored on disk?
In C:WindowsSystem32winevtLogs, one file per channel. Channel names with slashes are encoded in the file name, so Microsoft-Windows-Sysmon/Operational becomes Microsoft-Windows-Sysmon%4Operational.evtx. You can read the folder, but export through Event Viewer or wevtutil instead of copying the live files.
Can I get logs off a machine that won’t boot?
Yes, and this is the one case where copying works. Mount the disk on another system, or boot from external media. With Windows not running, nothing holds the files open, and you can copy them straight out of WindowsSystem32winevtLogs.
Should I save as EVTX or as XML or text?
EVTX. Event Viewer offers other formats, but they drop structure or bloat the file. EVTX keeps every field and is what LogTotal reads natively.
How far back do my logs go?
As far as the maximum log size allows, and not a day longer. wevtutil gl shows the size and retention settings. In Event Viewer, sort by date and look at the oldest event. If that’s too recent to be useful, raise the size for next time, or better, forward events to a SIEM.
Is it safe to upload event logs to an online tool?
LogTotal sanitizes uploads before analysis and doesn’t retain files.