@@ -1101,26 +1101,6 @@ Here we can view the all process of encoding/decoding in powershell console
11011101
11021102---
11031103
1104- <br />
1105-
1106- [ detecting the sandbox environment. ] Most sandbox's are using hostnames like Sandbox,
1107- Maltest, Malware, malsand, ClonePC. With simple tricks like hostname, mac address or
1108- process detection, malware can detect if its working in an sandbox environment.
1109- Sandbox evasion capabilities allow malware to stay undetected during sandbox analysis.
1110-
1111- the next powershell script checks if we are running in a sandbox environment by
1112- extracting target hostname and compare it with knonw sandbox's hostnames.
1113-
1114- <br />
1115-
1116- $h=hostname;if ($h -match "Sandbox" -Or $h -match "Maltest" -Or $h -match "Malware" -Or $h -match "ClonePC") {write-Host "";write-Host "SandBox detected .." -ForeGroundColor red;write-Host "Hostname: $h" -ForeGroundColor red;}else{write-Host "";write-Host "SandBox not detected .." -ForeGroundColor green;write-Host "Hostname: $h" -ForeGroundColor green;powershell Get-Date;Start-Sleep 3}
1117-
1118- ![ enigma0x3 - AMSI Bypass] ( http://i.cubeupload.com/lisJ35.png )
1119-
1120- [ sandbox-detection.ps1 demo script can be found here:] ( https://pastebin.com/qhgDvcrF ) <br />
1121-
1122- ---
1123-
11241104<br />
11251105
11261106- ** AMSI** .COM Object DLL hijacking [ enigma0x3 ]
@@ -1288,14 +1268,47 @@ there is a tool [AVSignSeek](https://github.com/hegusung/AVSignSeek) that can he
12881268
12891269## Bypass the scan engine (sandbox)
12901270
1271+ <br />
1272+
1273+ [ detecting the sandbox environment. ] Most sandbox's are using hostnames like Sandbox,
1274+ Maltest, Malware, malsand, ClonePC. With simple tricks like hostname, mac address or
1275+ process detection, malware can detect if its working in an sandbox environment.
1276+ Sandbox evasion capabilities allow malware to stay undetected during sandbox analysis.
1277+
1278+ the next powershell script checks if we are running in a sandbox environment by
1279+ extracting target hostname and compare it with knonw sandbox's hostnames.
1280+
1281+ <br />
1282+
1283+ $h=hostname;if ($h -match "Sandbox" -Or $h -match "Maltest" -Or $h -match "Malware" -Or $h -match "ClonePC") {write-Host "";write-Host "SandBox detected .." -ForeGroundColor red;write-Host "Hostname: $h" -ForeGroundColor red;}else{write-Host "";write-Host "SandBox not detected .." -ForeGroundColor green;write-Host "Hostname: $h" -ForeGroundColor green;powershell Get-Date;Start-Sleep 3}
1284+
1285+ ![ enigma0x3 - AMSI Bypass] ( http://i.cubeupload.com/lisJ35.png )
1286+
1287+ [ sandbox-detection.ps1 demo script can be found here:] ( https://pastebin.com/qhgDvcrF ) <br />
1288+
1289+ The next example uses 'stalling+Onset delay' technics to bypass the sandbox environment.
1290+
1291+ Onset delay: Malware will delay execution to avoid analysis by the sample.
1292+ For example, a external Ping can be perform during a pre-defined time.
1293+
1294+ Stalling code: This technique is used for delaying execution of the real malicious code.
1295+ Stalling code is typically executed before any malicious behavior. The attacker’s aim is
1296+ to delay the execution of the malicious activity long enough so that an automated dynamic
1297+ analysis system fails to extract the interesting malicious behavior.
1298+
1299+ <br />
1300+
1301+ $h=hostname;if ($h -match "Sandbox" -Or $h -match "Maltest" -Or $h -match "Malware" -Or $h -match "ClonePC") {write-Host "";write-Host "SandBox detected .." -ForeGroundColor red;write-Host "Hostname: $h" -ForeGroundColor red;ping -n 6 -w 100 www.microsoft.com;echo Microsoft > %tmp%\\License.pem;ping -n 3 -w 100 www.microsoft.org;powershell Get-Date;Start-Sleep 3}else{write-Host "";write-Host "SandBox not detected .." -ForeGroundColor green;write-Host "Hostname: $h" -ForeGroundColor green;powershell Get-Date;Start-Sleep 3}
1302+
1303+ ---
1304+
12911305 This next technic writes a file to disk before executing shellcode into target ram ..
12921306 'Template taken from Avet anti-virus evasion tool presented in blackhat 2017'.
12931307
1294- ---
1308+ < br />
12951309
12961310![ avet bypass] ( http://i67.tinypic.com/2chpeed.png )
12971311
1298- ---
12991312
13001313<br />
13011314
0 commit comments