# Strange Bits: HTML Smuggling and GitHub Hosted Malware
**[gdatasoftware.com/blog/2019/05/31695-strange-bits-smuggling-malware-github](https://www.gdatasoftware.com/blog/2019/05/31695-strange-bits-smuggling-malware-github)**
05/09/2019
G DATA Blog
Sometimes we see odd stuff, like malware that employs a technique called "HTML Smuggling". Also, malware on GitHub
seems to be a thing these days.
## "That's strange..."
_Many important discoveries do not start with a shouting of „Eureka” anymore, as they did in the days of old. Instead, the_
_most intriguing bits of modern research will at some point contain the phrase “That’s strange…”, followed by more_
_prodding and poking and – hopefully – a lightbulb moment. This series that we call "Strange Bits" contains many findings_
_that struck our analysts as odd, either because they do not seem to make any sense at the time or because a malicious_
_program exhibits behaviors that none of us have seen before. Maybe these findings will spark ideas in other fellow_
_researchers – maybe those findings are just what it says on the tin: Strange…._
### DanaBot loader uses HTML smuggling
This email has an unusual way to store contained malware. The email[1] displays polish text which prompts the user to
click on a download link. The translated text says "This file can not be previewed. You can download the file."
The tag for this link has a download attribute with the name of the dropped ZIP archive:
**dokumentacja_28380.zip[2]. However, the referenced data in the href attribute is not downloaded from a URL but saved**
[as a base64 string using the data URI scheme. This is also called HTML smuggling (thanks to](https://outflank.nl/blog/2018/08/14/html-smuggling-explained/) [Rich Warren who gave me](https://twitter.com/buffaloverflow)
a hint to the blog post).
-----
The dropped ZIP archive contains a file named dokumentacja_28380.vbe[3]. Despite its file extension it is not encoded
but a plain VBScript. The obfuscated script retrieves a PowerShell command which downloads DanaBot[4] to the
%TEMP% folder and executes it.
### GitHub repositories host coinminer malware and settings as base64 strings
-----
The GitHub user errorsysteme and their repositories were taken down after G DATA researchers discovered that they
hosted malware. The repositories were discovered via a downloader sample[5].
The user has two repositories, both contain text files with base64 strings of PE binaries and configuration files. The
repository wask only contains a file named data_lssas[6]. This file is downloaded and executed intially and will in turn
obtain and install files and settings from the base repository.
-----
"base" repository
The contents of the
File types for files in
the "base" repository after decoding the base64 strings
[The PE files named WerFault64[7] and WerFault86[8] are modified versions of the Non-Sucking Service Manager](https://nssm.cc/)
(NSSM). The file properties and icons have been changed to imitate Microsoft's actual WerFault.exe which is used for
error reporting. The modified NSSM is used to install malware as service on the system.
A file named parameters contains the settings for the coinminer malware.
-----
The actual coinminer is the files data_cash64[9] and data_cash86[10] in the base repository.
### Referenced Samples
**Description** **Filename** **SHA256**
[1] DanaBot
Loader
Email
[2] DanaBot
Loader ZIP
archive
[3] DanaBot
Loader
VBScript
[4] DanaBot
Payload
[5] Initial
GitHub
malware
downloader
[6] GitHub
downloader
in wask
repository
[7] Modified
NSSM 64
bit version
[8] Modified
NSSM 32
bit version
[9]
Coinminer
64 bit
version
dde37964ab9f749e1c48a88202ad6c5fd03bd2c82e67736e42fc02fe912be6ba
dokumentacja_28380.zip f4d1a4ce0ad334b31aa444ab9ced0d9d1eb581f889f3dbcfc1050eea474ad3cf
dokumentacja_28380.vbe 0222fecff6c56e7af6f1502328478283c46e7a243ef2edcac466c2acda5e3eb9
DbBf bfce42e325a9b999d1630a7ccc27ac8260104fb47bfc768637e2a2a687b65855
4b4c45569b1b7c3c114a633ec0a54864cd91fd99bea2645803d23e78f9fcd81c
data_lssas 0075b6e78cebc1ed63a495918620aa7220ddabf7c9e501bc840d724ce930d2d3
WerFault64 3335ec57681b238846e0d19a3459dc739d11dfaf36722b7f19e609a96b97ad92
WerFault86 2f979194413c1b40a9d11bc4031d1672cd445d64b60343f6d308e4df0d2bdc6b
data_cash64 c3d982038039828f201a93b323b2b76f8e0db20a81aee89334afa22a4c83f36f
-----
**Description** **Filename** **SHA256**
[10]
Coinminer
32 bit
version
**Karsten Hahn**
data_cash86 8521c866fd37499631e6e1b0902a21e555e565d609bb6e2402eb86dec8743fa9
Malware Analyst
-----