《工业互联网安全测试技术:DNP渗透测试.docx》由会员分享,可在线阅读,更多相关《工业互联网安全测试技术:DNP渗透测试.docx(9页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、DNP3协议测试实验文档实验原理DNP3协议是一种应用层协议,本文将采用SSL协议对DNP3协议提供安全传输机制, 其总体设计如下列图所示。本文设计的DNP3安全传输机制主要分为SSL握手和数据加密两 个功能模块。SSL握手模块:SSL握手是实现安全传输的前提,主要实现签名验证和密钥交换,生成的 共享密钥用于数据加密。数据加密模块:基于对数据安全的考虑,对DNP3协议数据进行加 密,并以密文的形式传输,确保了数据的安全。MTU主站设备; 应用程序SSL握手数据加密秘钳交换 一* -I 安全加密安全通信-SSL握手数据加密RTU从站设备应用程序这种安全传输机制没有改变DNP3协议,而是试图将DN
2、P3协议包裹在SSL协议中,确 保DNP3主站设备和DNP3从站设备之间在TCP/IP上的传输安全。实验目的创立服务端和仿真端,通过DNP3协议抓取流量包进行重放攻击。实验环境Windows 10操作系统 DNPCIientSim 软件 1 套DNPServerSim 软件 1 套ComMax软件1套Wireshark 软件 1 套推荐课时数:2课时实验步骤1,配置 DNPServerSim 软件(1)翻开DNPServerSim软件,点击Add Server,添加DNP3服务端,如下列图所示:9 DNP3 Server Simulator - UntitledMain HelpDelete
3、Server19/11/2021 07:537TrtAl.VersionAppbcatkHi 3 exit in 806 Seconds SirnuUtor7 DHP.seRVW-l Configuration_l Data_Ob|ects_l Traffic logSmJator DNP_SERV_1 Con/rattonData.Objects-l Traffic_ 1 Loq_1图1 DNPServerSim软件界面 将传送与接受报文功能开启,即将Enable FileTransfer功能从False设置为True,如下列图所示:3 DNP3 Server Simulator Untit
4、ledMain HelpDelete Server19/11/20210759TriaLVersioci Appbution wil exit wiSimulatorConftguraboi_l Data_Objects_l TrafficLogSmUator 一际Configurational Data.Objects.l Traffic Log.lDNP SERVER 1enable utc time/ local twneII Q在这里输入你要搜索的内容”、尸)17 人自中 756 r 2021/11/19图2开启接受文件 配置Configuration界面,点击Add Row,增加八个
5、单元,如下列图所示:DNP3 Server Simulator Untitled19/11/2021 07:57:48V Simulator7 DNP_RVIR_1Conftguratton.l Data.Objects-l Traffic LogSmiator O*_SVW_1 Confirdtx)n_l Data_Ob)ects_l TrafficLog_lII P在这里输入你要搜索的内容17C 人禽中 7:570“Q C r 2021/11/19 r图3增加单元(4)点击Choose a Group会出现八个选项,每一行对应一个选项,配置完成后如下列图所示:DNP3 Server Sim
6、ulator UntitledMain HelpSm&torConfiguration.! Data.Objects.l Traffic.l Loq.119/11/2021 0799Add RowLoad ConhguratonSJIoDNP3 Group IDNumber of PointsClassControl ModelSBOTWneOutAnalog Deadband ValueAnalog Storage Type1BINARY.INPUT1CLASS.OMSTATUS_OWLY00lOT-APPtICABtl2DOUBLE JMVT1CLASS.ONESTAIUS.ONLY00N
7、OT_APPUCA0L3BtNARY.OUTPVT1QASS.ONEDIRECT.0P6UT10N00NOT.APPlJCAeLE4COUNTWJhPUT1aASS.ONESTAWS.ONLY00NOT_APPlICAa|sANALOGJFfUT1QASS.ONESTATUS.ONLY00AS.aOAT6ANALOG.OUWTS1CLASS.ONEDRECT.OPGUTION00AS.ftOAT1OCTECT.SIRING1ctASS.oreSTATUS.ONLY00NOTJkPPLlCAeiE8VIRTUAL.TERMINAL.BIHARY INPUT DOUOEJNPUT BINARY.O
8、UTPUT COUNTS JNPUT ANALOG JhPJT ANALOG.OUTPUTS OCTECT STRINGII Q在这里输入你要搜索的内容17C人8中2。2窝八9图4单元设置 配置完8行之后,点击Load configuration选项,将会跳转到Data_Objects页面,如下 图所示:SB DNP3 Server Simulator - UntitledMain Help19/11/2021 08X)22二 xlTrlal_ VersionAppkc4tion wil exit in 251 Seconds*v SHnulator7 DNP.SfRVfR.l Conhgur
9、abon.l Data.Objects.l Traffic 1Smutotor DT_SVW_l Configurahon.l Data.Objects.l TrafficLoq.ISUrt CommunkJtion Q aIl p在这里输入你要搜索的内容17 人 8 中 202篙/ig3DNP3 Group IdIndex NumberValue QBtv8Time StampClass1BINARY JNPUT 00ONLINE08:00:S6:10S 19/11/2021CLASS.OfCSTAT2DOUeiEJNPUT00ONLINE08:00:56:105 19/11/2021CLA
10、SS.OCSTAT3BtNARY.OUTPUT00ONLINE08:00:56:105 19/11/2021CLASS.ONEDIREi400ONLINE08:00:56:105 19/11/2021CLASS_ONESTAT5FRCOUNTW.IMVT00ONLINE08:00:56:105 19/11/2021CLASS.ONESTAT6ANALOG JTFUT00ONLINE08:00:56:105 19/11/2021OASS.OHESTATAMLOG.OUTPUTS00ONLINE08:00:56:105 19/11/2021CLASS.ONEDIRE,80CTECT.S7RING0
11、Hi octect stmg08:00:56:105 19/11/2021CLASS.ONESTAT图5加载通信(6)点击log页面,可以看到配置已经加载成功的提示,如下列图所示:3 DNP3 Server Simulator UntitledMain Help19/11/2021 09)4:19Trtal_ Version Appbution wil exit inV Simulatorv DNP.SfRVfR.l Conftgurabon_l Data_Obect_l Traffic LogV Simulatorv DNP.SfRVfR.l Conftgurabon_l Data_Obec
12、t_l Traffic LogSmutetor OP.SKVR.l Configuratxxi-l Data.Objects.l TrafficgII p在这里输入你要搜索的内容II p在这里输入你要搜索的内容17C人禽中 8:040“Q c r 2021/11/19 r图6查看logDNP3的服务器端也就完成了。2,配置 DNPCIientSim 软件(1)翻开DNPCIientSim软件,点击Add Client,增加DNP3客户端,如下图:DNP3 Client Simulator UntitledMain HelpDelete CtoentSMnuiatorV DHP3_CLnMT_l
13、 Data.Objectsl Traffic LogItemDescription ValueCommunicahofi ModeTCPP_MODETCP Source IP AddressTCP Port Number20000Master Address2Outstation / Slave Address1Link Layer Timeout2000Appfecation Layer Timeout6000Pol Interval Gass 1,2,31000Integrality Pol Interval - dass 0,123Pol Interval - Class 020000
14、0Pol Interval - Class 10Pol Interval - Class 20Pol Interval Class 30Enable IfTC timeFALSEDisable Unsoidted at StatupFALSEEnable Frozen Analoq Input Support Enable Fie Transfer SupportFALSE FALSEFHeOperatkm Timeout60000Cal Update CaHbadc even TvnestampTRUECommand Taneout12000Auto Generate DMP3 Data O
15、bjectsTRUEUpdate Buffer Size1500加匕als- - - - - -MSBbkSmUator 5F3_CLUT00ONLINE8:11:12:669 19/11/2021NO.CLASSLFRC0UNTER.WVT00ONLITC8:11:12:669 19/11/2021NO.CLASSFANALOG JWUT00.0000H.INE8:11:12:669 19/11/2021NO.aASS6BINARY JOUTPUT00ONLINE8:11:12:669 19/11/2021NO.ttASSANALOG.OJTPVTS00.000OfCWE8:11:12:66
16、9 19/11/2021NO.QASSStop CommunicationServer Status - Connected图9开启通信3 .使用Wireshark软件抓取流量翻开Wireshark,在上方的过滤器中输入dnp3,筛选使用dnp3协议的数据包,如下列图 所示:|P DNP3 Client Simulator Untitled-XMain HelpTrtal-Version 19/11/2021AppbcUon wvlexAm 754 SecondsDelete Cbent Swnutatoe v DHP3CLUMI_1 gg_Objects Traffic LogDelete
17、Cbent Swnutatoe v DHP3CLUMI_1 gg_Objects Traffic LogSmutetor D3_QJBTDataJDbjects.l TrafficLog.lItemDescrtpboo . ValueCommunicatioa ModeTCP_IP_MOOETCP Source IP AddressTCP Port Number20000Master Address20 Adapter for loopback traffic capture X文件(F)绢辑(E)视图(V) 桀(G)捕获(C)分析(A)统计 (Y)无线(W)工具(T)帮助(H)4 !总区0
18、q鳖至圉信 =H 鬣堂星 |dnp3| +No.TimeSourceDestinationProtocolLengthInfo1219128.023542DNP3.068Read, Class1231221128.045630DNP3.061Response1225129.060745DNP3.068Read, Class1231227129.083833DNP3.061Response1231130.095686DNP3.068Read, Class123Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits) on
19、 interface DeviceNPF_Loopback, id 0 Null/LoopbackTransmission Control Protocol, Src Port: 50238, Dst Port: 20000, Seq: 1, Ack: 1, Len: 24Distributed Network Protocol 3.0图10报文获取(2)观察数据报文的最后一行Info, Read即客户端请求读取服务器端的数据的请求报文,而 Response是服务器端的回应报文。点击Read报文,复制其报文的Hex数据流,如下列图 所示: JF区eq e下小K& q q 52全部展开应用为列1
20、 dnp3o.TimeSourceDestination3391 361.2520653395 362.2560493397 362.277505作为过谑器应用 Prepare as Filter 对话过渡器3401 363.286821用过沌器着色3403 363.30836412;追踪流复制Expand Subtrees 折叠子树届,Adapter for loopback traffic capture文件(F)编辑(E)视图(V)蹶专(G)捕获(C)分析(A)统计 (Y)无线(W) IfCtrhShiftH Frame 3401: 68 bytes on wire (54/ Null/
21、Loopback Internet Protocol Version 4, Src:Transmission Control Protocol, Sr Distributed Network Protocol 3.0所有可见工程选中树的所有可见工程描述字段名称值作为过渡器显不分组字节导出分组字节流(B).Ctrl i ShiftCtrl+Shift+Xopback, id 0Wiki协议页面 过渔器字段参考协议首选项0000001000200030004002 00 00 00 45 00 00 407f 00 00 01 7f 00 00 01 bd 86 83 41 50 18 27 cd
22、01 00 02 00 c3 5a f5 c5 0104 06 ce将字节复制为十六进制+ ASCII转储 .as Hex Dump .as Printable Text .as a Hex Stream .as Raw Binary .as Escaped String解码为(A).Go to Linked Packet在新窗口中显示已链接的分组Ctrl+Shift+UKO7 17 人翱英 822D * 2021/11/19TimeSourceDestination3391 361.2520653395 362.2560493397 362.277505翻开9)关闭(G)产石母队(Q)常用工
23、艮(Z) WSD(H)退匕(X)Expand Subtrees 折会了树仝部展开仝部折叠应用为列作为过渡器应用 Prepare as Filter 对话过渡器Ctrl Shift I报文助|多报文卸|irIFa W*056411 c401000200c3582cl 013c02063c03063c0406a7b288 P在这里输入你要搜索的内容图11复制Hex数据4.使用ComMax模拟客户端(1)关闭DNPCIientSim软件,翻开ComMax软件,点击参数设置,设置服务器IP,默认端 口号为20000,点击确定,如下列图所示:* * Adapter for loopbac k traff
24、k (dplure文件(F)编银(E)视图(V)跳转(G)捕获(C)分析(A)统计(S) (Y)无线(W) 丁4 4 Z)电邕曾曼- = q qaH H|dnp3图12连接配置 将第三步复制的Hex数据流粘贴到ComMax的空白框中,点击连续发送,如下列图所示:V连续发送间隔座秒)畲法1N056411 c401000200c35af5c5013c02063c03063c0406cede图13模拟通信(3)之后观察接受报文窗口,有数据返回,窃取数据攻击模拟成功,如下列图所示:* ,A(1dpttr for loopbiM k trdffk (dpture文件(F)纭铜(E)视图(V)跳转(G)捕
25、获(C)分析(A)统计(S) (Y)无线(W) Tf0 |dnp3No.TimeSourceDestination3391361.2520653395362.2560493397362.277505卤磔Q 1吟邕布Expand Subtrees折会了树仝部展开仝部折叠应用为列Ctrl Shift I作为过沌器应用Prepare as Filter对话过渡器4 * Adapter for loopback traffic capture文件(F)编期(E)视图(V)目俄(G)捕获(C)分析(A)统计(S) (Y)无线(W)工具(T)帮助(H)入电qa*邕蓊曼二三aa4史I dnp3Time780
26、578097811781578171097.2388221098.2186381098.2386321099.2163791099.233086 m青云。mMax画强酸件|翻开9)关闭(G) M5H(P)清除报文(Q)常用工M(Z) 助(H)退出(X)单报文(Q) |多报文出)|V连续发送)056411c401000200c3W5c5013c02063c03a3c0406cede Xpsponsead, Class 123 iponseid, Class 123 iponseFrame 3401: 68 bytes Null/LoopbackInternet Protocol Ver Transmission Controlace DeviceNPF_Loopback, id 0 Distributed Network P:08 32:39 791)IX 05 64 OA 44 02 00 01 00 10 F0 C7 C5 81 90 00 4A DB (08 32 39 808),X 06 64 11 C4 01 00 02 00 C3 5A F5 C5 01 X 02 06 X 03 06 X 04 06 CE DEC。 ” /C图14窃取数据:7443, Len: 24