AF-VCD / Mrs-SMIME

MIT License
11 stars 7 forks source link

Failure to Decrypt File #4

Open Megan777c opened 3 years ago

Megan777c commented 3 years ago

Hello! I'm having issues getting these scripts to work.

Additional Info: I am asked for my PIN. No raw decrypted file is created.
OS: Mac OS Big Sur 11.4 I do not have multiple smart card readers on my computer. I do not have Activclient installed on my Mac. I have tried a different p7m file and it did not work.

I get the following error:

Last login: Wed Jun 2 23:50:05 on ttys000 meganhill@Megans-MacBook-Pro Mrs-SMIME-master % bash mrs-smime.sh Prompting user for p7m file... /Users/meganhill/Documents/S MIME Fix for Mac/smime.p7m Prompting user for output folder... /Users/meganhill/Documents/S MIME Fix for Mac/Raw decrypted text output/ Decrypting and decoding file ... mrs-smime.sh: line 41: $decrypted: ambiguous redirect Failed to decrypt or decode file meganhill@Megans-MacBook-Pro Mrs-SMIME-master %

ckhordiasma commented 3 years ago

hi, I think I implemented a fix if you are still interested in using this tool. Please redownload and try again.

note: air force made it rather difficult to get your own smime files nowadays, so my current methodology is:

  1. try to forward the offending smime email
  2. click and drag the 'smime.p7m' from the attachments section to the subject body, which should look like two smime.p7m files attached to your email
  3. email to your personal email
  4. download from personal email and use tool as normal
krboar commented 3 years ago

To add on to Megan's issues, this was the error message I received:

Decrypting and decoding file ... security: failed to add data to decoder: UNKNOWN (-8183(d) security: problem decoding Failed to decrypt or decode file

ckhordiasma commented 3 years ago

@krboar you are having this issue with a freshly downloaded version of the script, right?

krboar commented 3 years ago

@krboar you are having this issue with a freshly downloaded version of the script, right?

Yes, I just downloaded this version today.

ckhordiasma commented 3 years ago

@krboar thanks, I'll look into it. Also you are using this method https://github.com/AF-VCD/Mrs-SMIME/issues/4#issuecomment-881465848 to download the smime file, right?

I have found that if you try to upload to OneDrive and then download, it permanently corrupts the smime file

krboar commented 3 years ago

@ckhordiasma I tried, but I could not attach the 'smime.p7m' file onto the subject body before sending it to my personal email. The second copy wouldn't show in the body of the message. I still sent it anyways and went through with the process. I ran the script and did not get a prompt for my PIN and it gave me the same error. However, when I checked my folder a 'decrypted.smime' file appeared, but nothing else.

I am using BigSur version 11.5.1 and do not have ActivClient installed if that is of any help.

ckhordiasma commented 3 years ago

@krboar I made a gif of the drag drop thing to make sure we are on the same page on what to do there. I also made some changes to the code and added a few more error messages, could you try downloading it again and trying?

capture

krboar commented 3 years ago

@ckhordiasma Yes, that's what I'm trying to do but unfortunately it's not working. I've attached a gif of me trying to do that on OWA.

I just tried it and I am still getting the same error as soon as I choose the output folder location. I am not being prompted for a PIN either.

recording

ckhordiasma commented 3 years ago

Interesting, your version of webmail looks a lot different from mine. What URL are you using for webmail? Are you able to use webmail.apps.mil?

Also when you get a chance, could you send me an encrypted email at christopher.kodama.1@us.af.mil ? I want to use that as a starting point for more testing on my end.