Threat Hunting
APT:
DragonFly as defined by MITRE "Dragonfly is a cyber espionage group that has been attributed to Russia's Federal Security Service (FSB) Center 16. Active since at least 2010, Dragonfly has targeted defense and aviation companies, government entities, companies related to industrial control systems, and critical infrastructure sectors worldwide through supply chain, spearphishing, and drive-by compromise attacks"
TTPs:
Schedule Tasks Creation
Brute Force Attack
Phishing Email
Detection and Prevention:
Schedule Task Creation:
Installing Sysmon:
Windows:
Download Sysmon at this link: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
Download the sysmon XML config file: https://wazuh.com/resources/blog/emulation-of-attack-techniques-and-detection-with-wazuh/sysmonconfig.xml
Now in the downloads folder run in an admin Powershell prompt
Contents of the XML:
Wazuh Server config for Sysmon:
In the
/var/ossec/etc/shared/default/agent.confAdd the lines below
Next we must add the rule to the
/var/ossec/etc/rules/local_rules.xml
Creating an Active Response Script:
Create the file
C:\Program Files (x86)\ossec-agent\active-response\bin\analyze-scheduled-task.cmdand add the code below.
Configure Wazuh Agent to Monitor Response Log:
In the wazuh manager webui go to groups.

Edit the windows group

Add the lines below
If you don't have a windows group can add the lines below to /var/ossec/etc/shared/default/agent.conf on the wazuh server.
Now test to see if the scheduled-tasks.log is created
Run the command below to create a test task
Now the file C:\Program Files (x86)\ossec-agent\logs\scheduled-tasks.log should be created. It will look something like:
Now delete the task
Creating the Rule:
On the Wazuh server add the lines below into /var/ossec/etc/rules/local_rules.xml inside the <group name="windows,sysmon,">
Now restart wazuh manager on the wazuh server
Finished Product
In the webui it should show up as below:

Brute Force Attacks:
Wazuh Server setup:
In the
/var/ossec/etc/ossec.conffile make sure the lines below are not commented
Now in the same file add the lines. There is a section towards the middle of the file that has <active-response> commented out and you can add this right below that.
Now restart the Wazuh manager service:
Testing:
Run commands below to install hydra and trigger active response.
Now hydra usage:
Final Output:

Phishing Emails:
The file below is a document I made as a proof of concept for a set of instructions that could be given out to a corporation.
Last updated