通行证│用户名: 密码: 验证码: 验证码,看不清楚?请点击刷新验证码 电信网通铁通移动   在线
文章搜索:
热门搜索:红客 黑鹰 红客技术 安全动画 红客培训
首页 文章 软件 动画 资源 励志 论坛 邮箱 会员 军事 科技 博客 爱心红客 最近更新 800g资源
 业内新闻 漏洞公告 病毒公告 电脑知识 网络知识 菜鸟入门 攻防教程 黑客攻防 安全编程 工具使用 综合安全 个人安全 安全相关 Q Q安全 原创精华 红客人物 站内事件
您现在的位置: 爱国者安全网 >> 文章类 >> 红客教程 >> 工具使用 >> 文章正文
五个顶级Linux安全工具
责任编辑:酷酷の鱼   更新日期:2008-3-20
 

 

当上面的选项生效后,snort将记录与tcpdump文件匹配的数据包并将其保存到警告文件中,这样就允许你更容易地判断哪个警告是需要担心的哪个警告是错误的警告,你可以象下面这样来阅读它们:

# tcpdump -r /var/log/snort/tcpdump.log.1161106015
reading from file /var/log/snort/
↪tcpdump.log.1161106015, link-type
EN10MB (Ethernet)
06:37:50.839942 IP 10.0.0.82.1410 >
10.10.218.95.www: P
2352360050:2352360119(69) ack 1723804156 win 65535
06:53:07.792492 IP 10.0.0.82.1421 >
10.10.218.95.www: P
2124589760:2124589829(69) ack 2684875377 win 65535
...

如果你象查看数据包的内容,使用-X参数,tcpdump –X –r /var/log/snort/tcpdump.log.1161106015,snort也有一些功能来中断基于规则匹配(灵活的响应)的连接,也有许多第三方的规则,可以在http://www.bleedingthreats.net/找到。

5、Iptables

iptables是一款状态防火墙几乎集成到所有Linux发行版中了,这就意味着你可以使用它基于ip地址的规则来控制远程机器访问你的服务器,以及连接请求的类型。(旧的无状态的防火墙让你只能根据数据包的内容来做出判断,因此你被端口号限制,不能跟踪会话的存在,如FTP数据流),Debian用户可以通过apt-get install iptables conntrack来获取它。

当你从终端登陆到机器上时请完成你的初始化测试,用一个错误的规则将你自己锁在外面,然后你亲自恢复,当所有数据包被允许通过,因此这如果不被接受,观察iptables-save和iptables-restore命令,这里有一个加上注释的例子脚本,它非常基础,但是基本上它可以告诉你iptables是如何工作的:

#!/bin/bash
# example iptables script
# flush the old rules
iptables -F
# set the default policy of the chain to accept
iptables -P INPUT ACCEPT
# create a new table for logging and discarding
# unwanted packets
iptables -N LOGDROP
# use rate limiting on the logging, and
# add a prefix of ’filter: ’
iptables -A LOGDROP -m limit -j LOG
↪--log-prefix "filter: "
# drop unwanted TCP connections with a
# TCP ReSeT packet
iptables -A LOGDROP -p tcp -j REJECT
↪--reject-with tcp-reset
# drop other packets by sending an ICMP
# port unreachable in response
iptables -A LOGDROP -j REJECT
↪--reject-with icmp-port-unreachable
# now drop the packet
iptables -A LOGDROP -j DROP
#allow anything on the local interface
iptables -A INPUT -i lo -j RETURN
# allow packets that are related to
# an on-going conversation
iptables -A INPUT -p tcp -m conntrack
↪--ctstate RELATED,ESTABLISHED -j
RETURN
iptables -A INPUT -p udp -m conntrack
↪--ctstate RELATED,ESTABLISHED -j
RETURN
# allow SSH traffic
iptables -A INPUT -p tcp -m tcp
↪--dport 22 -j RETURN
# allow HTTP and HTTPS traffic
iptables -A INPUT -p tcp -m tcp
↪--dport 443 -j RETURN
iptables -A INPUT -p tcp -m tcp
↪--dport 80 -j RETURN
# accept the following ICMP types -
# echo, echo reply, source quench,
ttl exceeded,
# destination unreachable - and drop the rest
iptables -A INPUT -p icmp -m icmp
↪--icmp-type 0 -j RETURN
iptables -A INPUT -p icmp -m icmp
↪--icmp-type 3 -j RETURN
iptables -A INPUT -p icmp -m icmp
↪--icmp-type 4 -j RETURN
iptables -A INPUT -p icmp -m icmp
↪--icmp-type 8 -j RETURN
iptables -A INPUT -p icmp -m icmp
↪--icmp-type 11 -j RETURN
# if we haven’t accepted it, drop and log it.
iptables -A INPUT -j LOGDROP

上一页  [1] [2] [3] [4] [5] 下一页

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 最近更新
    固顶文章 Delphi编程培训班开课了
    普通文章 瑞星公司03月20日发布 每日计算机病毒及木马播报
    普通文章 Linux操作系统防范黑客的一些实用技巧
    普通文章 网络安全检测TOP 10
    推荐文章 推荐:防止IE浏览器被黑的技巧十则
    普通文章 Linux操作系统下防范黑客实用技巧
    普通文章 五个顶级Linux安全工具
    普通文章 Crack Oracle Password
    普通文章 < xmp >标签解密大法
    普通文章 防火墙作用日减 数据存取控制渐成主流
    热门文章
    普通文章《加密解密 技术内幕》1.1 PE文件格式一览
    普通文章《加密解密 技术内幕》1.21 PE教程2: 检验PE文件的有效
    普通文章新云CMS Online.asp页面过滤不严导致SQL注入漏洞
    普通文章发现了注入点后的注入中转站
    普通文章用vbs加用户的绝妙方法
    普通文章密码心理学 看看黑客如何来破解密码
    普通文章路由技术 利用路由器防止 DoS 疯狂攻击
    普通文章病毒伪装成ZIP压缩包图表 利用U盘传播病毒
    普通文章BHO劫持者木马强行篡改IE浏览器默认首页
    普通文章近期上网严防“寄生虫”病毒破坏系统
    精彩专题