Neo23x0 / Raccine

A Simple Ransomware Vaccine
The Unlicense
942 stars 123 forks source link

Update raccine.cpp #21

Closed JohnLaTwC closed 3 years ago

JohnLaTwC commented 3 years ago

Fix compiler warnings. Eliminate the need for earlier pragma to suppress a warning.

Omodaka9375 commented 3 years ago

Hi John, I would argue leaving the original fopen() agains fopen_s(). While it would remove a warning in the console, most platforms that support C only have open function. Meaning, if this is to work cross-platform, we should go with fopen(). Just a thought.

JohnLaTwC commented 3 years ago

My thought is that the entire implementation is currently very Windows specific (e.g. it calls over 20 Windows APIs). If raccine were to have a more modular approach to work xplat, it would require quite a change. So given this is a Windows specific implementation at this point, it makes sense to me to utilize more secure runtime APIs where possible.

Also, as this project matures and organizations consider deploys, the source will get more scrutiny. As such, every effort should be taken to have solid code--return values checked, no handle or memory leaks, secure versions of APIs always called, etc.

Omodaka9375 commented 3 years ago

You are right it is very specific to Windows. I was entertaining a thought of re-doing raccine in C, but yea it's probably a tricky one. I utilize both unix and windows in my work, so the idea came naturally to me to make it a shared object library. Then the API would be secure and low level enough to build on top of it.