http://www.perlmonks.org?node_id=1013000


in reply to Re^8: The Most Essential Perl Development Tools Today (guessing)
in thread The Most Essential Perl Development Tools Today

in the context of the sub GOOD { BAD } example: remember that this is about creating vulnerabilities ... [which] isn't about good programming practice, but of taking advantage of possible weaknesses.

"Vulnerability refers to the inability to withstand the effects of a hostile environment."

So, the hostiles somehow detect that I'm using two bareword filehandles in my script and then devise a mechanism by which the succeed in injecting a constant subroutine that effectively redirects one as the other into my scripts namespace.

The only way I can see for that to be possible, is that they modify the script itself; or, they modify one of the modules my script uses.

If they have access to my filesystem sufficiently to be able to exploit that "vulnerability"; don't you think that they might find easier, more direct ways of achieving their nefarious goals? Like maybe just writing whatever they damn please into whatever file they want to corrupt.

There's this vague memory running around my head. Something about shutting doors and horses bolting.

I'm also reminded of a company I sub'd at for a few months; they suddenly got paranoid about the number of people using one of the development labs and at some considerable expense added keycard locks and cameras to the entry points. One day the system that controlled the keycards crashed. That system lived inside the lab and no one could get in. They were about to get some guys into remove teh door from its hinges when one of the operators lifted a floor panel in the UPS room next door to the lab, crawled through the cable space and popped up in the lab and unlocked the doors from the inside.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^10: The Most Essential Perl Development Tools Today (vulnerability)
by tye (Sage) on Jan 12, 2013 at 06:47 UTC

    Yeah, an earlier draft of my response included a description of how I wasn't at all worried about somebody being able to inject code into my Perl script and then deciding that the thing to do with that power is to use some syntax ambiguity.

    It seems pretty silly to me, especially since the attacker would have to inject the code before my code is compiled. You can't theorize some "stack overflow" attack doing it.

    But reading the article, I saw that they weren't describing what I would call a "vulnerability". The example was clearly somebody introducing the error by accident. They even described it as "with the best intentions".

    So I deleted the argument about how I didn't care about the "vulnerability" angle and considered whether I was worried about the "oops" angle. I tend to actually worry about "oops" possibilities. But this one didn't seem very plausible to me, especially not the way I program.

    - tye        

      They even described it as "with the best intentions".

      This misanthrope accidentally defined BAD as GOOD "with the best of intentions"? Right.

      And having made the change, ran the tests and nothing failed before it went into production? Right.

      :)


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.