Trust No Program
Reply to topic
tzuk


Joined: 22 Jun 2004
Posts: 15008
Reply with quote
Version 3.81.01 turns on the ASLR bit for SbieDll, for both 32-bit and 64-bit versions of the DLL, and so far I haven't run into any problems with that.

I want to retract what I said earlier:
tzuk wrote:
Nevertheless people seem to be concerned, so I said I wouldn't mind adding ASLR at some point. But it turns out you can't limit ASLR to select a random DLL address in the lower 2GB of the address space. And for various reasons, SbieDll needs to be loaded in the lower 2GB of the address space. So this means that I can turn on the ASLR bit in the 32-bit SbieDll, but not in the 64-bit DLL. For the 64-bit DLL, I would have to rework SbieDll a bit, so it can load in the higher addresses. And test this change.


Turns out Windows ASLR takes that under consideration and if the original base address is in the lower 2GB, which is the case for the 64-bit SbieDll, then ASLR randomizes the address in the lower 2GB of the address space. So that means I really only had to turn on one bit somewhere and ASLR takes care of everything else. I apologize for not looking into this earlier, I just assumed the randomization would not care about low-2GB DLLs.

(I removed some contentious posts in this topic, in the interest of a smooth sailing. I hope no one minds.)

_________________
tzuk
View user's profileSend private message
Buster


Joined: 06 Aug 2007
Posts: 2185
Reply with quote
tzuk wrote:
(I removed some contentious posts in this topic, in the interest of a smooth sailing. I hope no one minds.)


Finally I will be able to sleep quietly at nights! <g>
View user's profileSend private message
D1G1T@L


Joined: 17 Apr 2011
Posts: 577
Location: DefaultBox
Reply with quote
They were all mine Razz, but I'm ok as long as Buster can finally have some rest Smile

_________________
One Program to rule them all, One Program to confine them, One Program to wrest them all and in the sandbox bind them.
View user's profileSend private message
D1G1T@L


Joined: 17 Apr 2011
Posts: 577
Location: DefaultBox
Reply with quote
Accoring to a bloke at Wilders ASLR doesn't seem to be enabled by Sandboxie (latest ver): http://www.wilderssecurity.com/showpost.php?p=2079647&postcount=3

Thought I'd let you know just in case something isn't working well.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15008
Reply with quote
Silly me. I enabled the bit once during testing, but forgot to update the build sequence accordingly. Embarassed Version 3.81.02 should fix that.
View user's profileSend private message
Max100


Joined: 20 Oct 2009
Posts: 159
Reply with quote
SbieCtrl.exe doesn't have aslr support, maybe because it is merely a gui component?
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15008
Reply with quote
It's becausee I only enabled ASLR for the DLL. Chances are that I can turn ASLR for all the EXEs in the distribution with no negative side effects. I'll test and might enable it in beta version .03.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15008
Reply with quote
In version 3.81.03, I enabled ASLR on all the EXEs in Sandboxie. I see that Process Explorer says ASLR is enabled for the process, but it doesn't look like Windows is really randomizing the load address for the primary module, i.e. the EXE itself.
View user's profileSend private message
Max100


Joined: 20 Oct 2009
Posts: 159
Reply with quote
tzuk wrote:
I see that Process Explorer says ASLR is enabled for the process, but it doesn't look like Windows is really randomizing the load address for the primary module, i.e. the EXE itself.


Mmmh, I could be wrong, but there are interesting answers here:
http://stackoverflow.com/a/6396484
http://blogs.msdn.com/b/vcblog/archive/2009/05/21/dynamicbase-and-nxcompat.aspx
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15008
Reply with quote
Thanks for the links Max100. The problem is that I had relocation data removed from the final EXE. Without this data, Windows doesn't know how to load an EXE to an address other than the address specified in the EXE as the default address. Having relocation data in executables (both EXE and DLLs) is a requirement for ASLR.
View user's profileSend private message
[.01] ASLR support for Sandboxie?
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 2 of 2  

Use the RSS feed to watch this topic for replies
  
  
 Reply to topic  

Sandboxie is Copyright © 2004-2012 by Sandboxie Holdings LLC.  All rights reserved.
Sandboxie.com | Contact Author
This site has been viewed 208,711,185 times since June 2004