IoT Inspector that works without the cloud.
-
Run IoT Inspector Local on a participant's computer.
-
Open the AR app on an iPhone that is connected to the same network.
Ask participant to do the following:
-
Run IoT Inspector Local; see
src/README.md
for instructions. -
Copy down the IP address displayed on IoT Inspector's terminal window. Let's say this IP is 10.0.0.X.
Do the following from the AR app:
-
Issue an HTTP
GET
request tohttp://10.0.0.X:46241/is_ready
. Upon error, check again in a second or two. -
Assuming no error, the response should be a JSON object:
{"status": "OK"}
. -
Issue an HTTP
GET
request tohttp://10.0.0.X:46241/get_device_list
. The response should be a JSON object in the form of:{ "abc001": { "device_id": "abc001", "device_ip": "10.0.0.5", "device_vendor": "Google", // name based on device's MAC address "device_name": "Google Home", // name based on IoT Inspector's device identification algorithm "netdisco_name": "Google Home", // name inferred from a device's SSDP/mDNS "dhcp_name": "", // name obtained from DHCP Requests "is_inspected": true // whether we are collecting traffic }, "def002": { "device_id": "def002", "device_ip": "10.0.0.6", "device_vendor": "", "device_name": "", "netdisco_name": "", "dhcp_name": "", "is_inspected": false } }
Note that the JSON object above constantly changes, as IoT Inspector scans for more devices. Examples of changes include:
- New additions of devices. In fact, when you request
http://10.0.0.X:46241/get_device_list
for the first time, you will likely get back{}
, since IoT Inspector is still in the process of scanning for new devices. - Updates to device names. For example, you might get an empty string in
netdisco_name
, but a few seconds later it becomesSmart TV
.
Because of the changes above, it is recommended that the AR app requests
http://10.0.0.X:46241/get_device_list
as often as possible. - New additions of devices. In fact, when you request
-
From the device list, decide which devices are of interest. For example, take a look at all the
device_name
fields and identify all the smart TVs and Google Homes. Remember theirdevice_id
s. -
Let's say you're interested in the Google Home, whose
device_id
isabc001
. Issue an HTTPGET
request tohttp://10.0.0.:46241X/enable_inspection/abc001
, which should return a JSON object:{"status": "OK"}
. Repeat this step for each device of interest. This step basically instructs IoT Inspector to start capturing network traffic for each device of interest. Each inspected device will have theis_inspected
field set astrue
upon/get_device_list
. -
To see what traffic has been captured, issue an HTTP
GET
request tohttp://10.0.0.X:46241/get_traffic
once every few seconds, which returns a JSON object in the form of:{ 'abc001': { "72.12.13.14": { "hostname": "server1.googleusercontents.com", "is_tracking": false, "inbound_bytes_per_second": 23, "outbound_bytes_per_second": 32 }, "35.112.131.5": { "hostname": "doubleclick.com", "is_tracking": true, "inbound_bytes_per_second": 23, "outbound_bytes_per_second": 32 }, }, }
This JSON object shows all destinations visited by every inspected device since
http://10.0.0.X:46241/get_traffic
was called the last time. Note thatis_tracking
indicates that IP address is an advertising or tracking service. Any of the fields above could be empty, because IoT Inspector has no information, or the feature is not implemented yet.I suggest requesting
http://10.0.0.X:46241/get_traffic
roughly once every two seconds to get an updated view of the traffic. -
When you are no longer interested in a device, say
abc001
, issue an HTTPGET
request tohttp://10.0.0.X:46241/disable_inspection/abc001
. -
When the AR app quits, issue an HTTP
GET
request tohttp://10.0.0.X:46241/shutdown
to terminate IoT Inspector.
/is_ready
: Checks if IoT Inspector is ready to interface with the AR app./get_device_list
: Returns a list of devices and constantly changes./enable_inspection/<device_id>
: Instructs IoT Inspector to start collecting network traffic from a givendevice_id
./get_traffic
: Returns network traffic from every inspected device between the last time you called this API and now./disable_inspection/<device_id>
: Instructs IoT Inspector to stop collecting network traffic from a givendevice_id
./disable_all_inspection
: Stop collecting traffic for all devices./shutdown
: Stops inspecting all traffic and quits IoT Inspector Local./block_device/<device_id>/<start_unix_ts>/<stop_unix_ts>
: Sends wrong spoofed ARP packets todevice_id
(effectively blocking the device) between two UNIX timestamps (epoch). You can call this function multiple times to update the start and stop timestamps./unblock_device/<device_id>
: Unblocks that device./list_blocked_devices
: Shows a list of blockeddevice_id
s.
Questions? Email Danny Y. Huang at [email protected]
.