通过shell发送arp

发布于 2024-07-13 19:17:12 字数 133 浏览 11 评论 0原文

有没有办法在 MacOS X 或任何其他 UNIX 上通过 shell(例如手动或通过 shell 脚本)发送自定义(和事件不需要的)a​​rp 响应? 此外,有没有办法让软件询问当前子网中所有 IP 的 MAC 表示,而不向任何人发送 ping ?

Is there a way a send custom (and event undemanded) arp responses via shell (e.g. by hand or by a shell script) on MacOS X or any other UNIX?
In addition, is there a way of making the software ask for the MAC representation for all IPs in the current subnet without sending pings the anyone?

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

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

发布评论

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

评论(3

别闹i 2024-07-20 19:17:12

就在这里。 此类活动用于 ARP 欺骗和 ARP 中毒攻击,并针对以下情况执行。 通过arpspoof。 如果您想发现主机的 MAC,当您知道其 IP 并且它位于您的广播域 (LAN) 中时,请使用arping。 ARP 是第 2 层协议,因此它的数据包不由路由器转发,但它比 ICMP echo (ping) 可靠得多。

一些工具:

  • arp - 标准程序(win/unix)
    用于列出主机的IP-MAC地址
    关联缓存,其中包含
    已学习的 IP

  • arping - 发送 ARP 的 unix 程序
    请求给定的 IP 并显示
    收到的 ARP 响应中包含的 MAC

  • arpspoof - dsniff 包中的程序,生成伪造的 ARP 响应

Yes there is. This kind of activity is used in ARP Spoofing and ARP Poisoning attacks and is preformed for ex. by arpspoof. If You want to discover host's MAC, when You know its IP and it is located in Yours broadcast domain (LAN), use arping. ARP is layer 2 protocol, so it's packets are not forwarded by routers but it's much more reliable then ICMP echo (ping).

Some tools:

  • arp - standard program (win/unix)
    used to list host's IP-MAC address
    association cache, which contains
    already learnt IPs

  • arping - unix program which sends ARP
    Request for a given IP and displays
    MAC contained in received ARP Response

  • arpspoof - a program from dsniff package generating bogus ARP Responses

戈亓 2024-07-20 19:17:12

数据包生成器可能可以解决问题。 维基百科页面链接到一些实现,但我不知道它们是否适用于 OSX。

A packet generator might do the trick. The wikipedia page links to some implementations but I don't know if they work on OSX.

生来就爱笑 2024-07-20 19:17:12

还有arp-scan 使用libpcap; 和使用 libnetarpdropper

要被动(或主动)嗅探网络中的 ARP 数据包并显示生成数据包的计算机的 IP 和 MAC 地址,您可以使用名为 ArpSpyX

# arpdropper requires http://sourceforge.net/projects/libnet-dev/ to compile
# (libnet & arpdropper successfully compiled on Mac OS X 10.6.8)
curl -LO http://thebends.googlecode.com/svn/trunk/misc/arpdropper.c
gcc -Wall -Wextra -lnet -o arpdropper arpdropper.c

./arpdropper

# Usage: ./arpdropper -i <device> -s <source ip> -d <dest ip>
# For arp replies:
#   ./arpdropper -r -i <device> -s <source ip> -m <source mac> -d <dest ip>

# using nmap
# get a pre-compiled Mac OS X version of nmap at:
# http://nmap.org/download.html#macosx or
# http://www.berndsworld.com/downloads/
nmap -PR -oN nmap-arpscan.txt 192.168.0.0/16

There are also arp-scan using libpcap; and arpdropper using libnet.

To passively (or actively) sniff your network for ARP packets and display the IP and MAC address of the machine that generated the packet you may use a Mac OS X application called ArpSpyX.

# arpdropper requires http://sourceforge.net/projects/libnet-dev/ to compile
# (libnet & arpdropper successfully compiled on Mac OS X 10.6.8)
curl -LO http://thebends.googlecode.com/svn/trunk/misc/arpdropper.c
gcc -Wall -Wextra -lnet -o arpdropper arpdropper.c

./arpdropper

# Usage: ./arpdropper -i <device> -s <source ip> -d <dest ip>
# For arp replies:
#   ./arpdropper -r -i <device> -s <source ip> -m <source mac> -d <dest ip>

# using nmap
# get a pre-compiled Mac OS X version of nmap at:
# http://nmap.org/download.html#macosx or
# http://www.berndsworld.com/downloads/
nmap -PR -oN nmap-arpscan.txt 192.168.0.0/16
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文