CN106161478B - 基于http响应头变化的准确攻击识别方法 - Google Patents

基于http响应头变化的准确攻击识别方法 Download PDF

Info

Publication number
CN106161478B
CN106161478B CN201610831649.7A CN201610831649A CN106161478B CN 106161478 B CN106161478 B CN 106161478B CN 201610831649 A CN201610831649 A CN 201610831649A CN 106161478 B CN106161478 B CN 106161478B
Authority
CN
China
Prior art keywords
attack
server
http response
request
response head
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.)
Active
Application number
CN201610831649.7A
Other languages
English (en)
Other versions
CN106161478A (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.)
Chengdu Zhidaochuangyu Information Technology Co Ltd
Original Assignee
Chengdu Zhidaochuangyu Information 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 Chengdu Zhidaochuangyu Information Technology Co Ltd filed Critical Chengdu Zhidaochuangyu Information Technology Co Ltd
Priority to CN201610831649.7A priority Critical patent/CN106161478B/zh
Publication of CN106161478A publication Critical patent/CN106161478A/zh
Application granted granted Critical
Publication of CN106161478B publication Critical patent/CN106161478B/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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1466Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种基于HTTP响应头变化的准确攻击识别方法,包括以下步骤:接收客户端HTTP请求并进行预判,判断HTTP请求是否为疑似攻击,若预判结果为疑似攻击,则将该请求拦截,将客户端请求数据替换为普通内容后发送给服务器;记录服务器发送的HTTP响应头,将客户端原始请求数据发送给服务器;再次记录服务器发送的HTTP响应头;对比两次HTTP响应头是否发生变化,若发生变化,判断本次客户端请求为攻击,若对比结果未发生变化,判断本次客户端请求为非攻击。本发明能够对疑似攻击行为进行准确识别,准确判定攻击是否生效,误报率低。

Description

基于HTTP响应头变化的准确攻击识别方法
技术领域
本发明涉及Web攻击识别技术领域,具体涉及一种基于HTTP响应头变化的准确攻击识别方法。
背景技术
目前Web攻击识别技术几乎都是根据HTTP请求进行检测的。检测方法是,客户端请求到达服务器前对客户端请求数据进行攻击特征匹配。例如客户端请求为http://www.example.com/?id=1and 1=1,如果and 1=1匹配了攻击特征,就识别为攻击,如果没有匹配攻击特征就识别为非攻击。此检测方法有几项缺点:首先,攻击识别是在客户端请求到达服务器前,导致攻击是否生效不能判别;其次,不同服务器对请求数据的处理方式不同产生很高的误报率;最后,识别方法是依据攻击特征的,当有新的攻击手法时,需要及时的进行特征分析和补充。
相关术语解释
HTTP:超文本传输协议(Hyper Text Transfer Protocol),是互联网上应用最为广泛的一种网络协议。
HTTP响应头:HTTP服务器向客户机的响应消息,状态行后的一个或多个,由HTTP头域名,冒号(:)和域值(域值前边要至少有一个空格)组成的内容。
Content-Length:HTTP消息实体的传输长度(在HTTP响应头中该字段标识服务器响应内容实体传输长度)。
发明内容
本发明所要解决的技术问题是提供一种基于HTTP响应头变化的准确攻击识别方法,解决现有Web攻击识别技术中不能判定攻击是否生效、高误报率、新的攻击方法出现后要进行攻击特征分析和补充等问题。
为解决上述技术问题,本发明采用的技术方案是:
一种基于HTTP响应头变化的准确攻击识别方法,包括以下步骤:
步骤1:接收客户端HTTP请求并进行预判,判断HTTP请求是否为疑似攻击,若预判结果为疑似攻击,则将该请求拦截,将客户端请求数据替换为普通内容后发送给服务器;
步骤2:记录服务器发送的HTTP响应头,将客户端原始请求数据发送给服务器;
步骤3:再次记录服务器发送的HTTP响应头;
步骤4:对比两次HTTP响应头是否发生变化;若发生变化,判断本次客户端请求为攻击,若对比结果未发生变化,判断本次客户端请求为非攻击。
根据上述方案,若步骤1的预判结果为非攻击,则断定本次客户端请求为非攻击。
与现有技术相比,本发明的有益效果是:对疑似攻击行为准确识别,识别出其为攻击还是非攻击;准确判定攻击是否生效,误报率低;此外,在新的攻击方法出现后,不需要进行攻击特征分析和补充。
附图说明
图1是本发明基于HTTP响应头变化的准确攻击识别方法流程示意图。
具体实施方式
下面结合附图和具体实施方式对本发明作进一步详细的说明。本发明提供的一种基于HTTP响应头变化的准确Web攻击识别方法,包括客户端请求初步判断、客户端请求拦截、客户端提交数据替换、客户端请求数据发送、HTTP响应头对比、依据HTTP响应头对比结果来判断客户端请求是否为攻击等内容,如图1所示,详述如下。
S101、收到客户端HTTP请求进行预判;
S102、如果步骤S101预判结果为疑似攻击;
S103、首先将该请求拦截,将客户端请求数据(通过参数提交的内容)替换为普通内容后发送给服务器;
S104、记录服务器发送的HTTP响应头;
S105、将客户端请求数据(没有替换请求数据,客户端原始请求)发送给服务器;
S106、记录服务器发送的HTTP响应头;
S107、对比步骤S104与S106结果,看两次HTTP响应头是否发生变化;
S108、若发生变化(不包括Content-Lengt),判断本次客户端请求为攻击;
S109、若步骤107对结果未发生变化,判断本次客户端请求为非攻击;
如果步骤S102判断为非攻击,本次客户端请求为非攻击。
例如客户端请求http://example.com/index?id=1,该请求为非攻击,直接将该请求发送到服务器。
例如客户端请求为:
http://example.com/viewSource.action?method:%23_memberAccess%3d@ ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23context[%23parameters.obj[0]] .getWriter().print(%23parameters.content[0]%2b201%2b20702),1?%23xx:% 23request.toString&obj=com.opensymphony.xwork2.dispatcher.HttpServletRespon se&content=14998
先将请求替换为http://example.com/viewSource.action?view,发送到服务器,服务器响应头为:
Server:Apache-Coyote/1.1
Content-Type:text/html
Transfer-Encoding:chunked
Date:Tue,14Jun 2016 08:47:36GMT
Connection:close
再发送客户端请求
http://example.com/viewSource.action?method:%23_memberAccess%3d@ ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23context[%23parameters.obj[0]] .getWriter().print(%23parameters.content[0]%2b201%2b20702),1?%23xx:% 23request.toString&obj=com.opensymphony.xwork2.dispatcher.HttpServletRespon se&content=14998,发送到服务器,服务器响应头为:
Server:Apache-Coyote/1.1
Content-Length:30
Date:Tue,14Jun 2016 08:48:00GMT
Connection:close
发现两次请求服务器发送的响应头发生了变化(一次有Content-Type:text/html,一次没有),判断该请求为攻击。

Claims (2)

1.一种基于HTTP响应头变化的准确攻击识别方法,其特征在于,包括以下步骤:
步骤1:接收客户端HTTP请求并进行预判,判断HTTP请求是否为疑似攻击,当预判结果为疑似攻击,则将该请求拦截,并将客户端请求数据替换为普通内容后发送给服务器;
步骤2:记录服务器发送的HTTP响应头,将客户端原始请求数据发送给服务器;
步骤3:再次记录服务器发送的HTTP响应头;
步骤4:对比两次HTTP响应头是否发生变化;若发生变化,且此变化不是Content-Length,判断本次客户端请求为攻击,若对比结果未发生变化,判断本次客户端请求为非攻击。
2.如权利要求1所述的基于HTTP响应头变化的准确攻击识别方法,其特征在于,若步骤1的预判结果为非攻击,则断定本次客户端请求为非攻击。
CN201610831649.7A 2016-09-19 2016-09-19 基于http响应头变化的准确攻击识别方法 Active CN106161478B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610831649.7A CN106161478B (zh) 2016-09-19 2016-09-19 基于http响应头变化的准确攻击识别方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610831649.7A CN106161478B (zh) 2016-09-19 2016-09-19 基于http响应头变化的准确攻击识别方法

Publications (2)

Publication Number Publication Date
CN106161478A CN106161478A (zh) 2016-11-23
CN106161478B true CN106161478B (zh) 2019-02-19

Family

ID=57341328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610831649.7A Active CN106161478B (zh) 2016-09-19 2016-09-19 基于http响应头变化的准确攻击识别方法

Country Status (1)

Country Link
CN (1) CN106161478B (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111818107B (zh) * 2020-09-14 2021-04-27 深圳赛安特技术服务有限公司 网络请求的响应方法、装置、设备及可读存储介质
CN112351009B (zh) * 2020-10-27 2022-07-22 杭州安恒信息技术股份有限公司 一种网络安全防护方法、装置、电子设备及可读存储介质
CN115065540B (zh) * 2022-06-20 2024-03-12 北京天融信网络安全技术有限公司 检测web漏洞攻击的方法、装置和电子设备
CN115296932B (zh) * 2022-09-30 2023-01-06 北京知其安科技有限公司 检测waf拦截有效性的方法、装置以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072106A (zh) * 2006-05-12 2007-11-14 国际商业机器公司 用于防御拒绝服务攻击的方法和***
CN101247395A (zh) * 2008-03-13 2008-08-20 武汉理工大学 一种Session ID全透明传递的ISAPI访问控制***
CN101764767A (zh) * 2008-12-23 2010-06-30 华为技术有限公司 网络互联的方法、网关设备及***
CN102541674A (zh) * 2011-12-26 2012-07-04 运软网络科技(上海)有限公司 自主元素模型控制***、方法及服务器受侵保护检测***
EP1990977B1 (en) * 2007-05-09 2012-10-03 Symantec Corporation Client side protection against drive-by pharming via referrer checking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072106A (zh) * 2006-05-12 2007-11-14 国际商业机器公司 用于防御拒绝服务攻击的方法和***
EP1990977B1 (en) * 2007-05-09 2012-10-03 Symantec Corporation Client side protection against drive-by pharming via referrer checking
CN101247395A (zh) * 2008-03-13 2008-08-20 武汉理工大学 一种Session ID全透明传递的ISAPI访问控制***
CN101764767A (zh) * 2008-12-23 2010-06-30 华为技术有限公司 网络互联的方法、网关设备及***
CN102541674A (zh) * 2011-12-26 2012-07-04 运软网络科技(上海)有限公司 自主元素模型控制***、方法及服务器受侵保护检测***

Also Published As

Publication number Publication date
CN106161478A (zh) 2016-11-23

Similar Documents

Publication Publication Date Title
CN106161478B (zh) 基于http响应头变化的准确攻击识别方法
CN105930727B (zh) 基于Web的爬虫识别方法
US7665140B2 (en) Fraudulent message detection
EP2676197B1 (en) System and methods for identifying compromised personally identifiable information on the internet
WO2023207548A1 (zh) 一种流量检测方法、装置、设备及存储介质
CN112929390B (zh) 一种基于多策略融合的网络智能监控方法
AU2014337396A1 (en) System for detecting classes of automated browser agents
EP2043328A3 (en) Methods and apparatus for detecting fraud with time based computer tags
CN106341406B (zh) 基于http响实体正文html dom树变化的准确攻击识别方法
CN101505247A (zh) 一种共享接入主机数目的检测方法和装置
CN106603734A (zh) Cdn服务ip检测方法和***
CN111641658A (zh) 一种请求拦截方法、装置、设备及可读存储介质
US10079770B2 (en) Junk information filtering method and apparatus
CN102710770A (zh) 一种上网设备识别方法及其实现***
US8141150B1 (en) Method and apparatus for automatic identification of phishing sites from low-level network traffic
CN108124007A (zh) 消息数据实时传输的方法与装置
RU2676247C1 (ru) Способ и компьютерное устройство для кластеризации веб-ресурсов
CN103634284B (zh) 一种网络flood攻击的侦测方法及装置
US20240146753A1 (en) Automated identification of false positives in dns tunneling detectors
CN108063833A (zh) Http dns解析报文处理方法及装置
US7711518B2 (en) Methods, systems and computer program products for providing system operational status information
KR101259910B1 (ko) 변조된 url 탐지 장치 및 그 방법
CN102891861A (zh) 一种基于客户端的钓鱼网站检测方法及其装置
CN109787866A (zh) 一种识别端口的方法及装置
CN109446807A (zh) 用于识别拦截恶意机器人的方法、装置以及电子设备

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 9/F, Building C, No. 28, North Tianfu Avenue, China (Sichuan) Pilot Free Trade Zone, Hi tech Zone, Chengdu, 610000, Sichuan

Patentee after: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 8th Floor, Building 5, No. 801, Middle Section of Tianfu Avenue, High tech Zone, Chengdu City, Sichuan Province, 610000

Patentee before: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder