Hello Massimiliano,
By default, Wazuh monitors RDP Login success and failure with the stock rules 60122 for Failure and 92657 for Success login. However, to differentiate RDP Login failure from local login failures, we will need to create a rule based on rule 60105. Still, first, we must ensure that Success and Failure Auditing is enabled on your Windows machine.
Step 1. Enable Success and Failure Auditing.
Do Windows + R > and type gpedit.msc > then expand Computer configuration > Security Settings > Advance Audit Policy Configuration > System Audit Policies - Local Group Policy Object > and double click on Logon/Logoff > Double click on Audit Logon > and check the boxes to select Success and Failure.
So the it looks like this:
Step 2. Create Rule for Audit Login Failure events
Login to the Wazuh Dashboard and click on the Hamburger menu > Server management > Rules > Custom rules > local_rules.xml button > go to the bottom of the file and paste the following rule before the </group> closing tag
<rule id="100200" level="7">
<if_sid>60105</if_sid>
<field name="win.system.eventID">^4625$</field>
<field name="win.eventdata.authenticationPackageName">^NTLM$</field>
<description>RDP Logon Failure - Unknown user or bad password</description>
<options>no_full_log</options>
<group>authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5,gpg13_7.1,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
<mitre>
<id>T1531</id>
</mitre>
</rule>
Then Click on Save and Restart.
Step 3. Test the login alerts and view them on the Threat Hunting.
I hope this information is helpful. Let me know if you have questions.
Regards,