Open qlemaire opened 2 years ago
I am afk but it may help to add the filematch attribute. It should be optional but may be there is an issue with the code that requires it. We mostly used this source="directory" with filematch.
Hi @qlemaire , I cannot reproduce your behaviour with one of our tool using a directory as output and DFIR-Orc v10.0.22. Could you give us the following information to help us investigate:
<execute>
If this is not a builtin command, could you try embedding it with DFIR-Orc (see this example) and tell us if this changes the behaviour ?
Thanks in advance. Regards
Thanks you for your answers!
You're right, I can directly execute the binary instead of running cmd.exe, this went out of my mind.
I did more testing and I think I found the catch explaining the behaviors => nested folders :
ERROR (The directory is not empty, hr=0x80070091): Failed to delete directory {DirectoryName}
*
by default => https://github.com/DFIR-ORC/dfir-orc/blob/main/src/OrcCommand/Command/WolfLauncher/WolfExecution_Config.cpp#L476)To perform those tests, I used these two certutil commands:
<!-- certutil backupkey (no nested folders) -->
<command keyword="certutil_backupkey">
<execute name="certutil.exe" run="%SystemRoot%\System32\certutil.exe"/>
<argument>-p test</argument> <!-- password -->
<output name="certutil_backupkey" source="Directory" argument='-backupkey {DirectoryName}'/> <!-- backup folder -->
<output name="certutil_backupkey.log" source="StdOutErr"/>
</command>
<!-- certutil backup (database nested folder not copied)-->
<command keyword="certutil_backup">
<execute name="certutil.exe" run="%SystemRoot%\System32\certutil.exe"/>
<argument>-p test</argument> <!-- password -->
<output name="certutil_backup" source="Directory" argument='-backup {DirectoryName}'/> <!-- backup folder -->
<output name="certutil_backup.log" source="StdOutErr"/>
</command>
Thanks again
Hi,
You are right, source="Directory"
does not support recursive collection of files and directories. This was originally intended as a safeguard against unwanted/accidental recursive deletion during clean up.
We might need to re-think about the pros and cons of this behavior so we'll keep this issue open and get back to you once this has been discussed.
Regards
Hello,
I'm trying to execute a wolflauncher command generating several output files into a folder. I would like to copy the output folder into the final ORC archive, but I can't figure out how to do so. I tried to use the
Directory
source type of theoutput
attribute (https://dfir-orc.github.io/wolf_config.html#id35) without success.Here is the wolflauncher config:
Here is the output on a Windows Server 2016 :
The
Command
folder is correctly generated with the proper output of the command (executed without any error), but not merged into the final archive which remains empty.Thanks!