2019-09-03 09:27:10 +00:00
# Malware analysis about unknown Israel APT campaign
## Table of Contents
* [Malware analysis ](#Malware-analysis )
+ [Initial vector ](#Initial-vector )
2019-09-04 00:55:56 +00:00
+ [Loader ](#loader )
2019-09-03 20:36:27 +00:00
+ [JS Backdoor ](#Backdoor )
2019-09-03 09:27:10 +00:00
* [Cyber Threat Intel ](#Cyber-Threat-Intel )
* [Indicators Of Compromise (IOC) ](#IOC )
* [References MITRE ATT&CK Matrix ](#Ref-MITRE-ATTACK )
* [Links ](#Links )
+ [Original Tweet ](#Original-Tweet )
+ [Link Anyrun ](#Links-Anyrun )
+ [Documents ](#Documents )
## Malware analysis <a name="Malware-analysis"></a>
### Initial vector <a name="Initial-vector"></a>
2019-09-03 20:36:27 +00:00
###### The initial vector use an SFX executable, who drop a lnk file for the persistence, a vbs file and the docx file for decoys the victim.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/strings.png "" )
###### We can also note the multiples possiblities for push the persisitence and options.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/lnkfile.png "" )
###### This execute the vbs file for push the persistence in the startup menu, hide it in changing these atributes and launch the persistence (lnk file)
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/VBScode.png "" )
###### This download the VB script and execute it by mshta call.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/lnk.PNG "" )
###### On the VB code, we can observed that use BITS fonctionality for download by a job the JS script to execute on the victim. Secondly, this check the architecture of the system and execute the correct path of wscript and push the windows out the screen.
2019-09-04 00:55:56 +00:00
### Loader <a name="loader"></a>
2019-09-03 22:45:29 +00:00
###### We can see that use function for decode the commands with a array of bytes.
2019-09-03 20:36:27 +00:00
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/encodeJS.png "" )
###### For decode the string , we use the next function used by the backdoor for decode the commands.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/decodeJS.png "" )
###### You can now change the encoded commands.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/decStr.png "" )
2019-09-03 22:45:29 +00:00
###### Once the encoded strings removed, we have the following code :
2019-09-03 20:36:27 +00:00
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/lay1dec.png "" )
2019-09-03 22:45:29 +00:00
As anti-forensic method, a method which can know if determiner if a debugger is present.
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/zoomdebug.PNG "" )
###### Finally, we can observe a Wscript execution with a function splter which split for get a array of byte, convert to ASCII and after execute the script with execute call.
2019-09-04 00:55:56 +00:00
### JS Backdoor <a name="Backdoor"></a>
###### By the following PowerShell script, we can get the second layer that is the JS Backdoor.
2019-09-03 22:45:29 +00:00
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/layer2.png "" )
2019-09-04 00:55:56 +00:00
###### Firstly,
`C4BA3647<|>USER-PC<|>admin<|>Microsoft Windows 7 Professional <|>plus<|>nan-av<|>` (Here from the Anyrun sandbox)
###### We can note that the USB spread option isn't used on this sample.The structure of the reply to the C2 is the next :
`[volumeserialnumber]<|>[computername]<|>[username]<|>plus<|>[AV product (yes -> name or no ->nan-av)]<|>[usbspreading option (= "")]<|>`
###### We can resume the list of commands of the backdoor :
|Command|Description|
| :---------------: |:-------------|
|execute| execute a command DOS/Powershell|
|send|Download a file to execute|
|site-send|Function don't exist but have the same arg that send command, seems be edited function of site-send and not deleted ?|
|recv|Read a file, put in a buffer and send to the C2|
|enum-driver|Send the list of drives to the C2|
|enum-faf|Get list of the folders, files and attributes and send it to the C2|
|enum-process|Get list of the process (name, id, path of the executable) and send it on the C2|
|delete|Function don't exist but by the params seems give to the attacker to delete folders or files|
|exit-process|Kill the backdoor process but can't remove the persistence, an "execute" command must be performed before for delete it in the registry|
2019-09-03 09:27:10 +00:00
### Cyber kill chain <a name="Cyber-kill-chain"></a>
###### The process graph resume the cyber kill chain used by the attacker.
2019-09-03 22:45:29 +00:00
![alt text ](https://raw.githubusercontent.com/StrangerealIntel/CyberThreatIntel/master/Israel/APT/Unknown/26-08-19/Images/cyber.PNG "" )
2019-09-04 00:55:56 +00:00
2019-09-03 09:27:10 +00:00
### Cyber Threat Intel <a name="Cyber-Threat-Intel"></a>
## References MITRE ATT&CK Matrix <a name="Ref-MITRE-ATTACK"></a>
###### List of all the references with MITRE ATT&CK Matrix
|Enterprise tactics|Technics used|Ref URL|
| :---------------: |:-------------| :------------- |
||||
||||
||||
## Indicators Of Compromise (IOC) <a name="IOC"></a>
###### List of all the Indicators Of Compromise (IOC)
| Indicator | Description|
| ------------- |:-------------:|
|||
||Domain requested|
||IP requested|
||HTTP/HTTPS requests||
||IP C2|
||Domain C2|
## Links <a name="Links"></a>
###### Original tweet: [https://twitter.com/Timele9527/status/1166188375109296128](https://twitter.com/Timele9527/status/1166188375109296128) <a name="Original-Tweet"></a>
###### Links Anyrun: <a name="Links-Anyrun"></a>
* [فضيحة جديدة لأحد قيادات حماس.zip (A new scandal of one of the leaders of Hamas.zip) ](https://app.any.run/tasks/59ed8062-cf77-4d73-81bd-19cb26b7c7c6/ )
###### Documents: <a name="Documents"></a>
* [link]()