iPhone上的ARP请求 [英] ARP Requests on iPhone

查看:247
本文介绍了iPhone上的ARP请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在iPhone上生成ARP(地址解析协议)请求数据包,并侦听返回的相关响应。

I'm trying to generate ARP (Address Resolution Protocol) request packets on the iPhone and listen for the associated responses that come back.

谷歌搜索让我陷入了死胡同。为了发送逻辑层数据包,我需要一些原始套接字,但需要超级用户权限才能创建它们。我试图避免越狱我的手机。

Google searches have led me into a dead-end. In order to send logical-layer packets, I'd need something along the lines of a raw socket, but need super-user permissions to create them. I'm trying to avoid jailbreaking my phone.

有很多c代码可以做到这一点,但由于权限的原因,我找不到任何可以转换为iOS的代码。

There's lots of c code out there that can do this, but I can't find anything that can translate to iOS due to the permissions.

当我决定使用Wireshark一些网络发现应用程序时,我已经准备好了。即Fing和Pinggy(帽子给Fing和Pinggy btw ......很棒的应用程序!)

I was ready to throw in the towel when I decided to Wireshark a couple network discovery apps I have. Namely "Fing" and "Pinggy" (hats off to Fing and Pinggy btw... awesome apps!)

https://itunes.apple.com/us/app/pinggy/id562201096?mt=8

https://itunes.apple.com/us/ app / fing-network-scanner / id430921107?mt = 8

与这些iPhone应用程序一起运行Wireshark表明他们从XXX.XXX进行ARP扫描。 X.0一直到XXX.XXX.X.255。我没有看到任何ICMP数据包与ARP同时发出。这让我相信在iOS上确实可以发送和接收ARP数据包。

Running Wireshark alongside these iPhone apps shows that they do an ARP scan from XXX.XXX.X.0 all the way to XXX.XXX.X.255. I do not see any ICMP packets go out simultaneously with the "ARPs". This leads me to believe that sending and receiving ARP packets are indeed possible on iOS.

我考虑过ping扫描,假设它会自己生成ARP请求。但是,我仍然需要一个原始套接字来收听回复,对吗?

I've thought about a ping sweep, assuming that it will generate ARP requests on its own. However, I will still need a raw socket to listen to the responses, correct?

问题:什么可用于发送/接收数据包逻辑层?特别是发送接收ARP报文?我错过了什么基本的东西吗?

Questions: What's available for sending/receiving packets at the logical layer? Specifically for sending receiving ARP packets? Am I missing anything fundamental?

提前致谢!

推荐答案

当我尝试ping有问题的设备时,ARP请求会消失。这是在与ping扫描器一起运行的Wireshark会话中看到的。我发现我无法重现我之前看到的缺失的设备,这让我问我原来的问题。

ARP requests do go out when I attempted to ping the problematic devices. This was seen with a Wireshark session running alongside the ping scanner. I found that I could not reproduce the "missing devices" I was seeing earlier that led me to ask my original question.

所以,回答我自己的问题:ARP请求在我的子网上执行简单的ping扫描时,每个IP地址发送一次。我会看到ARP请求(使用Wireshark)以及ping请求。如果你需要生成一个ARP请求,只需发出一个ping。

So, to answer my own question: ARP requests are sent per IP address when doing a simple ping scan on my subnet. I would see the ARP request go out (using Wireshark) as well as the ping request. If you need to generate an ARP request, simply send out a ping.

即使有问题的设备不响应​​ping请求,ARP表也将是通知它的存在。

Even if the "problematic" device won't respond to ping requests, the ARP table will be notified of its existence.

这篇关于iPhone上的ARP请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆