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. Other Discussions
  3. The Weird and The Wonderful
  4. Code Safety and The .Net CLR & Java Runtime

Code Safety and The .Net CLR & Java Runtime

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpdotnetquestionc++java
5 Posts 3 Posters 0 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.
  • D Offline
    D Offline
    dusty_dex
    wrote on last edited by
    #1

    Apologies if this subject has already been discussed before. After stumbling upon last September's Best C# Article NET-CLR-Injection-Modify-IL-Code-during-Run-time and learning about endless security issues with the Java Runtime. Are these platforms actually safer than conventional compiled executables? Isn't the whole point of Data Execution Prevention (DEP) meant to stop run-time modification of running code? The CLR/JAVA Runtime engines have the only *native* code that DEP has any direct control of, but they are allowed to run without question, because of some dubious assumption that code for a virtual cpu/machine can do no real damage. Maybe I'm wrong, but I can't help thinking that code under direct control of the 'real' cpu is safer than these virtualized runtime environments. :suss: I'm not fully versed in .NET or Java coding. Anyone care to shed more light on the subject.

    L P 2 Replies Last reply
    0
    • D dusty_dex

      Apologies if this subject has already been discussed before. After stumbling upon last September's Best C# Article NET-CLR-Injection-Modify-IL-Code-during-Run-time and learning about endless security issues with the Java Runtime. Are these platforms actually safer than conventional compiled executables? Isn't the whole point of Data Execution Prevention (DEP) meant to stop run-time modification of running code? The CLR/JAVA Runtime engines have the only *native* code that DEP has any direct control of, but they are allowed to run without question, because of some dubious assumption that code for a virtual cpu/machine can do no real damage. Maybe I'm wrong, but I can't help thinking that code under direct control of the 'real' cpu is safer than these virtualized runtime environments. :suss: I'm not fully versed in .NET or Java coding. Anyone care to shed more light on the subject.

      L Offline
      L Offline
      LloydA111
      wrote on last edited by
      #2

      dusty_dex wrote:

      The CLR/JAVA Runtime are the only executable code DEP has any direct control of

      Nope not true at all. It has full control over native code too. Also, don't forget that these runtimes are written in native code. Just as a point of interest, some CPU's have a hardware based DEP[^]

             .-.
            |o,o|
         ,| \_\\=/\_      .-""-.
         ||/\_/\_\\\_\\    /\[\] \_ \_\\
         |\_/|(\_)|\\\\  \_|\_o\_LII|\_
            \\.\_./// / | ==== | \\
            |\\\_/|"\` |\_| ==== |\_|
            |\_|\_|    ||" ||  ||
            |-|-|    ||LI  o ||
            |\_|\_|    ||'----'||
           /\_/ \\\_\\  /\_\_|    |\_\_\\
      
      D 1 Reply Last reply
      0
      • L LloydA111

        dusty_dex wrote:

        The CLR/JAVA Runtime are the only executable code DEP has any direct control of

        Nope not true at all. It has full control over native code too. Also, don't forget that these runtimes are written in native code. Just as a point of interest, some CPU's have a hardware based DEP[^]

               .-.
              |o,o|
           ,| \_\\=/\_      .-""-.
           ||/\_/\_\\\_\\    /\[\] \_ \_\\
           |\_/|(\_)|\\\\  \_|\_o\_LII|\_
              \\.\_./// / | ==== | \\
              |\\\_/|"\` |\_| ==== |\_|
              |\_|\_|    ||" ||  ||
              |-|-|    ||LI  o ||
              |\_|\_|    ||'----'||
             /\_/ \\\_\\  /\_\_|    |\_\_\\
        
        D Offline
        D Offline
        dusty_dex
        wrote on last edited by
        #3

        Sorry, my wording could have been clearer. :doh: [I've made a minor modification to the original post] I know that the DEP handles *all* native code, but that's what I was getting at. The runtimes are native code but I wanted to know whether the MSIL code/ Java Bytecode is kept in the dcache or icache along with native code. I thought native code, unless specifically marked as shared would otherwise be read-only and not modifiable at runtime. Which led me to wonder about the location .NET/Java bytecodes and the whole self-modifying code (code injection) problem, with the apparent side-stepping of DEP protection. :)

        1 Reply Last reply
        0
        • D dusty_dex

          Apologies if this subject has already been discussed before. After stumbling upon last September's Best C# Article NET-CLR-Injection-Modify-IL-Code-during-Run-time and learning about endless security issues with the Java Runtime. Are these platforms actually safer than conventional compiled executables? Isn't the whole point of Data Execution Prevention (DEP) meant to stop run-time modification of running code? The CLR/JAVA Runtime engines have the only *native* code that DEP has any direct control of, but they are allowed to run without question, because of some dubious assumption that code for a virtual cpu/machine can do no real damage. Maybe I'm wrong, but I can't help thinking that code under direct control of the 'real' cpu is safer than these virtualized runtime environments. :suss: I'm not fully versed in .NET or Java coding. Anyone care to shed more light on the subject.

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Wrong forum.

          D 1 Reply Last reply
          0
          • P PIEBALDconsult

            Wrong forum.

            D Offline
            D Offline
            dusty_dex
            wrote on last edited by
            #5

            So which forum? I based my decision on the WORST/BEST PRACTICES which is mentioned at the top.

            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