Investigating an Alert Using Defender for IoT and Wireshark
Published May 17 2022 05:58 PM 8,161 Views
Microsoft

This blog will be one in a series of blogs to discuss the above topic. We will take specific Microsoft Defender for IoT alerts and try to understand what initiated the alert and if the issue is one needing further investigation or remediation or not. We will follow a basic sequence to start the analysis.  This initial sequence will be used for all the investigations.

 

As the blog progresses, if you have an alert of concern and you are willing to provide a pcap, we can follow this process for your alert. Any examples used would be scrubbed and addresses anonymized.

 

The sequence is below:

  1. Review type of alert to understand the cause for concern
  2. Utilize properties in Devices Map to determine if the device has multiple alerts
  3. Utilize data mining to determine what types of conversations the suspect device has had
  4. Make note of specific IP / MAC addresses involved
  5. Determine protocol(s) involved
  6. Load pcap file into Wireshark, Determine if protocol in question is identified in Wireshark https://wiki.wireshark.org/, Filter traffic on IP / MAC Addresses involved in alert
  7. Follow interesting streams.  These can be determined by by looking at Statistics – Protocol Hierarchy, then Statistics – Flow Graph
  8. Note any meaningful text in message flow
  9. Use statistics – conversations – limit to display filter:  to see what other conversations are initiated from suspect source
  10. Apply interesting conversations as filter
  11. Look for internet or DMZ sessions with the suspect address(es)
  12. Look for file transfer to/from suspect address(es) over SMB, FTP, SFTP, FTPS, SCP, HTTP, HTTPS, etc.
  13. Look for remote access to target from internet or DMZ address(es), could be RDP, VNC, SSH, ..
  14. Look for illegal command messages
  15. Look for scanning activities
  16. If the activity appears to be malicious, attempt to place it in Att&ck for ICS framework

 

Alert: PLC Scan Detected

  1. As described in the alert, this activity could be normal or it could be malicious.  Some ICSs routinely scan all active devices to determine if they are functional and communicating.   So how do we evaluate this specific alert?  Let’s follow the sequence…

kreiseng_0-1651697865933.png

 

  1. Now let’s look at this scanning device in the Devices Map to see if it has multiple alerts like this one.

kreiseng_1-1651697865949.png

 

Notice that there seem to be two devices involved with 192.168.2.166 being the initiator. We might filter on this IP address in the Alerts list to see if all the alerts are related to scanning.

 

kreiseng_2-1651697865957.png

 

There are three different types of alerts associated with this source address.

 

  1.  At this point, we will use the Device Map to see what types of communication are common to this host.   Shown on the right is the details form showing all protocols associated with this IP address. Below, the plausibility of malicious activity appears more likely as we can see that the client 192.168.2.166 appears to attempt connections on a variety of protocols to target machines.

 

kreiseng_3-1651697865970.png

 

  1. Making note of the specific IP addresses involved, we see a range of addresses all on the 192.168.88.0 subnet, including the address in our alert. 
  2. Next, defining a Data Mining report to see all communications from 192.168.2.166 on all protocols makes the case even stronger.  Looking at the unresolved connections shows that this machine is poking a number of other machines on a variety of well known ports.

Screenshot 2022-05-04 153655.jpg

 

Well known protocols used include  21 (FTP), 22 (SSH), 23 (Telnet), 80 (HTTP), 135 (RPC Endpoint Mapper), 443 (HTTPS), 514 (Remote Shell), 4000 (Emerson ROC), 7001 (SPA), and 20000 (DNP3) among others.

 

      6. Microsoft Defender for IoT makes the filtered pcap available for this alert. Loading the filtered pcap into Wireshark, found many attempted sessions followed either by RST, ACK or by Fin, ACK.  This pcap showed only scans targeting 192.168.88.60

 

Trevor_Rusher_0-1652809922856.png

 

      7. Follow the streams associated with the identified protocols

Use filters in Wireshark to select each protocol, for instance tcp.port==21.  This shows that there is one FTP attempt and it receives a RST/ACK.  See below…

 

Trevor_Rusher_1-1652809922863.png

 

Going on to the next protocol, SSH is a little more interesting.  The filter is tcp.port==22.  If you note the ‘[‘ lines to the left of the packet window, this is a way to see the packets involved in the various streams.  I look for a ‘meaty’ stream (having a number of related packets) and follow the stream. 

 

Trevor_Rusher_2-1652809922878.png

 

 To follow the stream, right-click on the starting packet (or any packet in the stream), select ‘Follow’, then ‘TCP Stream’ as shown below:

 

Trevor_Rusher_3-1652809922886.png

 

Note that this shows a console attempt over SSH to a MOXA switch.

 

Trevor_Rusher_4-1652809922911.png

 

Moving on to Telnet on port 23 and adding one more Wireshark method, we will first filter on port 23 with tcp.port==23 to show this filtered data.

 

Trevor_Rusher_5-1652809922929.png

 

Now we will utilize the Statistics – Flow Graph option to look at this data in a different way. 

 

Trevor_Rusher_6-1652809922941.png

 

The result shows all streams as seen below:

 

Trevor_Rusher_7-1652809922955.png

 

Check the box to Limit the Flow Graph to the selection in the main window to tcp port 23, and the Flow Graph now shows only traffic involving Telnet below.

 

Trevor_Rusher_8-1652809922968.png

 

This shows some actual data passing as shown.  Since this data is in plain text, we want to see what is flowing in this stream.  Clicking on any line in this Flow Graph highlights the associated packet in the main Wireshark display in the background.  And from here we can follow the stream as we did above.  This results in the following…

 

Trevor_Rusher_9-1652809922984.png

 

Now, this is really interesting.  This query yields some potentially important information tabulated below.

 

  • MOXA EtherDevice Switch EDS-516A (Switch Model)
  • It is a Managed Redundant Switch
  • Firmware Version 2.6
  • S/N 09404
  • IP 192.168.88.61
  • MAC 00-90-E8-27-8C-37
  • Existence of an account named: admin
  • Existence of a user account: user, possible password: Hadmin

Following a similar process for HTTP yields an attempt to determine if the host 192.168.88.61 supports the http POST method.

 

Trevor_Rusher_10-1652809923000.png

 

No similar success was found in any of the other ports with exception of 4000 and 4001.  These yielded a ‘JDWP – Handshake’ followed by some binary then ‘J.WP’.  Not sure what this means but is related to Emerson ROC. 

 

So, to summarize, Microsoft Defender for IoT identified a potential issue on this network.  We used some of its inherent tools to decide if the alert appears to be a real concern.  Then we used Wireshark to gain insight into what information the potential attacker may have learned about the devices on this network. 

 

This provides us insight into how to defend this network, by preventing this type of access, possibly via firewall rule improvement.  We can certainly change passwords on scanned devices.  We can eliminate, if possible, open text communication modes like ftp or build up secondary defenses if this is not possible.

 

Hope you enjoyed this!

Co-Authors
Version history
Last update:
‎May 17 2022 10:58 AM
Updated by: