- Mar 23, 2015
- 555
Several weeks ago, I asked a question in my profile status:
Here are some (not all) replies to that profile status:
@Klipsh
@hjlbx
@DracusNarcrym
In my own reply to that profile status, I said that I would do some tests by myself. However, at that time I only had some malware samples which inject the memory of other processes with the technique called "Process Hollowing". By contrast, I hope to do some tests with malware samples that directly injects into other processes instead of using the technique "Process Hollowing". Following is an introduction of "Process Hollowing" written by @itman (thanks ) in wilderssecurity:
Recently I got eight malware samples that will directly inject into Explorer.exe. So I can continue my tests. I test them in WinXP running in a virtual machine. The latest version of Sandboxie Free is used in the tests. I also use Outpost Firewall Pro (OFP) to monitor the activities of the malware samples.
In my tests, I found that, when the malware samples launched directly (not in the sandbox), ofp alerts that those samples trying to manipulate the memory of Explorer.exe. By contrast, when those samples launched inside the default sandbox of Sandboxie (with default settings), there is no such alert, and the samples simply collapse. So I think these eight malware sample, when they are launched inside the sandbox, fail to inject into Explorer.exe, which runs outside of Sandbox.
I also test some malware samples that use the technique of Process Hollowing. When these samples launched inside the sandbox, their target processes, such as svchost.exe, will first be launched inside sandbox, then the malwares can successfully inject into the target processes. However, in my tests, since the target system processes also run in the sandbox (this is because their parent processes are sandboxed), they cannot influence the files not in the sandbox.
Please note that the malware samples in my tests are quite few, so I am afraid that we cannot draw a conclusion that generally holds. I would appreciate it if anyone could introduce more theories on this topic or post more test results.
-------------------------------------------------------------------------------------------------------------------
P.S. The reason why I post this thread in the forum of "General Security Discussions" rather than the forum of "Sandboxie" (SBIE) is because here I do not focus on specific features or settings of Sandboxie. The reason why I choose SBIE rather than the Auto-Sandbox of Comodo to do the tests here is only because I need a HIPS to tell me whether the memory injection is carried out, but malwares running inside the auto-sandbox of Comodo will not trigger HIPS alerts, which is inconvenient for the tests here.
The link to that status: Online_SwordCould a malware running inside the sandbox attack the memory of a process running out of the sandbox?
Here are some (not all) replies to that profile status:
@Klipsh
Of course, sandbox evasion is not a myth.
@hjlbx
This is how some CVEs work. So possible, yes. Somewhere in OS and all other softs there lies undiscovered vulnerabilities of all types. COMODO functionality address this sort of thing, but technical infos hard to come by...
@DracusNarcrym
Ah, I see. In that case it would be preferred that the sandbox terminate any executable that attempts to perform operations such as injecting code in running process images - since the whole "clone process" deal is not possible.
In my own reply to that profile status, I said that I would do some tests by myself. However, at that time I only had some malware samples which inject the memory of other processes with the technique called "Process Hollowing". By contrast, I hope to do some tests with malware samples that directly injects into other processes instead of using the technique "Process Hollowing". Following is an introduction of "Process Hollowing" written by @itman (thanks ) in wilderssecurity:
"Classic" process hollowing takes the form of the malware starting a legit process in a suspended state. This is usually a system process with high privileges such as svchost.exe. The malware will then "carve out" a memory area in the legit process and injection malicious code into that area. It then readjusts run info in areas like the PEB etc. and then starts the suspended processes.
Recently I got eight malware samples that will directly inject into Explorer.exe. So I can continue my tests. I test them in WinXP running in a virtual machine. The latest version of Sandboxie Free is used in the tests. I also use Outpost Firewall Pro (OFP) to monitor the activities of the malware samples.
In my tests, I found that, when the malware samples launched directly (not in the sandbox), ofp alerts that those samples trying to manipulate the memory of Explorer.exe. By contrast, when those samples launched inside the default sandbox of Sandboxie (with default settings), there is no such alert, and the samples simply collapse. So I think these eight malware sample, when they are launched inside the sandbox, fail to inject into Explorer.exe, which runs outside of Sandbox.
I also test some malware samples that use the technique of Process Hollowing. When these samples launched inside the sandbox, their target processes, such as svchost.exe, will first be launched inside sandbox, then the malwares can successfully inject into the target processes. However, in my tests, since the target system processes also run in the sandbox (this is because their parent processes are sandboxed), they cannot influence the files not in the sandbox.
Please note that the malware samples in my tests are quite few, so I am afraid that we cannot draw a conclusion that generally holds. I would appreciate it if anyone could introduce more theories on this topic or post more test results.
-------------------------------------------------------------------------------------------------------------------
P.S. The reason why I post this thread in the forum of "General Security Discussions" rather than the forum of "Sandboxie" (SBIE) is because here I do not focus on specific features or settings of Sandboxie. The reason why I choose SBIE rather than the Auto-Sandbox of Comodo to do the tests here is only because I need a HIPS to tell me whether the memory injection is carried out, but malwares running inside the auto-sandbox of Comodo will not trigger HIPS alerts, which is inconvenient for the tests here.
Last edited: