小符的CEH考证之路拾贰 - 规避 IDS、防火墙和Honeypots

529 阅读40分钟

CEH - 职业道德黑客 关于规避Evading IDS, Firewalls, and Honeypots

互联网在整个商业世界中的广泛使用总体上提高了网络使用率。 组织采用各种网络安全措施,例如防火墙、入侵检测系统 intrusion detection systems(IDS)、入侵防御系统intrusion prevention systems (IPS) 和“蜜罐honeypots”来保护其网络。 网络是黑客破坏组织安全的首选目标,攻击者不断寻找新方法来规避网络安全措施并攻击这些目标。 本模块深入了解各种网络安全技术,例如 IDS、IPS、防火墙和蜜罐。 它解释了这些组件的操作以及攻击者用来逃避它们的各种技术。 此外,它还描述了防止此类攻击所需的对策。这章对于职业道德黑客不是很重要,因为渗透测试一般都基于授权。

Object目标

  • Describe IDS, IPS, firewall, and honeypot concepts 概念
  • Use different IDS, IPS, firewall, and honeypot solutions 解决方案
  • Explain different techniques to bypass IDS IDS绕过技术
  • Explain various techniques to bypass firewalls 防火墙绕过技术
  • Use different tools to evade IDS/firewalls 工具
  • Explain different techniques to detect honeypots honeypots技术
  • Adopt countermeasures against IDS/firewall evasion 规避政策

Describe IDS 概念

道德黑客应该对防火墙的功能、角色、位置和设计有所了解,IDS、IPS 和蜜罐通过了解攻击者如何规避此类安全措施来保护组织的网络。

  • IDS Intrusion Detection System (IDS), 入侵检测系统 (IDS) 是一种安全软件或硬件设备,用于监视、检测和保护网络或系统免受恶意活动; 它在检测到入侵后立即提醒有关安全人员。 IDS 非常有用,因为它们监控网络的入站/出站流量inbound/outbound traffic并持续检查可疑活动suspicious activities以检测网络或系统安全漏洞。 具体来说,他们会检查流量中与已知入侵模式匹配的签名 traffic for signatures,并在检测到匹配时发出警报。 IDS 根据其功能可分为主动 IDS 和被动 IDS。 被动 IDS 通常只检测入侵,而主动 IPS 不仅可以检测网络中的入侵,还可以阻止它们.IDS主要功能有:

    • An IDS gathers and analyzes information from within a computer or a network to identify possible violations of the security policy, including unauthorized access, as well as misuse。IDS 从计算机或网络中收集和分析信息,以识别可能违反安全策略的行为,包括未经授权的访问和滥用。
    • An IDS is also referred to as a “packet sniffer,” which intercepts packets traveling via various communication media and protocols, usually TCP/IP。IDS 也称为“数据包嗅探器”,它拦截通过各种通信媒体和协议(通常是 TCP/IP)传输的数据包
    • The packets are analyzed after they are captured。数据包被捕获后进行分析
    • An IDS evaluates traffic for suspected intrusions and raises an alarm upon detecting such intrusions.IDS 评估可疑入侵的流量,并在检测到此类入侵时发出警报

    部署 IDS 的最常见位置之一是靠近防火墙。 根据要监控的流量,在防火墙外部/内部放置一个 IDS,以监控源自网络外部/内部的可疑流量。 放置在内部时,如果 IDS 靠近 DMZ,则它是理想的; 但是,最佳实践是通过在网络中的防火墙前部署一个 IDS 并在防火墙后部署另一个 IDS 来使用分层防御layered defense。在部署 IDS 之前,必须分析网络拓扑topology,了解流量如何流入和流出攻击者可用于访问网络的资源,并确定可能成为各种攻击目标的关键组件 网络。 确定IDS在网络中的位置后,必须对IDS进行配置,以最大限度地发挥其网络保护作用。IDS探测的流程:

    • Signature Recognition,签名识别,也称为误用检测 misuse detection,试图识别表明系统或网络被滥用的事件an abuse of a system or network。 该技术涉及首先创建可能的入侵模型,然后将这些模型与传入事件进行比较以做出检测决策。 IDS 的签名是在模型必须在不干扰正常系统流量的情况下检测攻击的假设下创建的without disturbing normal system traffic。 只有攻击应该与模型匹配; 否则,可能会发生错误警报。
      • 基于签名的入侵检测Signature-based intrusion detection使用简单的模式匹配simple pattern-matching techniques技术将传入或传出的网络数据包 incoming or outgoing network packets与已知攻击的二进制签名binary signatures进行比较,以检测入侵。 攻击者可以为数据包的特定部分定义二进制签名,例如 TCP 标志。
      • 签名识别 Signature recognition可以检测已知的攻击。 但是,其他无害数据包可能包含相同的签名,这将触发误报警报trigger a false positive alert
      • 不正确的签名可能会触发错误警报 Improper signatures 。 为了检测滥用,需要大量的签名。 签名越多,IDS检测到攻击的机会就越大; 但是,流量可能会错误地与签名匹配,从而影响系统性能。
      • 大量的签名数据需要更多的网络带宽。 IDS 将数据包的签名与签名数据库中的签名进行比较。 数据库中签名数量的增加可能会导致某些数据包的丢弃 dropping of certain packets。
      • URSNIF 和 VIRLOCK 等新病毒攻击推动了对单一攻击的多个签名的需求multiple signatures for a single attack。 更改某些攻击字符串中的单个位会使为该攻击生成的签名无效。 因此,需要全新的签名来检测类似的攻击。
      • 尽管基于签名的 IDS 存在问题,但此类系统很受欢迎,并且在正确配置和密切监视时运行良好。
    • Anomaly Detection异常检测或“未使用检测not-use detection”与签名识别不同signature recognition。 异常检测涉及异常数据库。 当事件发生在正常流量的容忍阈值tolerance threshold之外时,就会检测到异常。 因此,任何偏离常规any deviation使用的行为都是一种攻击。 异常检测基于计算机系统中用户和组件的固定行为特征来检测入侵。 建立正常使用的模型是创建异常检测器中最具挑战性的一步。
      • 在传统的异常检测方法中,保留基本数据以检查网络流量的变化。 然而,在现实中,网络流量存在一定的不可预测性,统计变化太多,从而使这些模型不精确。 一些标记为异常的事件可能只是网络使用中的异常情况irregularities in network usage。
      • 在这种类型的方法中,无法在常规网络上彻底构建模型是一个问题。 这些模型应该用于检查特定的网络。
    • Protocol Anomaly Detection协议异常检测取决于特定于协议的异常anomalies specific。 它确定了供应商部署 TCP/IP 协议的特定缺陷。 协议是根据 RFC 规范设计的,该规范规定标准握手以允许通用通信。 协议异常检测器可以识别新的攻击。
      • There are new attack methods and exploits that violate protocol standards.有违反协议标准的新攻击方法和漏洞利用
      • Malicious anomaly signatures are becoming increasingly common. By contrast, the network protocol is well defined and is changing slowly. Therefore, the signature database should frequently be updated to detect attacks.恶意异常签名正变得越来越普遍。 相比之下,网络协议定义明确并且变化缓慢。 因此,应经常更新特征库以检测攻击。
      • Protocol anomaly detectors are different from traditional IDS in terms of how they present alarms.协议异常检测器与传统 IDS 的不同之处在于它们呈现警报的方式。
      • The best way to present alarms is to explain which part of the state system is compromised. For this purpose, IDS operators must have thorough knowledge of protocol design.呈现警报的最佳方式是解释状态系统的哪一部分受到损害。 为此,IDS 操作员必须对协议设计有透彻的了解。
  • General Indications of Intrusions入侵的一般迹象

    • File System Intrusions 文件系统入侵,通过观察系统文件,可以识别入侵的存在。 系统文件记录系统的活动。 文件属性或文件本身的任何修改或删除都表明系统已成为攻击目标。
      • If you find new, unknown files/programs on your system, then there is a possibility that the system has been intruded into. The system can be compromised to the extent that it can, in turn, compromise other network systems.如果您在系统上发现新的、未知的文件/程序,则系统可能已被入侵。 该系统可能会受到损害,进而损害其他网络系统。
      • When an intruder gains access to a system, he or she tries to escalate privileges to gain administrative access. When the intruder obtains administrator privileges, he/she could change file permissions, for example, from read-only to write。当入侵者获得对系统的访问权限时,他或她会尝试提升权限以获得管理访问权限。 当入侵者获得管理员权限时,他/她可以更改文件权限,例如,从只读变为可写。
      • Unexplained modifications in file size are also an indication of an attack. Make sure you analyze all your system files文件大小的无法解释的修改也是攻击的迹象。 确保分析所有系统文件。
      • The presence of rogue suid and sgid files on your Linux system that do not match your master list of suid and sgid files could indicate an attack.Linux 系统上存在与 suid 和 sgid 文件主列表不匹配的流氓 suid 和 sgid 文件可能表明存在攻击。
      • You can identify unfamiliar file names in directories, including executable files with strange extensions and double extensions.您可以识别目录中不熟悉的文件名,包括具有奇怪扩展名和双扩展名的可执行文件。
      • Missing files are also a sign of a probable intrusion/attack.丢失的文件也是可能的入侵/攻击的迹象。
    • Network Intrusions 网络入侵
      • A sudden increase in bandwidth consumption 带宽消耗突然增加
      • Repeated probes of the available services on your machines重复的探测机器上的可用服务
      • Connection requests from IPs other than those in the network range, which imply that an unauthenticated user (intruder) is attempting to connect to the network。来自网络范围以外的 IP 的连接请求,这意味着未经身份验证的用户(入侵者)正在尝试连接到网络
      • Repeated login attempts from remote hosts。 来自远程主机的重复登录尝试
      • A sudden influx of log data, which could indicate attempts at DoS attacks, bandwidth consumption, and DDoS attacks。日志数据突然涌入,这可能表明 DoS 攻击、带宽消耗和 DDoS 攻击的尝试
    • System Intrusions 系统入侵
      • Sudden changes in logs such as short or incomplete logs 日志中的突然变化,例如短或不完整的日志
      • Unusually slow system performance 异常缓慢的系统性能
      • Missing logs or logs with incorrect permissions or ownership 丢失日志或具有不正确权限或所有权的日志
      • Modifications to system software and configuration files 修改系统软件和配置文件
      • Unusual graphic displays or text messages 不寻常的图形显示或文本消息
      • Gaps in system accounting 系统管理的差距
      • System crashes or reboots 系统崩溃或重启
      • Unfamiliar processes 不熟悉的流程
  • IDS的类别

    • Network-Based Intrusion Detection Systems 基于网络的入侵检测系统 (NIDS) 检查进入网络的每个数据包是否存在异常和不正确的数据。通过限制防火墙丢弃大量数据包,NIDS 彻底检查每个数据包。 NIDS 捕获并检查所有流量traffic。它根据内容在 IP 或应用程序级别生成警报。 NIDS 比基于主机的 IDS host-based IDS 更分散distributed。 NIDS 识别路由器和主机级别的异常anomalies 。审计数据包中包含的信息,记录恶意包信息;此外,它在收到数据包后为每个风险分配一个威胁级别。威胁级别使安全团队能够保持警惕。这些机制通常包括一个以混杂模式放置在网络上的黑匣子,用于侦听指示入侵的模式。它可以检测恶意活动,例如 DoS 攻击、端口扫描,甚至通过监控网络流量来尝试侵入计算机。
    • Host-Based Intrusion Detection Systems基于主机的入侵检测系统(HIDS) 分析每个系统的行为。 HIDS 可以安装在从台式电脑到服务器的任何系统上。它比 NIDS 更通用。除了检测未经授权的内部活动外,基于主机的系统还可以有效地检测未经授权的文件修改。 HIDS 侧重于本地系统的变化方面。它也更加以平台为中心,更加关注 Windows 操作系统;不过,其他 HIDS 也可用于 UNIX 平台。这些机制通常包括在特定主机上发生的审计事件。它们不是很常见,因为它们必须监视每个系统事件会产生开销。
  • IDS Alerts 的类别

    • True Positive (Attack - Alert):true positive是当事件触发警报并导致 IDS 做出反应时发生的情况,就好像真正的攻击正在进行中一样。该事件可能是实际攻击,在这种情况下,攻击者试图破坏网络,也可能是演习drill,在这种情况下,安全人员使用黑客工具测试网段。
    • False Positive (No attack - Alert): false positive,如果事件在没有实际攻击进行时触发警报,则会发生误报。当 IDS 将常规系统活动视为攻击时,就会发生这种情况。误报往往会使用户对警报不敏感,并削弱他们对实际入侵事件的反应。在测试 IDS 的配置时,管理员使用误报来确定 IDS 是否可以区分误报和真实攻击。
    • False Negative (Attack - No Alert): false negative是当 IDS 未能对实际攻击事件做出反应时发生的情况。这种情况是最危险的故障,因为 IDS 的目的是检测和响应攻击。
    • True Negative (No attack - No Alert):true negative是当 IDS 将活动识别为可接受的行为并且该活动是可接受的时发生的情况。真正的否定意味着成功地忽略了可接受的行为。它是无害的not harmful,因为 IDS 在这种情况下按预期执行。

Describe IPS 概念

  • Intrusion Prevention System (IPS),入侵防御系统 (IPS) 被视为主动 IDS,因为它们不仅能够检测入侵,还能够阻止入侵。 IPS 是连续监控系统,通常位于防火墙后面,作为额外的保护层。与被动的 IDS 不同,IPS 内嵌在网络中,位于数据请求源头和目标之间source and the destination,以主动分析网络流量并对进入网络的流量做出自动决策。主要功能包括:
    • Generate alerts if any abnormal traffic is detected in the network 如果在网络中检测到任何异常流量,则生成警报
    • Continuously record real-time logs of network activities 持续记录网络活动的实时日志
    • Block and filter malicious traffic 阻止和过滤恶意流量
    • Detect and eliminate threats quickly, as it is placed inline in the operational network 快速检测和消除威胁,因为它内嵌在运营网络中
    • Identify threats accurately without generating false positives 准确识别威胁而不会产生误报 IPS 根据配置在其中的某些规则和策略采取行动。换言之,IPS 可以识别、记录和阻止网络中任何入侵或攻击的发生。 IPS 还可用于检测公司安全策略中的关键问题,例如臭名昭著的内部威胁notorious insider threats、恶意网络访客malicious network guests等。IPS也是两种类型和IPS同理,Host-based IPS 和 Network-based IPS。
  • IPS的优势
    • Unlike IDS, IPS can block as well as drop illegal packets in the network 与 IDS 不同,IPS 可以阻止和丢弃网络中的非法数据包
    • IPS can be used to monitor activities occurring in a single organization IPS 可用于监控单个组织中发生的活动
    • IPS can prevent the occurrence of direct attacks in the network by controlling the amount of network traffic IPS可以通过控制网络流量来防止网络中直接攻击的发生

Describe Firewall 概念

防火墙是位于网络网关的基于软件或硬件的系统,保护专用网络的资源不被其他网络上的用户未经授权的访问。它们被放置在两个网络之间的连接点或网关上,通常是一个专用网络和一个公共网络,例如 Internet。防火墙检查所有进入或离开 Intranet 的消息,并阻止那些不符合指定安全标准的消息。防火墙可能与流量类型或源或目标地址和端口有关。它们包括一组监控网络之间流量的工具。放置在网络级别并与路由器密切合作的防火墙过滤所有网络数据包以确定是否将它们转发到它们的目的地。始终将防火墙安装在远离网络的其他部分,这样任何传入请求都无法直接访问私有网络资源。如果配置得当,防火墙会保护其一侧的系统免受另一侧的系统的影响。

  • A firewall is an intrusion detection mechanism that is designed by an organization’s security policy. Its settings can change to make appropriate changes to its functionality.防火墙是一种入侵检测机制,由组织的安全策略设计。它的设置可以更改以对其功能进行适当的更改。

  • Firewalls can be configured to restrict incoming traffic to POP and SMTP and to enable email access. Certain firewalls block specific email services to avoid spam. 防火墙可以配置为将传入流量限制为 POP 和 SMTP,并启用电子邮件访问。某些防火墙会阻止特定的电子邮件服务以避免垃圾邮件。

  • A firewall can be configured to check inbound traffic at a “checkpoint,” where a security audit is performed. It can also act as an active “phone tap” tool for identifying an intruder’s attempt to dial into modems in a secured network. Firewall logs consist of logging information that notifies the administrator about all attempts to access various services. 可以将防火墙配置为在执行安全审计的“检查点”检查入站流量。它还可以充当主动“电话窃听”工具,用于识别入侵者尝试拨入安全网络中的调制解调器。防火墙日志包含日志信息,用于通知管理员访问各种服务的所有尝试。

  • The firewall verifies the incoming and outgoing traffic against its rules and acts as a router to move data between networks. The firewall allows or denies access requests made from one side of it to services on the other side. 防火墙根据其规则验证传入和传出流量,并充当路由器在网络之间移动数据。防火墙允许或拒绝从它的一侧向另一侧的服务发出的访问请求

  • Identify all the attempts to log into the network for auditing. Unauthorized attempts can be identified by embedding an alarm that is triggered when an unauthorized user attempts to log in. Firewalls can filter packets based on the address and type of traffic. They recognize the source and destination addresses as well as port numbers during address filtering, and they identify the types of network traffic during protocol filtering. Firewalls can identify the state and attributes of data packets. 识别所有登录网络进行审计的尝试。可以通过嵌入警报来识别未经授权的尝试,当未经授权的用户尝试登录时触发该警报。防火墙可以根据地址和流量类型过滤数据包。它们在地址过滤期间识别源地址和目标地址以及端口号,并在协议过滤期间识别网络流量的类型。防火墙可以识别数据包的状态和属性。

  • Firewall Architecture 防火墙架构

    • Bastion Host 堡垒机, 堡垒主机旨在保护网络免受攻击。它充当内部和外部网络之间的中介mediator。堡垒主机是为保护网络资源免受攻击而设计和配置的计算机系统。进入或离开网络的流量通过防火墙。它有两个接口:
      • 公共接口直连互联网 Public interface directly connected to the Internet
      • 连接内网的私有接口 Private interface connected to the intranet
    • Screened Subnet 屏蔽子网 (DMZ) 是在屏蔽防火墙后面使用两或三宿主防火墙创建的受保护网络,该术语通常用于指代 DMZ。使用三宿主防火墙时,第一个接口连接到 Internet,第二个连接到 DMZ,第三个连接到 Intranet。 DMZ 响应公共请求并且没有专用网络访问的主机。 Internet 用户无法访问私有区域。从 Intranet 屏蔽子网的优点是可以响应公共请求,而无需允许流量进入 Intranet。三宿主防火墙的一个缺点是,如果它被入侵,DMZ 和 Intranet 也可能被入侵。更安全的技术是使用多个防火墙将 Internet 与 DMZ 分开,然后将 DMZ 与 Intranet 分开。
    • Multi-homed Firewall 多宿主防火墙, 多宿主防火墙是具有连接到两个或多个网络的多个 NIC 的节点。它将每个接口在逻辑上和物理上连接到单独的网段。多宿主防火墙有助于提高 IP 网络的效率和可靠性。多宿主防火墙具有三个以上的接口,允许根据组织的特定安全目标进一步细分系统。但是,提供更深层次保护的模型是背靠背防火墙。
    • Demilitarized Zone (DMZ)非军事区, 在计算机网络中,非军事区 (DMZ) 是托管计算机或小型子网络的区域,作为特定公司内部网络和不受信任的外部网络之间的中立区,以防止外部人员访问公司的私人数据. DMZ 充当安全内部网络和不安全 Internet 之间的缓冲区,因为它为公司 LAN 添加了一层安全性,从而防止直接访问网络的其他部分。DMZ 是使用具有三个或更多网络接口的防火墙创建的,这些网络接口分配了特定角色,例如内部受信任网络、DMZ 网络或外部不受信任网络 (Internet)。任何为外部用户提供访问权限的服务(例如电子邮件、Web 或 FTP)都可以放置在 DMZ 中。但是,与数据库服务器通信的 Web 服务器不能驻留在 DMZ 中,因为它们可以让外部用户直接访问敏感信息。根据特定的网络拓扑和公司要求,可以通过多种方式配置 DMZ。
  • Types of Firewalls 防火墙类型

    • Hardware Firewalls 硬件,硬件防火墙是放置在网络外围的专用防火墙设备。它是网络设置的一个组成部分,也内置在宽带路由器中或用作独立产品。硬件防火墙有助于保护本地网络上的系统,并且只需很少或无需配置即可有效执行。它采用包过滤技术。它读取数据包的标头以找出源地址和目标地址,并将它们与一组预定义和/或用户创建的规则进行比较,以确定是否应该转发或丢弃数据包。硬件防火墙在单个系统或使用单个接口连接的特定网络上运行。硬件防火墙的示例包括 Cisco ASA 和 FortiGate。硬件防火墙保护私有局域网。然而,硬件防火墙价格昂贵,并且难以实施和升级。优势:
      • Security: A hardware firewall with its operating system (OS) is considered to reduce security risks and increase the level of security controls.硬件防火墙及其操作系统 (OS) 被认为可以降低安全风险并提高安全控制级别。
      • Speed: Hardware firewalls initiate faster responses and enable more traffic.硬件防火墙启动更快的响应并启用更多流量。
      • Minimal Interference: Since a hardware firewall is a separate network component, it enables better management and allows the firewall to shut down, move, or be reconfigured without much interference in the network.由于硬件防火墙是一个单独的网络组件,它可以实现更好的管理,并允许防火墙关闭、移动或重新配置,而不会对网络造成太大干扰。 劣势:
      • More expensive than a software firewall. 比软件防火墙更昂贵。
      • Difficult to implement and configure. 难以实施和配置
      • Consumes more space and involves cabling. 占用更多空间并涉及布线
    • Software Firewalls 软件,软件防火墙类似于过滤器filter。它位于常规应用程序和操作系统的网络组件之间。它对个人家庭用户更有用,适合在公司网络外工作时需要数字安全的移动用户。此外,它很容易安装在个人的 PC、笔记本电脑或工作组服务器上。它有助于保护您的系统免受未经授权的访问的外部尝试,并提供针对日常木马Trojans和电子邮件蠕虫email worms的保护。它包括隐私控制privacy controls、网络过滤web filtering,等。软件防火墙将自身植入应用程序/网络路径的关键区域。它根据规则集分析数据流。与硬件防火墙相比,软件防火墙的配置简单。软件防火墙拦截从网络到计算机的所有请求,以确定它们是否有效,并保护计算机免受攻击和未经授权的访问。它结合了用户定义的控件、隐私控件、Web 过滤、内容过滤等,以限制不安全的应用程序在单个系统上运行。软件防火墙比硬件防火墙使用更多的资源,从而降低了系统的速度。软件防火墙的示例包括由 Norton、McAfee 和 Kaspersky 生产的防火墙。优势:
      • Less expensive than hardware firewalls. 比硬件防火墙便宜
      • Ideal for personal or home use.非常适合个人或家庭使用
      • Easier to configure and reconfigure 更容易配置和重新配置 劣势:
      • Consumes system resources. 消耗系统资源
      • Difficult to uninstall. 难以卸载
      • Not appropriate for environments requiring faster response times.不适用于需要更快响应时间的环境。
  • Firewall Technologies 防火墙技术

    防火墙是在不同防火墙服务的帮助下设计和开发的。每个防火墙服务都根据其效率和复杂性提供安全性。有不同类型的防火墙技术,具体取决于通信发生的位置、流量在网络中被截获的位置、被跟踪的状态等等。考虑到不同防火墙的能力,很容易选择和放置合适的防火墙,以尽可能最好的方式满足安全要求。每种类型的防火墙都有其优点。有几种防火墙技术可供组织实施其安全措施。有时,防火墙技术与其他技术相结合以构建另一种防火墙技术。例如,NAT 是一种路由技术;但是,当它与防火墙结合使用时,它被认为是一种防火墙技术。技术如下:

    • Packet Filtering包过滤防火墙(网络层),在包过滤防火墙中,每个包在转发forwarded之前都会与一组标准进行比较。根据数据包和标准,防火墙可以丢弃数据包并将其传输或向发起者originator发送消息。这些规则可以包括源和目标 IP 地址、源和目标端口号以及使用的协议。它工作在 TCP/IP 模型的 Internet 层或 OSI 模型的网络层。包过滤防火墙专注于单个数据包,分析它们的报头信息,并确定它们需要被引导的方式。传统的数据包过滤器根据数据包中的以下信息做出此决定:

      • Source IP address:用于检查数据包是否来自有效来源。源IP地址的信息可以从数据包的IP头中找到。
      • Destination IP address: 检查数据包是否到达正确的目的地以及目的地是否接受这些类型的数据包。目的IP地址的信息可以从数据包的IP头中找到。
      • Source TCP/UDP port: 用于检查数据包的源端口
      • Destination TCP/UDP port: 用于监视目标端口关于允许的服务和拒绝的服务
      • TCP flag bits: 用于检查数据包是否为要建立的连接设置了 SYN、ACK 或其他bit sets
      • Protocol in use: 协议是否被允许
      • Direction: 用于检查数据包是否进入或离开私网
      • Interface: 用于检查数据包是否来自不可靠区域。
    • Circuit-Level Gateways 电路级网关防火墙,电路级网关防火墙工作在 OSI 模型的会话层或 TCP/IP 的传输层。它无需验证即可在网络之间转发数据,并阻止来自主机的传入数据包,但允许流量通过自身。通过电路级网关传递到远程计算机的信息出现在网关gateway,因为传入流量带有代理(电路级网关)的 IP 地址 IP address of the proxy (circuit-level gateway).。此类防火墙监视创建会话的请求并确定是否允许这些会话。电路级网关提供对网络服务和主机请求的受控访问。为了确定请求的会话是否有效,它检查数据包之间的 TCP 握手。电路代理防火墙允许或阻止数据流;它们不过滤单个数据包。它们相对便宜,并且隐藏了有关它们保护的专用网络的信息inexpensive and hide the information。

    • Application-Level Firewall 基于应用程序的代理防火墙专注于应用程序层,而不仅仅是数据包。 应用层网关(代理)可以在 OSI 模型的应用层(或 TCP/IP 的应用层)过滤数据包。 传入和传出流量仅限于代理支持的服务; 所有其他服务请求都被拒绝。 对应用级防火墙的需求源于数据链路层和网络层中的大量语音、视频和协作流量,这些流量可能用于未经授权访问内部和外部网络。 配置为 Web 代理的应用程序级网关禁止 FTP、gopher、telnet 或其他流量。 他们检查流量并过滤特定于应用程序的命令,例如 HTTP:post 和 get。传统防火墙无法过滤此类流量。 他们可以检查、查找和验证状态检查防火墙遗漏的恶意流量malicious traffic,以决定是否允许访问,并提高应用层的整体安全性。 例如,状态防火墙无法检测到以合法协议发送恶意代码的蠕虫,因为代理防火墙专注于网络层中的数据包标头。 但是,深度数据包检测防火墙可以借助添加在数据包内的信息签名来发现此类攻击。

    • Stateful Multilayer Inspection

      • Stateful multilayer inspection firewalls combine the aspects of the other three types of firewalls (Packet Filtering, Circuit-Level Gateways, and Application-Level Firewalls)状态多层检测防火墙结合了其他三种防火墙(数据包过滤、电路级网关和应用级防火墙)的各个方面
      • They filter packets at the network layer of the OSI model (or the internet layer of TCP/IP), to determine whether session packets are legitimate, and they evaluate the contents of packets at the application layer它们在 OSI 模型的网络层(或 TCP/IP 的 Internet 层)过滤数据包,以确定会话数据包是否合法,并在应用层评估数据包的内容
    • Application Proxies

      • An application-level proxy works as a proxy server and filters connections for specific services应用程序级代理充当代理服务器并过滤特定服务的连接
      • It filters connections based on the services and protocols appropriate to that application. For example, an FTP proxy will only allow FTP traffic to pass through, and all other services and protocols will be blocked 它根据适用于该应用程序的服务和协议过滤连接,例如,一个 FTP 代理将只允许 FTP 流量通过,而所有其他服务和协议都将被阻止
    • Virtual Private Network vpn

      • A VPN is a private network constructed using public networks, such as the Internet .VPN 是使用公共网络(例如 Internet)构建的专用网络
      • It is used for the secure transmission of sensitive information over an untrusted network, using encapsulation and encryption.它用于在不受信任的网络上安全传输敏感信息,使用封装和加密
      • It establishes a virtual point-to-point connection through the use of dedicated connections. 它通过使用专用连接建立虚拟点对点连接
      • Only the computing device running the VPN software can access the VPN.只有运行VPN软件的计算设备才能访问VPN
    • Network Address Translation(NAT)

      • Network address translation separates IP addresses into two sets and enables the LAN to use these addresses for internal and external traffic separately 网络地址转换将 IP 地址分为两组,并使 LAN 能够将这些地址分别用于内部和外部流量
      • It also works with a router, similar to packet filtering. NAT also modifies the packets the router sends simultaneously 它也适用于路由器,类似于包过滤。 NAT 还会修改路由器同时发送的数据包
      • It has the ability to change the address of the packet and make it appear to have arrived from a valid address 它能够更改数据包的地址并使其看起来像是从有效地址到达的
      • It limits the number of public IP addresses an organization can us 它限制了组织可以使用的公共 IP 地址的数量
      • It can act as a firewall filtering technique where it allows only those connections which originate on the inside network and will block the connections which originate on the outside network 它可以充当防火墙过滤技术,仅允许源自内部网络的连接,并阻止源自外部网络的连接 基于OSI Layer不同的技术:这些技术的安全级别根据其效率级别而有所不同。可以通过允许它们通过主机之间的 OSI 层来比较这些技术。数据通过中间层从较高层传递到较低层。每一层都向数据包添加附加信息。下层现在通过物理网络将获得的信息发送到上层,然后到达其目的地。
    • Application 应用层 Virtual Private Network (VPN) Application Proxies

    • Presentation 应用层展示层 Virtual Private Network (VPN)

    • Session 会话层 Virtual Private Network (VPN) Circuit-Level Gateways

    • Transport 传输层 Virtual Private Network (VPN) Packet Filtering

    • Network 网络层 Virtual Private Network (VPN) Network Address Translation (NAT) Packet Filtering Stateful Multilayer Inspection

    • Data Link 链路层 Virtual Private Network (VPN) Packet Filtering

    • Physical 物理层 Not Applicable

  • 防火墙的限制

    • A firewall does not protect the network from new viruses, backdoors, or insider attacks 防火墙不能保护网络免受新病毒、后门或内部攻击
    • A firewall cannot do anything if the network design or configuration is faulty 如果网络设计或配置有问题,防火墙将无能为力
    • A firewall is not an alternative to antivirus or antimalware protection 防火墙不能替代防病毒或反恶意软件保护
    • A firewall cannot prevent social engineering threats 防火墙无法阻止社会工程威胁
    • A firewall does not prevent password misuse 防火墙不能防止密码滥用
    • A firewall does not block attacks from a higher level of the protocol stack 防火墙不会阻止来自更高级别协议栈的攻击
    • A firewall does not protect against attacks from dial-in connections or attacks originating from common ports and applications 防火墙不能防止来自拨入连接的攻击或来自公共端口和应用程序的攻击
    • A firewall is unable to understand tunneled traffic 防火墙无法理解隧道流量

Describe Honeypot 蜜罐概念

蜜罐Honeypot是 Internet 上的一种计算机系统,旨在吸引和诱捕那些试图未经授权或非法利用illicit utilization主机系统来渗透组织网络的人。 这是一个假代理运行fake proxy,通过记录流量然后向受害者的 ISP 发送投诉来陷害攻击者。 它没有授权的活动或生产价值,任何流向它的流量都可能是探测、攻击或妥协。 每当与蜜罐有任何交互时,它最有可能是恶意的。 蜜罐是独一无二的; 他们没有解决特定的问题。 相反,它们是具有许多不同安全应用程序的高度灵活的工具。 蜜罐有助于防止攻击、检测攻击以及信息收集和研究。 蜜罐可以记录端口访问尝试或监控攻击者的击键; 这些可能是更协同攻击的早期预警。 维护一个蜜罐需要付出相当大的努力。

  • 类型
    • Low-interaction Honeypots,These honeypots simulate only a limited number of services and applications of a target system or network。这些蜜罐仅模拟目标系统或网络的有限数量的服务和应用程序。
    • Medium-interaction Honeypots,These honeypots simulate a real operating system, applications, and services of a target network 这些蜜罐模拟目标网络的真实操作系统、应用程序和服务。
    • High-interaction Honeypots 这些蜜罐模拟目标网络的所有服务和应用程序
    • Pure Honeypots 这些蜜罐模拟目标组织的真实生产网络
  • Classification of honeypots based on their deception technology基于欺骗技术:
    • Malware Honeypots
    • Spam Honeypots
    • Spider Honeypots
    • Database Honeypots
    • Email Honeypots
    • Honeynets

IDS, IPS, Firewall, and Honeypot Solutions 解决方案

  • Intrusion Detection Tools 入侵检测工具:
    • Snort
      • Snort is an open-source network intrusion detection system, capable of performing real-time traffic analysis and packet logging on IP networks Snort 是一个开源网络入侵检测系统,能够对 IP 网络进行实时流量分析和数据包记录
      • It can perform protocol analysis and content searching/matching, and is used to detect a variety of attacks and probes, such as buffer overflows, stealth port scans, and OS fingerprinting attempts 可以进行协议分析和内容搜索/匹配,用于检测各种攻击和探测,例如缓冲区溢出、隐形端口扫描和操作系统指纹尝试
      • It uses a flexible rules language to describe traffic that it should collect or pass, as well as a detection engine that utilizes a modular plug-in architecture 它使用灵活的规则语言来描述它应该收集或通过的流量,以及利用模块化插件架构的检测引擎
      • Straight packet sniffer like tcpdump Packet logger (useful for network traffic debugging, etc.) Network intrusion prevention system 直接的数据包嗅探器,如 tcpdump 数据包记录器(用于网络流量调试等) 网络入侵防御系统
    • Suricata ,Source: suricata-ids.org
    • AlienVault,Source: www.alienvault.com
    • mobile手机端工具:
  • Intrusion Prevention Tools 入侵防御工具
  • Firewall软件
  • Honeypot Tools软件
  • IDS 规避技术 IDS Evasion Techniques为组织的基础设施提供额外安全层的 IDS 是攻击者感兴趣的目标。 攻击者实施各种 IDS 规避技术来绕过此类安全机制并破坏基础设施。 IDS 规避是修改攻击以欺骗 IDS/IPS 解释流量是合法的,从而防止 IDS 触发警报的过程。 许多 IDS 规避技术可以以不同且有效的方式执行 IDS 规避。
    • Insertion Attack
      • Insertion插入是攻击者通过强制读取无效数据包来混淆 IDS 的过程
      • IDS 盲目相信并接受一个被终端系统拒绝的数据包,攻击者利用这种情况将数据插入 IDS
      • 当 NIDS 处理数据包的严格程度低于内部网络时,就会发生这种攻击
      • 攻击者掩盖了额外的流量,IDS 得出结论认为该流量是无害的。 因此,IDS 收到的数据包比目的地多
    • Evasion
      • In this evasion technique, an end system accepts a packet that an IDS rejects 在这种规避技术中,终端系统接受 IDS 拒绝的数据包
      • Using this technique, an attacker exploits the host computer without the IDS ever realizing it 使用这种技术,攻击者可以在 IDS 没有意识到的情况下利用主机
      • The attacker sends portions of the request in packets that the IDS mistakenly rejects, allowing the removal of parts of the stream from the ID。 攻击者在 IDS 错误拒绝的数据包中发送部分请求,从而允许从 ID 中删除部分流
    • DoS Attack
      • Many IDSs use a centralized server for logging alerts 许多 IDS 使用集中式服务器来记录警报
      • If the attackers know the IP address of the centralized server, they can perform DoS or other hacks to slow down or crash the server 如果攻击者知道集中式服务器的 IP 地址,他们可以执行 DoS 或其他黑客攻击以减慢或崩溃服务器
      • As a result, the attackers’ intrusion attempts will not be logged 因此,攻击者的入侵尝试不会被记录
    • Obfuscating 混淆
      • 混淆是攻击者使用的一种 IDS 规避技术,攻击者以这样一种方式对攻击数据包有效负载进行编码 attackers who encode the attack packet payload ,使得目标主机可以解码数据包但不能解码 IDS
      • Attackers manipulate the path referenced in the signature to fool the HIDS攻击者操纵签名中引用的路径来欺骗 HIDS
      • Attackers can encode attack patterns in unicode to bypass IDS filters, but be understood by an IIS web server 攻击者可以用 unicode 编码攻击模式以绕过 IDS 过滤器,但会被 IIS Web 服务器理解
      • Polymorphic code is another means to circumvent signature-based IDSs by creating different attack patterns, so that the attack does not have just one unique detectable signature 多态代码是通过创建不同的攻击模式来规避基于签名的 IDS 的另一种方法,这样攻击就不会只有一个唯一的可检测签名
      • Attacks on encrypted protocols such as HTTPS are obfuscated if the attack is encrypte 如果攻击被加密,则对 HTTPS 等加密协议的攻击会被混淆
    • False Positive Generation
      • Attackers with knowledge of the target IDS craft malicious packets just to generate alerts 了解目标 IDS 的攻击者制作恶意数据包只是为了生成警报
      • These packets are sent to the IDS to generate many false positive alerts 这些数据包被发送到 IDS 以生成许多误报警报
      • Attackers then use these false positive alerts to hide the real attack traffic 攻击者然后使用这些误报警报来隐藏真实的攻击流量
      • Attackers can bypass the IDS unnoticed as it is difficult to differentiate the attack traffic from the large volume of false positive 攻击者可以绕过 IDS,因为很难将攻击流量与大量误报区分开来
    • Session Splicing
      • Session splicing is a technique used to bypass the IDS where an attacker splits the attack traffic into many packets such that no single packet triggers the IDS会话拼接是一种用于绕过 IDS 的技术,其中攻击者将攻击流量拆分为多个数据包,从而没有单个数据包触发 IDS
      • It is effective against IDSs that do not reconstruct packets before checking them against intrusion signatures它对在检查入侵签名之前不重建数据包的 IDS 有效
      • If attackers are aware of a delay in packet reassembly at the IDS, they can add delays between packet transmissions to bypass the reassembly 如果攻击者知道 IDS 数据包重组的延迟,他们可以在数据包传输之间添加延迟以绕过重组
      • Many IDSs stop reassembly if they do not receive packets within a certain time 许多IDS如果在一定时间内没有收到数据包就会停止重组
      • The IDS will stop working if the target host keeps the session active for a time longer than the IDS reassembly time 如果目标主机保持会话活动的时间超过 IDS 重组时间,IDS 将停止工作
      • Any attack attempt after a successful splicing attack will not be logged by the IDS 成功拼接攻击后的任何攻击尝试都不会被 ID 记录
    • Unicode Evasion
      • Unicode is a character coding system to support the worldwide interchange, processing, and display of written texts Unicode 是一种字符编码系统,支持书面文本的全球交换、处理和显示
      • In the Unicode code space, all the code points are treated differently but it is possible that there could be multiple representations of a single character.For example, / -> %u2215, e -> %u00e9 (UTF-16) and © -> %c2%a9, ≠ -> %e2%89%a0 (UTF-8) 在 Unicode 代码空间中,所有代码点的处理方式不同,但单个字符可能有多种表示形式
      • Because of this complexity, some IDS systems handle Unicode improperly as Unicode allows multiple interpretations of the same characters由于这种复杂性,一些 IDS 系统无法正确处理 Unicode,因为 Unicode 允许对相同字符进行多种解释
      • Taking this as an advantage, attackers can convert attack strings to Unicode characters to avoid pattern and signature matching at the IDS以此为优势,攻击者可以将攻击字符串转换为 Unicode 字符,以避免在 IDS 上进行模式和签名匹配
    • Fragmentation Attack
      • Fragmentation can be used as an attack vector when fragmentation timeouts vary between the IDS and the host 当 IDS 和主机之间的分片超时不同时,分片可用作攻击向量
      • If the fragment reassembly timeout is 10 sec at the IDS and 20 sec at the target system, attackers will send the second fragment 15 sec after sending the first fragment 如果片段重组超时在 IDS 为 10 秒,在目标系统为 20 秒,则攻击者将在发送第一个片段后 15 秒发送第二个片段
      • In this scenario, the IDS will drop the fragments as the second fragment is received after its reassembly time, but the target system will reassemble the fragments 在这种情况下,IDS 将在其重组时间后收到第二个片段时丢弃这些片段,但目标系统将重新组装这些片段
      • Attackers will keep sending the fragments with 15 sec delays until all the attack payload is reassembled at the target system 攻击者将继续以 15 秒的延迟发送片段,直到所有攻击载荷在目标系统重新组装
    • Overlapping Fragments, 一种 IDS 规避技术,其中攻击者生成一系列具有重叠 TCP 序列号的微小片段, 例如,初始片段由 100 个字节的有效载荷组成,序列号为 1; 第二个片段由 96 个字节组成,包括一个重叠序列,依此类推。在重新组装数据包时,目标主机必须知道如何组装重叠的 TCP 片段一些操作系统将采用具有给定偏移量的原始片段(例如,Windows W2K/XP/2003),而一些操作系统将采用具有给定偏移量的后续片段(例如,Cisco IOS)
    • Time-To-Live Attacks
    • Invalid RST Packets
    • Urgency Flag
    • Polymorphic Shellcode
    • ASCII Shellcode
    • Application-Layer Attacks
    • Desynchronization
    • Encryption
    • Flooding
  • Firewall Evasion Techniques防火墙绕过技术
    • Port Scanning
    • Firewalking
    • Banner Grabbing
    • IP Address Spoofing
    • Source Routing
    • Tiny Fragments
    • Using an IP Address in Place of a URL
    • Using Anonymous Website Surfing Sites
    • Using a Proxy Server
    • ICMP Tunneling
    • ACK Tunneling
    • HTTP Tunneling
    • SSH Tunneling
    • DNS Tunneling
    • Through External Systems
    • Through MITM Attack
    • Through Content
    • Through XSS Attack
      • An XSS attack exploits vulnerabilities that occur while processing input parameters of the end-users and the server responses in a web application XSS 攻击利用在处理最终用户的输入参数和 Web 应用程序中的服务器响应时发生的漏洞
      • Attackers inject malicious HTML code in the victim website to bypass the WAF 攻击者在受害者网站中注入恶意 HTML 代码以绕过 WAF( Using ASCII values,Using Hex Encoding to bypass the WAF,Using Obfuscation to bypass the WAF )
  • Detecting Honeypots检测蜜罐陷阱
    • Attackers can determine the presence of honeypots by probing the services running on the system 攻击者可以通过探测系统上运行的服务来确定蜜罐的存在
    • Attackers craft malicious probe packets to scan for services such as HTTP over SSL (HTTPS), SMTP over SSL (SMPTS), and IMAP over SSL (IMAPS)攻击者制作恶意探测数据包以扫描服务,例如基于 SSL 的 HTTP (HTTPS)、基于 SSL 的 SMTP (SMPTS) 和基于 SSL 的 IMAP (IMAPS)
    • Ports that show a specific service running but deny a three-way handshake connection indicate the presence of a honeypot 显示特定服务正在运行但拒绝三次握手连接的端口表明存在蜜罐
    • 工具: