So i was going over some source code i have saved and i came across something i found interesting. The lang in question is C and the project was basically a more stealthy and secure NetCat in order to backdoor executables. What i thought was neat was that it had multi-platform support. Different flavors of Linux, Mac and Windows were all supported.
Seeing as it's designed to be a backdoor it has a lot of networking related code. And since you don't want anyone finding out you're up to no good i figured comms would be encrypted to some degree or another. And sure enough there was a source file that delt with the encryption of incoming and outgoing packets. After staring at that file for a bit i decided to open the files that had all the stuff with regards to the actual crypto operations in them. Now mind you i'm not a C wizard by far, but it looks to me like it was basically written as a module. And it struck me that if that were the case, surely it wouldn't be too hard to adapt the file that normally would encrypt the packets into something that could encrypt files.
Now i was hoping i could get you guys' opinion on the feasibility of this. And how to go about it. I think it would be a good excersize for me to get my C skills up.
Here's the source code for the Packet Encryption Layerhttps://pastebin.com/susqy0kM
And here is the source code for the crypto related operations.https://pastebin.com/QCrFwqqZ
I know the crypto stuff is a bit dated, but i found it interesting nonetheless. And i'd be interested in hearing your thoughts.