Skip to content

Commit

Permalink
Moved tool definitions into the artifact. (Velocidex#485)
Browse files Browse the repository at this point in the history
There is no need now to run the Server.Utils.DownloadBinaries artifact
to sync tools. Each artifact defines its own tool in its own YAML and
it gets added dynamically.
  • Loading branch information
scudette authored Jul 10, 2020
1 parent 9bb3b1c commit 053af0b
Show file tree
Hide file tree
Showing 27 changed files with 658 additions and 522 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ feature submitted that you are really interested in, we would love to
have more testing prior to the official release.

We have a CI pipeline at https://www.velocidex.com/ci managed by
AppVeyor. The pipeline produces a complete windows and linux binary
AppVeyor. The pipeline produces a complete windows binary
built at each commit poiint - simply click on the `artifacts` tab,
scroll down and download `velociraptor.exe` or
`velociraptor_linux.elf`
scroll down and download `velociraptor.exe`

Additionally we build all binaries using Github actions. Simply click
the actions tab on Github and download the `Binaries.zip` file. This
will contain binaries for Windows, MacOS and Linux.
the [actions tab](https://github.com/Velocidex/velociraptor/actions)
on Github and download the `Binaries.zip` file. This will contain
binaries for Windows, MacOS and Linux.


## Getting help
Expand Down
178 changes: 0 additions & 178 deletions api/proto/inventory.pb.go

This file was deleted.

27 changes: 0 additions & 27 deletions api/proto/inventory.proto

This file was deleted.

12 changes: 6 additions & 6 deletions artifacts/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ func (self *Repository) PopulateArtifactsVQLCollectorArgs(
artifact, pres := self.Get(k)
if pres {
// Include any dependent tools.
for _, required_tool := range artifact.RequiredTools {
if !utils.InString(request.Tools, required_tool) {
request.Tools = append(request.Tools, required_tool)
for _, required_tool := range artifact.Tools {
if !utils.InString(request.Tools, required_tool.Name) {
request.Tools = append(request.Tools, required_tool.Name)
}
}

Expand Down Expand Up @@ -465,9 +465,9 @@ func (self *Repository) Compile(artifact *artifacts_proto.Artifact,
}

// Merge any tools we need.
for _, required_tool := range artifact.RequiredTools {
if !utils.InString(result.Tools, required_tool) {
result.Tools = append(result.Tools, required_tool)
for _, required_tool := range artifact.Tools {
if !utils.InString(result.Tools, required_tool.Name) {
result.Tools = append(result.Tools, required_tool.Name)
}
}

Expand Down
17 changes: 10 additions & 7 deletions artifacts/definitions/Server/Utils/CreateCollector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ description: |
type: SERVER

required_tools:
- VelociraptorWindows
- VelociraptorLinux
- VelociraptorDarwin
tools:
- name: VelociraptorWindows
url: https://github.com/Velocidex/velociraptor/releases/download/v0.4.6/velociraptor-v0.4.6-windows-amd64.exe
- name: VelociraptorLinux
url: https://github.com/Velocidex/velociraptor/releases/download/v0.4.6/velociraptor-v0.4.6-linux-amd64
- name: VelociraptorDarwin
url: https://github.com/Velocidex/velociraptor/releases/download/v0.4.6/velociraptor-v0.4.6-darwin-amd64

parameters:
- name: OS
Expand Down Expand Up @@ -186,11 +189,11 @@ sources:
LET Binaries <= SELECT * FROM foreach(
row={
SELECT required_tools FROM artifact_definitions(names=Artifacts)
SELECT tools FROM artifact_definitions(names=Artifacts)
}, query={
SELECT * FROM foreach(row=required_tools,
SELECT * FROM foreach(row=tools,
query={
SELECT _value AS Binary FROM scope()
SELECT name AS Binary FROM scope()
})
}) GROUP BY Binary
Expand Down
41 changes: 0 additions & 41 deletions artifacts/definitions/Server/Utils/DownloadBinaries.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions artifacts/definitions/Server/Utils/UpdatePublicHashes.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions artifacts/definitions/Windows/Forensics/BulkExtractor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ author: Matt Green - @mgreen27
required_permissions:
- EXECVE

required_tools:
- Bulk_Extractor
tools:
- name: Bulk_Extractor
url: https://github.com/4n6ist/bulk_extractor-rec/releases/download/rec03/bulk_extractor-rec03_x64.zip

precondition: SELECT OS From info() where OS = 'windows'

Expand Down
5 changes: 3 additions & 2 deletions artifacts/definitions/Windows/Memory/Acquisition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ description: |
NOTE: This artifact usually takes a long time. You should increase
the default timeout to allow it to complete.
required_tools:
- WinPmem
tools:
- name: WinPmem
url: https://github.com/Velocidex/c-aff4/releases/download/v3.3.rc3/winpmem_v3.3.rc3.exe

sources:
- queries:
Expand Down
Loading

0 comments on commit 053af0b

Please sign in to comment.