Singles' Day "benefits" of porn sites: Encrypted hanging horses play hooligan promotion

Conclusion:
The attacker has a good understanding of the relevant encryption algorithms, and chose the rare Rabbit symmetric encryption algorithm; the attacker has a certain front-end development experience, the code has strong fault tolerance and high compatibility; the background is no longer a static file, but uses the Dynamically generate content, and the generated URL is also one-time; all js code has been manipulated by obfuscated variables.
Attackers gradually began to learn the practice of popular foreign Exploitkits, dynamically generated attack pages, and encrypted the exploit code to prevent gateway filtering and traffic packet replay analysis, which increased the difficulty of analysis and helped keep the attack code secret.
For ordinary users, it is recommended to avoid using plug-ins as much as possible, avoid clicking malicious advertisements disguised as pornographic websites, and enable security software for protection.

 

 

https://bbs.safewiki.org/thread-141-1-1.html

 

 

 

 

Recently, 360 Security Center has detected an incident of a website pop-up advertisement hanging a horse. The pop-up online advertisement appears to be hanging a horse. The content of the advertisement is mainly disguised pornographic temptation information such as dating in the same city. Through the analysis of the whole process of the hanging horse attack, it is found that the hanging horse Scripts and payloads are encrypted as they pass through the attacker's network, and executed by decryption at the final stage. The payload even leverages the regsrv32 utility to execute a .sct file to bypass AppLocker's scripting rules.
The following is a brief analysis of the hanging horse Trojan:

Through monitoring and tracking, it is found that the automatic pop-up advertisements mainly come from plug-ins and pornographic websites. Users who use such plug-ins to automatically pop up dating advertisements in the same city or browse some pornographic websites may trigger pages with vulnerability attacks. If the victim's machine does not have If the corresponding patch is applied, the corresponding vulnerability will be triggered, and the Trojan will be downloaded and executed:

<ignore_js_op>



<ignore_js_op>
The process of the js script embedded by the client on this page is as follows:

 

<ignore_js_op>
A simplified diagram of the encryption process of the hanging horse code:

 

<ignore_js_op>


Main function:
Each time the server will generate a random validate value and put it into the form. The result of this value is different each time it is refreshed. This value is used as the browser's session mark.
In addition, the attacker uses IE's official HTML conditional comments to judge the browser version. This judgment is valid for common front-end designs, but it is wrong for browser exploits, because different browsers will enable different degrees of Compatibility mode results in incorrect compatibility setting results, so it is better to directly judge the browser version.
According to the above results of the browser, construct the final form data that needs to be submitted, and perform GET submission

<ignore_js_op>

 

<ignore_js_op>

 

Second page:


The address submitted by GET http://174.*.*.42/p/servlet?token=&id=49457&validate=XXXXXXXXXX
has servlet in the parameter, so it is guessed that the background may be java.
This request will be redirected to another page by 302:
http://174.*.*.43/rt/ab06add394fb469b6510973131acb870.html?id=49457
This page will return the encrypted Load code of Rabbit or RC4 according to the ID, the page Two additional js library files (encrypt.min.js, tinyjs.min.js) are loaded to provide related symmetric and asymmetric encryption algorithms.

<ignore_js_op>
Decrypted result:


A RSA public key will be prefabricated in the code, and then a random number generation function will be used to generate a string as the subsequent symmetric encryption key, and the data will be POSTed to the server. In addition, a string will be dynamically generated, and the two will be concatenated as The encryption key for subsequent communications. A POST request will return the key-encrypted exploit code from the server. At this time, according to the received data option, choose to use RC4 or Rabbit algorithm to decrypt and execute.


<ignore_js_op>

 

Exploit: The exploit code that was finally decrypted and executed is clearly CVE-2016-0189.



After the vulnerability is successfully exploited, it will use regsvr32 to call the sct file to execute the corresponding script.
( Regsvr32 is a command of Windows command line utility used to register dynamic link library files, register controls to the system or uninstall controls, and run in command line mode. Foreign netizens Casey Smith@subTee found that a command or .sct is executed by calling the regsrv32 utility. The file has the potential to bypass AppLocker 's scripting rules. Since the utility is officially signed by Microsoft, the benefits are self-evident, and it supports TLS encryption, follows the redirection method, and does not leave traces on disk. In view of this There are many advantages, and those who hang horses will not miss it)

<ignore_js_op>
 

 

regsrv32 command line parameter options:

 

/s  execute silently


/n  specifies not to call DllRegisterServer , this option must be used together with /i


/i  calls DllInstall passing it to the optional [cmdline] , when used with  /u  it calls DllUnstall





Sct file:
The file contains base64 encoded malicious dll files, which are written to local files using ActiveXObject.
When using scripts to manipulate binary files, errors are often reported because of invisible characters, so the hoaxer usually chooses to first perform binary operations on binary files. The file is base64 encoded and then manipulated, and finally the binary file is restored by decoding;

<ignore_js_op>



The following is the js script that tests the conversion of the Base64 part in the sct file into a dll file:




Then it will be executed through regsvr32 plus specific parameters: the parameter contains the download link of the lua script.




<ignore_js_op>

 

In the config.lua file, it determines whether it is an Internet cafe environment. If it is an Internet cafe environment, only install Xiaohei Notepad (xiaohei.lua) and abc picture (abc.lua); otherwise, install various software as shown in the figure below.



<ignore_js_op>



<ignore_js_op>

 

Taking duba.lua as an example, the content of the lua script is as follows, mainly to determine the download and installation in the environment where the promotion software is not installed:

 

<ignore_js_op>

 

In the end, 10 promotion softwares were promoted and installed on the machines of ordinary recruited users:



<ignore_js_op>

 

According to monitoring and homology analysis, the Trojan also added the "Invisible Soul" Trojan in the earlier version, but no "Invisible Soul" Trojan was found in the recently spread samples.

 

[The "Invisible Soul" Trojan infected with MBR (Disk Master Boot Record) intercepted by 360 Security Center in August]

 

http://www.freebuf.com/articles/web/143912.html "Hidden Soul", the most powerful anti-reconnaissance Trojan in history: propping up the trap of millions of porn players

 

http://www.freebuf.com/articles/system/144792.html "Invisible Soul" Trojan tampered with homepage analysis: criminal sketch of the most powerful anti-reconnaissance Trojan in history



360 Security Guard has been able to effectively block such websites from hanging horses:



<ignore_js_op>
360 Security Guard intercepts the Trojan using regsvr32 to register the sct Trojan:



<ignore_js_op>
<ignore_js_op>
<ignore_js_op>


Conclusion:
The attacker has a good understanding of the relevant encryption algorithms, and chose the rare Rabbit symmetric encryption algorithm; the attacker has a certain front-end development experience, the code has strong fault tolerance and high compatibility; the background is no longer a static file, but uses the Dynamically generate content, and the generated URL is also one-time; all js code has been manipulated by obfuscated variables.
Attackers gradually began to learn the practice of popular foreign Exploitkits, dynamically generated attack pages, and encrypted the exploit code to prevent gateway filtering and traffic packet replay analysis, which increased the difficulty of analysis and helped keep the attack code secret.
For ordinary users, it is recommended to avoid using plug-ins as much as possible, avoid clicking malicious advertisements disguised as pornographic websites, and enable security software for protection.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326131261&siteId=291194637