Working With Sanbox

Marco Ramilli
Date
29 September 2009
Read
Share

Yesterday I was trying some modified virus versions on my MAC while I discovered that I was loosing the virus control. It was like Panic ! Fortunately I recovered my system but how to follow my tests ? Installing a new OS X system on a virtual machine seems to o much time consuming, moreover I don't have any OS X iso around my office. So I decided to use Sandboxes ! I looked around for a while before figure out that on every OS X (>10.5) there is an already installed sandbox: :"SandBox-exec".

From wikpedia for people not familiar with sandbox:

Sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers and untrusted users.
The sandbox typically provides a tightly-controlled set of resources for guest programs to run in, such as scratch space on disk and memory. Network access, the ability to inspect the host system or read from input devices are usually disallowed or heavily restricted. In this sense, sandboxes are a specific example of virtualization.

How does it work ?
Well it's pretty easy. First of all take a look into /usr/share/snadbox/ for a complete list of configuration commands. After that try to build your own configuration file, here a very simple "Deny All network Connections"

(version 1)
(allow default)
(deny network*)

Here the screenshot of a ping used without sandbox-exec and within sandbox-exec (click on the picture to enlarge) :

I totally suggest this approach to test unknown files or suspected files, even if made from your hand.

Marco Ramilli
Date
29 September 2009
Read
Share
← Go back
Latest Posts

i-SOON Data Leak: Key Points

Introduction i-SOON (上海安洵), a prominent contractor for various Chinese government agencies such […]

Date
26.02.2024
Duration
5 min
Text
Marco Ramilli

X Gold Badges: a new proliferating market

When I saw a threat actor hijacking the X account of Google's […]

Date
08.01.2024
Duration
5 min
Text
Marco Ramilli

Technical Data Sheet: LOCKBIT 3.0

LOCKBIT 3.0 is a notorious Ransomware Group that was first identified on […]

Date
20.12.2023
Duration
5 min
Text
Marco Ramilli
1 2 3 236
Back to Top
magnifier