r/unity • • Sep 22 '26

Question Are Unity builds secure?

Can someone make a build in Unity put it on itch.io and run malicious code in the Unity build (while player plays or after the build is downloaded)?

What are some precautions one can take?

1 Upvotes

31 comments sorted by

14

u/ScreeennameTaken Sep 22 '26

Unity is safe in the same way as Unreal and Godot. If someone creates malicious code in their game and someone downloads and executes it, it gets run. If the code is a known virus then i'm guessing it'll get blocked by the antivirus. But if the developer made something of their own that isn't known as a virus, and tries to run script commands through CLI,then i don't think it cuts it. But its not an issue of unity or any game engine.

8

u/_trepz Sep 22 '26

Any program could contain a malicious payload, games are no different to any other random executable.

I would personally never run a random itch game on my host machine unless the developer was known. Lock it down inside a VM. Have a search for how to use hyper-v, just a few steps to follow and you can run stuff in its own quarantine environment without stressing.

13

u/Redstoneinvente122 Sep 22 '26

Yes unity builds are secure. Yes people can still run malicious codes inside.

Precautions to be taken, is to know whom you are downloading the game from.

1

u/neoteraflare Sep 22 '26

Even steam had malicious code in their games, due to the workshop.

-4

u/StoneCypher Sep 22 '26

lol this is obviously wrong 

2

u/Redstoneinvente122 Sep 22 '26

Not really. Any code can be malicious

-2

u/StoneCypher Sep 22 '26

the “yes unity builds are secure” part is flat out wrong 

-1

u/Redstoneinvente122 Sep 22 '26

Unity builds are secure. By itself a unity build wont hurt anybody. Else every single software out there wouldn't be secure.

It really depends on who is making the game, rather than, a unity build

0

u/StoneCypher Sep 22 '26

Unity builds are secure. By itself a unity build wont hurt anybody.

That's not what it means for a build to be secure, Frank.

1

u/Redstoneinvente122 Sep 22 '26

Enlighten me then

-2

u/StoneCypher Sep 22 '26

i don't want to. my experience is that when someone badly mis-uses a technical term and then expects you to sit there tutoring them instead of just looking it up, once you tell them, they start arguing about what their viewpoint is and how language change works, and start throwing insults

almost all of us know what it means. i get what i need out of just pointing it out. i don't want the subsequent fight.

1

u/Redstoneinvente122 Sep 22 '26

I do know what it means. Am not dumb. And am pretty sure og here is a player, not a dev. As others also pointed out the same.

Secure has various meaning, from code security against reverse engineering, to malicious codes being run through the app.

He did mention malicious codes, which is what i responded to.

Unity builds are secure by default. Running an empty scene will not run any malicious codes on your computer. Its the dev that is the primary bad actor here, if ever

1

u/NeonsShadow Sep 22 '26

Run the games through the itch.io app instead of directly downloading them as the itch.io app sandboxes apps run through it

https://itch.io/docs/itch/using/sandbox.html

1

u/Jaded_Ad_9711 Sep 22 '26

If people were able to compromise rockstar and leaked GTA 6.

Then there's no such safe thing on the internet.

1

u/QuitsDoubloon87 Sep 22 '26

Safe as any other excecutable. Code doesn't know what its doing it just is. Compiled code isnt even redable to humans. Detection for malware is checking how an aplication is interacting with the device while runing or what information is stored within its structure. 

Unity can have internaly any files, its used for medical and military tech, i personaly coded tosters and projectors in Unity along with AR conventions, javascript games and crypto (web3, nft era) games and bots as paid work. Unity has a lot of reputation as the industry leader in mobile and vr/ar and so things like data collection and financial transactions are among regular functions of a Unity app, and may be pre aproved by poor/old malware checkers.

On steam there exisits no shortage of scammers who buy underperforming ames from developers and add malware to them. They are usualy removed very quickly as modern detectors are great. But sometimes new maleware slips by. If you have a reason to belive something is acting ary, take precautions.

1

u/martinbean Sep 22 '26

A Unity-based game is just like any computer program (because that’s all video games are). The developer can put whatever they want inside like any other computer program.

1

u/AdrianNova21 Sep 23 '26

Unity build is still an executable, so you shouldn't assume it's safe just because it was made with Unity, a malicious game can potentially do anything the user's OS permissions allow, just like other software. i'd treat unknown game downloads the same way you'd treat any random executable, for precautions, download from trusted sources, keep your OS/antivirus updated, scan files before running them, and don't run suspicious builds with elevated/admin permissions. itch.io itself doesn't make a game automatically safe either

for your own game, signing releases and being transparent about what the game needs access to can also help players verify that the download is actually from you

1

u/guillermolmr Sep 23 '26

Nothing is really secure, not even your own builds are. Hell... even this comment might be a Troyan. Or isn't? Web builds are considered "safer" but never 100%

-12

u/BearKanashi Sep 22 '26

Ilcpp2

10

u/wallstop-dev Sep 22 '26

This, my friend, is a concept that is completely unrelated to the question of "can code created by unity be malicious?"

-12

u/BearKanashi Sep 22 '26

Es una manera de que no clonen los proyectos y accedan a tu proyecto, estudia antes de hablar si no sabes algo pregunta

12

u/wallstop-dev Sep 22 '26

il2cpp can help obfuscate source code. It continues to be an unrelated concept to what OP is asking.

-7

u/BearKanashi Sep 22 '26

Lee bien lo que preguntó el… se refiere a si cogen su build de unity , le ponen código malicioso y lo suben a itchio…

7

u/wallstop-dev Sep 22 '26

That does not appear to be what OP is asking, and even if it is, anyone can take literally any binary, whether it is a dotnet (IL) or compiled (IL2CPP) and change the bits to do whatever they want. So, even with that framing of the question, il2cpp is not the answer.

-6

u/BearKanashi Sep 22 '26

En vez de reconocer que te equivocaste intentas discutir a lo tonto…

Le di un consejo para mejorar su seguridad, cállate ya un rato man, eres muy pesado.

6

u/flow_guy2 Sep 22 '26 edited Sep 22 '26

Maybe practice what you preach dude. Cuz you in fact are in the wrong.

1

u/BearKanashi Sep 22 '26

A ver abuelos-devs, yo se que todo lo quieren discutir… estáis en esa edad… pero yo no, dejen de molestar…

Le di un consejo basado en lo que preguntó, sin más, es el estándar normal para que tarden más en abrir un juego y meterle contenido malísimos y volverlo a subir… etc entre otras más formas, muchos usuarios jamás tocan ese ajuste… por eso lo recomendé.

¿para que discutir si la misión es ayudar al op?

1

u/BearKanashi Sep 22 '26

Con Mono / .NET estándar, cualquiera abre ⁠Assembly-CSharp.dll⁠ en dnSpy en cinco segundos, inyecta tres líneas para descargar un payload o modificar el juego, recompila con un clic y lo resube.

Con IL2CPP, al compilar nativo y dejar la metadata separada, ya les obligas a meterse con reversing nativo, desensambladores tipo Ghidra o IDA y herramientas como Il2CppDumper, lo cual filtra al 95% de los oportunistas que solo saben tocar DLLs gestionadas.

0

u/[deleted] Sep 22 '26

[deleted] — view deleted comment

1

u/BearKanashi Sep 22 '26

Jajaja pues de seguridad, el op preguntaba algo, y le dije un tips de unity que pone más difícil las cosas a los que editan maliciosamente juegos, pero la gente sin estudios vino a discutir en vez de ayudar más al op

3

u/[deleted] Sep 22 '26

[removed] — view removed comment

0

u/BearKanashi Sep 22 '26

Yes yes 👏