active directory
1046 TopicsAgentless DC logging with WEF/WEC under tiering: five traps from a lab pilot
We wanted the security logs of our domain controllers in one place without installing anything on tier 0. Windows Event Forwarding does that natively, and it works. It also has five ways of looking healthy while forwarding nothing. This is what a lab pilot taught us, with the command that proves each point. Everything below comes from a lab. Names, addresses and figures are fictitious or rounded. Why no agent on tier 0 A domain controller's Security log is a circular buffer. Once it wraps, the oldest events are gone, and anyone holding tier 0 rights can clear what is left. Availability monitoring tells you a DC is up. It does not tell you who added a member to Domain Admins last Tuesday. The usual answer is a log shipper on every server. On tier 0 that means one more third-party service, running as SYSTEM, on the machines you least want to extend. Windows Event Forwarding (WEF) avoids that: the DC itself pushes selected events to a Windows Event Collector (WEC), and the only agent sits on the collector. Microsoft's documentation for this fits in about three pages. Our own procedure went through several versions. The difference is this post. The architecture in four hops A GPO tells each source where its collector is. One "Subscription Manager" GPO per tier, linked to the OU of the sources and never to the collector's (we did that once, and the collector dutifully subscribed to itself), filtered on a group such as WEF-T0-Sources. The source connects to the collector. WinRM over HTTP/5985, authenticated with the computer account. Kerberos signs and encrypts the payload, so HTTP here does not mean clear text. Basic, Digest and AllowUnencrypted stay off. The collector hands out subscriptions and receives events. The source filters its own logs and pushes batches (5 events or 30 seconds). Events land in ForwardedEvents, sized as a buffer (a few gigabytes), not as an archive. One agent on the collector ships to the SIEM. We use NXLog Community Edition reading ForwardedEvents only, sending GELF over TCP to a Graylog input dedicated to that tier. Domain controllers never talk to the SIEM directly: if Graylog stops, each collector keeps the events in its buffer. Three rules keep this compatible with a tiering model: One collector per tier. A collector belongs to the highest tier it collects from and is administered only from that tier. Tiers never share a source group, a subscription, a Graylog input or a stream. Flows only go one way. Sources connect to the collector, the collector connects to Graylog. Graylog never opens a connection to a collector, and no remote-management agent runs there. The collector's firewall lists the sources. The WinRM inbound rule accepts only the addresses of the tier's source group. We derive the list from the group so nobody forgets a source: $Ips = Get-ADGroupMember -Identity "WEF-T0-Sources" | ForEach-Object { (Resolve-DnsName -Name "$($_.Name).corp.garbadrome.local" -Type A).IPAddress } Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -Enabled True -Profile Domain,Private -RemoteAddress $Ips A source missing from that rule fails quietly: on the source, Microsoft-Windows-Forwarding/Operational logs event 105 (subscription manager unreachable) and nothing else tells you why. Trap 1: the forwarder cannot read the Security log Symptom. On the collector, the source is Active, heartbeats arrive, LastError is 0. Not one Security event shows up. Cause. Forwarding is done by the WinRM service on the source. By default that service has no read access to the Security channel. Fix. Grant read access to the WinRM service SID in the channel's security descriptor, by GPO (Computer Configuration > Administrative Templates > Windows Components > Event Log Service > Security > Configure log access). The policy replaces the whole descriptor, so start from the one your DC reports and append one entry: (A;;0x1;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970) That SID is the service SID of WinRM and is the same on every Windows machine. Microsoft's own setup page tells you to add NETWORK SERVICE to Event Log Readers. On a member server that is a local group. On a domain controller it is a domain group: you would be granting read access to every log on every DC. On DCs, we did not follow that advice. The part that cost us an afternoon. In our lab the source needed two reboots. After one reboot everything looked configured and nothing flowed. Our reading, which we have not proven: the policy is applied after the Event Log service has started, so the first reboot writes the new right and the second one makes the service use it. Setting the descriptor directly with wevtutil sl takes effect at once, which is how we handled the Sysmon channel. Proof. Only the effective descriptor counts, not the GPO report: wevtutil.exe gl Security | Select-String "channelAccess" The WinRM service SID must appear in the output. Trap 2: Active on the collector, refused on the source Symptom. A subscription that reads several channels delivers events from some of them only. The collector reports nothing wrong. Cause. If one channel of the query is unreadable, the source drops that channel and keeps the others. It says so, but only in its own log. Fix. Read Microsoft-Windows-Forwarding/Operational on the source after every change: Get-WinEvent -LogName "Microsoft-Windows-Forwarding/Operational" -MaxEvents 30 | Format-Table TimeCreated, Id, Message -Wrap Event IDs to know: 100: subscription created, fine 101: subscription created, but one of its channels is unreadable and is skipped 102: subscription failed (code 5004: channel unreadable or missing) 104: connected to the collector 105: collector unreachable (DNS, firewall, address in the GPO) Every channel you forward needs a read entry for the forwarder, as Security does. Sysmon's channel was our second lesson: the collector showed the source as active, nothing arrived, and the source logged code 5004 at every attempt. Once we had added the read entry and restarted WinRM on the source, event 100 appeared within two minutes. Proof. One event 100 per subscription, per source. Anything else is a source that looks alive and is not. Trap 3: the collector stops delivering and says nothing Symptom. Every subscription is Active with LastError: 0. Heartbeats keep arriving. Test events exist in the source's local log and never reach the collector. What happened. We had just disabled an old test subscription. From then on, the other subscriptions on that collector delivered nothing. The source did log event 103 (a subscription not unsubscribed cleanly), but do not read too much into it: the same DC logged it dozens of times in a few weeks, mostly around reboots, without any loss. Fix. On the collector only: Restart-Service Wecsvc The subscriptions re-activated and the events that had been waiting were delivered, each with its own time and record ID, so nothing arrived twice. We restarted neither WinRM nor the domain controller. Cause. Unknown. We saw it once, and it followed the disabling of a subscription; we did not find why. Proof. This is the incident that made the marker test (below) mandatory for us. Nothing on the collector distinguished this state from a healthy one. Trap 4: one event, one subscription Symptom. Duplicates in the SIEM, or a subscription nobody dares to disable because nobody knows what else it carries. Cause. Most likely overlapping queries. While two of our subscriptions both selected account-management events, we found thousands of events stored twice on the collector with the same record ID. We did not isolate the cause with a dedicated test. After the overlap was removed, a sample check found no duplicate. Fix. One theme per subscription, and each event ID in exactly one of them. Our tier 0 runs about ten, one per theme: system, security changes, process creation, authentication, directory changes, weak Kerberos encryption, PowerShell script blocks, Sysmon and security policy processing. Each can be switched off alone. The query language will fight you on three points: Exact matches only. contains() and starts-with() are not accepted in a subscription query. What you cannot filter at the source, you filter in the SIEM. Check how a value is really written, too: on the DCs we tested, a Kerberos encryption type appears as 0x17, lower case, with no leading zero, and the filter matches nothing else. Long lists are refused. A long chain of EventID=... or fails at creation with WS-Man error 0x80338107. Use ranges: EventID >= 4720 and EventID <= 4767. Exclusions go in Suppress, on an exact value. This is how two subscriptions share an event ID without overlapping: one suppresses what the other selects. <QueryList> <Query Id="0" Path="Security"> <Select Path="Security">*[System[(EventID=4702)]]</Select> <Suppress Path="Security">*[EventData[Data[@Name='TaskName']='\Microsoft\Windows\UpdateOrchestrator\Schedule Work']]</Suppress> </Query> </QueryList> Decide an exclusion after measuring, never before. An event suppressed at the source cannot be recovered later. Proof. We compare the queries of all subscriptions with a script before enabling a new one. Our first version ignored Suppress elements and raised a false alarm on two subscriptions that were complementary by design. The second check is in the SIEM and is described below. Trap 5: the noise is your configuration Symptom. One DC sends several times more events than its neighbours. Cause. Not users, and not attackers. In our lab, over a few hours, one DC sent several times more Security events than the others, and about half of them were event 4702 (scheduled task updated) for a single Windows Update task rewriting itself. Fix. Three corrections, in the order we found them: Sysmon registry monitoring. Registry events were more than 90% of what Sysmon produced. About half came from one networking key written continuously; most of the rest were security settings rewritten at every policy refresh, logged even when the value did not change. Restricting it to the places where code gets launched (Run keys, service ImagePath, Image File Execution Options) cut registry events by about 99%. The self-rewriting task. The Suppress shown above removes that one task by its full name. Other 4702 events stay: a scheduled task modified on a DC is exactly what you want to see. Policy refresh. Our lab runs HardenAD, an open-source hardening toolkit, adapted to the lab; in that setup it reapplies DC policies every five minutes. That is a design choice with a logging cost. It is also what made the failure described at the end show up every five minutes. Proof. In the SIEM, group by channel, then by event ID, sorted by count. Any line you cannot explain is either noise to remove or something you needed to know. Proving nothing is lost A heartbeat proves the source talks to the collector. It does not prove that a single event gets through. The only proof we accept is a marker: a harmless, recognisable action on the source, found again at the far end. 1. Produce the marker on the source. With command-line auditing on, this creates an identifiable event 4688: cmd.exe /c "echo WEF-TEST-$(Get-Date -Format yyyyMMdd-HHmmss)" 2. Find it on the collector, in ForwardedEvents, with the source's name in MachineName. 3. Find it in the SIEM, with the source's name in the source field. We then cut the collector for about twenty minutes, longer than the heartbeat interval, while two flows were producing markers. Every marker arrived, and only once. The reason is simple: events stay in the source's own log, and the source resumes from the last event it delivered. That also tells you where a loss would come from: a source log that wraps before the collector comes back. Size the source logs for the longest outage you accept. In our measurements Microsoft-Windows-GroupPolicy/Operational, at its default size, held only a few hours. wevtutil.exe sl "Microsoft-Windows-GroupPolicy/Operational" /ms:67108864 What we have not tested yet: an outage of the SIEM input itself. NXLog buffers to disk in that case (pm_buffer), and ForwardedEvents holds the rest, but we have not measured it. On the Graylog side The shipper's configuration is short. The parts that matter: <Input windows_wec> Module im_msvistalog Channel ForwardedEvents SavePos TRUE ReadFromLast TRUE Exec $collector = 'WEC-T0'; $tier = 'T0'; </Input> <Output graylog_tcp> Module om_tcp Host 192.0.2.50 Port 12201 OutputType GELF_TCP </Output> Four things to know before you trust what you read in the SIEM: source is the originating DC, not the collector. NXLog takes it from the event's Computer field. We add collector and tier so we can still tell which path an event took. Time is stored in UTC. If events look exactly one hour off, fix the display time zone in the user profile. Never shift the time in the shipper or in a pipeline: the stored data would become wrong. Precision is one second with the Community Edition in our setup. For the exact order of events from one server, sort by RecordNumber. Duplicates are easy to rule out. For one source and one channel, group by EventID and compare count() with card(RecordNumber). Equal values on every line mean no event arrived twice. The link between collector and SIEM carries account names, command lines and PowerShell script content. Keep it on a dedicated, filtered network, and use TLS (om_ssl in place of om_tcp) as soon as it crosses anything shared. Checklist: adding a source Add the computer account to the tier's source group. On the collector, rerun the firewall command so the new address is allowed. If the source is a DC, check that its copy of the Default Domain Controllers Policy matches the PDC's before you reboot it. The last section explains why. Reboot the source twice. Check channelAccess on the Security channel. If the source is a DC, install Sysmon and check the descriptor of its channel as well. Enlarge the local logs you rely on. Validate: one event 100 per subscription, a marker found on the collector, the same marker found in the SIEM. What to remember An active subscription is not a working collection. Only a marker found at the far end proves it. The forwarder must be able to read every channel. That is the first cause of a source that is active and silent. One event, one subscription. Most of the noise comes from configuration, not from activity. In the SIEM, source is the originating server and time is stored in UTC. Coming next: the DC that stopped applying its security policy While we were adding another DC to the pilot, one forwarding event kept coming back every five minutes. Nothing else looked wrong. Following it led us to a domain controller that had quietly stopped applying its security settings after a reboot, because one file carried a timestamp 11 seconds away from the PDC's copy. The file had been written five months earlier. The only witness was the tool we were still installing. I'll write that one up in a separate post. References Microsoft Learn: Setting up a source-initiated subscription Microsoft Learn: wecutil ANSSI (French national cybersecurity agency): guide-journalisation-microsoft, scripts and standard queries for logging in an Active Directory environment NXLog Community Edition reference: im_msvistalog, om_tcp, xm_gelf, pm_buffer Microsoft Sysinternals: Sysmon HardenAD: LoicVeirman/HardenAD, open-source Active Directory hardening toolkit Two questions for people running this in production: have you seen trap 3 (Active, heartbeats, no events until Wecsvc restarts), and under which conditions? And did the Security channel ACL set by GPO take effect after one reboot on your sources, or did you also need two? Corrections welcome.36Views0likes1CommentMultiple option select in my access portal entra
Subject: Guidance Required on Multiple Selection Functionality in Microsoft Entra Access Packages Dear Microsoft Entra Team, I am seeking guidance regarding the multiple selection functionality for requestor information questions in Microsoft Entra ID Governance Access Packages. We have configured a multiple-choice question in an Access Package and updated the isMultipleSelectionAllowed property to true using the Microsoft Graph API. When we retrieve the assignment policy through a GET request, the property correctly returns true. However, in the My Access Portal, selecting a new option replaces the previously selected option instead of allowing multiple selections. Could you please help clarify the following: Is multiple selection for a single multiple-choice question officially supported in the My Access Portal? If so, is any additional configuration required beyond setting isMultipleSelectionAllowed to true through Microsoft Graph API? If the My Access Portal does not currently support this behavior, what would be the recommended and supported approach to enable multiple selections for a single question without creating separate Access Packages for each option? Although we could potentially use individual Yes/No questions, this may not be a scalable solution when users need to choose from 20+ roles. Managing and presenting a large number of separate questions could negatively impact usability and the overall request experience. We would be grateful if you could advise on any supported approach that allows multiple role selections within a single request form. If multiple selections are supported and submitted through My Access, how can the selected responses be extracted and processed within an Azure Logic App? Are there any alternative approaches within Microsoft Entra ID Governance to achieve this functionality other than Power Apps? While Power Apps could potentially address the requirement, we are concerned that it may bypass or reduce some of the existing governance and approval capabilities provided by Access Packages. We would appreciate your recommendations for achieving this requirement using supported Microsoft Entra capabilities. We would greatly appreciate your technical guidance and recommendations on this matter. Thank you for your time and assistance. Kind Regards, Likhith85Views0likes2CommentsVolume Activation role questions
We have a DC, running Server 2016 to decommission (call it old server). One of the roles it had was Volume Activation (VA). This is Active Directory based and the keys AD holds are both for clients (Win11) and servers (2016/19/22/25). I have removed the VA role from the server and tested with a server which I added to the domain and the OS activated successfully, so it looks like it is working. I noticed the _vlmcs SRV DNS record was not deleted and is still pointing to the old server. Since the old server is no longer having the VA role, is it safe to delete the DNS record for the _vlmcs SRV record? What else do I need to take into account? Thanks in advance132Views0likes1CommentCómo delegar la administración de DNS y DHCP en Windows Server 2025 sin dar permisos de Domain Admin
Hola a todos. Soy estudiante de un ciclo de informática y estoy montando un laboratorio con Windows Server 2025 (Standard con entorno gráfico) como controlador de dominio con los roles de DNS y DHCP instalados. Quiero que un segundo usuario pueda gestionar las zonas DNS y los ámbitos DHCP, pero sin que forme parte del grupo Domain Admins. He visto los grupos integrados DNSAdmins y Administradores de DHCP, pero he leído que DNSAdmins puede suponer un riesgo de escalada de privilegios. ¿Cuál es la forma recomendada de hacerlo aplicando el principio de mínimo privilegio? ¿Delegar permisos sobre la zona, usar una unidad organizativa aparte u otra opción?255Views0likes2CommentsProcedures to raise the functional level of AD 2008 r2 to 2019
Hello everyone, Our AD has the Windows Server 2008 functional level and the servers with Windows Server 2016 OS. I intend to raise the functional level to 2019 or 2025. I would like your help with tips and documentation to decide whether 2019 or 2025 would be best, what are the risks and procedures for successful migration. I have an isolated environment to carry out rehearsals and tests before actually going into production.Solved559Views0likes3CommentsWindows server 2022 is not updating with latest patch KB5126655
Windows server 2022 is not updating with latest patch KB5126655. However, successfully installed 2026-10 Cumulative update for .Net framework. Last successful Cumulative update for the operating system version 21H2 is 2026-06. Try to update the latest patch manually, the server is rolling back the patch.1.7KViews0likes13CommentsSettings Crashes After DC Promotion; Windows Update Unavailable (Server 2016/2022)
Objective Resolve the issue where the Windows Settings app crashes immediately upon opening, so that I can access Settings and install Windows updates normally. Environment and Problem Description We have two domain controllers in our Active Directory domain, named AD and DC. Both are running Windows Server 2016. - AD holds all five FSMO roles and runs as a Hyper-V virtual machine hosted on another server. - DC is a physical server. Both domain controllers have the same problem. Control Panel opens normally, but the Settings app does not. When I click Settings, a window briefly flashes on the screen without displaying any content (or only the gear icon appears), and then the window immediately closes. I cannot open Settings-related pages, including Windows Update. As a result, I cannot use the normal Windows Update interface to install updates. The issue also affects monthly updates downloaded manually from the Microsoft Update Catalog. When I run an update package, the following error appears: Windows Update Standalone Installer: Installer encountered an error: 0x80070005 Access is denied. I performed the following test in an isolated environment: 1. Restored a backup of AD and installed a fresh Windows Server 2022 machine named AD3. AD3 was not connected to any other hosts or networks during the test. 2. Before AD3 was promoted to a domain controller, the Settings app worked normally. 3. Immediately after promoting AD3 to a domain controller, Settings stopped opening and began closing immediately. 4. I then transferred all five FSMO roles to AD3 and demoted AD, so that AD was no longer a domain controller. 5. Surprisingly, the Settings app on AD started working again after AD was demoted. This behavior strongly suggests that the problem is related to the domain controller role or something that changes when a server is promoted to a domain controller. However, I have not identified the underlying cause. Is there a recommended diagnostic procedure or a known issue that could explain this behavior? I would appreciate any technical guidance on how to identify the root cause and resolve the problem without having to demote the domain controllers. Thank you.149Views0likes1CommentKerberos Event ID 4771 (0x18) across multiple users while interactive logons succeed
Users are able to perform interactive/manual logons successfully with their current credentials. The failures are also generated outside normal working hours. The Client Address in the 4771 events corresponds to the workstation/IP of the respective user. We have observed many different Client Addresses (at least 15 different source IPs), so the failures are not originating from a single host. As an initial troubleshooting step, we executed: klist purge for one affected user. The Kerberos ticket cache was cleared successfully, but the Event ID 4771 failures continued afterward with no noticeable change. Previous guidance suggested checking for stale/stored credentials, scheduled tasks, Windows services, Credential Manager entries, mapped resources, proxy authentication, or background applications that might be attempting authentication with outdated credentials. Another recommendation was to use Sysmon on an affected workstation and correlate outbound Kerberos traffic on port 88 with the timestamp of the 4771 event in order to identify the process or executable generating the request. Before making changes or deploying additional monitoring software in the client's environment, we would like to determine the safest and most appropriate troubleshooting approach. Given that: interactive logons work normally; 0x18 failures occur for many users; each user's Client Address generally corresponds to their own workstation; the issue occurs across many different workstations; and clearing the Kerberos ticket cache did not change the behavior, what would be the recommended Microsoft troubleshooting method to identify the exact process, service, application, or stored credential generating these failed Kerberos pre-authentication requests? Thank you.215Views0likes1CommentADFS migration issue from 2016 OS to 2025 OS.
We have an ADFS 2016 farm (10.0.14393.6078, Farm Behavior Level 3) using a gMSA service account. We are trying to add an ADFS 2025 node (10.0.26100.33158) using Add-AdfsFarmNode. HTTP SPNs are correctly registered and visible in Active Directory, yet Add-AdfsFarmNode fails with "There were no SPNs set on the service account". Is direct Windows Server 2025 federation server expansion into a Windows Server 2016 ADFS farm supported, and are there known issues with gMSA-based farms?427Views0likes2Comments