Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The first thing I note is that their code examples involved symbolic references. Therefore the initial explanation of the gotcha involves a programming practice which strict would protect you from.

However the mistake in the SOAP implementation is different. It is using the dynamic method lookup that Perl uses. This is not catchable with strict. This is an important detail. Someone trying to figure out why things work based on their coding example would be looking to the wrong dispatch mechanism and therefore they would seriously misunderstand what is going wrong.

But the fundamental problem is that SOAP is a poorly designed protocol designed with no eye to security, and built largely for the convenience offered because most firewalls will let through http traffic. This was said pointed out a long time ago by Bruce Schneier, but it is amazing how many people have missed the basic point. The point is that firewalls are retroactive protection for security mistakes in applications. If applications seek new ways around firewalls but continue to make the same basic mistakes then you are guaranteed to get into a situation where firewalls need to retroactively filter a more complicated protocol. Wonderful.

(What I actually want is for Microsoft to build into the OS something that requires SOAP tunnelled directly over https - so that the encryption in https makes it impossible to filter their inevitable security mitakes. When that happens I will have something concrete to stand on to argue for completely removing Microsoft from corporate networks. Remotely exploitable security holes which cannot be blocked and cannot be filtered. Lovely. But I digress...)<p Anyways back to the horrible security hole in Perl SOAP implementations. Well the security hole is obvious, and it is what I pointed out at Re (tilly) 1: Orthogonal Code and Security. The problem is that the SOAP server is using its ability to serve a request as synonymous with its permission to serve that request. Given that anyone can construct any request they desire, this is a huge problem. Given the number of people who seem inclined to follow the latest stupid buzzwords, this guarantees that many will follow the easy path towards a series of obvious mistakes which will give people like myself things to complain about for years to come.

I am positive that SOAP implementations in other languages are going to be making the same mistakes that Perl's do. Just a guaranteed side-effect of having network protocols designed by people without a clue about security implemented by other people who likewise lack clues.

If you want to use SOAP, do as is suggested in the article. Put your functions into a hash. Don't let any function not in that hash be called. And should you need to implement any security model more complex than, "This is publically accessible, that is not", then I wish you luck...


In reply to Re (tilly) 1: SOAP::Lite and Security (Phrack #58) by tilly
in thread SOAP::Lite and Security (Phrack #58) by Coyote

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-23 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found