![]() |
| Compressing in a sandbox with 7-Zip |
|
Guest10
|
I previously posted this reply, and then withdrew it. My tests while using this were successful, and then after I posted the message, I had one test that failed, with a different error message from 7-Zip - and I couldn't figure out what that problem was. Subsequent tests have worked, so I'm re-posting this if you want to try it for yourself:
----------- When you try to zip files that are in a sandbox folder, 7-Zip will run sandboxed, and therefore will run under Sandboxie's control. The sandboxed 7-Zip needs access to a resource that Sandboxie blocks, unless you specifically allow access to that resource. To allow that access, you will need to add an exclusion to the Sandbox Settings of each sandbox in which you want to use 7-Zip, to zip the files. Sandbox Settings > Resource Access > IPC Access > Direct Access In "The list above applies to:" box, type 7zg.exe Do not press Enter, but click on the "Edit/Add" button. Put in the box: *\BaseNamedObjects*\7zCompressMapping* and click OK. Then click on "Apply", not OK, because you should also add '7zg.exe' to the list of Lingering Programs while you are in Sandbox Settings: Program Stop > Lingering Programs > "Add by Name" 7zg.exe and click OK until the Sandbox Settings window closes. The Lingering Programs setting will cause the sandboxed process '7zg.exe' to end, when it is finished with the zip operation. Otherwise, you would have to manually 'Terminate' the program. [Edited to add some wild cards to the exclusion - in case they may be needed by someone using Vista] |
||||||||||||
|
Last edited by Guest10 on Fri Mar 20, 2009 12:28 pm; edited 1 time in total _________________ Paul XP Pro SP3 (Admin rights), Zone Alarm Pro Firewall, Malwarebytes Pro, Firefox 21, Thunderbird 17 |
|||||||||||||
|
schmenge35
|
Thank you very much ,Working now! :D Thanks again
|
||||||||||||
|
|
|||||||||||||
| Compressing a file inside sandboxie |
|
Mattchu
|
Hello all, i`m quite new to sandboxie and was just wondering something. When downloading stuff(possible malware) inside a sandbox and it is then found to be malicious how do you guys go about compressing the executable to a .ZIP file?
I tryed to do it with 7-zip but was unable to, kept getting an error. Just wondered because to submit said files they need to be compressed/password protected and i wouldn`t like to let them out of the box just to compress them. With a VM you don`t have this issue, but like i said sandboxie and it`s workings are new to me. Many thanks for any suggestions |
||||||||||||
|
|
|||||||||||||
|
Guest10
|
Is it the "Cannot open mapping" error, in 7-Zip?
Since the file is in a sandbox folder, compressing it with 7-Zip will run 7-Zip sandboxed. Sandboxie needs to be told to allow one of 7-Zip's resources. If you want to add a local template to your Sandboxie configuration, it should allow sandboxed 7-Zip to work in the sandbox you choose. Open Sandboxie Control's window (the tray icon), then choose any sandbox you may have from the "Sandbox" menu, then: Sandbox Settings > Applications > Local > Create New then paste in a copy of the template (in the code box, below). Click OK, twice. Then for each sandbox where you want to allow this template: (sandbox) > Sandbox Settings > Applications > Local Select the 7-Zip entry on the right side, then click Add and then OK. ---- This has been tested from within Windows Explorer, by right-clicking the file and choosing 7-Zip > Add to Archive. The compressed file will be created in the same folder as the original file. It used to be necessary for me to add 7zG.exe to my list of Lingering Programs, but for some reason I no longer have to. It's still listed in the local template's comment line, though.
|
||||||||||||||
|
|
|||||||||||||||
|
Mattchu
|
Thanks for answering Guest10, i did what you recomended but am still getting "Can not open mapping" window when i try to compress a file with 7-zip.
This is on windows 7 RC allthough i don`t no if that would make a differance. Also i do not have the "Run as UAC Administrator" ticked, i tried that but still no joy. Tried addiing the 7zg.exe to Sandbox/Default box/Sandbox settings/Program Stop/Lingering programs as well, still no joy. Any other ideas, suggestions, things i could try? Cheers It`s allright now, i`ve sussed what you need to do(run explorer sanboxed to compress |
||||||||||||
|
|
|||||||||||||
|
tzuk
|
Guest10 should I your 7-Zip configuration to my Templates.ini ?
|
||||||||||||
|
_________________ tzuk |
|||||||||||||
|
Guest10
|
I'm a little confused now though, since Mattchu said that he had to compress the file using a sandboxed Windows Explorer. On XP, I just use an unsandboxed Windows Explorer and right-click the file in the sandbox. Then after selecting 7-Zip's 'Add to Archive', 7-Zip runs sandboxed without any problems - if the template has been applied to that sandbox. I can't test it on Win 7. I've given this same tip before, and it worked for that user. |
||||||||||||||
|
|
|||||||||||||||
|
tzuk
|
OK, maybe I will look into this then.
|
||||||||||||
|
|
|||||||||||||
|
Mattchu
|
Sorry this was my mistake/misunderstanding of how sandboxie works. I removed the configuration you recomended and when running explorer sandboxed am still able to compress things in the sandboxie folder.
If i try and do it without and just having your code in place i still get the "Can not open mapping" message. Will try on xp later on and will let you know the results, it`s most likely a 7 issue. It did a resource access monitor and came back with these results after doing it twice. Maybe they can help. snipped. --tzuk |
||||||||||||
|
|
|||||||||||||
|
Guest10
|
Try adding this line to the local template:
OpenIpcPath=*\BaseNamedObjects*\7zMap* You will need to use: Configure > Edit Configuration to edit the local template, and add that line. or you could use: (sandbox) > Sandbox Settings > Applications > Local Select the template from the list on the right, and then click"Remove" and then OK. After you "Remove" the template from all sandboxes where it is applied, then Sandboxie will ask if you want to delete the template itself. If you answer yes, then the old template will be removed from your configuration file. You would then need to use "Create New" to add the revised template, below, to the configuration file. If you use the second method, don't forget to Add this template in (sandbox) > Sandbox Settings > Applications > Local for the sandbox(es) where you will be using it. ---------------------------------- It should look like this:
|
||||||||||||||
|
Last edited by Guest10 on Sat Oct 17, 2009 4:15 pm; edited 1 time in total |
|||||||||||||||
|
Mattchu
|
Champion Guest10, that did the trick, nice 1.
I had a feeling it was something to do with \BasedNamedObjects\7zMap..... as that was the only one with an X next to it. Once again thanks and i think i may well be purchasing this product very soon. Have a good day |
||||||||||||
|
|
|||||||||||||
| Problem with mapping with 7z |
|
nijiko
|
When you are in Sandboxie's folder, not running Explorer in sandbox.
Right click to use 7z, you will receive 7z's warning, "can not open mapping", and 7z exit, can not use 7z. |
||||||||||||
|
|
|||||||||||||
|
Guest10
|
Here's a local template that you can use:
Open Sandboxie Control's window (the tray icon), then choose any sandbox you may have from the "Sandbox" menu, then: Sandbox Settings > Applications > Local > Create New then paste in a copy of the template (in the code box, above). Click OK, twice. Then for each sandbox where you want to allow this template: (sandbox) > Sandbox Settings > Applications > Local Select the 7-Zip entry on the right side, then click Add and then OK. |
||||||||||||||
|
|
|||||||||||||||
|
nijiko
|
Well, it works.
Is there any other spec. programs's settings like this? I just think to solve all these kinds of problems, not until I have error on them. Thank you. |
||||||||||||
|
|
|||||||||||||
| Compressing in a sandbox with 7-Zip |
|
||
|


Use the RSS feed to watch this topic for replies