CN108881484A - 一种检测终端是否能访问互联网的方法 - Google Patents

一种检测终端是否能访问互联网的方法 Download PDF

Info

Publication number
CN108881484A
CN108881484A CN201810830754.8A CN201810830754A CN108881484A CN 108881484 A CN108881484 A CN 108881484A CN 201810830754 A CN201810830754 A CN 201810830754A CN 108881484 A CN108881484 A CN 108881484A
Authority
CN
China
Prior art keywords
certificate
server
carries out
preset
detection terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810830754.8A
Other languages
English (en)
Other versions
CN108881484B (zh
Inventor
赵飞
郑晓峰
周毅
李宗宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Yun Meng Meng Technology Co Ltd
Original Assignee
Hangzhou Yun Meng Meng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Yun Meng Meng Technology Co Ltd filed Critical Hangzhou Yun Meng Meng Technology Co Ltd
Priority to CN201810830754.8A priority Critical patent/CN108881484B/zh
Publication of CN108881484A publication Critical patent/CN108881484A/zh
Application granted granted Critical
Publication of CN108881484B publication Critical patent/CN108881484B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种检测终端是否能访问互联网的方法,包括以下步骤:a)预置一批公共网站URL池以及对应的CA证书公钥列表和CA证书,并将其预置到客户端程序中;b)当出现客户端访问服务器网络发生中断并且重连失败,或应用初次进行服务器连接时,首先通过随机从预置的公共网站URL池中选取2个同时进行https连接并用预置的CA证书进行服务器真实性校验。本方法不额外增加投入的情况下确保客户端所处环境可以访问因特网。由于知名网站的服务器证书都是私有的,无法仿冒,可以感知真实的网络环境。方案利用公共资源,可靠性高且不需要额外投入成本。

Description

一种检测终端是否能访问互联网的方法
技术领域
本发明涉及一种检测终端是否能访问互联网的方法。
背景技术
客户端访问服务器连接中断时,客户端一般需要做网络重连以实现业务连续。但在有些网络安全场景下需要确认当前因特网是否可达,然后在进行网络连接等后续操作。恶意攻击者会利用局域网模拟互联网使用虚假DNS解析服务构造虚假服务器,诱使客户端发起重连,进而对交互报文进行分析寻找漏洞。
现有的技术一般通过客户端给服务器发送保活报文的方法确认服务器是否可达,或者通过购买服务器证书,在客户端进行服务器校验的方式,这种方式比较容易被劫持和虚假服务器应答仿冒,不能真实反映当前网络连通情况。
发明内容
本发明的目的在于针对现有技术的不足,提供一种检测终端是否能访问互联网的方法。
为了解决上述技术问题,采用如下技术方案:
一种检测终端是否能访问互联网的方法,包括以下步骤:
a)预置一批公共网站URL池以及对应的CA证书公钥列表和CA证书,并将其预置到客户端程序中;
b)当出现客户端访问服务器网络发生中断并且重连失败,或应用初次进行服务器连接时,首先通过随机从预置的公共网站URL池中选取2个同时进行https连接并用预置的CA证书进行服务器真实性校验。
进一步,如果CA证书进行服务器真实性校验通过,则说明因特网连通性没问题,然后才开始跳转到下一个服务器IP进行业务连接。
进一步,如果CA证书进行服务器真实性校验没通过,则说明因特网连通性异常,终止网络连接。
进一步,CA证书进行服务器真实性校验的方式使用openssl库来实现安全连接过程,确保https握手成功并且证书校验通过,否则是假冒的服务器。
相关术语解释如下:
SSL:SSL(Secure Sockets Layer安全套接层),及其继任者传输层安全(Transport Layer Security,TLS)是为网络通信提供安全及数据完整性的一种安全协议。TLS与SSL在传输层对网络连接进行加密。
CA证书:CA证书(内含公钥和私钥,本申请所述的CA指的是证书公钥),网上的公众用户通过验证CA的签字从而信任CA,任何人都可以得到CA的证书(含公钥),用以验证它所签发的证书。如果一个用户想鉴别另一个证书的真伪,他就用CA的公钥对那个证书上的签字进行验证,一旦验证通过,该证书就被认为是有效的。证书实际是由证书签证机关(CA)签发的对用户的公钥的认证。
由于采用上述技术方案,具有以下有益效果:
本发明为一种检测终端是否能访问互联网的方法,不额外增加投入的情况下确保客户端所处环境可以访问因特网。由于知名网站的服务器证书都是私有的,无法仿冒,可以感知真实的网络环境。方案利用公共资源,可靠性高且不需要额外投入成本。
附图说明
下面结合附图对本发明作进一步说明:
图1为本发明中一种检测终端是否能访问互联网的方法的流程示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
如图1所示,一种检测终端是否能访问互联网的方法,包括以下步骤:
a)预置一批公共网站URL池以及对应的CA证书公钥列表和CA证书,并将其预置到客户端程序中;
b)当出现客户端访问服务器网络发生中断并且重连失败,或应用初次进行服务器连接时,首先通过随机从预置的公共网站URL池中选取2个同时进行https连接并用预置的CA证书进行服务器真实性校验。
如果CA证书进行服务器真实性校验通过,则说明因特网连通性没问题,然后才开始跳转到下一个服务器IP进行业务连接。
如果CA证书进行服务器真实性校验没通过,则说明因特网连通性异常,终止网络连接。
CA证书进行服务器真实性校验的方式使用openssl库来实现安全连接过程,确保https握手成功并且证书校验通过,否则是假冒的服务器。
CA证书进行服务器真实性校验的具体过程如下:使用openssl库来实现安全连接过程,调用SSL_CTX_load_verify_locations函数加载URL对应的CA证书,依据ctx创建一个bio对象和ssl对象,然后调用BIO_set_conn_hostname来设置要访问的URL,为了确认连接是否成功,先调用BIO_do_connect函数判断返回值是否大于0,然后调用SSL_get_verify_result来检查是否是可信服务器,如果返回值是X509_V_OK则说明服务器为真实服务器,否则是假冒的服务器。
以上仅为本发明的具体实施例,但本发明的技术特征并不局限于此。任何以本发明为基础,为解决基本相同的技术问题,实现基本相同的技术效果,所作出地简单变化、等同替换或者修饰等,皆涵盖于本发明的保护范围之中。

Claims (4)

1.一种检测终端是否能访问互联网的方法,其特征在于包括以下步骤:
a)预置一批公共网站URL池以及对应的CA证书公钥列表和CA证书,并将其预置到客户端程序中;
b)当出现客户端访问服务器网络发生中断并且重连失败,或应用初次进行服务器连接时,首先通过随机从预置的公共网站URL池中选取2个同时进行https连接并用预置的CA证书进行服务器真实性校验。
2.根据权利要求1所述的一种检测终端是否能访问互联网的方法,其特征在于:如果CA证书进行服务器真实性校验通过,则说明因特网连通性没问题,然后才开始跳转到下一个服务器IP进行业务连接。
3.根据权利要求1所述的一种检测终端是否能访问互联网的方法,其特征在于:如果CA证书进行服务器真实性校验没通过,则说明因特网连通性异常,终止网络连接。
4.根据权利要求1所述的一种检测终端是否能访问互联网的方法,其特征在于:所述CA证书进行服务器真实性校验的方式使用openssl库来实现安全连接过程,确保https握手成功并且证书校验通过,否则是假冒的服务器。
CN201810830754.8A 2018-07-26 2018-07-26 一种检测终端是否能访问互联网的方法 Active CN108881484B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810830754.8A CN108881484B (zh) 2018-07-26 2018-07-26 一种检测终端是否能访问互联网的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810830754.8A CN108881484B (zh) 2018-07-26 2018-07-26 一种检测终端是否能访问互联网的方法

Publications (2)

Publication Number Publication Date
CN108881484A true CN108881484A (zh) 2018-11-23
CN108881484B CN108881484B (zh) 2021-04-02

Family

ID=64305618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810830754.8A Active CN108881484B (zh) 2018-07-26 2018-07-26 一种检测终端是否能访问互联网的方法

Country Status (1)

Country Link
CN (1) CN108881484B (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672587A (zh) * 2018-12-14 2019-04-23 北京酷云互动科技有限公司 公共终端的识别方法、识别***、服务器、计算机可读介质
CN115021917A (zh) * 2022-06-24 2022-09-06 浪潮卓数大数据产业发展有限公司 一种基于证书的安全校验方法、***、设备及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580172A (zh) * 2014-12-24 2015-04-29 北京奇虎科技有限公司 一种基于https协议的数据通信方法及装置
CN105634744A (zh) * 2015-12-31 2016-06-01 北京元心科技有限公司 一种根证书存储装置及安全接入方法
US20170237716A1 (en) * 2016-02-17 2017-08-17 Electronics And Telecommunications Research Institute System and method for interlocking intrusion information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580172A (zh) * 2014-12-24 2015-04-29 北京奇虎科技有限公司 一种基于https协议的数据通信方法及装置
CN105634744A (zh) * 2015-12-31 2016-06-01 北京元心科技有限公司 一种根证书存储装置及安全接入方法
US20170237716A1 (en) * 2016-02-17 2017-08-17 Electronics And Telecommunications Research Institute System and method for interlocking intrusion information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672587A (zh) * 2018-12-14 2019-04-23 北京酷云互动科技有限公司 公共终端的识别方法、识别***、服务器、计算机可读介质
CN115021917A (zh) * 2022-06-24 2022-09-06 浪潮卓数大数据产业发展有限公司 一种基于证书的安全校验方法、***、设备及介质
CN115021917B (zh) * 2022-06-24 2024-05-10 浪潮卓数大数据产业发展有限公司 一种基于证书的安全校验方法、***、设备及介质

Also Published As

Publication number Publication date
CN108881484B (zh) 2021-04-02

Similar Documents

Publication Publication Date Title
US10362053B1 (en) Computer security threat sharing
US20190354709A1 (en) Enforcement of same origin policy for sensitive data
US8756697B2 (en) Systems and methods for determining vulnerability to session stealing
Izhikevich et al. {LZR}: Identifying unexpected internet services
Dreger et al. Dynamic application-layer protocol analysis for network intrusion detection
CN101873331B (zh) 一种安全认证方法和***
Buchanan et al. Analysis of the adoption of security headers in HTTP
CN104869102B (zh) 基于xAuth协议的授权方法、装置和***
CN110198297B (zh) 流量数据监控方法、装置、电子设备及计算机可读介质
Hubbard et al. A study of SSL proxy attacks on Android and iOS mobile applications
CN114598540A (zh) 访问控制***、方法、装置及存储介质
CN113341798A (zh) 远程访问应用的方法、***、装置、设备及存储介质
CN109067785A (zh) 集群认证方法、装置
US11784993B2 (en) Cross site request forgery (CSRF) protection for web browsers
CN102271136A (zh) Nat网络环境下的访问控制方法和设备
CN111314381A (zh) 安全隔离网关
CN110099129A (zh) 一种数据传输方法以及设备
CN108011873A (zh) 一种基于集合覆盖的非法连接判断方法
CN104955036B (zh) 公共Wi-Fi环境下安全联网方法和装置
US11601431B2 (en) Split-tiered point-to-point inline authentication architecture
CN105518693B (zh) 一种安全防护方法,及装置
CN108881484A (zh) 一种检测终端是否能访问互联网的方法
Wu et al. IoT network traffic analysis: Opportunities and challenges for forensic investigators?
CN116633725A (zh) 一种全渠道接入网关
CN116962149A (zh) 网络故障的检测方法和装置、存储介质及电子设备

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant