Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Asset_Discovery_Offline
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yogesh.m
Asset_Discovery_Offline
Commits
034b2b56
Commit
034b2b56
authored
May 08, 2023
by
yogesh.m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4f11b785
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
90 additions
and
65 deletions
+90
-65
__pycache__/sniff.cpython-39.pyc
__pycache__/sniff.cpython-39.pyc
+0
-0
assets.json
assets.json
+1
-1
config.yaml
config.yaml
+1
-1
helpers/Packet_Analyzer.py
helpers/Packet_Analyzer.py
+14
-15
helpers/__pycache__/Packet_Analyzer.cpython-39.pyc
helpers/__pycache__/Packet_Analyzer.cpython-39.pyc
+0
-0
protocol_discover_helpers/__pycache__/bacnet_discover.cpython-39.pyc
...scover_helpers/__pycache__/bacnet_discover.cpython-39.pyc
+0
-0
protocol_discover_helpers/__pycache__/enip_discover.cpython-39.pyc
...discover_helpers/__pycache__/enip_discover.cpython-39.pyc
+0
-0
protocol_discover_helpers/__pycache__/modbus_discover.cpython-39.pyc
...scover_helpers/__pycache__/modbus_discover.cpython-39.pyc
+0
-0
protocol_discover_helpers/__pycache__/omron_discover.cpython-39.pyc
...iscover_helpers/__pycache__/omron_discover.cpython-39.pyc
+0
-0
protocol_discover_helpers/__pycache__/s7_discover.cpython-39.pyc
...l_discover_helpers/__pycache__/s7_discover.cpython-39.pyc
+0
-0
protocol_discover_helpers/bacnet_discover.py
protocol_discover_helpers/bacnet_discover.py
+4
-0
protocol_discover_helpers/enip_discover.py
protocol_discover_helpers/enip_discover.py
+5
-0
protocol_discover_helpers/modbus_discover.py
protocol_discover_helpers/modbus_discover.py
+6
-0
protocol_discover_helpers/omron_discover.py
protocol_discover_helpers/omron_discover.py
+6
-0
protocol_discover_helpers/s7_discover.py
protocol_discover_helpers/s7_discover.py
+5
-0
protocol_enumerators/__pycache__/modbus.cpython-39.pyc
protocol_enumerators/__pycache__/modbus.cpython-39.pyc
+0
-0
protocol_enumerators/modbus.py
protocol_enumerators/modbus.py
+37
-31
test.py
test.py
+11
-17
No files found.
__pycache__/sniff.cpython-39.pyc
View file @
034b2b56
No preview for this file type
assets.json
View file @
034b2b56
{
"192.168.1.178"
:
{
"last_activity"
:
"05-05-23 19:09:25"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
"tcp:modbus"
,
"mac"
:
"7c:76:35:6a:d4:84"
,
"vendor"
:
"Intel Corporate"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"168.119.249.101"
:
{
"last_activity"
:
"05-05-23 19:09:24"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"54.167.180.57"
:
{
"last_activity"
:
"05-05-23 19:09:05"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"35.174.210.7"
:
{
"last_activity"
:
"05-05-23 19:09:06"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"162.19.234.38"
:
{
"last_activity"
:
"05-05-23 19:09:18"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
"modbus:tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Unknown"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"3.225.129.254"
:
{
"last_activity"
:
"05-05-23 19:09:10"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"50.16.7.188"
:
{
"last_activity"
:
"05-05-23 19:09:24"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
"modbus:tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Unknown"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"108.159.15.29"
:
{
"last_activity"
:
"05-05-23 19:09:22"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
}}
{
"192.168.1.178"
:
{
"last_activity"
:
"08-05-23 18:50:09"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
"udp:tcp:"
,
"mac"
:
"7c:76:35:6a:d4:84"
,
"vendor"
:
"Intel Corporate"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"192.168.1.19"
:
{
"last_activity"
:
"08-05-23 18:46:44"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
""
,
"mac"
:
"d6:34:8a:fc:bd:c3"
,
"vendor"
:
"No Mac"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"23.218.244.131"
:
{
"last_activity"
:
"08-05-23 18:50:01"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"13.33.146.36"
:
{
"last_activity"
:
"08-05-23 18:39:05"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"166.141.28.138"
:
{
"last_activity"
:
"08-05-23 18:38:29"
,
"dev_type"
:
"ABB 33 V2.5.1,2015-11-26 3333333333333333333333333333"
,
"protocols"
:
":tcp:modbus"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Unknown"
,
"firmware"
:
"Unknown"
,
"model"
:
"sid5"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"192.168.0.222"
:
{
"last_activity"
:
"08-05-23 18:50:08"
,
"dev_type"
:
"Domain Name Server"
,
"protocols"
:
"udp"
,
"mac"
:
"20:67:7c:de:26:04"
,
"vendor"
:
"Hewlett Packard Enterprise"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.195.74"
:
{
"last_activity"
:
"08-05-23 18:49:58"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"203.23.178.51"
:
{
"last_activity"
:
"08-05-23 18:50:04"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"34.159.15.168"
:
{
"last_activity"
:
"08-05-23 18:49:35"
,
"dev_type"
:
"Silhouette User"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"172.217.166.99"
:
{
"last_activity"
:
"08-05-23 18:38:25"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.193.131"
:
{
"last_activity"
:
"08-05-23 18:39:10"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.195.170"
:
{
"last_activity"
:
"08-05-23 18:39:28"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.193.174"
:
{
"last_activity"
:
"08-05-23 18:50:09"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.195.197"
:
{
"last_activity"
:
"08-05-23 18:46:33"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"168.119.249.101"
:
{
"last_activity"
:
"08-05-23 18:50:09"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"192.168.1.110"
:
{
"last_activity"
:
"08-05-23 18:50:05"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
""
,
"mac"
:
"1e:a0:48:8c:81:a2"
,
"vendor"
:
"No Mac"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.67.67"
:
{
"last_activity"
:
"08-05-23 18:39:25"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"216.58.200.131"
:
{
"last_activity"
:
"08-05-23 18:39:25"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"74.125.24.188"
:
{
"last_activity"
:
"08-05-23 18:49:58"
,
"dev_type"
:
"HP Virtual Room Service"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"35.227.213.179"
:
{
"last_activity"
:
"08-05-23 18:50:05"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"35.174.127.31"
:
{
"last_activity"
:
"08-05-23 18:50:00"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.205.227"
:
{
"last_activity"
:
"08-05-23 18:50:08"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.67.46"
:
{
"last_activity"
:
"08-05-23 18:38:46"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"34.159.37.72"
:
{
"last_activity"
:
"08-05-23 18:49:49"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.77.100"
:
{
"last_activity"
:
"08-05-23 18:49:53"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.182.142"
:
{
"last_activity"
:
"08-05-23 18:39:05"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"20.189.173.9"
:
{
"last_activity"
:
"08-05-23 18:39:15"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.195.142"
:
{
"last_activity"
:
"08-05-23 18:49:51"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"96.1.50.111"
:
{
"last_activity"
:
"08-05-23 18:45:44"
,
"dev_type"
:
"Programmable Logic Controller"
,
"protocols"
:
"tcp:udp:enip"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Rockwell Automation/Allen-Bradley"
,
"firmware"
:
"1769-L33ER/A LOGIX5333ER"
,
"model"
:
"d05f2a4d"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.193.106"
:
{
"last_activity"
:
"08-05-23 18:45:03"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.205.234"
:
{
"last_activity"
:
"08-05-23 18:46:14"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"52.123.253.70"
:
{
"last_activity"
:
"08-05-23 18:46:37"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"13.33.146.37"
:
{
"last_activity"
:
"08-05-23 18:49:50"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"54.237.209.135"
:
{
"last_activity"
:
"08-05-23 18:45:56"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"34.224.204.210"
:
{
"last_activity"
:
"08-05-23 18:45:57"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"34.203.61.11"
:
{
"last_activity"
:
"08-05-23 18:46:23"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"20.198.119.84"
:
{
"last_activity"
:
"08-05-23 18:46:11"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"34.233.147.211"
:
{
"last_activity"
:
"08-05-23 18:46:14"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.193.99"
:
{
"last_activity"
:
"08-05-23 18:46:25"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.182.138"
:
{
"last_activity"
:
"08-05-23 18:49:36"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.196.10"
:
{
"last_activity"
:
"08-05-23 18:49:06"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"54.86.189.18"
:
{
"last_activity"
:
"08-05-23 18:49:08"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"192.168.2.94"
:
{
"last_activity"
:
"08-05-23 18:49:47"
,
"dev_type"
:
"Unknown"
,
"protocols"
:
""
,
"mac"
:
"c0:2c:5c:57:04:71"
,
"vendor"
:
"Apple, Inc."
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.196.46"
:
{
"last_activity"
:
"08-05-23 18:49:45"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"udp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
},
"142.250.195.229"
:
{
"last_activity"
:
"08-05-23 18:50:03"
,
"dev_type"
:
"http protocol over TLS/SSL"
,
"protocols"
:
"tcp"
,
"mac"
:
"7c:5a:1c:7f:6e:ef"
,
"vendor"
:
"Sophos Ltd"
,
"firmware"
:
"Unknown"
,
"model"
:
"Unknown"
,
"os"
:
"Unknown"
,
"plant"
:
"Dalmia Cement"
}}
\ No newline at end of file
\ No newline at end of file
config.yaml
View file @
034b2b56
configuration
:
configuration
:
threads
:
20
#number of threads to scan at once
threads
:
20
#number of threads to scan at once
transfer frequency
:
1
#how frequent the scan needs to be
transfer frequency
:
1
#how frequent the scan needs to be
unifytwin_server_ip_address
:
https://webhook.site/
422d91cf-4c18-4728-b7a0-13f14898c4b1
#Data will be sent back here
unifytwin_server_ip_address
:
https://webhook.site/
34c9fd4a-8924-41ab-a01f-383ef36db96b
#Data will be sent back here
edge_device_location
:
Dalmia Cement
edge_device_location
:
Dalmia Cement
null_loopback
:
False
null_loopback
:
False
interfaces
:
Wi-Fi
interfaces
:
Wi-Fi
...
...
helpers/Packet_Analyzer.py
View file @
034b2b56
import
binascii
import
binascii
import
json
import
json
from
protocol_discover_helpers
import
modbus_discover
,
enip_discover
,
s7_discover
,
omron_discover
,
bacnet_discover
class
Packet_Analyzer
():
class
Packet_Analyzer
():
def
__init__
(
self
):
def
__init__
(
self
):
data
=
None
self
.
data
=
None
self
.
protocol_list
=
{
502
:
modbus_discover
,
44818
:
enip_discover
,
102
:
s7_discover
,
9600
:
omron_discover
,
47808
:
bacnet_discover
}
def
identify_protocol
(
self
,
hex_pkt
):
def
identify_protocol
(
self
,
hex_pkt
):
protocols
=
""
protocols
=
""
if
(
b
'6300'
in
hex_pkt
and
hex_pkt
[
84
:
88
]
==
b
'6300'
):
protocols
=
protocols
+
"enip:"
if
(
b
'0300'
in
hex_pkt
and
hex_pkt
[
108
:
112
]
==
b
'0300'
):
protocols
=
protocols
+
"s7comm:"
if
(
b
'810a'
in
hex_pkt
and
hex_pkt
[
84
:
88
]
==
b
'810a'
):
protocols
=
protocols
+
"bacnet:"
if
((
b
'8000'
in
hex_pkt
or
b
'c000'
in
hex_pkt
)
and
(
hex_pkt
[
84
:
88
]
==
b
'8000'
or
hex_pkt
[
84
:
88
]
==
b
'c000'
)):
print
(
"omron found"
)
protocols
=
protocols
+
"omron:"
if
(
b
'0000'
in
hex_pkt
and
hex_pkt
[
108
:
112
]
==
b
'0000'
):
protocols
=
protocols
+
"modbus:"
if
(
hex_pkt
[
46
:
48
]
==
b
"06"
):
if
(
hex_pkt
[
46
:
48
]
==
b
"06"
):
protocols
=
protocols
+
"tcp"
protocols
=
protocols
+
"tcp"
port
=
self
.
get_tcp_port
(
hex_pkt
)
if
(
port
in
self
.
protocol_list
):
port_protocol
=
self
.
protocol_list
[
port
]
.
protocol_identify
(
hex_pkt
)
if
(
port_protocol
):
protocols
=
protocols
+
port_protocol
if
(
hex_pkt
[
46
:
48
]
==
b
"11"
):
if
(
hex_pkt
[
46
:
48
]
==
b
"11"
):
protocols
=
protocols
+
"udp"
protocols
=
protocols
+
"udp"
port
=
self
.
get_udp_port
(
hex_pkt
)
if
(
port
in
self
.
protocol_list
):
port_protocol
=
self
.
protocol_list
[
port
]
.
protocol_identify
(
hex_pkt
)
if
(
port_protocol
):
protocols
=
protocols
+
port_protocol
return
protocols
return
protocols
def
get_ip
(
self
,
hex_pkt
):
def
get_ip
(
self
,
hex_pkt
):
...
...
helpers/__pycache__/Packet_Analyzer.cpython-39.pyc
View file @
034b2b56
No preview for this file type
protocol_discover_helpers/__pycache__/bacnet_discover.cpython-39.pyc
0 → 100644
View file @
034b2b56
File added
protocol_discover_helpers/__pycache__/enip_discover.cpython-39.pyc
0 → 100644
View file @
034b2b56
File added
protocol_discover_helpers/__pycache__/modbus_discover.cpython-39.pyc
0 → 100644
View file @
034b2b56
File added
protocol_discover_helpers/__pycache__/omron_discover.cpython-39.pyc
0 → 100644
View file @
034b2b56
File added
protocol_discover_helpers/__pycache__/s7_discover.cpython-39.pyc
0 → 100644
View file @
034b2b56
File added
protocol_discover_helpers/bacnet_discover.py
0 → 100644
View file @
034b2b56
def
protocol_identify
(
hex_pkt
):
if
(
b
'810a'
in
hex_pkt
and
hex_pkt
[
84
:
88
]
==
b
'810a'
):
return
"bacnet:"
\ No newline at end of file
protocol_discover_helpers/enip_discover.py
0 → 100644
View file @
034b2b56
def
protocol_identify
(
hex_pkt
):
if
(
b
'6300'
in
hex_pkt
and
hex_pkt
[
84
:
88
]
==
b
'6300'
):
return
":enip"
\ No newline at end of file
protocol_discover_helpers/modbus_discover.py
0 → 100644
View file @
034b2b56
def
protocol_identify
(
hex_pkt
):
if
(
hex_pkt
[
108
:
112
]
==
b
'0000'
):
return
":modbus"
\ No newline at end of file
protocol_discover_helpers/omron_discover.py
0 → 100644
View file @
034b2b56
def
protocol_identify
(
hex_pkt
):
if
((
b
'8000'
in
hex_pkt
or
b
'c000'
in
hex_pkt
)
and
(
hex_pkt
[
84
:
88
]
==
b
'8000'
or
hex_pkt
[
84
:
88
]
==
b
'c000'
)):
print
(
"omron found"
)
return
":omron"
\ No newline at end of file
protocol_discover_helpers/s7_discover.py
0 → 100644
View file @
034b2b56
def
protocol_identify
(
hex_pkt
):
if
(
b
'0300'
in
hex_pkt
and
hex_pkt
[
108
:
112
]
==
b
'0300'
):
return
":s7comm"
\ No newline at end of file
protocol_enumerators/__pycache__/modbus.cpython-39.pyc
View file @
034b2b56
No preview for this file type
protocol_enumerators/modbus.py
View file @
034b2b56
...
@@ -74,37 +74,43 @@ def comm(host, port, rsid):
...
@@ -74,37 +74,43 @@ def comm(host, port, rsid):
def
action
(
host
,
port
,
aggressive
):
def
action
(
host
,
port
,
aggressive
):
count
=
0
count
=
0
for
sid
in
range
(
1
,
247
):
try
:
rsid
=
form_rsid
(
sid
,
0x11
,
b
""
)
for
sid
in
range
(
1
,
247
):
result
=
comm
(
host
,
port
,
rsid
)
rsid
=
form_rsid
(
sid
,
0x11
,
b
""
)
if
(
result
!=
False
and
len
(
result
)
>
8
):
result
=
comm
(
host
,
port
,
rsid
)
output
[
sid
]
=
{
'Slave ID data'
:
'Unknown'
,
'Device identification'
:
'Unknown'
}
if
(
result
!=
False
and
len
(
result
)
>
8
):
if
(
result
[
7
]
==
17
or
result
[
7
]
==
145
):
output
[
sid
]
=
{
'Slave ID data'
:
'Unknown'
,
'Device identification'
:
'Unknown'
}
if
(
result
[
7
]
==
17
):
if
(
result
[
7
]
==
17
or
result
[
7
]
==
145
):
slave_id
=
extract_slave_id
(
result
)
if
(
result
[
7
]
==
17
):
output
[
sid
][
"Slave ID data"
]
=
slave_id
if
slave_id
else
"Unknown"
slave_id
=
extract_slave_id
(
result
)
elif
(
result
[
7
]
==
145
):
output
[
sid
][
"Slave ID data"
]
=
slave_id
if
slave_id
else
"Unknown"
exception_code
=
result
[
8
]
elif
(
result
[
7
]
==
145
):
exception_string
=
modbus_exception_codes
[
exception_code
]
if
exception_code
<
12
and
exception_code
>
0
else
None
exception_code
=
result
[
8
]
if
(
exception_string
==
None
):
exception_string
=
modbus_exception_codes
[
exception_code
]
if
exception_code
<
12
and
exception_code
>
0
else
None
exception_string
=
"Unknown exception, Code="
+
str
(
exception_code
)
if
(
exception_string
==
None
):
output
[
sid
][
"Error"
]
=
exception_string
exception_string
=
"Unknown exception, Code="
+
str
(
exception_code
)
else
:
output
[
sid
][
"Error"
]
=
exception_string
return
False
else
:
device_table
=
discover_device_id
(
host
,
port
,
sid
)
return
False
if
(
device_table
!=
None
and
len
(
device_table
)
>
0
):
device_table
=
discover_device_id
(
host
,
port
,
sid
)
output
[
sid
][
"Device identification"
]
=
re
.
sub
(
'[
\x00
-
\x1f
]'
,
' '
,
device_table
.
decode
())
.
replace
(
" "
,
" "
)
if
(
device_table
!=
None
and
len
(
device_table
)
>
0
):
count
=
0
device_table
=
re
.
sub
(
'[
\x00
-
\x1f
]'
,
' '
,
device_table
.
decode
(
errors
=
'ignore'
))
if
not
aggressive
:
output
[
sid
][
"Device identification"
]
=
device_table
.
replace
(
" "
,
" "
)
output
[
sid
][
"sid"
]
=
"sid"
+
str
(
sid
)
count
=
0
return
output
[
sid
]
if
not
aggressive
:
elif
(
result
==
'terr'
and
count
>
2
):
output
[
sid
][
"sid"
]
=
"sid"
+
str
(
sid
)
return
False
return
output
[
sid
]
elif
(
result
==
False
):
elif
(
result
==
'terr'
and
count
>
2
):
return
False
return
False
else
:
elif
(
result
==
False
):
count
=
count
+
1
return
False
return
json
.
dumps
(
output
)
else
:
count
=
count
+
1
return
json
.
dumps
(
output
)
except
Exception
as
e
:
exc_type
,
exc_obj
,
exc_tb
=
sys
.
exc_info
()
fname
=
os
.
path
.
split
(
exc_tb
.
tb_frame
.
f_code
.
co_filename
)[
1
]
print
(
exc_type
,
fname
,
exc_tb
.
tb_lineno
,
e
)
def
get_info
(
ip
,
port
,
aggressive
=
False
):
def
get_info
(
ip
,
port
,
aggressive
=
False
):
...
...
test.py
View file @
034b2b56
import
openai
from
protocol_discover_helpers
import
modbus_discover
# Define OpenAI API key
dicc
=
{
"502"
:
modbus_discover
}
openai
.
api_key
=
"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"
# Set up the model and prompt
print
(
dicc
[
"502"
]
.
protocol_identify
(
"7c76356ad4847c5a1c7f6eef08004500016e64580000fa06d5bfa68d1c8ac0a801b201f67448f87b9f607ba3597550181765211b00000000000000fe012b0e0182000003000341424201023333021156322e352e312c323031352d31312d32360000000096000000960233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333000c09300008000000230000602210208000860200210000018040110000040100100000000000000039"
))
model_engine
=
"text-davinci-003"
hex_pkt
=
b
'7c76356ad4847c5a1c7f6eef08004500016e64580000fa06d5bfa68d1c8ac0a801b201f67448f87b9f607ba3597550181765211b00000000000000fe012b0e0182000003000341424201023333021156322e352e312c323031352d31312d32360000000096000000960233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333000c09300008000000230000602210208000860200210000018040110000040100100000000000000039'
prompt
=
"give me a random youtube funny comment and keep it simple from 6 to 20 words along with emojis scene:dog chewing ball"
# Generate a response
def
protocol_identify
(
hex_pkt
):
completion
=
openai
.
Completion
.
create
(
if
(
hex_pkt
[
108
:
112
]
==
b
'0000'
):
engine
=
model_engine
,
hex_pkt
=
hex_pkt
[
108
:]
prompt
=
prompt
,
tid
=
int
(
hex_pkt
[
0
:
4
]
.
decode
(),
16
)
max_tokens
=
1024
,
pid
=
int
(
hex_pkt
[
4
:
8
]
.
decode
(),
16
)
n
=
1
,
length
=
int
(
hex_pkt
[
8
:
12
]
.
decode
(),
16
)
stop
=
None
,
print
(
len
(
hex_pkt
[
0
:])
/
2
)
temperature
=
0.9
,
)
response
=
completion
.
choices
[
0
]
.
text
print
(
response
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment