IMF#4: Put the past behind
Category: System
Description
One more step to go!
> Deploy on deploy.heroctf.fr
Format : Hero{flag}
Author : Log_s
Write-up
- After gaining access to the 
daveuser on thedevserver from IMF#3: admin:admin, we came across a file namedrandomfile.txt.enc. - Upon examining the contents of the file, it became evident that it was encoded or encrypted.
 - To decipher the encoded file, we began investigating around and noticed the challenge's title, which hinted at the significance of the past. This led us to consider the usage of the 
historycommand, which provides a record of previous commands executed. - By running the 
historycommand, we were able to retrieve a list of important commands from prior sessions. The relevant commands were as follows: - Upon examining the 
historyoutput, we discovered that the file had been encoded using theopensslcommand with theaes-256-cbcalgorithm and a salt value ofSup3r53cr3tP4ssw0rd. - Armed with the necessary information, we proceeded to decode the file using the following command: 
openssl aes-256-cbc -d -salt -k Sup3r53cr3tP4ssw0rd -in randomfile.txt.enc -out randomfile.txt.dec - The flag can be found in the decoded file.
 
Flag: Hero{4_l1ttle_h1st0ry_l3ss0n_4_u}