首页 > 其他分享 >五.Suricata识别http攻击流量

五.Suricata识别http攻击流量

时间:2022-08-20 19:12:08浏览次数:61  
标签:web http Suricata content 8443 HOME 识别 any

一.定义http攻击类型

编辑classification.config文件,为HTTP协议增加以下类别,并设定相应的priority

HTTP协议是明文传输,其流量特征存在于URL地址,POST请求正文,请求头或响应头,文件上传的情况(POST请求正文)

config classification: web-status-error, web服务器状态异常, 4
config classification: web-scan-attack, web页面扫描攻击, 2
config classification: web-sql-injection, SQL注入攻击, 1
config classification: web-xss-attack, XSS跨站攻击, 2
config classification: web-ssrf-attack, SSRF跨站攻击, 2
config classification: web-shell-attack, 站点木马植入, 1
config classification: web-file-upload, 文件上传异常, 1

 

二.URL地址栏异常

1.状态码异常

# 状态码异常
alert http any any <> $HOME_NET 8443 (msg:"Web服务器出现404."; content:"404"; http_stat_code; classtype:web-status-error; sid:561001; rev:1;)
alert http any any <> $HOME_NET 8443 (msg:"Web服务器出现403."; content:"404"; 
http_stat_code; classtype:web-status-error; sid:561002; rev:1;)

alert http any any <> $HOME_NET 8443 (msg:"Web服务器出现500."; content:"404";
http_stat_code; classtype:web-status-error; sid:561003; rev:1;)

# 扫描攻击
alert http any any <> $HOME_NET 8443 (msg:"Web服务器出现404."; content:"404";
http_stat_code; threshold:type threshold, track by_src, count 5, seconds 20;
classtype:web-scan-attack; sid:561004; )

2.SQL注入攻击

# SQL注入攻击

alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-union."; content:"union"; http_uri; nocase; classtype:web-sql-injection; sid:561001; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-union."; content:"select"; 
http_uri; nocase; classtype:web-sql-injection; sid:562001; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-ordey by."; content:"order by"; 
http_uri; nocase; classtype:web-sql-injection; sid:562002; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-database()."; content:"database()"; 
http_uri; nocase; classtype:web-sql-injection; sid:562003; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-version()."; content:"version()"; 
http_uri; nocase; classtype:web-sql-injection; sid:562004; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-user()."; content:"user()"; 
http_uri; nocase; classtype:web-sql-injection; sid:562005; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-updatexml(."; content:"updatexml("; 
http_uri; nocase; classtype:web-sql-injection; sid:562006; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-extract(."; content:"extract("; 
http_uri; nocase; classtype:web-sql-injection; sid:562007; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-and."; content:"|20|and|20|"; 
http_uri; nocase; classtype:web-sql-injection; sid:562008; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-or."; content:"|20|or|20|"; 
http_uri; nocase; classtype:web-sql-injection; sid:562009; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-| |."; content:"|7C 7C|"; 
http_uri; nocase; classtype:web-sql-injection; sid:562010; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-and."; content:"&&"; 
http_uri; nocase; classtype:web-sql-injection; sid:562011; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击-#."; content:"|23|"; 
http_uri; nocase; classtype:web-sql-injection; sid:562012; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击---."; content:"--"; 
http_uri; nocase; classtype:web-sql-injection; sid:562013; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击---."; content:"--"; http_uri; 
pcre:"/\+*|\s*/i"; nocase; classtype:web-sql-injection; sid:562014; rev:1;)
alert http any any -> $HOME_NET 8443 (msg:"SQL注入攻击."; content:"="; http_uri; 
pcre:"/union|select|from|updatexml|extract|database\
(|user\(|version\(|information_schema|where|columns|--\
s+|--\++|\s+and\s+|\s+or\s+|\|\||&&/i";
classtype:web-sql-injection; sid:562015; rev:1;)

 

标签:web,http,Suricata,content,8443,HOME,识别,any
From: https://www.cnblogs.com/eveplw/p/16608436.html

相关文章

  • HttpServletResponse 类
    HttpServletResponse类的作用HttpServletResponse类和HttpServletRequest类一样。每次请求进来,Tomcat服务器都会创建一个Response对象传递给Servlet程序去使用......
  • 四.Suricata命令与规则语法
    一.离线流量分析#suricata-c/etc/suricata/suricata.yaml-rx.pcap-l/var/log/suricata-v1.离线分析可以对规则库进行测试2.规则更新后,历史的流量可以进行分析......
  • docker搭建phpswoole实现http服务
    一、创建DockerfileFROMphpswoole/swoole#COPY./www//var/www/二、同级目录下创建docker-composer.yamlservices:phpswoole-server:container_name:p......
  • HTTP中的强缓存与协商缓存
    HTTP中的强缓存与协商缓存_island2022年05月26日15:24 ·  阅读3792关注本文已参与低调务实优秀中国好青年前端社群的写作活动浏览器缓存机制我们都知道......
  • 三.Suricata的安装与使用
    一.IDS功能通过监听网卡流量并匹配规则引擎进行入侵实时检测和预警,检测手段上也与Wazuh比较类似 二.IPS功能与Wazuh的主动响应的功能不一样,IPS功能并不需要对防火墙进......
  • 手机上的截图文字识别功能还有多少人不知道!
    本篇文章详细讲解一下我们手机里常用的文字识别功能,分为三大块,一起来看看吧。一、手机图库自带文字识别二、手机微信文字识别 三、QQ文字识别一、手机图库自带文字识......
  • vue学习之------Windows PowerShell不识别vue命令
    已经全局安装了vue-cli,但是WindowsPowerShell不识别vue命令: 解决办法:1、以管理员身份运行PowerShell2、执行set-ExecutionPolicyRemoteSigned3、输入Y,回车,即可......
  • httpd基于用户的访问控制
    13、基于用户的访问控制认证质询:WWW-Authenticate:响应码为401,拒绝客户端请求,并说明要求客户端提供账号和密码认证:Authorization:客户端用户填入账号和密码后再次发送请......
  • httpd--status页面
    LoadModulestatus_modulemodules/mod_status.so <Location"/status"> SetHandlerserver-status #限制谁可以访问 <requireany> requirealldenied re......
  • httpd--虚拟主机
    17、虚拟主机站点标识:socket IP相同,但端口不同 IP不同,但端口均为默认端口 FQDN不同:请求报文中首部Host:www.magedu.com有三种实现方案: 基于ip:为每个虚拟主机准......