Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
name: Windows Test
runs-on: windows-latest
steps:
- name: Set up Go 1.23
- name: Set up Go 1.25
uses: actions/setup-go@v4
with:
go-version: 1.23
go-version: 1.25

# Caching seems to really slow down the build due to the time
# taken to save the cache.
Expand Down
2 changes: 1 addition & 1 deletion cmd/chunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

kingpin "github.com/alecthomas/kingpin/v2"
"github.com/davecgh/go-spew/spew"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"www.velocidex.com/golang/evtx"
)

Expand Down
22 changes: 11 additions & 11 deletions cmd/dumpevtx.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*
Copyright 2018 Velocidex Innovations
Copyright 2018 Velocidex Innovations

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main

import (
"os"

kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin "github.com/alecthomas/kingpin/v2"
)

var (
Expand Down
6 changes: 4 additions & 2 deletions cmd/extract_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"os"
"strings"

kingpin "github.com/alecthomas/kingpin/v2"
_ "github.com/mattn/go-sqlite3"
"golang.org/x/sys/windows/registry"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"www.velocidex.com/golang/binparsergen/reader"
"www.velocidex.com/golang/evtx"
pe "www.velocidex.com/golang/go-pe"
Expand All @@ -28,6 +28,7 @@ var (
// with potential message files. The message_table paths are not
// guaranteed to exists.
func walkProvider(cb func(provider string, message_table string) error) error {
resolver := evtx.NewWindowsMessageResolver()
channels_key, err := registry.OpenKey(registry.LOCAL_MACHINE,
`SYSTEM\CurrentControlSet\Services\EventLog`,
registry.READ|registry.ENUMERATE_SUB_KEYS|registry.WOW64_64KEY)
Expand Down Expand Up @@ -67,7 +68,8 @@ func walkProvider(cb func(provider string, message_table string) error) error {
continue
}

for _, message_file := range evtx.ExpandLocations(message_files) {
for _, message_file := range resolver.ExpandLocations(
message_files) {
err = cb(provider_name, message_file)
if err != nil {
fmt.Printf("While processing %v (%v): %v\n",
Expand Down
2 changes: 1 addition & 1 deletion cmd/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql"
"fmt"

kingpin "github.com/alecthomas/kingpin/v2"
_ "github.com/mattn/go-sqlite3"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/Velocidex/ordereddict"
kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin "github.com/alecthomas/kingpin/v2"
"www.velocidex.com/golang/evtx"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"time"

kingpin "github.com/alecthomas/kingpin/v2"
"github.com/davecgh/go-spew/spew"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"www.velocidex.com/golang/evtx"
)

Expand Down
2 changes: 1 addition & 1 deletion fixtures/Event4624_windows.golden
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@
"TargetLinkedLogonId": 0,
"ElevatedToken": "%%1843"
},
"Message": "An account was successfully logged on.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-21-546003962-2713609280-610790815-1001\n\tAccount Name:\t\ttest\n\tAccount Domain:\t\tTESTCOMPUTER\n\tLogon ID:\t\t170334\n\nLogon Information:\n\tLogon Type:\t\t2\n\tRestricted Admin Mode:\t-\n\tVirtual Account:\t\tNo\r\n\n\tElevated Token:\t\tNo\r\n\n\nImpersonation Level:\t\tImpersonation\r\n\n\nNew Logon:\n\tSecurity ID:\t\tS-1-5-21-546003962-2713609280-610790815-1002\n\tAccount Name:\t\tuser\n\tAccount Domain:\t\tTESTCOMPUTER\n\tLogon ID:\t\t6003213\n\tLinked Logon ID:\t\t0\n\tNetwork Account Name:\t-\n\tNetwork Account Domain:\t-\n\tLogon GUID:\t\t00000000-0000-0000-0000-000000000000\n\nProcess Information:\n\tProcess ID:\t\t4764\n\tProcess Name:\t\tC:\\Windows\\System32\\svchost.exe\n\nNetwork Information:\n\tWorkstation Name:\tTESTCOMPUTER\n\tSource Network Address:\t::1\n\tSource Port:\t\t0\n\nDetailed Authentication Information:\n\tLogon Process:\t\tseclogo\n\tAuthentication Package:\tNegotiate\n\tTransited Services:\t-\n\tPackage Name (NTLM only):\t-\n\tKey Length:\t\t0\n\nThis event is generated when a logon session is created. It is generated on the computer that was accessed.\n\nThe subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\n\nThe logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).\n\nThe New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.\n\nThe network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\n\nThe impersonation level field indicates the extent to which a process in the logon session can impersonate.\n\nThe authentication information fields provide detailed information about this specific logon request.\n\t- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.\n\t- Transited services indicate which intermediate services have participated in this logon request.\n\t- Package name indicates which sub-protocol was used among the NTLM protocols.\n\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.\r\n"
"Message": "An account was successfully logged on.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-21-546003962-2713609280-610790815-1001\n\tAccount Name:\t\ttest\n\tAccount Domain:\t\tTESTCOMPUTER\n\tLogon ID:\t\t170334\n\nLogon Information:\n\tLogon Type:\t\t2\n\tRestricted Admin Mode:\t-\n\tRemote Credential Guard:\t-\n\tVirtual Account:\t\t0\n\tElevated Token:\t\t%28\n\nImpersonation Level:\t\tImpersonation\r\n\n\nNew Logon:\n\tSecurity ID:\t\tS-1-5-21-546003962-2713609280-610790815-1002\n\tAccount Name:\t\tuser\n\tAccount Domain:\t\tTESTCOMPUTER\n\tLogon ID:\t\t6003213\n\tLinked Logon ID:\t\tNo\r\n\n\tNetwork Account Name:\t-\n\tNetwork Account Domain:\tNo\r\n\n\tLogon GUID:\t\t00000000-0000-0000-0000-000000000000\n\nProcess Information:\n\tProcess ID:\t\t4764\n\tProcess Name:\t\tC:\\Windows\\System32\\svchost.exe\n\nNetwork Information:\n\tWorkstation Name:\tTESTCOMPUTER\n\tSource Network Address:\t::1\n\tSource Port:\t\t0\n\nDetailed Authentication Information:\n\tLogon Process:\t\tseclogo\n\tAuthentication Package:\tNegotiate\n\tTransited Services:\t-\n\tPackage Name (NTLM only):\t-\n\tKey Length:\t\t0\n\nThis event is generated when a logon session is created. It is generated on the computer that was accessed.\n\nThe subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\n\nThe logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).\n\nThe New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.\n\nThe network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\n\nThe impersonation level field indicates the extent to which a process in the logon session can impersonate.\n\nThe authentication information fields provide detailed information about this specific logon request.\n\t- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.\n\t- Transited services indicate which intermediate services have participated in this logon request.\n\t- Package name indicates which sub-protocol was used among the NTLM protocols.\n\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.\r\n"
}
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module www.velocidex.com/golang/evtx

require (
github.com/Velocidex/ordereddict v0.0.0-20230909174157-2aa49cc5d11d
github.com/Velocidex/ordereddict v0.0.0-20250821063524-02dc06e46238
github.com/alecthomas/assert v1.0.0
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/davecgh/go-spew v1.1.1
github.com/hashicorp/golang-lru v1.0.2
github.com/mattn/go-sqlite3 v1.14.24
github.com/mattn/go-sqlite3 v1.14.32
github.com/pkg/errors v0.9.1
github.com/sebdah/goldie v1.0.0
github.com/stretchr/testify v1.9.0
golang.org/x/sys v0.29.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
golang.org/x/sys v0.37.0
www.velocidex.com/golang/binparsergen v0.1.1-0.20240404114946-8f66c7cf586e
www.velocidex.com/golang/go-pe v0.1.1-0.20250101153735-7a925ba8334b
www.velocidex.com/golang/go-pe v0.1.1-0.20251107001057-f93001158cd9
)

require (
github.com/Velocidex/json v0.0.0-20220224052537-92f3c0326e5a // indirect
github.com/Velocidex/pkcs7 v0.0.0-20230220112103-d4ed02e1862a // indirect
github.com/Velocidex/yaml/v2 v2.2.8 // indirect
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.1.1 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/alecthomas/repr v0.5.2 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
golang.org/x/text v0.21.0 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
golang.org/x/text v0.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// replace www.velocidex.com/golang/go-pe => /home/mic/projects/go-pe/
//replace github.com/Velocidex/ordereddict => /home/mic/projects/ordereddict
// replace github.com/Velocidex/ordereddict => /home/mic/projects/ordereddict

go 1.20
go 1.24.0
Loading