Tool Unity Ren'Py Renpy + Unity Malware Scanner

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
Yeah, the way I do it with Unity. I'm going towards that, but there is, apparently, no convenient way of decompiling all of those files at once. Not even just .pyc
There are tools, but I'd have to build them myself, probably even modify a little, so I could embed them into scanner for decompiling purposes

And creating a subprocess from .exe (the way solution seems to lean towards) will for sure trigger a shit loads of antiviruses on this program. Maybe even windows defender. The one I'm actively trying to not disturb
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
1755854290540.png
It's so much pain in the ass, windows' ML keeps screaming from time to time. I wonder if there's any convenient tool to get rid of all of them at once
Probably would be a good idea to also reupload on some file host so ppl don't have to play captcha
 

cpdp11

Member
Jul 5, 2020
109
172
208
I tested this a little with renpy games, and it seems to only check the renpy library. (lib and common folders)
As far as I know, previously malware infected renpy games often had some code in the rpy/rpyc files within the game folder, not in the library.
Can this scanner check game script files?
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
I tested this a little with renpy games, and it seems to only check the renpy library. (lib and common folders)
As far as I know, previously malware infected renpy games often had some code in the rpy/rpyc files within the game folder, not in the library.
Can this scanner check game script files?
Yes, the current version compares the engine (whole renpy folder) and lib folders. Also checks the .exe, .py and .sh files.
I'm working on the improvements of these checks for now and on stability with different RenPy versions. Later I'll be adding game code analysis. So yes, it doesn't analyze game code yet. But it will.

So first I'd need to add decompilation of .pyc, .pyo, .rpyc and .rpymc files and write analyzer that reads the code itself to see what is really going on. Then it will be easy to add game folder for that analysis, just need to unpack .rpa somehow without overloading your RAM and storage space since games tend to weight a ton of gigabytes on RenPy
 

colobancuz

Active Member
Respected User
Aug 11, 2019
989
2,506
367
Looks OK to me? Seems like some voice chat plugins (for whatever reason?) and save file location opening code
Just looks sketchy for a plugins it uses
Yes, it seems so. I got hold of the previous version, and it's the same there. I can't understand why there's voice chat there, I didn't see it in the game. It seems like he just copied all the plugins he had, just in case.
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
Yeah, unfortunately most developers aren't familiar with assembly stripping option so they put all the shit they had into the build
 

F1forhalp

MRP: Serious Sam - The First Encounter
Donor
Oct 28, 2019
2,444
2,145
447
interesting tool. quick question; does this also work with older Win versions? i'd love to try it on a Win7 install.
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
interesting tool. quick question; does this also work with older Win versions? i'd love to try it on a Win7 install.
It should. Probably also works on Linux in wine
But I guess I didn't compile it to support x32 bit. Like anyone has a x32 computer today
 
  • Like
Reactions: F1forhalp

F1forhalp

MRP: Serious Sam - The First Encounter
Donor
Oct 28, 2019
2,444
2,145
447
It should. Probably also works on Linux in wine
But I guess I didn't compile it to support x32 bit. Like anyone has a x32 computer today
aight thanks i'll try how it does on a Win7x64 then, in and out of the virtual box.
as long as it can run standalone and doesn't ask for additional VisualCrap++ this or .Net that or the likes, i'm eager to try. gonna be a long week, quite some amount of installed (well, only unpacked really) games stacking up.

won't be able to test it on Linux, no games on that.
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
If anyone with a solid enough experience in python would like to help I could really use it, send me a DM
 

F1forhalp

MRP: Serious Sam - The First Encounter
Donor
Oct 28, 2019
2,444
2,145
447
uhh lil snag here.. first thing your scanner wants, is to hook up to the interwebs for whatwasit, references..? i think. if no network, it gives an error and quits (on keypress).
the computer in question is hardware offline meaning it doesn't have any network. so i'd need whatever references the scanner wants, to be present locally, else it won't run. how'd i do that?
tia
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
uhh lil snag here.. first thing your scanner wants, is to hook up to the interwebs for whatwasit, references..? i think. if no network, it gives an error and quits (on keypress).
the computer in question is hardware offline meaning it doesn't have any network. so i'd need whatever references the scanner wants, to be present locally, else it won't run. how'd i do that?
tia
I mentioned it in the OP before I decided to trim it for better readability. It downloads reference assemblies (or renpy in case of renpy) from internet. There's no way to include them in build since there are countless versions of unity and renpy
It is possible to make a patrial scan offline, but I didn't bother with it for now so the program just crashes

althrough if you think about that... You don't need any malware scanner if your PC cannot be connected to the internet lol
 

F1forhalp

MRP: Serious Sam - The First Encounter
Donor
Oct 28, 2019
2,444
2,145
447
I mentioned it in the OP before I decided to trim it for better readability. It downloads reference assemblies (or renpy in case of renpy) from internet. There's no way to include them in build since there are countless versions of unity and renpy
It is possible to make a patrial scan offline, but I didn't bother with it for now so the program just crashes

althrough if you think about that... You don't need any malware scanner if your PC cannot be connected to the internet lol
well okay. i run the 'lewd box' without network, but it does contain all those, well, 'lewd' games i downloaded, i'm just moving the downloaded archives to it with a external HDD. that's why it seems a good idea to have this scanner.
so i thought, if i get the assemblies and put them somewhere locally, would that work?
ofc i would have to somehow manually point the scanner to the new location, but basically that's the idea behind my nagging.
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
well okay. i run the 'lewd box' without network, but it does contain all those, well, 'lewd' games i downloaded, i'm just moving the downloaded archives to it with a external HDD. that's why it seems a good idea to have this scanner.
so i thought, if i get the assemblies and put them somewhere locally, would that work?
ofc i would have to somehow manually point the scanner to the new location, but basically that's the idea behind my nagging.
You can just run scanner from the PC you're downloading games on. It is completely static, so nothing from the game would be loaded/run on your system
But once again, I see no point in trouble since malware can't do shit if you have no internet
"Technically" if you get the RenPy version of the game right, download RenPy for this version and drop it in Temp/AntiMalwareCache/Renpy/8.2.0 (version number) it won't connect to the internet
But that's not the case for unity
 
  • Like
Reactions: F1forhalp

X3gold

Newbie
Oct 6, 2017
15
17
225
Question: If you can answer this, I have IObit Malware Fighter Pro running on my system all the time; it scans in real time. I once had it scan the entire folder of a Renpy game. Nothing was found, but your tool shows that something is wrong. In this case, should I rely on your tool or on IObit Malware Fighter Pro as far as the accuracy of the scan is concerned?
 

Uncle Eugene

Active Member
Modder
Respected User
Jun 6, 2020
598
4,570
426
Question: If you can answer this, I have IObit Malware Fighter Pro running on my system all the time; it scans in real time. I once had it scan the entire folder of a Renpy game. Nothing was found, but your tool shows that something is wrong. In this case, should I rely on your tool or on IObit Malware Fighter Pro as far as the accuracy of the scan is concerned?
Renpy scanner is not reliable yet at all, so you shouldn't really trust it for now, however it will show you the list of files that are different from real clean engine files. You're supposed to look on what it tells you and check for yourself is it dangerous or just a false positive. For example if it's only one .png that is different - it should be OK, but if there is a python script file that's been modified - you should check why is it different since this seems suspicious enough to not run the game right away

Any Antivirus
My Scanner
Can't tell the difference between legit downloader and malicious downloader
Screams on any downloader

Can't tell you what line of code is potentially dangerous because of the way it works
Will show you exactly where potentially dangerous code was found
Allows execution of outside code and running new processes
Triggered by execution of any code that is not embedded into the game or by starting any new process
Designed to find any real malware patterns

Designed specifically to find potentially dangerous or suspicious code in Unity/Renpy porn games
Can potentially stop unwanted behaviour in realtime
Can't stop what's already running

Here's the table to better show the difference. My scanner is not an antivirus, it is designed for a very limited purpose, so it understands much better what is it scanning and what to look for while the real antivirus is designed to catch malware that is known, that is alreay running or that uses some obfuscation/patterns mainly used to steal data or for other evil purposes

So when it comes to static analysis of the game my program is good to know what can be potentially dangerous in the game files that seems not right and real antivirus could miss, while real antivirus is good for catching actual malware if it is there

Meaning they should work in tandem. If either of them tells you the game isn't safe you really should double check if it's false positive or something is actually wrong. My scanner may miss actual malware if it's code is embedded inside the game itself, but does not allow for any "outside code" to get in, so everything that will be executed is guaranteed to be inside the game folder and won't be downloaded later
So the only way left for malware to pass my scanner (at least on Unity) is to include the malware itself into the game (and malware must not use any of the patterns that trigger scan). But in this case any real antivirus should find that without any problem