码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • ubuntu基本配置和suricata安装、模拟攻击


    目录

    1. Ubuntu基本配置

    2. 安装suricata

    3. suricata-update的使用


    1. Ubuntu基本配置

    修改ubuntu的root密码
    sudo passwd,然后输入密码

    允许远程ubuntu在远程工具登录
    vim /etc/ssh/sshd_config
    输入PermitRootLogin yes
    systemctl restart sshd.service 

    2. 安装suricata

    安装链接https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Ubuntu_Installation_-_Personal_Package_Archives_(PPA)

    apt-get install software-properties-common
    add-apt-repository ppa:oisf/suricata-stable
    apt-get update
    apt-get install suricata
    suricata -c
    apt-get install suricata-dbg
    apt-get update
    apt-get upgrade
    suricata
    /etc/init.d/suricata start
    systemctl status suricata

    日志:/var/log/suricata/
    配置文件:/etc/suricata/
    规则文件:/etc/suricata/rules/

    修改yaml的网卡配置:
    af-packet:
      - interface: ens33

    pcap:
      - interface: ens33

    pfring:
      - interface: ens33

    启用sip,mqtt,rdp
    修改完就重启程序,查看状态是running


    网卡调优
    ethtool -K ens33  tso off lro off gro off
    ethtool -K ens33  rx off
    ethtool -K ens33  tx off
    ethtool -K ens33  sg off
    ethtool -K ens33  gso off
    ethtool -K ens33  gro off
    ethtool -K ens33  lro off
    ethtool -K ens33  rxvlan off
    ethtool -K ens33  txvlan off
    ethtool -K ens33  ntuple off
    ethtool -K ens33  rxhash off
    ethtool -K ens33  rx off  tx off


    日志目录:/var/log/suricata
    攻击日志: eve.json  fast.log 
    系统日志:suricata.log


    测试:
    关闭防火墙
    sudo ufw status命令查看当前的防火墙状态
    sudo ufw enable命令来开发防火墙
    sudo ufw disable命令来关闭防火墙

    扫服务版本:nmap -sV 10.0.1.180

    内网访问外网检测:curl http://testmynids.org/uid/index.html

    开启规则,需要在suricata.rules把注释去掉

    3. suricata-update的使用

    更新规则:suricata-update 
    规则存入位置:/var/lib/suricata/rules/suricata.rules
    测试是否生效(测试需要一点时间):suricata -T -c /etc/suricata/suricata.yaml
    源:/usr/local/var/lib/suricata/update/sources
    更新规则源索引:suricata-update update-sources
    索引中的来源:suricata-update list-sources
    启用规则集:suricata-update enable-source ptresearch/attackdetection
    再次更新规则:suricata-update
    列出启用的来源:suricata-update list-sources --enabled
    禁用源:suricata-update disable-source et/pro
    启用默认禁用的规则/opt/suricata-6.0.8/suricata-update/suricata/update/configs/enable.conf

  • 相关阅读:
    高速缓存Cache详解(西电考研向)
    大二Web课程设计——动漫海贼王(可以很好的应付老师的作业)
    十大靠谱“计算机视觉数据集”榜单
    【Unity2022】Unity实现手机游戏操控摇杆(实现操控轮盘)
    【鸿蒙最新全套教程】<HarmonyOS第一课>1、运行Hello World
    【Linux】 find命令使用
    Linux bash: ipconfig: command not found解决方法
    【MATLAB教程案例11】基于PSO粒子群优化算法的函数极值计算matlab仿真及其他应用
    Docker Compose
    【leetcode】429. N 叉树的层序遍历
  • 原文地址:https://blog.csdn.net/qq_37200978/article/details/127673702
  • 最新文章
  • 【JVM】编译执行与解释执行的区别是什么?JVM 使用哪种方式?
    用 Hashids 优雅解决 C 端自增 ID 暴露问题
    V8引擎 精品漫游指南--Ignition篇(上) 指令 栈帧 槽位 调用约定 内存布局 基础内容
    LLVM Pass快速入门(四):代码插桩
    milkup:桌面端 markdown AI续写和即时渲染
    基于项目工程构建SBOM(软件物料清单)的研究
    鸿蒙应用开发UI基础第二节:鸿蒙应用程序框架核心解析与实操
    .NET 中如何快速实现 List 集合去重?
    扣子Coze实战:从0到1打造抖音+小红书热点监控智能体
    浅谈数据访问层
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号