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,348
Trophies
3
XP
27,316
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
  • No one is chatting at the moment.
  • JuanMena @ JuanMena:
    Will you give me mouth to mouth oxygen if my throat closes?
  • K3N1 @ K3N1:
    Nah the air can do that
  • K3N1 @ K3N1:
    Ask @x65943 he's trained for that stuff
  • JuanMena @ JuanMena:
    Kissing random dudes choking in celery? Really? Need to study for that?
  • K3N1 @ K3N1:
    Yes it requires a degree
  • K3N1 @ K3N1:
    I could also yank out the rest of my teeth but theirs professionals for that
  • x65943 @ x65943:
    If your throat closes, putting oxygen in your mouth will not solve anything - as you will be introducing oxygen prior to the area of obstruction
  • JuanMena @ JuanMena:
    Just kiss me Kyle.
  • x65943 @ x65943:
    You either need to be intubated to bypass obstruction or create a stoma inferior to the the area of obstruction to survive
  • x65943 @ x65943:
    "Just kiss me Kyle." And I thought all the godreborn gay stuff was a smear campaign
  • JuanMena @ JuanMena:
    If I die, tell my momma I won't be carrying Baby Jesus this christmas :sad::cry:
  • K3N1 @ K3N1:
    Smear campaigns are in The political section now?
  • JuanMena @ JuanMena:
    Chary! Chary! Chary, Chary, Chary!
  • Sonic Angel Knight @ Sonic Angel Knight:
    Pork Provolone :P
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds yummy
  • K3N1 @ K3N1:
    Sweet found my Wii u PSU right after I ordered a new one :tpi:
  • JuanMena @ JuanMena:
    It was waiting for you to order another one.
    Seems like, your PSU was waiting for a partner.
  • JuanMena @ JuanMena:
    Keep them both
    separated or you'll have more PSUs each year.
  • K3N1 @ K3N1:
    Well one you insert one PSU into the other one you get power
  • JuanMena @ JuanMena:
    It literally turns it on.
  • K3N1 @ K3N1:
    Yeah power supplies are filthy perverts
  • K3N1 @ K3N1:
    @Psionic Roshambo has a new friend
    +1
  • JuanMena @ JuanMena:
    It's Kyle, the guy that went to school to be a Certified man Kisser.
  • Psionic Roshambo @ Psionic Roshambo:
    Cartmans hand has taco flavored kisses
  • A @ abraarukuk:
    hi guys
    A @ abraarukuk: hi guys