跳转至

T1071-002-win-内网FTP链接到公网行为

来自ATT&CK的描述

攻击者可以使用与传输文件关联的应用程序层协议进行通信,以免与现有流量混在一起进行检测网络过滤。远程系统的命令(通常是这些命令的结果)将嵌入在客户端和服务器之间的协议流量中。

传输文件的协议(例如FTP,FTPS和TFTP)在环境中可能很常见。从这些协议产生的数据包可能具有许多字段和标头,可以在其中隐藏数据。数据也可以隐藏在传输的文件中。攻击者可能会滥用这些协议以与受害网络中受其控制的系统进行通信,同时还会模仿正常的预期流量。

测试案例

检测可能使用FTP网络连接到Internet的事件。自1980年代以来,文件传输协议(FTP)一直以其当前形式出现。在网络上发送和接收文件可能是常见且有效的过程。因此,攻击者还经常使用此协议从您的网络中窃取数据或下载新工具。此外,FTP是纯文本协议,如果被拦截,则可能会公开用户名和密码。

检测日志

network

测试复现

暂无

测试留痕

暂无,仅提供检测规则相关的日志示例

检测规则/思路

sigma规则

title: 检测内网FTP链接到公网行为
description: 通过NETWORK检测内网FTP链接到公网行为
tags: T1071.002
status: experimental
references:
    - https://www.elastic.co/guide/en/siem/guide/current/ftp-file-transfer-protocol-activity-to-the-internet.html#ftp-file-transfer-protocol-activity-to-the-internet
logsource:
    product: network
detection:
    selection1:
          Type: tcp
          destination.port: 
                     - 21
                     - 20
    selection2:
          source.ip:
                     - 10.0.0.0/8
                     - 172.16.0.0/12
                     - 192.168.0.0/16
    selection3:
          destination.ip:
                     - 10.0.0.0/8
                     - 172.16.0.0/12
                     - 192.168.0.0/16
    condition: (selection1 and selection2) and not selection3)
level: low

Elastic rule query

network.transport: tcp and destination.port: (20 or 21) and (
network.direction: outbound or ( source.ip: (10.0.0.0/8 or
172.16.0.0/12 or 192.168.0.0/16) and not destination.ip: (10.0.0.0/8
or 172.16.0.0/12 or 192.168.0.0/16) ) )

建议

规则未经线上测试,谨慎使用,但是我相信它能够很好的帮助你发现网内的威胁。

参考推荐

MITRE-ATT&CK-T1071-002

https://attack.mitre.org/techniques/T1071/002/

检测内网FTP链接到公网行为

https://www.elastic.co/guide/en/siem/guide/current/ftp-file-transfer-protocol-activity-to-the-internet.html#ftp-file-transfer-protocol-activity-to-the-internet