create an emulator sort of thing?

CIAwesome526

Im ugly and im proud
OP
Member
Joined
Mar 25, 2014
Messages
1,242
Trophies
0
Location
The Lake, Kalos Region
XP
886
Country
United States
so i created a small test app on windows. and i want to change the file extension, and i guess encrypt it? i dont know. anyway, i want to be able to make another application that can open these encrypted files, with the custom extension. i dont want it just view the files, but say it was a game, using the "emulator" would play the file automatically. im sure its not easy, but thats why im asking. im also wondering if the whole encryption thing is possible, so that people cant just easily right click on the file, to view the internals or whatever. kind of like, i guess an nes rom, cant just be opened so you can see all the files... its encrypted, and it has some extension like .nes, then if you open it with an nes emulator on any device, it will play the game. i guess it decrypts then starts the game? im wondering if i can achieve something similar to this: an app that starts an encrypted application.
 
  • Like
Reactions: Margen67

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,197
Trophies
3
Website
trastindustries.com
XP
26,933
Country
United Kingdom
A NES ROM is not so much encrypted as all compiled into one file and usually without a filesystem to separate things, and assembled/compiled to run on the 6502 processor with a NES memory layout. See incbin or binary include for more on that one.
Some later systems, like the 3ds and wii, do have encrypted ROMs that do need to be decrypted to work but that is a different matter.

You could make a script and have it only run when a decoder program looks at it. You would not be the first though and as such there are a few options though I will mainly cover three of them. I do have to warn you though that anti virus programs take a very dim view of this sort of thing -- there is little practical use for it and as such it is mainly malware that does it.

1) Executable packing

2) Encryption

3) Obfuscation

Obfuscation usually deals more in source code but it does apply to binaries as well. The way you write the code and compile it then means nobody has any idea what it does, at least not without knowing the language inside and out and spending ages looking at it.

Executable packing is less likely to be flagged by a virus checker but it is still the cause of many a false positive. Originally packing was more to get file sizes down but it does have benefits in preventing the code from being looked at without first unpacking it. You can probably find many examples of this in the commercial software world.

Some of the higher levels of executable packing will encrypt chunks of the code using actual cryptography rather than compression and more code focused obfuscation. In your initial scenario it sounded like you would have one program run, decode automatically and run the new code. The middle step is something of an issue as you would tend to want to provide your own key to run (be it one you type, a challenge, a USB drive with a unique ID (GPS systems often use this concept) or something more involved.


All this seems something of a hassle though. For most purposes you would probably be better off with an encrypted zip file, a full drive encryption or a VM you can control to run it in.
 
  • Like
Reactions: Margen67
General chit-chat
Help Users
  • K3N1 @ K3N1:
    Engine oil sounds better tbh
  • DinohScene @ DinohScene:
    yeh, engine oil inside the balloons
  • DinohScene @ DinohScene:
    yeet it hard enough against their windows
  • K3N1 @ K3N1:
    It makes good fast food
  • DinohScene @ DinohScene:
    people need to learn to stfu and mind their own bloody business
  • K3N1 @ K3N1:
    Rules are so dumb where I live management bitchs just as bad
  • DinohScene @ DinohScene:
    I had some old bat telling me yesterday that she didn't like the fact I had my engine running on the car park
  • DinohScene @ DinohScene:
    like for fuck sakes old wench, I'm almost ready to leave and you purposely come up to me to tell me your problem, fuck off
  • K3N1 @ K3N1:
    Noise ordinance I understand but not being able to leave a grill outdoor washing your car outside ffs
  • DinohScene @ DinohScene:
    people are fucking stupid
  • DinohScene @ DinohScene:
    no way around it
  • DinohScene @ DinohScene:
    with that tho, I'm off to work
  • K3N1 @ K3N1:
    Half our neighbors are exmeth heads anyway
  • K3N1 @ K3N1:
    Enjoy
  • DinohScene @ DinohScene:
    bloody drugnuts
  • K3N1 @ K3N1:
    Prescription drugs ftw
  • Halbour @ Halbour:
    hi
  • DinohScene @ DinohScene:
    Boom, another spammer banished to the eternal electrons of digihell
    +2
  • FAST6191 @ FAST6191:
    Nah just a facet of one. We need to start being like the 2000s and going after them again.
  • K3N1 @ K3N1:
    I like how alot of people still think massive spam bots are actual people
    +1
  • BigOnYa @ BigOnYa:
    Mods, we got a Spambot on aisle 10, so annoying
    +1
  • AncientBoi @ AncientBoi:
    Uh, actually that was isle 43 :D js
  • K3N1 @ K3N1:
    https://youtu.be/JAmw-TTG2Ds I'd have so much fun with this
    K3N1 @ K3N1: https://youtu.be/JAmw-TTG2Ds I'd have so much fun with this