-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZIP loader triggers an exception when loading Velociraptor Linux collections (Ubuntu) #699
Comments
Adding the following
try:
self._fs.map_file_entry(rel_name, file_entry)
except Exception:
continue |
The Velociraptor collector was made with the following settings: velociraptor config generate > server.config.yaml
velociraptor --config server.config.yaml artifacts collect Server.Internal.ToolDependencies
velociraptor --config server.config.yaml artifacts collect Server.Utils.CreateCollector \
--args OS=Linux \
--args artifacts='["Generic.Collectors.File"]' \
--args parameters='{"Generic.Collectors.File":{"Root":"/","collectionSpec":"Glob\netc/**\nusr/local/etc/**\nvar/log/**\nvar/spool/at/**\nvar/spool/cron/**\nvar/spool/anacron/**\nvar/lib/dpkg/status/**\nvar/audit/**\nvar/cron/**\nroot/.bash*\nroot/.zsh*\nroot/.ssh/**\nroot/.config/**\nhome/*/.bash*\nhome/*/.zsh*\nhome/*/.ssh/**\nhome/*/.config/**\nhome/*/.lastlogin\nboot/config*\nboot/efi*\nboot/grub*\nboot/init*\nvar/db/**\n"}}' \
--args opt_filename_template="Collection-Linux-%FQDN%-%TIMESTAMP%" \
--output linux.zip \
--args target=ZIP \
--args opt_prompt=N \
--args opt_admin=Y \
--args opt_level=0 \
--args opt_timeout=86400 \
--args opt_format=jsonl |
Maybe a path is attempted to be mapped on an already existing path (that was not detected as a directory). E.g.:
Maybe because this happens on a Linux collection, the |
Yes I have shared the file with you. |
Thanks, it's indeed what I expected:
For the time being, I think a try/except + log is indeed the correct "fix", but it should be a bit more explicit. I.e. there could be a check in |
How does Acquire deal with symlinks? |
They are stored as symlinks in the tar archive. |
Note this issue only occurs with a specific Linux collection that I made when developing #698.
Executing
target-query
on a Velociraptor collection of a Linux system triggers the following exception:What stands out is that the variable
directory
in case of th exception has the typeZipFilesystemEntry
, which is weird because in all other cases it has the typedissect.target.filesystem.VirtualDirectory
.The text was updated successfully, but these errors were encountered: