Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. PlugIns - Preventing Malicious Code...

PlugIns - Preventing Malicious Code...

Scheduled Pinned Locked Moved Design and Architecture
game-devtutorialquestionannouncement
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shy Agam
    wrote on last edited by
    #1

    Hello experts, I'm working on a system which would be able to dinamically load all kinds of multiplayer games. In order for the system to know how to handle any game, I set up some ground rules using an abstract class named GameEngine. Among other stuff, it contains an abstract ProcessMessage() method. At first I thought of loading DLLs from a special folder, and analyzing every class which inherits GameEngine. But then came another thought into my mind... What if someone, instead of implementing a game, inherits GameEngine and puts down malicious code into ProcessMessage()? My first solution is not to read DLLs from a directory, but to read only a DLL that I will code... Whenever I want to add another game, I would update the DLL... However, this prevents other programmers from adding games to my program... What can I do? Thanks in advance, Shy.

    M 1 Reply Last reply
    0
    • S Shy Agam

      Hello experts, I'm working on a system which would be able to dinamically load all kinds of multiplayer games. In order for the system to know how to handle any game, I set up some ground rules using an abstract class named GameEngine. Among other stuff, it contains an abstract ProcessMessage() method. At first I thought of loading DLLs from a special folder, and analyzing every class which inherits GameEngine. But then came another thought into my mind... What if someone, instead of implementing a game, inherits GameEngine and puts down malicious code into ProcessMessage()? My first solution is not to read DLLs from a directory, but to read only a DLL that I will code... Whenever I want to add another game, I would update the DLL... However, this prevents other programmers from adding games to my program... What can I do? Thanks in advance, Shy.

      M Offline
      M Offline
      Moak
      wrote on last edited by
      #2

      shyagam wrote:

      What if someone, instead of implementing a game, inherits GameEngine and puts down malicious code

      A plugin system is per design an "open system", what means malicious code here? First of all, the game user needs to download and install a plugin, so I would say if someone uses code from an unknown source he/she is generally responsible for caused damage! In case you just want to protect users from e.g. downloading broken plugins then have a checksum with each DLL that your downloader checks (i.e. SHA1 checksum does no match with DLL then delete it). Perhaps you can offer quality control to plugin developers and give a "verified" rating to decent plugins... or list good plugins on your webpage (e.g. see IrfanView)? If your question is about limiting plugins from sources other than yourself: You could sign each DLL cryptographically or have an initial handshake with a "license" that enables certain functionality... but at the end of the day this can be technically circumvented since the algorithm/key is somewhere inside the plugin or the application. When I follow the PS/Wii/Xbox modding scene I think vendor locking attempts are quite futile... Hope it helps.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups