My goal is to read or copy in memory the following file:
C:\Windows\appcompat\Programs\Amcache.hve
With a rust code similar to this one:
let mut test = match File::open("C:\\Windows\\appcompat\\Programs\\Amcache.hve".to_string()) {
Ok(file) => file,
Err(err) => {
eprintln!("An error occured during the opening of \'{}\'.", err);
std::process::exit(0)
}
};
As expected, I get an error "The process cannot access the file because it is being used by another process. (os error 32)" because it's a protected file. My final goal is to read it and parse it with the crate nt_hive to get forensics information about program execution.
Is there a way to copy/read it properly with a code that have admin privileges?
I have tried many crate, read some blogs but I don't find any useful information. I wonder if using winapi change something ...?
Update
I have found a way to reach my purpose. I will use a low level crate for NTFS. thanks all for your support