World: r3wp
[!REBOL3]
older newer | first last |
Ladislav 8-Oct-2011 [9597] | And, besides, it is circumventable anyway, the only reason why I do not show you that alternative is, that it looks even uglier than the usage of CHANGE |
BrianH 8-Oct-2011 [9598] | But you can already BIND to a word bound to a function context. BODY-OF just keeps you from getting access to a word bound to a function context from outside the function. As long as you control access to the original code block you are secure. |
Ladislav 8-Oct-2011 [9599x2] | But you can already BIND to a word bound to a function context. - actually, I cannot, if the function isn't already running (in that case BIND refuses to do that) |
That is what I call "annoying" | |
BrianH 8-Oct-2011 [9601] | >> bind 'a do func [/a] ['a] ** Script error: a is not in the specified context ** Where: bind ** Near: bind 'a do func [/a] ['a] Well, then you don't have to be as careful with letting bound function words leak I guess. |
Ladislav 8-Oct-2011 [9602x3] | (since it does not enhance security in any way) |
But, that is wrong, since when you let the word out, you can bind, just not using the BIND function (you need to use CHANGE for that) | |
or, having the access to the body, you can do other tricks | |
BrianH 8-Oct-2011 [9605] | That isn't binding, that is changing to a word that is already bound. |
Ladislav 8-Oct-2011 [9606x2] | And what else binding is in this case? |
Binding just replaces all the words it "binds" | |
BrianH 8-Oct-2011 [9608] | >> head change [1] 'a == [a] >> head change [1] #"a" == [#"a"] With BIND, you can leak the 'a word and get access to the 'b word from that same context. You can't do that with CHANGE. |
Ladislav 8-Oct-2011 [9609x3] | yes, but that is not a safety measure. |
That is only "false safety", since it is circumventable | |
As long as you "Leak out" one word, you actually leak out the whole context, just not for the people who don't want to use "dirty tricks" | |
BrianH 8-Oct-2011 [9612x2] | (Sorry, internet outage) Sure it is, in some cases. What if 'a is harmless, but 'b refers to a password? If you can only CHANGE, not BIND, then leaking a word is only as dangerous as leaking what that word refers to. If you can BIND using that word as a context, you can get access to *every* value referred to by that context, not just the one. So it's still potentially a problem to leak a single word (depending on what gets assigned to that one word), but not as bad a problem as it could be. |
You still have to be careful while the function is running though. | |
Ladislav 9-Oct-2011 [9614x6] | What if 'a is harmless, but 'b refers to a password? - you are most probably out of luck, leaking 'a means 'b is obtainable as well |
(only in trivial cases it may be a problem) | |
I am still sure, that disabling BIND in such cases is totally useless. (besides, when the function is not running, you cannot obtain the value of 'b even if you obtained 'b) | |
But, if you do want to "play dirty", then having 'a is completely sufficient | |
It surely is not a safety measure in any reasonable meaning, it is just an annoyance. | |
What it actually does, is that it disables to write some, otherwise clean, code. | |
BrianH 9-Oct-2011 [9620x4] | I'm curious: How can you get a word 'b bound to a function context, when the function is not running, you don't have access to the original function body, and all you have is a word 'a bound to that same context? No command or extension tricks either - they're already assumed to be unsafe. |
If there is a trick that doesn't require access to a block of code that already has a bound 'b in it, or that provides access to the bound body of a function without saving a reference to the body before the function is made, this is information we need to know to make R3 secure. | |
If it's the STACK function or something else that requires debug privileges to run, document it and move on. We already know STACK can be insecure, just not all of the tricks for doing so. | |
Actually, I'd be really interested if you figure out how to use STACK to hack a function that isn't running - that would be a heck of a trick. | |
Ladislav 9-Oct-2011 [9624] | I'm curious: How can you get a word 'b bound to a function context, when the function is not running, you don't have access to the original function body, and all you have is a word 'a bound to that same context? No command or extension tricks either - they're already assumed to be unsafe. - I offer you this statement, which I *can* prove in a reasonable sense: - I assume, that F is a function having a context with more than one variable (Otherwise, there is nothing to prove, is there?) -, so, for the simplification, let's assume, that there are variables 'var-a and 'var-b in F's context, such that: - the Attacker has already access to the variable 'var-a bound to the F's context - , but he does not have the access to the variable 'var-b bound to the F's context yet - now, let's assume, that having access to the variable 'var-b in the F's context he would be able to "do some harm" (whatever that "harm" is) Provided, that the above conditions are met, the Attacker is already able to do the harm even not having the variable 'var-b bound to the F's context available yet. Do I have even to prove the statement? |
BrianH 9-Oct-2011 [9625] | Oh, that's what you meant. I was asking specifically about the particular question I asked. It sounded like you were saying you had a way to do a BIND without BIND. If so, that would be an interesting trick, but also a security hole. I'm more interested in the trick though, if it exists. |
Ladislav 9-Oct-2011 [9626] | Not much of a trick is needed. The above statement (when proven, which is easy), proves, that the disabling of BIND for non-running function words is not a security measure. |
BrianH 9-Oct-2011 [9627] | The above statement requires either access to a word of the same spelling bound to the context. I'm talking about accessing a different word. |
Ladislav 9-Oct-2011 [9628x3] | Sorry? |
Did I write that? | |
(I may have written it incorrectly, then, since that is not what I intended to write) | |
BrianH 9-Oct-2011 [9631] | Let's ignore the function context aspect of it all, and simplify the problem. If you have a word bound to a context, and want to get access to another word bound to the same context, and don't have access to the BIND or IN functions at all, how would you do it? |
Ladislav 9-Oct-2011 [9632x2] | Once again, the assumptions are: - I have a word 'var-a bound to the F's context - It is true, that *if* I had a word 'var-b bound to the F's context, then I would be able to do "some harm" Provided that these conditions are met, then I am able to do the harm. |
(Even though the BIND function is "crippled*, but, as proven by the above statement, unreasonably so.) | |
BrianH 9-Oct-2011 [9634] | I am asking something really specific (see my last message). |
Ladislav 9-Oct-2011 [9635] | Yes, but I never offered the answer to your question. |
BrianH 9-Oct-2011 [9636] | Ah, but that is the only question I was asking. |
Ladislav 9-Oct-2011 [9637] | Yes, but my intent was to prove, that the BIND crippling is unreasonable, which is provable. |
BrianH 9-Oct-2011 [9638] | We can plug one hole at a time. What you are requesting is something that we are trying to prohibit, and we have good reasons for doing so. If there are also other means of doing it, we can address those issues later. One issue at a time. |
Ladislav 9-Oct-2011 [9639x2] | What you are requesting is something that we are trying to prohibit, and we have good reasons for doing so. - by the above, I just proved, that you do not |
...have good reasons | |
BrianH 9-Oct-2011 [9641] | We are trying to prevent functions from being modified from the outside without changing the function (SAME? test), and to allow functions to work on information that we want to keep hidden from other code, such as when a variable has an unencrypted password in it or other sensitive information. Or we could just give up on being able to run untrusted code because it's futile, as you are requesting. |
Ladislav 9-Oct-2011 [9642x2] | Above you mentioned, that the reson is this: - if I had access to a 'var-a variable bound to the F's context, and if I were able to do "some harm" having another variable 'var-b bound to the F's context, then that is a good reason why to cripple BIND, to not give me the access to the 'var-b bound to the F's context as well when the function is not running. As stated, I can disprove that as a reason. |
Thus, the purported reason is not a reason at all, surely not "good". | |
BrianH 9-Oct-2011 [9644] | My last message had the reasons. What you are talking about are the means. |
Ladislav 9-Oct-2011 [9645x2] | OK, I will cite you exactly: Sure it is, in some cases. What if 'a is harmless, but 'b refers to a password? If you can only CHANGE, not BIND, then leaking a word is only as dangerous as leaking what that word refers to. If you can BIND using that word as a context, you can get access to *every* value referred to by that context, not just the one. So it's still potentially a problem to leak a single word (depending on what gets assigned to that one word), but not as bad a problem as it could be. |
That can be easily disproved. | |
older newer | first last |