-
Notifications
You must be signed in to change notification settings - Fork 183
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
[bug] Cannot process directory of evtx files with space in directory path #1166
Comments
Thank you for reporting the issue :)
Windows(cmd/Powershell) seems to interpret single quotes as simple values... :( |
Sorry, I misunderstood behavior... The above #1166 (comment) is true for
I have confirmed the following on Windows 10.
@joswr1ght |
@fukusuket Thanks for finding out the cause of this! By the way, do you know why it fails if the path ends in a backslash and is this something we can handle in Hayabusa? @joswr1ght Could you let us know if this works for you? |
Yes, You are right!
The version is a little old, but the cause similar to the following may be related. I'll check if Hayabusa can handle it :) |
@YamatoSecurity
Due to the above, it seems difficult to deal with on the Hayabusa side :( Therefore, In the README, The only exception is PowerShell 7.3 and newer, which worked even with a backslash as the last character.
|
For a better user experience, I suggest amending the error in the output log file to indicate that trailing backslashes should not be used in a directory path specification. Imagine a user is running Hayabusa and they use PowerShell tab completion to specify a directory path. PowerShell will autocomplete the directory name that will lead to Hayabusa's inability to process the directory path. While mentioning this behavior in the README is nice, it's better to have the directions in the place where the user will be able to immediately correct the problem (and not just blame Hayabusa unfairly for this problem). Here is the original error log file output:
Suggest something like this:
|
@joswr1ght That is a good suggestion. However, the message @fukusuket @hitenkoku Do one of you know how we could add the message |
@YamatoSecurity I will check it.
|
@fukusuket @hitenkoku I noticed that this error of not being able to load evtx file only happens if the user specifies |
@YamatoSecurity use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
println!("{:?}", args);
} The results are as follows. It seems that the cause is that all arguments after the backslash are treated as one argument.
I confirmed the above behavior with the following PowerShell version.
Rust received the wrong arguments from PowerShell, so I think it's hard to handle wrong arguments on the Rust side :( |
@fukusuket Ah, I see now. Thanks for testing it out! In that case, there is not much we can do on the Hayabusa side. We will deal with it just with explanation and error message. |
Describe the bug
Running Hayabusa using a directory of EVTX files
-d
where the directory path includes a space causes Hayabusa to return an error response.Step to Reproduce
Steps to reproduce the behavior:
In this example, if I rename the Desktop folder from
T1078-Valid accounts
tovalidaccounts
or similar, Hayabusa recognizes the directory of files and processes the EVTX files as expected.Expected behavior
When a directory path includes spaces and is presented as a quoted argument, Hayabusa should interpret the directory path as a literal path.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: