-
Notifications
You must be signed in to change notification settings - Fork 361
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
bash_history parser failing with 'utf-8' codec can't decode byte 0xba in position #3298
Comments
@madsumm your description is very hard to follow, can you take a bit of time to explain your issue. Do all the bash_history files follow the supported format? Also see: https://github.com/log2timeline/plaso/blob/master/test_data/bash_history |
Also note that Plaso versions older than 6 months are considered out dated. |
@joachimmetz , the format is the same as you had stated. However, in the same partition, the /home//.bash_history is properly parsed.
I did the previous version just to test the behaviour. |
Any warnings about why? Did you mount the file system via the operation system? Do you have access to the files? |
Yes I mounted the E01 volume and was able to see the content of the file. No issues. |
Tested the example in isolation:
Based on the first 2 lines it looks like the parser picks up on it. So there must be some other reason why these files are not being processed on your end. Can you provide us with debug logs of the main and worker processes and other relevant troubleshooting information (also see https://plaso.readthedocs.io/en/latest/sources/Troubleshooting.html) |
Hi, Interestingly I found the following in the log:
and
looks like the file seems different?? Rgds |
An UTF-8 decoding error is causing the parser to fail. Would be interesting to know why this bash_history file has an encoding error. I'll need to give it some thought on how to properly handle such a scenario without having everything parsed as bash_history |
Hi, it seems there are some strange char on some lines from the logs... encrypted?
It is good to ignore any such errors maybe from the logs due to uncertainty of the format sometimes by various devices? |
Likely more some random data as input, hard to say without the full context.
Not entirely sure what you are exactly trying to say here. IMHO "ignoring" would not be the proper approach, maybe a better approach is generate a processing warning and fall back to an encoding method that replaces the unsupported characters. |
There are a few lines I observed to have random characters like these... not much though
Yep, you are right. "Ignoring" is not the right word for it though. |
Tracking work on a possible solution in #3301, closing this issue. |
Description of problem:
Linux parsers used or individual parser ("bash_history") used on a linux E01 file.
Other user's bash-history is passed but not ROOT.
Command line and arguments:
l
og2timeline.py --parsers linux (or bash_history) --process-archives <plasofile> <sourceE01>
Plaso version:
For example 20201007
Operating system Plaso is running on:
Ubuntu 20.04.1 Desktop version
Installation method:
Standard add-repository and "apt install plaso-tools"
**Others
Tried earlier versions (late 2019), similar results.
The E01 files are manually extracted from LVM2 volumes and can be mounted as in Linux.
Retried plaso on directory as source, result is the same.
The text was updated successfully, but these errors were encountered: