Netsh Open FW Proxy Ports

Metadata

Author

Roberto Rodriguez @Cyb3rWard0g

Creation Date

2020/10/21

Modification Date

2020/10/21

Tactics

[‘TA0005’]

Techniques

[‘T1562.004’]

Tags

[‘art.15e57006-79dd-46df-9bf9-31bc24fb5a80’]

Dataset Description

This dataset represents adversaries modifying the local FW by opening port for proxy.

Notebooks

Notebooks created by the community leveraging the mordor datasets

Author

Name

Link

Simulation Plan

Environment

Tool Type

Module

Lab VM

Manual

cmd

Adversary View

netsh advfirewall firewall add rule name="atomic testing" action=allow dir=in protocol=TCP localport=450
netsh advfirewall firewall delete rule name="atomic testing" protocol=TCP localport=450 >nul 2>&1

Explore Mordor Dataset

Initialize Analytics Engine

from openhunt.mordorutils import *
spark = get_spark()

Download & Process Mordor File

mordor_file = "https://raw.githubusercontent.com/OTRF/mordor/master/datasets/small/windows/defense_evasion/host/cmd_netsh_fw_mod_open_ports.zip"
registerMordorSQLTable(spark, mordor_file, "mordorTable")
[+] Processing a Spark DataFrame..
[+] DataFrame Returned !
[+] Temporary SparkSQL View: mordorTable 

Get to know your data

df = spark.sql(
'''
SELECT Hostname,Channel,EventID, Count(*) as count
FROM mordorTable
GROUP BY Hostname,Channel,EventID
ORDER BY count DESC
'''
)
df.show(truncate=False)
+------------+------------------------------------+-------+-----+
|Hostname    |Channel                             |EventID|count|
+------------+------------------------------------+-------+-----+
|WORKSTATION5|Security                            |4658   |676  |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|10     |347  |
|WORKSTATION5|Security                            |4656   |339  |
|WORKSTATION5|Security                            |4663   |337  |
|WORKSTATION5|Security                            |4690   |337  |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|7      |244  |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|12     |38   |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|13     |21   |
|WORKSTATION5|Security                            |5447   |8    |
|WORKSTATION5|Security                            |4688   |3    |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|1      |3    |
|WORKSTATION5|Security                            |4689   |2    |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|5      |2    |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|11     |2    |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|18     |2    |
|WORKSTATION5|System                              |104    |1    |
|WORKSTATION5|Security                            |4946   |1    |
|WORKSTATION5|Security                            |4948   |1    |
|WORKSTATION5|Microsoft-Windows-Sysmon/Operational|24     |1    |
|WORKSTATION5|Security                            |1102   |1    |
+------------+------------------------------------+-------+-----+