You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arthur Ahiceh <ar...@gmail.com> on 2008/03/03 17:42:10 UTC

Re: Security Features offered by Wicket

Hi igor,

your response demonstrate that Wicket's behaviour is very simple to extend
and it is that I like from wicket. I think that to prevent CSRF attacks is
neccessary to add your random parameter to all requests...it was that I
would like to comment here! To prevent CSRF with a random parameter is
necessary to extend wicket's behaviour and it isn't an automatically task
delegated in Wicket framework.

There are people that thinks that CSRF attacks are not possible in Wicket
applications but I think that wicket's urls are easily created by an
attacker with a valid values stored in a victim's session and therefore
attacks are possible by "src" attribute of images. See:
http://en.wikipedia.org/wiki/Cross-site_request_forgery#Example_and_characteristics

Using captchas this problem is resolved but as I said here what I wanted was
that Wicket prevented by default CSRF attacks.

I want to clarify that I like Wicket and what I'm doing is asking and
helping to secure Wicket...I think that this solutions are not paranoia and
they are necessary in production environments...

 Arthur.











2008/2/29, Igor Vaynberg <ig...@gmail.com>:
>
> here are some ideas to much over...
>
> class SecureForm extends Form {
> private String token;
> protected void onbeforerender() { token=UUID.randomUUID.toString(); }
> protected void oncomponenttagbody() {
>     getresponse().write("<input type='hidden' name='token'
> value='"+token+"'/>");
>     super.oncomponenttagbody();
> }
> public boolean process() {
>    if (!token.equals(getrequest().getparameter("token")) {
>        throw new IllegalStateException("token mismatch");
>    }
>    return super.process();
> }
> }
>
> so now you have token validation between http space and session space
>
> if you want to take it to the next level
>
> class SecureTextField extends TextField {
> private String secureName;
>
> public String getInputName() {
>     if (secureName==null) {
>      secureName="a"+UUID.randomUUID().toString().replace("-","");
>     }
>     return secureName;
>   }
> }
>
> and now you have a textfield whose input name is unpredictable
>
> there are all kinds of things you can easily do in wicket, just
> depends on your level of paranoia.
>
> -igor
>
>
>
>
>
>
>
> On Fri, Feb 29, 2008 at 7:33 AM, Arthur Ahiceh <ar...@gmail.com>
> wrote:
> > Hi again,
> >
> >  The example that I put here is a typical example when you read articles
> >  about CSRF attacks. It demonstrates that the "attack" request is made
> by a
> >  valid user with his credentials (cookies).
> >
> >
> >  >> "This second authentication usually also contains an encrypted
> version of
> >  the amount that should be transfered."
> >  yes! this is random token solution that I have commented. You can add a
> >  random parameter to all requests or to encrypt the values of all the
> >  noneditable parameters (links, lists, radios, etc.).
> >
> >  Therefore, if we did not adopt automatic solutions it is probable that
> most
> >  of the applications they are vulnerable to this type of attacks. Is it
> not
> >  better than frameworks like Wicket solves certain vulnerabilities to
> us?
> >
> >  >> CryptedUrlWebRequestCodingStrategy... (William Hoover)
> >  This strategy as I know is only applied to urls and not to data forms!
> But I
> >  would like that this point was confirmed by a wicket's developers
> group.
> >
> >  >> public wiki document... (Martin Makundi)
> >  First, I would like to know Wickets' features better and they confirmed
> me
> >  if my questions are correct or no...
> >
> >  >> CONFIDENTIALITY
> >
> > >> It is not possible out of the box afaik but you could either try to
> >  >> subclass Form or write a filter to intercept and replace form values
> >  >> when wicket sends the response and reverse it when the user submits
> >  >> the form.
> >
> >  right, I know that I could do it as HDIV does but I like to know if
> this
> >  feature is provided by Wicket framework, I think that it would be very
> >  interesting...what do you think about an automatic solution?
> >
> >  Excuse me, I'm french and my english is poorer than I would like.
> >
> >  Thanks again four your time! I consider that it is a subject that to
> all
> >  interests to us.
> >
> >  Arthur.
> >
> >
> >
> >
> >  2008/2/29, Maurice Marrink <ma...@gmail.com>:
> >
> >
> > >
> >  > >  While pages ids have been correlatives, hacker could always
> construct a
> >  > >  valid url to generate a CSRF attack. Let's see a typical
> example...
> >  > >
> >  > >  Consider a bank web site that allows its users to make account
> >  > transfers.
> >  > >  Once a user has logged in and received an authentication cookie,
> he
> >  > needs
> >  > >  only to request the URL
> >  > >
> >  >
> http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::&inputForm4_hf_0&transferTo=123&amount=1000in
> >  > >  order to transfer $1000 to account number 123. If an attacker can
> >  > >  trick
> >  > >  an already-authenticated user into visiting a malicious page that
> >  > contains
> >  > >  an image link like <img src=
> >  > >
> >  >
> http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::&inputForm4_hf_0&transferTo=456&amount=1000/
> >  > >,
> >  > >  the user's (victim) browser will automatically request that URL,
> thus
> >  > making
> >  > >  an account transfer without the user's knowledge or consent.
> >  > >
> >  > >  Once the victim makes a valid transfer, the transfer's values are
> in
> >  > >  session, so if the attacker generates many images like commented
> with
> >  > >  different values in "interface" parameter, he would obtain the
> >  > objective.
> >  > >  So, I think that it is necessary to insert a random value to all
> >  > requests or
> >  > >  generate confidential values for all parameters of a request. What
> do
> >  > you
> >  > >  think?
> >  >
> >  > In this case i think the problem would be the app allowing the
> >  > transfer without requiring additional authentication and not the
> >  > framework.
> >  > Fortunately my online bank does require this and thus no amount of
> >  > links will ever get past the response of "authenticate yourself
> >  > again".
> >  > This second authentication usually also contains an encrypted version
> >  > of the amount that should be transfered.
> >  >
> >  >
> >  > >
> >  > >  3. CONFIDENTIALITY: I have seen in forms that radio's options an
> >  > checkbox's
> >  > >  values have no confidential values. Could I put automatically all
> form
> >  > >  values confidentiality in Wicket? I don't want that the attacker
> sees
> >  > the
> >  > >  original values...
> >  > >
> >  > >  Is it possible to apply encrypt strategy to forms?
> >  >
> >  > It is not possible out of the box afaik but you could either try to
> >  > subclass Form or write a filter to intercept and replace form values
> >  > when wicket sends the response and reverse it when the user submits
> >  > the form.
> >  >
> >  >
> >  > Maurice
> >  >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >  > For additional commands, e-mail: users-help@wicket.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Security Features offered by Wicket

Posted by Arthur Ahiceh <ar...@gmail.com>.
Yes!! This is what I want to say in my example! The request is made by the
victim's browser and the attacker don't require to hijack the session!!

Thank you Sebastiaan for explain better than me!

Arthur.




2008/3/4, Sebastiaan van Erk <se...@sebster.com>:
>
> The point of CSRF attack is that you *DONT* have to hijack the session.
>
> By including for example an image on the attacking website with a src
> reference to the vulnerable website, the browser load the page of
> vulnerable website, and if you currently have a session, the browser
> will be tricked into using your current session. That means, if you're
> logged in, the attacking website can trick your browser into
> (unknowingly and against your will) requesting any url on the vulnerable
> website in the context of your current session.
>
> No session hijacking required.
>
> Regards,
> Sebastiaan
>
> Ned Collyer wrote:
> > My point is, if the code path exists, doing some elaborate session
> hijacking
> > sniffer something something predict blah... can be a pain in the arse
> and
> > not really a valuable investment.
> >
> > A better thing would be to ask the devs if it is plausible (regardless
> of
> > how hard it might be in the real world).
> >
> > If the answer to plausibility is yes, then there needs to be a solution.
> > Not a "yeah its plausible try to hack it" approach.
> >
> > If the OP cannot hack the system, but an attacker uses the exact methods
> > he's described here, then that would be pretty embarrassing for all
> parties.
> >
> >
> > Martijn Dashorst wrote:
> >> I can claim anything in thought experiments. That is easy. Making it
> >> true is something different.
> >>
> >> Martijn
> >>
> >
>
>

Re: Security Features offered by Wicket

Posted by Ned Collyer <ne...@gmail.com>.
ahh yep :)

I was actually fixing one of these last week using a different framework.

Must be late.


Sebastiaan van Erk wrote:
> 
> The point of CSRF attack is that you *DONT* have to hijack the session.
> 
> By including for example an image on the attacking website with a src 
> reference to the vulnerable website, the browser load the page of 
> vulnerable website, and if you currently have a session, the browser 
> will be tricked into using your current session. That means, if you're 
> logged in, the attacking website can trick your browser into 
> (unknowingly and against your will) requesting any url on the vulnerable 
> website in the context of your current session.
> 
> No session hijacking required.
> 
> Regards,
> Sebastiaan
> 

-- 
View this message in context: http://www.nabble.com/Security-Features-offered-by-Wicket-tp15738864p15825239.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
The point of CSRF attack is that you *DONT* have to hijack the session.

By including for example an image on the attacking website with a src 
reference to the vulnerable website, the browser load the page of 
vulnerable website, and if you currently have a session, the browser 
will be tricked into using your current session. That means, if you're 
logged in, the attacking website can trick your browser into 
(unknowingly and against your will) requesting any url on the vulnerable 
website in the context of your current session.

No session hijacking required.

Regards,
Sebastiaan

Ned Collyer wrote:
> My point is, if the code path exists, doing some elaborate session hijacking
> sniffer something something predict blah... can be a pain in the arse and
> not really a valuable investment.
> 
> A better thing would be to ask the devs if it is plausible (regardless of
> how hard it might be in the real world).
> 
> If the answer to plausibility is yes, then there needs to be a solution.
> Not a "yeah its plausible try to hack it" approach.
> 
> If the OP cannot hack the system, but an attacker uses the exact methods
> he's described here, then that would be pretty embarrassing for all parties.
> 
> 
> Martijn Dashorst wrote:
>> I can claim anything in thought experiments. That is easy. Making it
>> true is something different.
>>
>> Martijn
>>
> 

Re: Security Features offered by Wicket

Posted by Ned Collyer <ne...@gmail.com>.
My point is, if the code path exists, doing some elaborate session hijacking
sniffer something something predict blah... can be a pain in the arse and
not really a valuable investment.

A better thing would be to ask the devs if it is plausible (regardless of
how hard it might be in the real world).

If the answer to plausibility is yes, then there needs to be a solution.
Not a "yeah its plausible try to hack it" approach.

If the OP cannot hack the system, but an attacker uses the exact methods
he's described here, then that would be pretty embarrassing for all parties.


Martijn Dashorst wrote:
> 
> I can claim anything in thought experiments. That is easy. Making it
> true is something different.
> 
> Martijn
> 

-- 
View this message in context: http://www.nabble.com/Security-Features-offered-by-Wicket-tp15738864p15824726.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Martijn Dashorst <ma...@gmail.com>.
I can claim anything in thought experiments. That is easy. Making it
true is something different.

Martijn

On 3/4/08, Ned Collyer <ne...@gmail.com> wrote:
>
>  Nick, I think you would be quite surprised at the level of auditing something
>  has to pass to be used in a financial system, especially a bank.  (unless u
>  have some dodgy bank)
>
>  If something is theoretically possible, then thats as good as "proven".
>
>  Gotta remember that hackers are a lot smarter in many instances than the
>  people who wrote the software to keep them out.
>
>
>
>  Nick Heudecker wrote:
>  >
>  > Arthur,
>  >
>  > Only what you can *prove* matters, not what you think.  Have you created
>  > an
>  > example application with a CSRF attack?
>  >
>
>
> --
>  View this message in context: http://www.nabble.com/Security-Features-offered-by-Wicket-tp15738864p15824235.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Alex Jacoby <ae...@isr.umich.edu>.
Forget it... it wouldn't help much.

http://en.wikipedia.org/wiki/Csrf:
Using POST instead of GET does not offer protection, as JavaScript can  
be used to forge POST requests with ease.


On Mar 4, 2008, at 9:29 AM, Alex Jacoby wrote:

> Just a thought from a security newbie... does/can wicket require  
> POST for form submissions?  Would that prevent the issue of  
> embedding the evil param values in the src of an image?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Alex Jacoby <ae...@isr.umich.edu>.
Just a thought from a security newbie... does/can wicket require POST  
for form submissions?  Would that prevent the issue of embedding the  
evil param values in the src of an image?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi,

Igor Vaynberg wrote:
> On Tue, Mar 4, 2008 at 4:42 AM, Sebastiaan van Erk <se...@sebster.com> wrote:
>>  The form with the token looks good, the question I have is, why is
>>  something like it not the default (since almost everybody's site will be
>>  vulnerable without it)?
> 
> because we are a generic framework and i believe the thinking so far
> has been that this kind of security is not a requirement but an
> exception. clearly if you are building a banking app then security is
> the default and unsecure is the exception. eg we can enable csrf
> protection out of the box, but then you are completely screwed if you
> want to have your website indexed - crawlers dont like different urls
> pointing to same content and they dont support sessions.

I'm not saying to by default enable the crypted url strategy. While that 
may be the "safest" option, I agree that probably nobody wants that (I 
certainly don't, I'm a big fan of nice urls).

But the form with the token is very non-intrusive and it stops the 
majority of the CSRF attacks (since the majority occur in form posts). 
Obviously there may be exceptions, where merely doing a GET on a page 
with page parameters does an action, and these would not be protected by 
the form, but would require the token added to the URL or encrypted 
urls. But this would really be the exception.

So as far as I see, enabling CSRF protection out of the box on forms 
does not screw up crawlers (crawlers don't post forms), does not mess up 
the urls (the token is a hidden field), is transparent, simple, and 
non-intrusive.

> if our users tell us they want the security to be the default we would
> make the switch...

I wonder how many users know about this attack. I didn't, and I think it 
would be nice if Wicket protected me even though I didn't! :-)

> -igor

Regards,
Sebastiaan

Re: Security Features offered by Wicket

Posted by Igor Vaynberg <ig...@gmail.com>.
On Tue, Mar 4, 2008 at 4:42 AM, Sebastiaan van Erk <se...@sebster.com> wrote:
>  The form with the token looks good, the question I have is, why is
>  something like it not the default (since almost everybody's site will be
>  vulnerable without it)?

because we are a generic framework and i believe the thinking so far
has been that this kind of security is not a requirement but an
exception. clearly if you are building a banking app then security is
the default and unsecure is the exception. eg we can enable csrf
protection out of the box, but then you are completely screwed if you
want to have your website indexed - crawlers dont like different urls
pointing to same content and they dont support sessions.

if our users tell us they want the security to be the default we would
make the switch...

-igor

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.

Sebastiaan van Erk wrote:
> How does the crypted web url request coding strategy work with 
> bookmarkable pages and nice urls? Do they play nice together?
>
Im also thinking of Ajax, how does fit it...
> The form with the token looks good, the question I have is, why is 
> something like it not the default (since almost everybody's site will 
> be vulnerable without it)?
I was thinking that too, or at least bring in the option, having a 
safeForm or something like it packaged with wicket..
>
> Currently protection from CSRF requires people 1) to know about CSRF 
> and either 2a) to code their own form solution (which might be broken) 
> or to rip it from the web (which might also be broken ;-)), or 2b) to 
> enable the CryptedUrlWebRequestCodingStrategy.
>
> In any case, knowledge of such attacks is required and an action needs 
> to be taken, if you want to be protected. That's something maybe the 
> framework could do for you?
>
Hmm, if theres not performance/memory issues i'd say go for it aswell. 
Making stuff secure as default is always nice...
> Regards,
> Sebastiaan
>
> Nino Saturnino Martinez Vazquez Wael wrote:
>> Hmm, Im a little slow this week.. Theres even an article about it:
>>
>> http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html 
>>
>>
>> Johan Compagner wrote:
>>> Wicket has support for protection just enable it:
>>>
>>> CryptedUrlWebRequestCodingStrategy
>>>
>>> and you can use that in combination with:
>>>
>>> UrlCompressingWebRequestProcessor
>>>
>>> The problem with this is i guess that the normal form get then also 
>>> still
>>> works but i am not sure
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk 
>>> <se...@sebster.com>
>>> wrote:
>>>
>>>  
>>>> Wicket does nothing to protect from CSRF attacks, and it is trivially
>>>> vulnerable. Sure it's a lot more difficult with the standard
>>>> ?wicket:interface type URLs than it would be with more predictable 
>>>> URLs,
>>>> but you can still quite easily guess the URLs, and futhermore, to
>>>> improve your chances of success you can simply include many images in
>>>> the attacking page with different values for the URLs, i.e.,
>>>>
>>>> img
>>>> src="
>>>> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1 
>>>>
>>>> "
>>>>
>>>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, 
>>>> all in
>>>> one page.
>>>>
>>>> Furthermore, most people actually LIKE predictable urls and go to 
>>>> great
>>>> length to mount pages and make them bookmarkable. There's even a
>>>> StatelessForm component, which is entirely vulnerable to CSRF.
>>>>
>>>> Thus, I'd say that even without a quickstart, it's obvious that Wicket
>>>> does not offer any CSRF protection out of the box, and that if you 
>>>> want
>>>> this kind of protection, you will have to do it yourself (which is
>>>> probably not really difficult; though I think many people are not 
>>>> aware
>>>> of these kind of attack vectors and don't even think about it, 
>>>> which is
>>>> why it would be nice if Wicket *could* do it out of the box).
>>>>
>>>> I believe that answers the original question, that CSRF protection is
>>>> *NOT* a security feature offered by Wicket.
>>>>
>>>> Regards,
>>>> Sebastiaan
>>>>
>>>> Nino Saturnino Martinez Vazquez Wael wrote:
>>>>   
>>>>> While that is true.. It's also true that wicket devs favor stuff 
>>>>> proven
>>>>> with a quickstart, because it becomes easier to make a fix for 
>>>>> something
>>>>> you can see in code..
>>>>>
>>>>> So as I've written once before a quickstart should be the way to 
>>>>> go or
>>>>> just use one of the existing applications, phone book or blog 
>>>>> tutorial
>>>>> etc. And make a hack at that...
>>>>>
>>>>> regards Nino
>>>>>
>>>>> Ned Collyer wrote:
>>>>>     
>>>>>> Nick, I think you would be quite surprised at the level of auditing
>>>>>> something
>>>>>> has to pass to be used in a financial system, especially a bank.
>>>>>> (unless u
>>>>>> have some dodgy bank)
>>>>>>
>>>>>> If something is theoretically possible, then thats as good as 
>>>>>> "proven".
>>>>>>
>>>>>> Gotta remember that hackers are a lot smarter in many instances than
>>>>>>         
>>>> the
>>>>   
>>>>>> people who wrote the software to keep them out.
>>>>>>
>>>>>>
>>>>>> Nick Heudecker wrote:
>>>>>>
>>>>>>       
>>>>>>> Arthur,
>>>>>>>
>>>>>>> Only what you can *prove* matters, not what you think.  Have you
>>>>>>>           
>>>> created
>>>>   
>>>>>>> an
>>>>>>> example application with a CSRF attack?
>>>>>>>
>>>>>>>
>>>>>>>           
>>>>>>         
>>>
>>>   
>>

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
How does the crypted web url request coding strategy work with 
bookmarkable pages and nice urls? Do they play nice together?

The form with the token looks good, the question I have is, why is 
something like it not the default (since almost everybody's site will be 
vulnerable without it)?

Currently protection from CSRF requires people 1) to know about CSRF and 
either 2a) to code their own form solution (which might be broken) or to 
rip it from the web (which might also be broken ;-)), or 2b) to enable 
the CryptedUrlWebRequestCodingStrategy.

In any case, knowledge of such attacks is required and an action needs 
to be taken, if you want to be protected. That's something maybe the 
framework could do for you?

Regards,
Sebastiaan

Nino Saturnino Martinez Vazquez Wael wrote:
> Hmm, Im a little slow this week.. Theres even an article about it:
> 
> http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html 
> 
> 
> Johan Compagner wrote:
>> Wicket has support for protection just enable it:
>>
>> CryptedUrlWebRequestCodingStrategy
>>
>> and you can use that in combination with:
>>
>> UrlCompressingWebRequestProcessor
>>
>> The problem with this is i guess that the normal form get then also still
>> works but i am not sure
>>
>>
>>
>>
>>
>>
>> On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk <se...@sebster.com>
>> wrote:
>>
>>  
>>> Wicket does nothing to protect from CSRF attacks, and it is trivially
>>> vulnerable. Sure it's a lot more difficult with the standard
>>> ?wicket:interface type URLs than it would be with more predictable URLs,
>>> but you can still quite easily guess the URLs, and futhermore, to
>>> improve your chances of success you can simply include many images in
>>> the attacking page with different values for the URLs, i.e.,
>>>
>>> img
>>> src="
>>> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1 
>>>
>>> "
>>>
>>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in
>>> one page.
>>>
>>> Furthermore, most people actually LIKE predictable urls and go to great
>>> length to mount pages and make them bookmarkable. There's even a
>>> StatelessForm component, which is entirely vulnerable to CSRF.
>>>
>>> Thus, I'd say that even without a quickstart, it's obvious that Wicket
>>> does not offer any CSRF protection out of the box, and that if you want
>>> this kind of protection, you will have to do it yourself (which is
>>> probably not really difficult; though I think many people are not aware
>>> of these kind of attack vectors and don't even think about it, which is
>>> why it would be nice if Wicket *could* do it out of the box).
>>>
>>> I believe that answers the original question, that CSRF protection is
>>> *NOT* a security feature offered by Wicket.
>>>
>>> Regards,
>>> Sebastiaan
>>>
>>> Nino Saturnino Martinez Vazquez Wael wrote:
>>>    
>>>> While that is true.. It's also true that wicket devs favor stuff proven
>>>> with a quickstart, because it becomes easier to make a fix for 
>>>> something
>>>> you can see in code..
>>>>
>>>> So as I've written once before a quickstart should be the way to go or
>>>> just use one of the existing applications, phone book or blog tutorial
>>>> etc. And make a hack at that...
>>>>
>>>> regards Nino
>>>>
>>>> Ned Collyer wrote:
>>>>      
>>>>> Nick, I think you would be quite surprised at the level of auditing
>>>>> something
>>>>> has to pass to be used in a financial system, especially a bank.
>>>>> (unless u
>>>>> have some dodgy bank)
>>>>>
>>>>> If something is theoretically possible, then thats as good as 
>>>>> "proven".
>>>>>
>>>>> Gotta remember that hackers are a lot smarter in many instances than
>>>>>         
>>> the
>>>    
>>>>> people who wrote the software to keep them out.
>>>>>
>>>>>
>>>>> Nick Heudecker wrote:
>>>>>
>>>>>        
>>>>>> Arthur,
>>>>>>
>>>>>> Only what you can *prove* matters, not what you think.  Have you
>>>>>>           
>>> created
>>>    
>>>>>> an
>>>>>> example application with a CSRF attack?
>>>>>>
>>>>>>
>>>>>>           
>>>>>         
>>
>>   
> 

Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.

Arthur Ahiceh wrote:
> good article Nino! Our paranoia is not going to be really a paranoia... ;-)
>
>   
:)
> As Sebastian comment "CSRF attack is relatively high risk, and relatively
> low cost to fix".
>
>   
Yes that's true..
> Arthur.
>
>
>
>
>
> 2008/3/4, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>:
>   
>> Hmm, Im a little slow this week.. Theres even an article about it:
>>
>>
>> http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html
>>
>> Johan Compagner wrote:
>>     
>>> Wicket has support for protection just enable it:
>>>
>>> CryptedUrlWebRequestCodingStrategy
>>>
>>> and you can use that in combination with:
>>>
>>> UrlCompressingWebRequestProcessor
>>>
>>> The problem with this is i guess that the normal form get then also
>>>       
>> still
>>     
>>> works but i am not sure
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk <sebster@sebster.com
>>>
>>> wrote:
>>>
>>>
>>>       
>>>> Wicket does nothing to protect from CSRF attacks, and it is trivially
>>>> vulnerable. Sure it's a lot more difficult with the standard
>>>> ?wicket:interface type URLs than it would be with more predictable
>>>>         
>> URLs,
>>     
>>>> but you can still quite easily guess the URLs, and futhermore, to
>>>> improve your chances of success you can simply include many images in
>>>> the attacking page with different values for the URLs, i.e.,
>>>>
>>>> img
>>>> src="
>>>>
>>>>         
>> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
>>     
>>>> "
>>>>
>>>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all
>>>>         
>> in
>>     
>>>> one page.
>>>>
>>>> Furthermore, most people actually LIKE predictable urls and go to great
>>>> length to mount pages and make them bookmarkable. There's even a
>>>> StatelessForm component, which is entirely vulnerable to CSRF.
>>>>
>>>> Thus, I'd say that even without a quickstart, it's obvious that Wicket
>>>> does not offer any CSRF protection out of the box, and that if you want
>>>> this kind of protection, you will have to do it yourself (which is
>>>> probably not really difficult; though I think many people are not aware
>>>> of these kind of attack vectors and don't even think about it, which is
>>>> why it would be nice if Wicket *could* do it out of the box).
>>>>
>>>> I believe that answers the original question, that CSRF protection is
>>>> *NOT* a security feature offered by Wicket.
>>>>
>>>> Regards,
>>>> Sebastiaan
>>>>
>>>> Nino Saturnino Martinez Vazquez Wael wrote:
>>>>
>>>>         
>>>>> While that is true.. It's also true that wicket devs favor stuff
>>>>>           
>> proven
>>     
>>>>> with a quickstart, because it becomes easier to make a fix for
>>>>>           
>> something
>>     
>>>>> you can see in code..
>>>>>
>>>>> So as I've written once before a quickstart should be the way to go or
>>>>> just use one of the existing applications, phone book or blog tutorial
>>>>> etc. And make a hack at that...
>>>>>
>>>>> regards Nino
>>>>>
>>>>> Ned Collyer wrote:
>>>>>
>>>>>           
>>>>>> Nick, I think you would be quite surprised at the level of auditing
>>>>>> something
>>>>>> has to pass to be used in a financial system, especially a bank.
>>>>>> (unless u
>>>>>> have some dodgy bank)
>>>>>>
>>>>>> If something is theoretically possible, then thats as good as
>>>>>>             
>> "proven".
>>     
>>>>>> Gotta remember that hackers are a lot smarter in many instances than
>>>>>>
>>>>>>             
>>>> the
>>>>
>>>>         
>>>>>> people who wrote the software to keep them out.
>>>>>>
>>>>>>
>>>>>> Nick Heudecker wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Arthur,
>>>>>>>
>>>>>>> Only what you can *prove* matters, not what you think.  Have you
>>>>>>>
>>>>>>>               
>>>> created
>>>>
>>>>         
>>>>>>> an
>>>>>>> example application with a CSRF attack?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>       
>> --
>> -Wicket for love
>> -Jme for fun
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>   

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Arthur Ahiceh <ar...@gmail.com>.
good article Nino! Our paranoia is not going to be really a paranoia... ;-)

As Sebastian comment "CSRF attack is relatively high risk, and relatively
low cost to fix".

Arthur.





2008/3/4, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>:
>
> Hmm, Im a little slow this week.. Theres even an article about it:
>
>
> http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html
>
> Johan Compagner wrote:
> > Wicket has support for protection just enable it:
> >
> > CryptedUrlWebRequestCodingStrategy
> >
> > and you can use that in combination with:
> >
> > UrlCompressingWebRequestProcessor
> >
> > The problem with this is i guess that the normal form get then also
> still
> > works but i am not sure
> >
> >
> >
> >
> >
> >
> > On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk <sebster@sebster.com
> >
> > wrote:
> >
> >
> >> Wicket does nothing to protect from CSRF attacks, and it is trivially
> >> vulnerable. Sure it's a lot more difficult with the standard
> >> ?wicket:interface type URLs than it would be with more predictable
> URLs,
> >> but you can still quite easily guess the URLs, and futhermore, to
> >> improve your chances of success you can simply include many images in
> >> the attacking page with different values for the URLs, i.e.,
> >>
> >> img
> >> src="
> >>
> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
> >> "
> >>
> >> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all
> in
> >> one page.
> >>
> >> Furthermore, most people actually LIKE predictable urls and go to great
> >> length to mount pages and make them bookmarkable. There's even a
> >> StatelessForm component, which is entirely vulnerable to CSRF.
> >>
> >> Thus, I'd say that even without a quickstart, it's obvious that Wicket
> >> does not offer any CSRF protection out of the box, and that if you want
> >> this kind of protection, you will have to do it yourself (which is
> >> probably not really difficult; though I think many people are not aware
> >> of these kind of attack vectors and don't even think about it, which is
> >> why it would be nice if Wicket *could* do it out of the box).
> >>
> >> I believe that answers the original question, that CSRF protection is
> >> *NOT* a security feature offered by Wicket.
> >>
> >> Regards,
> >> Sebastiaan
> >>
> >> Nino Saturnino Martinez Vazquez Wael wrote:
> >>
> >>> While that is true.. It's also true that wicket devs favor stuff
> proven
> >>> with a quickstart, because it becomes easier to make a fix for
> something
> >>> you can see in code..
> >>>
> >>> So as I've written once before a quickstart should be the way to go or
> >>> just use one of the existing applications, phone book or blog tutorial
> >>> etc. And make a hack at that...
> >>>
> >>> regards Nino
> >>>
> >>> Ned Collyer wrote:
> >>>
> >>>> Nick, I think you would be quite surprised at the level of auditing
> >>>> something
> >>>> has to pass to be used in a financial system, especially a bank.
> >>>> (unless u
> >>>> have some dodgy bank)
> >>>>
> >>>> If something is theoretically possible, then thats as good as
> "proven".
> >>>>
> >>>> Gotta remember that hackers are a lot smarter in many instances than
> >>>>
> >> the
> >>
> >>>> people who wrote the software to keep them out.
> >>>>
> >>>>
> >>>> Nick Heudecker wrote:
> >>>>
> >>>>
> >>>>> Arthur,
> >>>>>
> >>>>> Only what you can *prove* matters, not what you think.  Have you
> >>>>>
> >> created
> >>
> >>>>> an
> >>>>> example application with a CSRF attack?
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >
> >
>
> --
> -Wicket for love
> -Jme for fun
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hmm, Im a little slow this week.. Theres even an article about it:

http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html

Johan Compagner wrote:
> Wicket has support for protection just enable it:
>
> CryptedUrlWebRequestCodingStrategy
>
> and you can use that in combination with:
>
> UrlCompressingWebRequestProcessor
>
> The problem with this is i guess that the normal form get then also still
> works but i am not sure
>
>
>
>
>
>
> On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk <se...@sebster.com>
> wrote:
>
>   
>> Wicket does nothing to protect from CSRF attacks, and it is trivially
>> vulnerable. Sure it's a lot more difficult with the standard
>> ?wicket:interface type URLs than it would be with more predictable URLs,
>> but you can still quite easily guess the URLs, and futhermore, to
>> improve your chances of success you can simply include many images in
>> the attacking page with different values for the URLs, i.e.,
>>
>> img
>> src="
>> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
>> "
>>
>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in
>> one page.
>>
>> Furthermore, most people actually LIKE predictable urls and go to great
>> length to mount pages and make them bookmarkable. There's even a
>> StatelessForm component, which is entirely vulnerable to CSRF.
>>
>> Thus, I'd say that even without a quickstart, it's obvious that Wicket
>> does not offer any CSRF protection out of the box, and that if you want
>> this kind of protection, you will have to do it yourself (which is
>> probably not really difficult; though I think many people are not aware
>> of these kind of attack vectors and don't even think about it, which is
>> why it would be nice if Wicket *could* do it out of the box).
>>
>> I believe that answers the original question, that CSRF protection is
>> *NOT* a security feature offered by Wicket.
>>
>> Regards,
>> Sebastiaan
>>
>> Nino Saturnino Martinez Vazquez Wael wrote:
>>     
>>> While that is true.. It's also true that wicket devs favor stuff proven
>>> with a quickstart, because it becomes easier to make a fix for something
>>> you can see in code..
>>>
>>> So as I've written once before a quickstart should be the way to go or
>>> just use one of the existing applications, phone book or blog tutorial
>>> etc. And make a hack at that...
>>>
>>> regards Nino
>>>
>>> Ned Collyer wrote:
>>>       
>>>> Nick, I think you would be quite surprised at the level of auditing
>>>> something
>>>> has to pass to be used in a financial system, especially a bank.
>>>> (unless u
>>>> have some dodgy bank)
>>>>
>>>> If something is theoretically possible, then thats as good as "proven".
>>>>
>>>> Gotta remember that hackers are a lot smarter in many instances than
>>>>         
>> the
>>     
>>>> people who wrote the software to keep them out.
>>>>
>>>>
>>>> Nick Heudecker wrote:
>>>>
>>>>         
>>>>> Arthur,
>>>>>
>>>>> Only what you can *prove* matters, not what you think.  Have you
>>>>>           
>> created
>>     
>>>>> an
>>>>> example application with a CSRF attack?
>>>>>
>>>>>
>>>>>           
>>>>         
>
>   

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Johan Compagner <jc...@gmail.com>.
Wicket has support for protection just enable it:

CryptedUrlWebRequestCodingStrategy

and you can use that in combination with:

UrlCompressingWebRequestProcessor

The problem with this is i guess that the normal form get then also still
works but i am not sure






On Tue, Mar 4, 2008 at 11:42 AM, Sebastiaan van Erk <se...@sebster.com>
wrote:

> Wicket does nothing to protect from CSRF attacks, and it is trivially
> vulnerable. Sure it's a lot more difficult with the standard
> ?wicket:interface type URLs than it would be with more predictable URLs,
> but you can still quite easily guess the URLs, and futhermore, to
> improve your chances of success you can simply include many images in
> the attacking page with different values for the URLs, i.e.,
>
> img
> src="
> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
> "
>
> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in
> one page.
>
> Furthermore, most people actually LIKE predictable urls and go to great
> length to mount pages and make them bookmarkable. There's even a
> StatelessForm component, which is entirely vulnerable to CSRF.
>
> Thus, I'd say that even without a quickstart, it's obvious that Wicket
> does not offer any CSRF protection out of the box, and that if you want
> this kind of protection, you will have to do it yourself (which is
> probably not really difficult; though I think many people are not aware
> of these kind of attack vectors and don't even think about it, which is
> why it would be nice if Wicket *could* do it out of the box).
>
> I believe that answers the original question, that CSRF protection is
> *NOT* a security feature offered by Wicket.
>
> Regards,
> Sebastiaan
>
> Nino Saturnino Martinez Vazquez Wael wrote:
> > While that is true.. It's also true that wicket devs favor stuff proven
> > with a quickstart, because it becomes easier to make a fix for something
> > you can see in code..
> >
> > So as I've written once before a quickstart should be the way to go or
> > just use one of the existing applications, phone book or blog tutorial
> > etc. And make a hack at that...
> >
> > regards Nino
> >
> > Ned Collyer wrote:
> >> Nick, I think you would be quite surprised at the level of auditing
> >> something
> >> has to pass to be used in a financial system, especially a bank.
> >> (unless u
> >> have some dodgy bank)
> >>
> >> If something is theoretically possible, then thats as good as "proven".
> >>
> >> Gotta remember that hackers are a lot smarter in many instances than
> the
> >> people who wrote the software to keep them out.
> >>
> >>
> >> Nick Heudecker wrote:
> >>
> >>> Arthur,
> >>>
> >>> Only what you can *prove* matters, not what you think.  Have you
> created
> >>> an
> >>> example application with a CSRF attack?
> >>>
> >>>
> >>
> >>
> >
>

Re: Security Features offered by Wicket

Posted by Arthur Ahiceh <ar...@gmail.com>.
yes, Sebastian, wicket resolved data tampering because it stores in session
form data. I commented "data tampering" too to refer to security features
that could be provided by frameworks, like HDIV does...

;-)

Arthur.




2008/3/4, Sebastiaan van Erk <se...@sebster.com>:
>
> Hi,
>
> The tampering with data part is resolved by Wicket, since Wicket does
> not use hidden fields but stores the data in the session on the server
> side.
>
> Furthermore, Wicket by default does server side validation of all input,
> even if you add ajaxy behaviors to also do client side validation.
>
> Regards,
> Sebastiaan
>
> Arthur Ahiceh wrote:
> >>> I believe that answers the original question, that CSRF protection is
> > *NOT* a security feature offered by Wicket.
> >
> > I think the same, I said it and they tell me that URLs wasn't
> predictables
> > when the page identifiers are a correlative numbers, so vulnerable to
> CSRF
> > attacks.
> >
> > I want to emphasize that I think that these tasks (avoid CSRF attacks,
> to
> > offer confidentiality, avoid tampering data in forms) would must be
> resolved
> > by default by frameworks like Wicket to offer "a security framework".
> >
> > Arthur.
> >
> >
> >
> >
> >
> >
> >
> > 2008/3/4, Sebastiaan van Erk <se...@sebster.com>:
> >> Wicket does nothing to protect from CSRF attacks, and it is trivially
> >> vulnerable. Sure it's a lot more difficult with the standard
> >> ?wicket:interface type URLs than it would be with more predictable
> URLs,
> >> but you can still quite easily guess the URLs, and futhermore, to
> >> improve your chances of success you can simply include many images in
> >> the attacking page with different values for the URLs, i.e.,
> >>
> >> img
> >> src="
> >>
> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
> >> "
> >>
> >> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all
> in
> >> one page.
> >>
> >> Furthermore, most people actually LIKE predictable urls and go to great
> >> length to mount pages and make them bookmarkable. There's even a
> >> StatelessForm component, which is entirely vulnerable to CSRF.
> >>
> >> Thus, I'd say that even without a quickstart, it's obvious that Wicket
> >> does not offer any CSRF protection out of the box, and that if you want
> >> this kind of protection, you will have to do it yourself (which is
> >> probably not really difficult; though I think many people are not aware
> >> of these kind of attack vectors and don't even think about it, which is
> >> why it would be nice if Wicket *could* do it out of the box).
> >>
> >> I believe that answers the original question, that CSRF protection is
> >> *NOT* a security feature offered by Wicket.
> >>
> >> Regards,
> >> Sebastiaan
> >>
> >> Nino Saturnino Martinez Vazquez Wael wrote:
> >>> While that is true.. It's also true that wicket devs favor stuff
> proven
> >>> with a quickstart, because it becomes easier to make a fix for
> something
> >>> you can see in code..
> >>>
> >>> So as I've written once before a quickstart should be the way to go or
> >>> just use one of the existing applications, phone book or blog tutorial
> >>> etc. And make a hack at that...
> >>>
> >>> regards Nino
> >>>
> >>> Ned Collyer wrote:
> >>>> Nick, I think you would be quite surprised at the level of auditing
> >>>> something
> >>>> has to pass to be used in a financial system, especially a bank.
> >>>> (unless u
> >>>> have some dodgy bank)
> >>>>
> >>>> If something is theoretically possible, then thats as good as
> "proven".
> >>>>
> >>>> Gotta remember that hackers are a lot smarter in many instances than
> >> the
> >>>> people who wrote the software to keep them out.
> >>>>
> >>>>
> >>>> Nick Heudecker wrote:
> >>>>
> >>>>> Arthur,
> >>>>>
> >>>>> Only what you can *prove* matters, not what you think.  Have you
> >> created
> >>>>> an
> >>>>> example application with a CSRF attack?
> >>>>>
> >>>>>
> >>>>
> >>
> >
>
>

Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi,

The tampering with data part is resolved by Wicket, since Wicket does 
not use hidden fields but stores the data in the session on the server side.

Furthermore, Wicket by default does server side validation of all input, 
even if you add ajaxy behaviors to also do client side validation.

Regards,
Sebastiaan

Arthur Ahiceh wrote:
>>> I believe that answers the original question, that CSRF protection is
> *NOT* a security feature offered by Wicket.
> 
> I think the same, I said it and they tell me that URLs wasn't predictables
> when the page identifiers are a correlative numbers, so vulnerable to CSRF
> attacks.
> 
> I want to emphasize that I think that these tasks (avoid CSRF attacks, to
> offer confidentiality, avoid tampering data in forms) would must be resolved
> by default by frameworks like Wicket to offer "a security framework".
> 
> Arthur.
> 
> 
> 
> 
> 
> 
> 
> 2008/3/4, Sebastiaan van Erk <se...@sebster.com>:
>> Wicket does nothing to protect from CSRF attacks, and it is trivially
>> vulnerable. Sure it's a lot more difficult with the standard
>> ?wicket:interface type URLs than it would be with more predictable URLs,
>> but you can still quite easily guess the URLs, and futhermore, to
>> improve your chances of success you can simply include many images in
>> the attacking page with different values for the URLs, i.e.,
>>
>> img
>> src="
>> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
>> "
>>
>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in
>> one page.
>>
>> Furthermore, most people actually LIKE predictable urls and go to great
>> length to mount pages and make them bookmarkable. There's even a
>> StatelessForm component, which is entirely vulnerable to CSRF.
>>
>> Thus, I'd say that even without a quickstart, it's obvious that Wicket
>> does not offer any CSRF protection out of the box, and that if you want
>> this kind of protection, you will have to do it yourself (which is
>> probably not really difficult; though I think many people are not aware
>> of these kind of attack vectors and don't even think about it, which is
>> why it would be nice if Wicket *could* do it out of the box).
>>
>> I believe that answers the original question, that CSRF protection is
>> *NOT* a security feature offered by Wicket.
>>
>> Regards,
>> Sebastiaan
>>
>> Nino Saturnino Martinez Vazquez Wael wrote:
>>> While that is true.. It's also true that wicket devs favor stuff proven
>>> with a quickstart, because it becomes easier to make a fix for something
>>> you can see in code..
>>>
>>> So as I've written once before a quickstart should be the way to go or
>>> just use one of the existing applications, phone book or blog tutorial
>>> etc. And make a hack at that...
>>>
>>> regards Nino
>>>
>>> Ned Collyer wrote:
>>>> Nick, I think you would be quite surprised at the level of auditing
>>>> something
>>>> has to pass to be used in a financial system, especially a bank.
>>>> (unless u
>>>> have some dodgy bank)
>>>>
>>>> If something is theoretically possible, then thats as good as "proven".
>>>>
>>>> Gotta remember that hackers are a lot smarter in many instances than
>> the
>>>> people who wrote the software to keep them out.
>>>>
>>>>
>>>> Nick Heudecker wrote:
>>>>
>>>>> Arthur,
>>>>>
>>>>> Only what you can *prove* matters, not what you think.  Have you
>> created
>>>>> an
>>>>> example application with a CSRF attack?
>>>>>
>>>>>
>>>>
>>
> 

Re: Security Features offered by Wicket

Posted by Arthur Ahiceh <ar...@gmail.com>.
>> I believe that answers the original question, that CSRF protection is
*NOT* a security feature offered by Wicket.

I think the same, I said it and they tell me that URLs wasn't predictables
when the page identifiers are a correlative numbers, so vulnerable to CSRF
attacks.

I want to emphasize that I think that these tasks (avoid CSRF attacks, to
offer confidentiality, avoid tampering data in forms) would must be resolved
by default by frameworks like Wicket to offer "a security framework".

Arthur.







2008/3/4, Sebastiaan van Erk <se...@sebster.com>:
>
> Wicket does nothing to protect from CSRF attacks, and it is trivially
> vulnerable. Sure it's a lot more difficult with the standard
> ?wicket:interface type URLs than it would be with more predictable URLs,
> but you can still quite easily guess the URLs, and futhermore, to
> improve your chances of success you can simply include many images in
> the attacking page with different values for the URLs, i.e.,
>
> img
> src="
> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
> "
>
> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in
> one page.
>
> Furthermore, most people actually LIKE predictable urls and go to great
> length to mount pages and make them bookmarkable. There's even a
> StatelessForm component, which is entirely vulnerable to CSRF.
>
> Thus, I'd say that even without a quickstart, it's obvious that Wicket
> does not offer any CSRF protection out of the box, and that if you want
> this kind of protection, you will have to do it yourself (which is
> probably not really difficult; though I think many people are not aware
> of these kind of attack vectors and don't even think about it, which is
> why it would be nice if Wicket *could* do it out of the box).
>
> I believe that answers the original question, that CSRF protection is
> *NOT* a security feature offered by Wicket.
>
> Regards,
> Sebastiaan
>
> Nino Saturnino Martinez Vazquez Wael wrote:
> > While that is true.. It's also true that wicket devs favor stuff proven
> > with a quickstart, because it becomes easier to make a fix for something
> > you can see in code..
> >
> > So as I've written once before a quickstart should be the way to go or
> > just use one of the existing applications, phone book or blog tutorial
> > etc. And make a hack at that...
> >
> > regards Nino
> >
> > Ned Collyer wrote:
> >> Nick, I think you would be quite surprised at the level of auditing
> >> something
> >> has to pass to be used in a financial system, especially a bank.
> >> (unless u
> >> have some dodgy bank)
> >>
> >> If something is theoretically possible, then thats as good as "proven".
> >>
> >> Gotta remember that hackers are a lot smarter in many instances than
> the
> >> people who wrote the software to keep them out.
> >>
> >>
> >> Nick Heudecker wrote:
> >>
> >>> Arthur,
> >>>
> >>> Only what you can *prove* matters, not what you think.  Have you
> created
> >>> an
> >>> example application with a CSRF attack?
> >>>
> >>>
> >>
> >>
> >
>
>

Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Checkout the other part of this thread, I think this has become a dead 
end...

http://javathoughts.capesugarbird.com/2007/08/protecting-wicket-application-against.html

Sebastiaan van Erk wrote:
> Hi,
>
> Nino Saturnino Martinez Vazquez Wael wrote:
>> As with all thing's you can make them more or less secure. As stated 
>> before, depending on a level of paranoia nothing are secure!
>
> But that's got nothing to do with the question: does Wicket offer 
> security feature X? Nor does it help answer the follow up question: 
> should Wicket off security feature X?
>
>> If the application is a web one, well use CSRF attacks, use random 
>> attacks, Bruteforce the site, go to their operator and get inside the 
>> database. Eventually you will get in, if you cover your tracks.
>
> I disagree. You don't necessary eventually get in. Brute force is 
> infeasible (in well designed systems). Going to their operator leaves 
> tracks and has high risk and high costs. Doing a CSRF attack is easy, 
> anonymous, and can be done remotely.
>
>> Nothing is secure.
>
> Oh darn, well I guess I'll just remove my password protection from my 
> computer, it's not secure anyway!!!
>
>> Having an quickstart as a usecase could help developers decide if its 
>> worth the effort. Whats a reasonable level for security... I guess 
>> the best one is telling the users to use the browser exclusivly for 
>> the bank site and be sure to logout before leaving it.
>
> I don't see how a quickstart will help... Maybe it will help show 
> *what* a CSRF attack is for those who don't know. :-)
>
> I think the original poster makes a good point. I think a CSRF attack 
> is relatively high risk, and relatively low cost to fix. All it takes 
> (I think, don't pin me on this, I have to research it a bit more) is 
> something like a secure token to be kept in the state of the form 
> which must be sent back on submit by the user, which is then matched. 
> The wicket user does not have to know about this at all, it is 
> transparent. As added benefit it blocks double form posts.
>
> In the case that it is desired that posts can be made without first 
> having to request the page with the form, one should be able to turn 
> CSRF protection off.
>
> Considering its 1) ease of implementation, 2) low intrusiveness, 3) 
> added value, I definately think it's worth considering protecting 
> Wicket from CSRF by default.
>
> Regards,
> Sebastiaan
>
>

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
Hi,

Nino Saturnino Martinez Vazquez Wael wrote:
> As with all thing's you can make them more or less secure. As stated 
> before, depending on a level of paranoia nothing are secure!

But that's got nothing to do with the question: does Wicket offer 
security feature X? Nor does it help answer the follow up question: 
should Wicket off security feature X?

> If the application is a web one, well use CSRF attacks, use random 
> attacks, Bruteforce the site, go to their operator and get inside the 
> database. Eventually you will get in, if you cover your tracks.

I disagree. You don't necessary eventually get in. Brute force is 
infeasible (in well designed systems). Going to their operator leaves 
tracks and has high risk and high costs. Doing a CSRF attack is easy, 
anonymous, and can be done remotely.

> Nothing is secure.

Oh darn, well I guess I'll just remove my password protection from my 
computer, it's not secure anyway!!!

> Having an quickstart as a usecase could help developers decide if its 
> worth the effort. Whats a reasonable level for security... I guess the 
> best one is telling the users to use the browser exclusivly for the bank 
> site and be sure to logout before leaving it.

I don't see how a quickstart will help... Maybe it will help show *what* 
a CSRF attack is for those who don't know. :-)

I think the original poster makes a good point. I think a CSRF attack is 
relatively high risk, and relatively low cost to fix. All it takes (I 
think, don't pin me on this, I have to research it a bit more) is 
something like a secure token to be kept in the state of the form which 
must be sent back on submit by the user, which is then matched. The 
wicket user does not have to know about this at all, it is transparent. 
As added benefit it blocks double form posts.

In the case that it is desired that posts can be made without first 
having to request the page with the form, one should be able to turn 
CSRF protection off.

Considering its 1) ease of implementation, 2) low intrusiveness, 3) 
added value, I definately think it's worth considering protecting Wicket 
from CSRF by default.

Regards,
Sebastiaan



Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
That said...

Would a valid solution involving appending a pair of session keys to the 
url workout?


http://thesiteiwannahack.com/?wicket:keyA=somethingreallylong&wicket:keyB=somethinkreallylong&wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1

The wicket:key would be added after the user logged in..

Whats to say of that approach.. Would it be okay?

Then the hacker should also guess those two keys, and that would be as 
secure as possible?


regards Nino


Nino Saturnino Martinez Vazquez Wael wrote:
> As with all thing's you can make them more or less secure. As stated 
> before, depending on a level of paranoia nothing are secure!
>
> Mounting a page and making it stateless, and further more making it 
> take parameters is one of less safer ones.
>
> If the application is a web one, well use CSRF attacks, use random 
> attacks, Bruteforce the site, go to their operator and get inside the 
> database. Eventually you will get in, if you cover your tracks.
>
> If the application is a desktop version, deploy a keylogger and a 
> mouse recorder, grab their password file. If they cycle passwords, 
> bruteforce that too. Might not work with the first 100 users, but in 
> time and theory you will get in.
>
> Nothing is secure.
>
> Having an quickstart as a usecase could help developers decide if its 
> worth the effort. Whats a reasonable level for security... I guess the 
> best one is telling the users to use the browser exclusivly for the 
> bank site and be sure to logout before leaving it.
>
> -Nino
>
> Sebastiaan van Erk wrote:
>> Wicket does nothing to protect from CSRF attacks, and it is trivially 
>> vulnerable. Sure it's a lot more difficult with the standard 
>> ?wicket:interface type URLs than it would be with more predictable 
>> URLs, but you can still quite easily guess the URLs, and futhermore, 
>> to improve your chances of success you can simply include many images 
>> in the attacking page with different values for the URLs, i.e.,
>>
>> img 
>> src="http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1" 
>>
>>
>> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all 
>> in one page.
> This is not new, it's been discussed a few messages ago... You still 
> need to hijack the users session.
>>
>> Furthermore, most people actually LIKE predictable urls and go to 
>> great length to mount pages and make them bookmarkable. There's even 
>> a StatelessForm component, which is entirely vulnerable to CSRF.
>>
>> Thus, I'd say that even without a quickstart, it's obvious that 
>> Wicket does not offer any CSRF protection out of the box, and that if 
>> you want this kind of protection, you will have to do it yourself 
>> (which is probably not really difficult; though I think many people 
>> are not aware of these kind of attack vectors and don't even think 
>> about it, which is why it would be nice if Wicket *could* do it out 
>> of the box).
>>
>> I believe that answers the original question, that CSRF protection is 
>> *NOT* a security feature offered by Wicket.
> I believe that true in the sense that you can always make your pages 
> vulnerable if you want to (also if its unknowingly).
>>
>> Regards,
>> Sebastiaan
>>
>> Nino Saturnino Martinez Vazquez Wael wrote:
>>> While that is true.. It's also true that wicket devs favor stuff 
>>> proven with a quickstart, because it becomes easier to make a fix 
>>> for something you can see in code..
>>>
>>> So as I've written once before a quickstart should be the way to go 
>>> or just use one of the existing applications, phone book or blog 
>>> tutorial etc. And make a hack at that...
>>>
>>> regards Nino
>>>
>>> Ned Collyer wrote:
>>>> Nick, I think you would be quite surprised at the level of auditing 
>>>> something
>>>> has to pass to be used in a financial system, especially a bank.  
>>>> (unless u
>>>> have some dodgy bank)
>>>>
>>>> If something is theoretically possible, then thats as good as 
>>>> "proven".
>>>>
>>>> Gotta remember that hackers are a lot smarter in many instances 
>>>> than the
>>>> people who wrote the software to keep them out.
>>>>
>>>>
>>>> Nick Heudecker wrote:
>>>>  
>>>>> Arthur,
>>>>>
>>>>> Only what you can *prove* matters, not what you think.  Have you 
>>>>> created
>>>>> an
>>>>> example application with a CSRF attack?
>>>>>
>>>>>     
>>>>
>>>>   
>>>
>

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Arthur Ahiceh <ar...@gmail.com>.
>> Having an quickstart as a usecase could help developers decide if its
worth the effort.
Since the moment that wicket does not add any random parameter to urls, the
applications are vulnerable to CSRF attacks, so I think that quickstart
application could be a good example but I think that we can view easily that
URLs are predictable and therefore a framework vulnerable (by default) to
this attack type.

>> "Nothing is secure"
I "agree" with this confirmation but if we develop a secure frameworks BY
DEFAULT, we will prevent a lot of attacks BY DEFAULT! Security features must
be functionalities offered by frameworks by default and they do not have to
be an option of the final users.
Arthur.

2008/3/4, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>:
>
> As with all thing's you can make them more or less secure. As stated
> before, depending on a level of paranoia nothing are secure!
>
> Mounting a page and making it stateless, and further more making it take
> parameters is one of less safer ones.
>
> If the application is a web one, well use CSRF attacks, use random
> attacks, Bruteforce the site, go to their operator and get inside the
> database. Eventually you will get in, if you cover your tracks.
>
> If the application is a desktop version, deploy a keylogger and a mouse
> recorder, grab their password file. If they cycle passwords, bruteforce
> that too. Might not work with the first 100 users, but in time and
> theory you will get in.
>
> Nothing is secure.
>
> Having an quickstart as a usecase could help developers decide if its
> worth the effort. Whats a reasonable level for security... I guess the
> best one is telling the users to use the browser exclusivly for the bank
> site and be sure to logout before leaving it.
>
> -Nino
>
> Sebastiaan van Erk wrote:
> > Wicket does nothing to protect from CSRF attacks, and it is trivially
> > vulnerable. Sure it's a lot more difficult with the standard
> > ?wicket:interface type URLs than it would be with more predictable
> > URLs, but you can still quite easily guess the URLs, and futhermore,
> > to improve your chances of success you can simply include many images
> > in the attacking page with different values for the URLs, i.e.,
> >
> > img
> > src="
> http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1
> "
> >
> >
> > and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all
> > in one page.
> This is not new, it's been discussed a few messages ago... You still
> need to hijack the users session.
> >
> > Furthermore, most people actually LIKE predictable urls and go to
> > great length to mount pages and make them bookmarkable. There's even a
> > StatelessForm component, which is entirely vulnerable to CSRF.
> >
> > Thus, I'd say that even without a quickstart, it's obvious that Wicket
> > does not offer any CSRF protection out of the box, and that if you
> > want this kind of protection, you will have to do it yourself (which
> > is probably not really difficult; though I think many people are not
> > aware of these kind of attack vectors and don't even think about it,
> > which is why it would be nice if Wicket *could* do it out of the box).
> >
> > I believe that answers the original question, that CSRF protection is
> > *NOT* a security feature offered by Wicket.
> I believe that true in the sense that you can always make your pages
> vulnerable if you want to (also if its unknowingly).
> >
> > Regards,
> > Sebastiaan
> >
> > Nino Saturnino Martinez Vazquez Wael wrote:
> >> While that is true.. It's also true that wicket devs favor stuff
> >> proven with a quickstart, because it becomes easier to make a fix for
> >> something you can see in code..
> >>
> >> So as I've written once before a quickstart should be the way to go
> >> or just use one of the existing applications, phone book or blog
> >> tutorial etc. And make a hack at that...
> >>
> >> regards Nino
> >>
> >> Ned Collyer wrote:
> >>> Nick, I think you would be quite surprised at the level of auditing
> >>> something
> >>> has to pass to be used in a financial system, especially a bank.
> >>> (unless u
> >>> have some dodgy bank)
> >>>
> >>> If something is theoretically possible, then thats as good as
> "proven".
> >>>
> >>> Gotta remember that hackers are a lot smarter in many instances than
> >>> the
> >>> people who wrote the software to keep them out.
> >>>
> >>>
> >>> Nick Heudecker wrote:
> >>>
> >>>> Arthur,
> >>>>
> >>>> Only what you can *prove* matters, not what you think.  Have you
> >>>> created
> >>>> an
> >>>> example application with a CSRF attack?
> >>>>
> >>>>
> >>>
> >>>
> >>
>
> --
> -Wicket for love
> -Jme for fun
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
As with all thing's you can make them more or less secure. As stated 
before, depending on a level of paranoia nothing are secure!

Mounting a page and making it stateless, and further more making it take 
parameters is one of less safer ones.

If the application is a web one, well use CSRF attacks, use random 
attacks, Bruteforce the site, go to their operator and get inside the 
database. Eventually you will get in, if you cover your tracks.

If the application is a desktop version, deploy a keylogger and a mouse 
recorder, grab their password file. If they cycle passwords, bruteforce 
that too. Might not work with the first 100 users, but in time and 
theory you will get in.

Nothing is secure.

Having an quickstart as a usecase could help developers decide if its 
worth the effort. Whats a reasonable level for security... I guess the 
best one is telling the users to use the browser exclusivly for the bank 
site and be sure to logout before leaving it.

-Nino

Sebastiaan van Erk wrote:
> Wicket does nothing to protect from CSRF attacks, and it is trivially 
> vulnerable. Sure it's a lot more difficult with the standard 
> ?wicket:interface type URLs than it would be with more predictable 
> URLs, but you can still quite easily guess the URLs, and futhermore, 
> to improve your chances of success you can simply include many images 
> in the attacking page with different values for the URLs, i.e.,
>
> img 
> src="http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1" 
>
>
> and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all 
> in one page.
This is not new, it's been discussed a few messages ago... You still 
need to hijack the users session.
>
> Furthermore, most people actually LIKE predictable urls and go to 
> great length to mount pages and make them bookmarkable. There's even a 
> StatelessForm component, which is entirely vulnerable to CSRF.
>
> Thus, I'd say that even without a quickstart, it's obvious that Wicket 
> does not offer any CSRF protection out of the box, and that if you 
> want this kind of protection, you will have to do it yourself (which 
> is probably not really difficult; though I think many people are not 
> aware of these kind of attack vectors and don't even think about it, 
> which is why it would be nice if Wicket *could* do it out of the box).
>
> I believe that answers the original question, that CSRF protection is 
> *NOT* a security feature offered by Wicket.
I believe that true in the sense that you can always make your pages 
vulnerable if you want to (also if its unknowingly).
>
> Regards,
> Sebastiaan
>
> Nino Saturnino Martinez Vazquez Wael wrote:
>> While that is true.. It's also true that wicket devs favor stuff 
>> proven with a quickstart, because it becomes easier to make a fix for 
>> something you can see in code..
>>
>> So as I've written once before a quickstart should be the way to go 
>> or just use one of the existing applications, phone book or blog 
>> tutorial etc. And make a hack at that...
>>
>> regards Nino
>>
>> Ned Collyer wrote:
>>> Nick, I think you would be quite surprised at the level of auditing 
>>> something
>>> has to pass to be used in a financial system, especially a bank.  
>>> (unless u
>>> have some dodgy bank)
>>>
>>> If something is theoretically possible, then thats as good as "proven".
>>>
>>> Gotta remember that hackers are a lot smarter in many instances than 
>>> the
>>> people who wrote the software to keep them out.
>>>
>>>
>>> Nick Heudecker wrote:
>>>  
>>>> Arthur,
>>>>
>>>> Only what you can *prove* matters, not what you think.  Have you 
>>>> created
>>>> an
>>>> example application with a CSRF attack?
>>>>
>>>>     
>>>
>>>   
>>

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Sebastiaan van Erk <se...@sebster.com>.
Wicket does nothing to protect from CSRF attacks, and it is trivially 
vulnerable. Sure it's a lot more difficult with the standard 
?wicket:interface type URLs than it would be with more predictable URLs, 
but you can still quite easily guess the URLs, and futhermore, to 
improve your chances of success you can simply include many images in 
the attacking page with different values for the URLs, i.e.,

img 
src="http://thesiteiwannahack.com/?wicket:interface=:11:formToHack::IFormSubmitListener::&myparam1=val1"

and then for page id 11, 12, 13, 14, for 1 to 100 for all I care, all in 
one page.

Furthermore, most people actually LIKE predictable urls and go to great 
length to mount pages and make them bookmarkable. There's even a 
StatelessForm component, which is entirely vulnerable to CSRF.

Thus, I'd say that even without a quickstart, it's obvious that Wicket 
does not offer any CSRF protection out of the box, and that if you want 
this kind of protection, you will have to do it yourself (which is 
probably not really difficult; though I think many people are not aware 
of these kind of attack vectors and don't even think about it, which is 
why it would be nice if Wicket *could* do it out of the box).

I believe that answers the original question, that CSRF protection is 
*NOT* a security feature offered by Wicket.

Regards,
Sebastiaan

Nino Saturnino Martinez Vazquez Wael wrote:
> While that is true.. It's also true that wicket devs favor stuff proven 
> with a quickstart, because it becomes easier to make a fix for something 
> you can see in code..
> 
> So as I've written once before a quickstart should be the way to go or 
> just use one of the existing applications, phone book or blog tutorial 
> etc. And make a hack at that...
> 
> regards Nino
> 
> Ned Collyer wrote:
>> Nick, I think you would be quite surprised at the level of auditing 
>> something
>> has to pass to be used in a financial system, especially a bank.  
>> (unless u
>> have some dodgy bank)
>>
>> If something is theoretically possible, then thats as good as "proven".
>>
>> Gotta remember that hackers are a lot smarter in many instances than the
>> people who wrote the software to keep them out.
>>
>>
>> Nick Heudecker wrote:
>>  
>>> Arthur,
>>>
>>> Only what you can *prove* matters, not what you think.  Have you created
>>> an
>>> example application with a CSRF attack?
>>>
>>>     
>>
>>   
> 

Re: Security Features offered by Wicket

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
While that is true.. It's also true that wicket devs favor stuff proven 
with a quickstart, because it becomes easier to make a fix for something 
you can see in code..

So as I've written once before a quickstart should be the way to go or 
just use one of the existing applications, phone book or blog tutorial 
etc. And make a hack at that...

regards Nino

Ned Collyer wrote:
> Nick, I think you would be quite surprised at the level of auditing something
> has to pass to be used in a financial system, especially a bank.  (unless u
> have some dodgy bank)
>
> If something is theoretically possible, then thats as good as "proven".
>
> Gotta remember that hackers are a lot smarter in many instances than the
> people who wrote the software to keep them out.
>
>
> Nick Heudecker wrote:
>   
>> Arthur,
>>
>> Only what you can *prove* matters, not what you think.  Have you created
>> an
>> example application with a CSRF attack?
>>
>>     
>
>   

-- 
-Wicket for love
-Jme for fun

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Ned Collyer <ne...@gmail.com>.
Nick, I think you would be quite surprised at the level of auditing something
has to pass to be used in a financial system, especially a bank.  (unless u
have some dodgy bank)

If something is theoretically possible, then thats as good as "proven".

Gotta remember that hackers are a lot smarter in many instances than the
people who wrote the software to keep them out.


Nick Heudecker wrote:
> 
> Arthur,
> 
> Only what you can *prove* matters, not what you think.  Have you created
> an
> example application with a CSRF attack?
> 

-- 
View this message in context: http://www.nabble.com/Security-Features-offered-by-Wicket-tp15738864p15824235.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Security Features offered by Wicket

Posted by Nick Heudecker <nh...@gmail.com>.
Arthur,

Only what you can *prove* matters, not what you think.  Have you created an
example application with a CSRF attack?

On Mon, Mar 3, 2008 at 10:42 AM, Arthur Ahiceh <ar...@gmail.com>
wrote:

> Hi igor,
>
> your response demonstrate that Wicket's behaviour is very simple to extend
> and it is that I like from wicket. I think that to prevent CSRF attacks is
> neccessary to add your random parameter to all requests...it was that I
> would like to comment here! To prevent CSRF with a random parameter is
> necessary to extend wicket's behaviour and it isn't an automatically task
> delegated in Wicket framework.
>
> There are people that thinks that CSRF attacks are not possible in Wicket
> applications but I think that wicket's urls are easily created by an
> attacker with a valid values stored in a victim's session and therefore
> attacks are possible by "src" attribute of images. See:
>
> http://en.wikipedia.org/wiki/Cross-site_request_forgery#Example_and_characteristics
>
> Using captchas this problem is resolved but as I said here what I wanted
> was
> that Wicket prevented by default CSRF attacks.
>
> I want to clarify that I like Wicket and what I'm doing is asking and
> helping to secure Wicket...I think that this solutions are not paranoia
> and
> they are necessary in production environments...
>
>  Arthur.
>
>
>
>
>
>
>
>
>
>
>
> 2008/2/29, Igor Vaynberg <ig...@gmail.com>:
> >
> > here are some ideas to much over...
> >
> > class SecureForm extends Form {
> > private String token;
> > protected void onbeforerender() { token=UUID.randomUUID.toString(); }
> > protected void oncomponenttagbody() {
> >     getresponse().write("<input type='hidden' name='token'
> > value='"+token+"'/>");
> >     super.oncomponenttagbody();
> > }
> > public boolean process() {
> >    if (!token.equals(getrequest().getparameter("token")) {
> >        throw new IllegalStateException("token mismatch");
> >    }
> >    return super.process();
> > }
> > }
> >
> > so now you have token validation between http space and session space
> >
> > if you want to take it to the next level
> >
> > class SecureTextField extends TextField {
> > private String secureName;
> >
> > public String getInputName() {
> >     if (secureName==null) {
> >      secureName="a"+UUID.randomUUID().toString().replace("-","");
> >     }
> >     return secureName;
> >   }
> > }
> >
> > and now you have a textfield whose input name is unpredictable
> >
> > there are all kinds of things you can easily do in wicket, just
> > depends on your level of paranoia.
> >
> > -igor
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Feb 29, 2008 at 7:33 AM, Arthur Ahiceh <ar...@gmail.com>
> > wrote:
> > > Hi again,
> > >
> > >  The example that I put here is a typical example when you read
> articles
> > >  about CSRF attacks. It demonstrates that the "attack" request is made
> > by a
> > >  valid user with his credentials (cookies).
> > >
> > >
> > >  >> "This second authentication usually also contains an encrypted
> > version of
> > >  the amount that should be transfered."
> > >  yes! this is random token solution that I have commented. You can add
> a
> > >  random parameter to all requests or to encrypt the values of all the
> > >  noneditable parameters (links, lists, radios, etc.).
> > >
> > >  Therefore, if we did not adopt automatic solutions it is probable
> that
> > most
> > >  of the applications they are vulnerable to this type of attacks. Is
> it
> > not
> > >  better than frameworks like Wicket solves certain vulnerabilities to
> > us?
> > >
> > >  >> CryptedUrlWebRequestCodingStrategy... (William Hoover)
> > >  This strategy as I know is only applied to urls and not to data
> forms!
> > But I
> > >  would like that this point was confirmed by a wicket's developers
> > group.
> > >
> > >  >> public wiki document... (Martin Makundi)
> > >  First, I would like to know Wickets' features better and they
> confirmed
> > me
> > >  if my questions are correct or no...
> > >
> > >  >> CONFIDENTIALITY
> > >
> > > >> It is not possible out of the box afaik but you could either try to
> > >  >> subclass Form or write a filter to intercept and replace form
> values
> > >  >> when wicket sends the response and reverse it when the user
> submits
> > >  >> the form.
> > >
> > >  right, I know that I could do it as HDIV does but I like to know if
> > this
> > >  feature is provided by Wicket framework, I think that it would be
> very
> > >  interesting...what do you think about an automatic solution?
> > >
> > >  Excuse me, I'm french and my english is poorer than I would like.
> > >
> > >  Thanks again four your time! I consider that it is a subject that to
> > all
> > >  interests to us.
> > >
> > >  Arthur.
> > >
> > >
> > >
> > >
> > >  2008/2/29, Maurice Marrink <ma...@gmail.com>:
> > >
> > >
> > > >
> > >  > >  While pages ids have been correlatives, hacker could always
> > construct a
> > >  > >  valid url to generate a CSRF attack. Let's see a typical
> > example...
> > >  > >
> > >  > >  Consider a bank web site that allows its users to make account
> > >  > transfers.
> > >  > >  Once a user has logged in and received an authentication cookie,
> > he
> > >  > needs
> > >  > >  only to request the URL
> > >  > >
> > >  >
> >
> http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::&inputForm4_hf_0&transferTo=123&amount=1000in
> > >  > >  order to transfer $1000 to account number 123. If an attacker
> can
> > >  > >  trick
> > >  > >  an already-authenticated user into visiting a malicious page
> that
> > >  > contains
> > >  > >  an image link like <img src=
> > >  > >
> > >  >
> >
> http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::&inputForm4_hf_0&transferTo=456&amount=1000/
> > >  > >,
> > >  > >  the user's (victim) browser will automatically request that URL,
> > thus
> > >  > making
> > >  > >  an account transfer without the user's knowledge or consent.
> > >  > >
> > >  > >  Once the victim makes a valid transfer, the transfer's values
> are
> > in
> > >  > >  session, so if the attacker generates many images like commented
> > with
> > >  > >  different values in "interface" parameter, he would obtain the
> > >  > objective.
> > >  > >  So, I think that it is necessary to insert a random value to all
> > >  > requests or
> > >  > >  generate confidential values for all parameters of a request.
> What
> > do
> > >  > you
> > >  > >  think?
> > >  >
> > >  > In this case i think the problem would be the app allowing the
> > >  > transfer without requiring additional authentication and not the
> > >  > framework.
> > >  > Fortunately my online bank does require this and thus no amount of
> > >  > links will ever get past the response of "authenticate yourself
> > >  > again".
> > >  > This second authentication usually also contains an encrypted
> version
> > >  > of the amount that should be transfered.
> > >  >
> > >  >
> > >  > >
> > >  > >  3. CONFIDENTIALITY: I have seen in forms that radio's options an
> > >  > checkbox's
> > >  > >  values have no confidential values. Could I put automatically
> all
> > form
> > >  > >  values confidentiality in Wicket? I don't want that the attacker
> > sees
> > >  > the
> > >  > >  original values...
> > >  > >
> > >  > >  Is it possible to apply encrypt strategy to forms?
> > >  >
> > >  > It is not possible out of the box afaik but you could either try to
> > >  > subclass Form or write a filter to intercept and replace form
> values
> > >  > when wicket sends the response and reverse it when the user submits
> > >  > the form.
> > >  >
> > >  >
> > >  > Maurice
> > >  >
> > >  >
> > >  >
> ---------------------------------------------------------------------
> > >  > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > >  > For additional commands, e-mail: users-help@wicket.apache.org
> > >  >
> > >  >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>



-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com