Netcat反向shell

发布于 2024-10-08 20:47:44 字数 473 浏览 0 评论 0原文

我正在尝试为网络上的两台计算机创建一个反向 shell,几年前我使用了 netcat,我记得我做了类似监听传入连接的操作:

netcat -v -l -p <PORT>

但现在当我尝试它不起作用时,我只是得到netcat 的用法:

$ netcat -v -l -p 12345
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port]
      [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
      [-x proxy_address[:port]] [hostname] [port[s]]

最新的 netcat 版本中有什么变化吗?

我使用的是ubuntu 10.04

I am trying to create a reverse shell for two computers on my network, I used netcat a few years ago, I remember I did something like to listen for incoming connections:

netcat -v -l -p <PORT>

But now when I try that it doesn't work, I just get the netcat usage:

$ netcat -v -l -p 12345
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port]
      [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
      [-x proxy_address[:port]] [hostname] [port[s]]

Did something changed in the latest netcat releases?

I am using ubuntu 10.04

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

屋顶上的小猫咪 2024-10-15 20:47:44

有无数种不同的 netcat 变体。 (好吧,不是真的;也许有六个主要的。)每个都有不同的功能。

在 Ubuntu 中,您可以安装 netcat-openbsdnetcat-traditionalnetcat6netcat 只是一个由 update-alternatives [--display/--set] nc 管理的符号链接。

netcat-openbsd 最有可能由 Ubuntu 10.04 安装并设置为默认值(并且直接依赖于 libvirt-bin),但是您的选项集仅适用于其他实现。您可以使用 nc.traditional 或 nc6(当然,在安装正确的软件包之后),或者使用 update-alternatives 将它们设置为默认netcat

There's a bajillion different netcat variants out there. (Okay, not really; maybe half a dozen major ones.) Each has different features.

In Ubuntu, you can install netcat-openbsd, netcat-traditional, netcat6. netcat is simply a symlink managed by update-alternatives [--display/--set] nc.

netcat-openbsd is most likely to be installed and set as default by Ubuntu 10.04 (and is directly depended upon by libvirt-bin), but your option set only works on the other implementations. You can use nc.traditional or nc6 (after installing the proper packages, of course), or use update-alternatives to set them as the default netcat.

我不是你的备胎 2024-10-15 20:47:44

如果您删除 -p,您应该正在侦听端口

nc -vl <PORT>

If you drop the -p you should be listening on port <PORT>.

nc -vl <PORT>
望笑 2024-10-15 20:47:44
 -p source_port
         Specifies the source port nc should use, subject to privilege
         restrictions and availability.  It is an error to use this option
         in conjunction with the -l option.

数控-v-l 12345

 -p source_port
         Specifies the source port nc should use, subject to privilege
         restrictions and availability.  It is an error to use this option
         in conjunction with the -l option.

nc -v -l 12345

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文