|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: State of Digibug module
Bharat Mediratta wrote: Tim Almdal wrote: ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug module
Further to: Don't know about you, but, if i try http://example.com/gallery3/print_photo/35
I get a forbidden exception and if I go put the csrf value on, I end up
redirecting to the digibug shopping cart, but no link to the full size
is exposed. Maybe, I'm a little dense tonight, but I'm not sure where
the security concern is.
Tim Almdal wrote:
------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleTim Almdal wrote:
> Further to: Don't know about you, but, if i try > http://example.com/gallery3/print_photo/35 I get a forbidden exception > and if I go put the csrf value on, I end up redirecting to the digibug > shopping cart, but no link to the full size is exposed. Maybe, I'm a > little dense tonight, but I'm not sure where the security concern is. You're sending a <form> back to the browser, then telling it to submit the form. But the form has the print_proxy url in it! So try intercepting the form. You can do this by snooping network traffic, modifying your local dns entry for digibug.com, disabling Javascript, using Firebug, curl, wget, or lots of other ways. When I do this, I see: form action="http://www.digibug.com/dapi/order.php" method="post"> <input type="hidden" name="digibug_api_version" value="100" /> ... <input type="hidden" name="image_1" value="http://example.com/index.php/digibug/print_proxy/73db0f04da7cdf319c68ee11c5526a54" /> </form> Now I've got the url to a full size image for which I have no permissions to see. :-( I'm doing a pass over the Digibug module now and will fix this up along with some other stuff (the XSS wasn't fully closed, I'm going to simplify the UI, etc). -Bharat ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleClosure: I've finished making updates to Digibug and have enforced security. Tim and I are now disagreeing about the functionality of the print module. Tim's point is that you should be able to print photos without letting the user see the full size. My point is that we should not have a module that subverts our view_full permission. Current state of the world is that Tim is going to try to figure out a way to get the functionality we want without sacrificing security. -Bharat Bharat Mediratta wrote: > Tim Almdal wrote: >> Further to: Don't know about you, but, if i try >> http://example.com/gallery3/print_photo/35 I get a forbidden exception >> and if I go put the csrf value on, I end up redirecting to the digibug >> shopping cart, but no link to the full size is exposed. Maybe, I'm a >> little dense tonight, but I'm not sure where the security concern is. > > You're sending a <form> back to the browser, then telling it to submit > the form. But the form has the print_proxy url in it! So try > intercepting the form. You can do this by snooping network traffic, > modifying your local dns entry for digibug.com, disabling Javascript, > using Firebug, curl, wget, or lots of other ways. When I do this, I see: > > form action="http://www.digibug.com/dapi/order.php" method="post"> > <input type="hidden" name="digibug_api_version" value="100" /> > ... > <input type="hidden" name="image_1" > value="http://example.com/index.php/digibug/print_proxy/73db0f04da7cdf319c68ee11c5526a54" > /> > </form> > > Now I've got the url to a full size image for which I have no > permissions to see. :-( > > I'm doing a pass over the Digibug module now and will fix this up along > with some other stuff (the XSS wasn't fully closed, I'm going to > simplify the UI, etc). > > -Bharat > > ------------------------------------------------------------------------------ > __[ g a l l e r y - d e v e l ]_________________________ > > [ list info/archive --> http://gallery.sf.net/lists.php ] > [ gallery info/FAQ/download --> http://gallery.sf.net ] > ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleJust an idea for this. Can a random string or something unique to the server for that image be added to this URL.
That way the full image URL can be passed to a certain function, however a users/system cannot "guess" any other URLs of other images. The only way you can subvert the full permission of an image is by knowing basically the URL plus the 'key' to that individual image. So the url would be something similar to: http://example.com/gallery3/print_photo/35/12390239bbf32f And the random keys would not be sequential or guessable.
|
|
|
Re: State of Digibug moduleChris F-2 wrote:
> Just an idea for this. Can a random string or something unique to the server > for that image be added to this URL. > > That way the full image URL can be passed to a certain function, however a > users/system cannot "guess" any other URLs of other images. > > The only way you can subvert the full permission of an image is by knowing > basically the URL plus the 'key' to that individual image. > > So the url would be something similar to: > > http://example.com/gallery3/print_photo/35/12390239bbf32f > > And the random keys would not be sequential or guessable. Are you suggesting a shared-secret solution? That only works if you share a secret with Digibug such that only your Gallery3 and Digibug have a copy of the secret. Currently, Digibug doesn't offer that type of solution. Each Gallery 3 install has its own unique key we could use for this purpose, but Digibug would have to implement something on their sude to support it. ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleI wasn't thinking of that complex. Just a key that's unique to that image of that installation.
So for example: key = md5(imageid + galleryuniqueid) In this situation, the full image is still exposed, but it'll be only for that single image, not allow access to other full images. It'll still fail your requirements, but it'll be limited to 1 image and not potentially others. That means the url will be: http://example.com/gallery3/print_photo/35/12390239bbf32f http://example.com/gallery3/print_photo/36/534313901bfb1 http://example.com/gallery3/print_photo/37/1239bab9321vb and not: http://example.com/gallery3/print_photo/35 http://example.com/gallery3/print_photo/36 http://example.com/gallery3/print_photo/37 With the latter being guessable by a user. Chris
|
|
|
Re: State of Digibug moduleChris F-2 wrote:
> key = md5(imageid + galleryuniqueid) ... > That means the url will be: > > http://example.com/gallery3/print_photo/35/12390239bbf32f > http://example.com/gallery3/print_photo/36/534313901bfb1 > http://example.com/gallery3/print_photo/37/1239bab9321vb ... I see. The problem is that the "print" button has to provide a link to this url, so each of these urls will be on display. This means that while I can't just put in arbitrary ids to grab your full size images, I can just write a crawler to find these urls and then escalate each of them into a full size url. The end result is the same, as far as I can tell-- I'll be able to circumvent permissions and grab your full size images. -Bharat ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleAh sorry, i thought this URL was passed behind the scenes and not public.
Scratch that idea then sorry.
|
|
|
Re: State of Digibug moduleI've been following this thread with great interest. What was the
G3-protocol-breaking method that you had in mind to get around this problem? I can't see how you can reliably pass a private url (or, equivalently, the image data itself) to digibug without either: A shared secret with Digibug to verify the callback, or less convenient but perhaps equivalently checking/verifying the IP address from which Digibug tries to download the image data OR - A direct G3-server to Digibug protocol, i.e. not passing the url via a hidden field in a form in the user's browser. -A ----- Original Message ----- From: "Bharat Mediratta" <bharat@...> To: "Chris F-2" <lists@...> Cc: <gallery-devel@...> Sent: Monday, June 29, 2009 5:02 AM Subject: Re: [Gallery-devel] State of Digibug module Chris F-2 wrote: > key = md5(imageid + galleryuniqueid) ... > That means the url will be: > > http://example.com/gallery3/print_photo/35/12390239bbf32f > http://example.com/gallery3/print_photo/36/534313901bfb1 > http://example.com/gallery3/print_photo/37/1239bab9321vb ... I see. The problem is that the "print" button has to provide a link to this url, so each of these urls will be on display. This means that while I can't just put in arbitrary ids to grab your full size images, I can just write a crawler to find these urls and then escalate each of them into a full size url. The end result is the same, as far as I can tell-- I'll be able to circumvent permissions and grab your full size images. -Bharat ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
|
|
Re: State of Digibug moduleAlec Myers wrote:
> I've been following this thread with great interest. What was the > G3-protocol-breaking method that you had in mind to get around this problem? > I can't see how you can reliably pass a private url (or, equivalently, the > image data itself) to digibug without either: > > A shared secret with Digibug to verify the callback, or less convenient but > perhaps equivalently checking/verifying the IP address from which Digibug > tries to download the image data > > OR - > > A direct G3-server to Digibug protocol, i.e. not passing the url via a > hidden field in a form in the user's browser. We took the server<->server approach in G2 and while it worked, I never really trusted it. We had to write a lot of code on the backend to make it robust, and then deliver the results to the user, etc. We can sign it with a shared secret, but there's a logistical issue which would require us to have something on the digibug side. We could use a trusted 3rd party (eg: gallery.menalto.com) to do our shared-secret encryption such that GMC proxies the request over to the print service (not a fully baked idea). This puts GMC in the critical path, though which is not a great idea (and privacy users will be up in arms). IP locking might be the easiest approach. We have Digibug give us their set of legal IPs and burn it into G3 as a setting and only allow print_proxy to receive requests from those urls. It's easy, and reasonably hard to spoof. If the IPs change, we can put out a new release. -Bharat ------------------------------------------------------------------------------ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
| Free embeddable forum powered by Nabble | Forum Help |