<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andis Paudel on Medium]]></title>
        <description><![CDATA[Stories by Andis Paudel on Medium]]></description>
        <link>https://medium.com/@andispaudel?source=rss-248381d49df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ICMaPqPtMvM8pvj1</url>
            <title>Stories by Andis Paudel on Medium</title>
            <link>https://medium.com/@andispaudel?source=rss-248381d49df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:36:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andispaudel/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Active Directory DNS Services]]></title>
            <link>https://medium.com/@andispaudel/active-directory-dns-services-8aeced531b67?source=rss-248381d49df------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aeced531b67</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[logpoint]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[wildcard-dns]]></category>
            <dc:creator><![CDATA[Andis Paudel]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 04:33:33 GMT</pubDate>
            <atom:updated>2026-09-21T04:33:33.600Z</atom:updated>
            <content:encoded><![CDATA[<h3>Background</h3><p>I’m on my way learning Windows Active Directory on my path to excel at being a security engineer. This article is the first of a series where I will be jotting down the things that will help us understand how these things work and how we can look at them from a security point of view here.</p><p>To begin with, Windows Active Directory is used as an identity infrastructure by more than half of the companies worldwide in an on-prem AD setup or a hybrid setup (with Azure AD/Entra ID). Some organisations have also moved wholly to the cloud and use Entra ID for their identity and all. As we move onto the age of AI and advanced threats, identity is the new security perimeter. Securing identity infrastructure and setting up detections to monitor them is the first thing any mature organisation needs to do. Therefore, learning to secure Active Directory is a foremost thing a person in security needs to do.</p><p>As Active Directory offers a lot of services, such as Domain Services, Federation Services, Certificate Services and so on. Here, we will be looking at the Active Directory Domain Name System and the corresponding Active Directory Domain Services.</p><h3>Active Directory Domain Name System</h3><p>This is the default DNS solution on Windows Server devices.</p><p>To put it simply, DNS is how we find an IP address for the hostname, in the same way we use a phonebook to find a phone number belonging to a person.</p><p>The two reasons why AD DS needs DNS:</p><p><strong>Maintain hierarchical infrastructure design:</strong> An AD may have multiple forests, domains and child domains. Domain namespaces are used to separate them from each other and build a domain hierarchy.</p><p><strong>Locate Domain Controllers:</strong> Devices in an AD need to communicate with DC for authentication. If it’s in a remote site, it needs to locate its closest DC; such a process is done via DNS service (SRV) records.</p><p>Before DNS, LAN Manager Hosts (LMHOSTS) and hosts files were used to map IP addresses to hostnames. Hosts files still override DNS entries in the name resolution process.</p><p>C:\Windows\System32\drivers\etc contains the hosts files and LMHOSTS. In Windows Server, DNS data is saved under C:\Windows\System32\dns.</p><p>So, in an AD environment, when a user queries a website, it sends a recursive DNS query to the AD’s DNS server to resolve the IP address. If it doesn’t have a relevant DNS record, it asks the DNS forwarder (usually it’s the ISP’s DNS server or a public DNS server like Google or Cloudflare). We can check the DNS forwarder for a DNS server via the command.</p><pre>Get-DnsServerForwarder</pre><p>If the DNS resolver doesn’t have a record, it will send an iterative query to the root NS, then to the Level 1 (e.g., dot com) DNS server, then to the authoritative one, which would be the domain’s own Name Server.</p><p>We can either integrate AD DS with existing DNS infrastructure by deploying new DNS servers and DNS delegation, or we can implement new DNS infrastructure along with the new AD setup process. Implementing new DNS infra is an easier and recommended way rather than integrating with existing infra, which may pose several problems like disjoint namespaces and other replication configurations that we need to make. In the new AD and DNS setup, DNS replication uses the same secure AD replication already used for users, computers, groups and policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*txmUDeX5I70bd9VoAWmXNg.png" /><figcaption>General AD with DNS Setup</figcaption></figure><h3>DNS Records</h3><p>These are held by the DNS database. Most of the records are created automatically in an AD-integrated DNS setup while adding resources to the domain, changing settings and domain controllers. Some records that are to be manually created are:</p><h3>SOA — Start of Authority Record</h3><p>This is created when a zone is created for the first time. This provides general information for the DNS zone like the primary DNS server, responsible person (zone admin), serial number, refresh interval, retry interval, TTL and such.</p><p>To view the properties of an SOA record:</p><pre>Get-DnsServerResourceRecord -ZoneName &quot;EXAMPLE.COM&quot; -RRType &quot;SOA&quot; | Select-Object -ExpandProperty RecordData</pre><h3>A and AAAA Records</h3><p>These map an FQDN (Fully Qualified Domain Name -&gt; Unique Domain Name) to an IP address. A for IPv4 and AAAA for IPv6 addresses. Every device will have such a record when it is added to the domain automatically.</p><p>FQDN = hostname + domain name</p><p>Adding an A record:</p><pre>Add-DnsServerResourceRecordA -Name &quot;blog&quot; -ZoneName &quot;EXAMPLE.COM&quot; -IPv4Address &quot;192.168.1.100&quot;</pre><p>Removing an A record:</p><pre>Remove-DnsServerResourceRecord -ZoneName &quot;EXAMPLE.COM&quot; -RRType &quot;A&quot; -Name &quot;blog&quot;</pre><p>Listing A records in a zone:</p><pre>Get-DnsServerResourceRecord -ZoneName &quot;EXAMPLE.COM&quot; -RRType &quot;A&quot;</pre><h3>NS Records</h3><p>They are used to list authoritative DNS servers for the zone. In an AD-integrated DNS setup, all the domain controllers with the DNS role installed will be added to NS records.</p><p>To list NS for a zone:</p><pre>Get-DnsServerResourceRecord -ZoneName &quot;EXAMPLE.COM&quot; -RRType &quot;NS&quot;</pre><h3>MX — Mail Exchanger Records</h3><p>They specify an MX server for a domain. It could be any email server. If there are multiple MX records, the mail server priority number will be used to maintain priority order.</p><h3>CNAME — Canonical Name Records</h3><p>They are aliases for FQDN.</p><h3>PTR — Pointer Records</h3><p>They are used to map IP addresses to FQDN and can be called reverse DNS records.</p><h3>SRV Records</h3><p>They are used to specify the location of a service inside the infrastructure. They help to locate the nearest domain controllers. We can specify service, protocol, priority, weight, port number and host offering this service as information. A set of default SRV records are created for an AD-integrated DNS environment.</p><p>Listing SRV Records:</p><pre>Get-DnsServerResourceRecord -ZoneName &quot;EXAMPLE.COM&quot; -RRType &quot;SRV&quot;</pre><p>For detailed output, can pipe(|) out to Select-Object -ExpandProperty RecordData</p><h3>Zones</h3><p>There are 4 types of zones supported by Microsoft DNS Server with different responsibilities and characteristics.</p><h3>Primary Zone</h3><p>This is a read/write container containing DNS records for a domain. Upon creation of a first DC with integrated DNS, it will create this zone by default. This holds a master copy of the zone and stores in AD DS.</p><p>It can be of two types:</p><p><strong>1. Standard Primary Zones</strong></p><p>Used in non-AD environments to manage DNS, like while hosting a public-facing website by yourself. This stores its data in a data file in C:\Windows\system32\DNS folder.</p><p><strong>2. AD-integrated Primary Zone</strong></p><p>Stores its data in AD and uses the multi-master replication method. So, updating DNS records from any DC will replicate to all other DCs.</p><p>Can create a primary zone in an AD-integrated setup as:</p><pre>Add-DnsServerPrimaryZone -Name &quot;example.com&quot; -ReplicationScope &quot;Forest&quot; -PassThru</pre><p>By default, replication scope is set to domain; here we did forest. Primary zones are the only DNS zones that can be edited.</p><h3>Secondary Zone</h3><p>This keeps a read-only copy of a primary zone. Reliable network connectivity and sufficient zone transfer permissions are a must to maintain a healthy secondary zone. By default, zone transfer is not allowed in AD DS-integrated zones.</p><p>Can allow this via:</p><pre>Set-DnsServerPrimaryZone -Name &quot;example.com&quot; -SecureSecondaries TransferToSecureServers -SecondaryServers 192.168.1.102</pre><p>Can modify configuration via -TransferAnyServer or -TransferToZoneNameServer</p><h3>Stub Zone</h3><p>This is a read-only copy of a master zone but only contains SOA and NS records, plus the A records (glue records) for those name servers. It is aware of all authoritative DNS servers for its domain.</p><h3>Reverse Lookup Zone</h3><p>They hold PTR records. Such a zone can be primary, secondary or a stub in itself. They need to be created manually via:</p><pre>Add-DnsServerPrimaryZone -NetworkID &quot;10.10.0.0/24&quot; -ReplicationScope &quot;Domain&quot;</pre><h3>Conditional Forwarders</h3><p>DNS servers forward DNS queries to external DNS servers when they can’t resolve them internally. If forwarders are not responding, the DNS server will use “Root Hints” to resolve the query.</p><p>Can create a conditional forwarder via:</p><pre>Add-DnsServerConditionalForwarderZone -Name &quot;foreign.net&quot; -ReplicationScope &quot;Forest&quot; -MasterServers 10.0.0.2</pre><p>So, any queries for foreign.net will be resolved using the 10.0.0.2 DNS server. These are mainly used when creating AD trust with another AD forest or domain. A conditional forwarder is faster than normal forwarding because the query goes straight to the server that is authoritative for that namespace, instead of walking down from the root hints.</p><h3>DNS Policies</h3><p>They have various capabilities like</p><ul><li>Geo-location-based traffic routing</li><li>Application Load Balancing</li><li>Time-based DNS response</li><li>Split-brain DNS: internal and external network accesses being redirected separately.</li><li>DNS query filtering: based on client subnet, interface IP address, protocol, query type, time of day, etc.</li></ul><p>Can create a policy as:</p><pre>Add-DnsServerClientSubnet -Name &quot;blockA&quot; -IPv4Subnet 10.0.0.2/32<br>Add-DnsServerQueryResolutionPolicy -Name &quot;blockApolicy&quot; -Action IGNORE -ClientSubnet &quot;EQ,blockA&quot;</pre><h3>Secure DNS over HTTPS (DoH)</h3><p>The DNS client on Windows has supported DoH for a while now. The DNS server side took longer. Microsoft shipped DoH for the Windows DNS Server role on Windows Server 2025, first as a public preview in the February 2026 update, and then generally available from the June 2026 update. So, on a patched Windows Server 2025 DNS server we can now encrypt client-to-server DNS traffic with a proper certificate on the server.</p><p>Two things to keep in mind:</p><ul><li>It only covers client-to-server traffic. DNS traffic between two DNS servers is still not encrypted by DoH.</li><li>It is off by default and needs a trusted TLS certificate configured first.</li></ul><p>Google and Cloudflare public DNS servers support DoH queries as well.</p><h3>DNS Server Operation Modes</h3><p><strong>Dynamic</strong> AD DS integrated DNS uses this by default. This allows hosts and users to register, update and remove DNS records from DNS servers. Useful while there is DHCP-based IP assignment.</p><p><strong>Read/write</strong> Applicable when DNS zones run without AD DS integration. An authorised user needs to update records manually.</p><p><strong>Read-only</strong> When the server only keeps a read-only copy of a master zone.</p><p>The RODC (Read-only DCs) run AD DS-integrated primary DNS zones in read-only mode.</p><h3>Zone Transfers</h3><p>This is used for DNS replications. Two types:</p><p><strong>Asynchronous Full Transfer (AXFR)</strong> Done while setting up a new secondary/other zone to replicate a full copy of the zone file from the master server.</p><p><strong>Incremental Zone Transfer (IXFR)</strong> After the initial full transfer, the system only replicates the records that have been modified.</p><p>When there are changes in the master DNS zone, the system sends a notification to secondary servers about it, and then they request a zone update. They may also query based on SOA refresh intervals.</p><h3>DNS Delegation</h3><p>DNS delegation allows a parent DNS zone to assign responsibility for part of its namespace to another DNS server. Delegating a DNS zone does not create a new AD domain or change the AD forest structure. It only divides responsibility within DNS.</p><p>Let’s walk through setting up delegation to the dev.example.com domain. Before we start the delegation process, we need a second DNS server with an active primary DNS zone.</p><p>From the DNS server,</p><pre>Add-DnsServerPrimaryZone -Name &quot;dev.example.com&quot; -ZoneFile &quot;dev.example.com.dns&quot;</pre><p>Adding an A record in the zone,</p><pre>Add-DnsServerResourceRecordA -Name &quot;app1&quot; -ZoneName &quot;dev.example.com&quot; -AllowUpdateAny -IPv4Address &quot;192.168.0.110&quot;</pre><p>From the DC, to set up delegation:</p><pre>Add-DnsServerZoneDelegation -Name &quot;example.com&quot; -ChildZoneName &quot;dev&quot; -NameServer &quot;lp-test-01.example.com&quot; -IPAddress 192.168.0.110</pre><h3>Why an Attacker Cares</h3><p>Everything above is how DNS is supposed to work. Now let’s look at the same thing from the other side.</p><p>The short version: in Active Directory, name resolution is an authentication control. Whatever decides <em>which host you talk to</em> also decides <em>who you hand your credentials to</em>. Most of what follows comes down to that one sentence.</p><h3>Reconnaissance</h3><p>We already saw that a set of SRV records gets created automatically for an AD-integrated zone. Those records exist so that a client can find its nearest DC. The same records tell an attacker where every domain controller, global catalog and Kerberos KDC lives, and which site each one belongs to. One query, and the topology of the domain is on screen. No exploit needed, because this is the service doing exactly its job.</p><p>It gets better for the attacker. We saw that zone transfer is not allowed by default in AD-integrated zones, so we might assume the whole zone is not readable. That assumption is wrong. Because the zone is stored in AD, the records are AD objects, and any authenticated user can read them over LDAP by default. Dirk-jan Mollema’s adidnsdump does exactly this, and it works with a plain domain user. So, a locked-down zone transfer setting is not protecting the contents of the zone.</p><p>Naming conventions make this worse. If your servers are called sql-prod-01 and backup-nas-02, the zone dump is basically a target list.</p><h3>ADIDNS Record Spoofing</h3><p>This is the big one, and it’s worth understanding properly. Kevin Robertson at NetSPI documented it in two posts in 2018, and everything in this section comes from his research.</p><p>The default ACL on an AD-integrated DNS zone gives <strong>Authenticated Users</strong> the <strong>Create all child objects</strong> right. Read that literally. Every account that can log in to the domain — every service account, every intern, every contractor account nobody disabled — can create new DNS records in the zone.</p><p>That means a low-privileged user can insert themselves into name resolution for the whole domain. Compare it with LLMNR/NBT-NS poisoning, which is the attack most of us meet first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ABaOofcfoQ0x5OSPAFqMZQ.png" /><figcaption>Compared to LLMNR/NBT-NS</figcaption></figure><p>That last row is the one people miss. ADIDNS record injection is a one-shot action. Once the record is in AD, the attacker’s tooling can go away and the poisoning keeps working. Which makes it a perfectly viable phishing payload — one user running something briefly is enough.</p><h3>Permissions attach to names, not records</h3><p>All record types for a given name live on one AD object, a dnsNode. So if an admin has already created an A record called intranet, an unprivileged user cannot add an intranet MX record either, because the object exists and they don&#39;t own it.</p><p>That cuts both ways, and it’s the basis of the cheapest fix in the defence section below. Whoever creates a name first owns it.</p><h3>The wildcard record</h3><p>A dnsNode literally named * answers any name in the zone that doesn&#39;t match an existing record. That is LLMNR poisoning, except served authoritatively, domain-wide, to fully qualified queries, from the top of the resolution order. Every typo, every decommissioned server that someone&#39;s mapped drive still points at, every hardcoded hostname in an old script resolves wherever the attacker wants.</p><p>One detail matters for detection: dynamic updates can’t handle the * character, but LDAP can. So a wildcard record has to be created through LDAP as a dnsNode object. <strong>There are two write paths into the zone — dynamic updates and LDAP — and they produce completely different telemetry.</strong> If we only watch the DNS server logs, we miss the LDAP path entirely. Keep that in mind for the logging section.</p><h3>WPAD and the Global Query Block List</h3><p>WPAD is the classic prize, because a client that trusts it will fetch its proxy config from whoever answers. wpad does not exist in the zone by default, so it looks like the perfect name to grab.</p><p>It usually does nothing, because of the Global Query Block List (GQBL), which contains wpad and isatap by default. The DNS server refuses to answer queries matching names on that list.</p><p>“Usually” is doing a lot of work there. Robertson found three ways around it — via a wildcard record, via a DNAME record, and via an NS record delegating a wpad subdomain to a nameserver the attacker controls. Microsoft assigned CVE-2018-8320 and patched the wildcard and DNAME paths in October 2018. The NS-record path was still working when his second article was published.</p><p>The lesson is not “WPAD is fine now”. A block list is a name-matching control bolted onto a resolver, and name-matching controls have edges. Turning WPAD off at the client via GPO is a control that doesn’t depend on the resolver getting every path right.</p><h3>DNS suffix search order</h3><p>This one is the least known and the most likely to bite a well-run environment.</p><p>Everything above targets names that don’t exist. But many organisations push multiple DNS suffixes to clients via GPO, and a short-name lookup gets tried against each suffix in order until one answers. So if an attacker can write to a zone that appears <em>earlier</em> in that search list, they can hijack short-name requests for hosts that legitimately exist in a <em>later</em> suffix. The higher-priority zone answers first and the real record never gets consulted.</p><p>So the attack surface isn’t “unclaimed names”. It’s “unclaimed names in every zone, plus every name in every lower-priority suffix”.</p><h3>Zone Transfer Exposure</h3><p>We saw -TransferAnyServer earlier as one of the options for configuring zone transfers. If that ends up set on a zone — usually when someone is troubleshooting a stubborn secondary and never reverts it — any host that can reach the DNS server on TCP/53 can pull the entire zone with an AXFR. Same outcome as the LDAP dump above, except this one doesn&#39;t even need a domain account.</p><p>Worth checking across the estate:</p><pre>Get-DnsServerZone | Select-Object ZoneName, SecureSecondaries, SecondaryServers</pre><h3>DNS as a C2 and Exfiltration Channel</h3><p>DNS is allowed out of almost every network, is rarely inspected, and is designed to carry arbitrary strings. That makes it a comfortable covert channel. Data gets encoded into subdomain labels of a domain the attacker controls, the internal resolver dutifully forwards the query out, and the attacker’s authoritative nameserver reads it. TXT records carry the responses back.</p><p>There is an AD-specific variant too. Because an attacker owns any dnsNode they create, and those objects have writable attributes, records in the zone can be used as a dead drop inside the directory itself — no external DNS traffic at all.</p><p>Relevant ATT&amp;CK techniques if you want to map this: T1590.002 (DNS recon), T1557 (adversary-in-the-middle), T1071.004 (DNS as C2), T1568.002 (domain generation algorithms).</p><h3>What to Log</h3><p>Here is where the visibility actually comes from.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cpBqEaE0kpVrIfBpqKc8rQ.png" /><figcaption>Logging Guide</figcaption></figure><p>Two practical notes before anyone turns all of this on:</p><p><strong>The audit channel is on by default and cheap.</strong> Microsoft’s own guidance is that it doesn’t significantly affect DNS server performance. If you are collecting nothing today, start here.</p><p><strong>The analytical channel is off by default and is not cheap.</strong> A server handling 100,000 queries per second can see around 5% performance degradation with analytic logging enabled, with no apparent impact at 50,000 QPS and below. It also writes to an .etl file rather than a normal event log, so collecting it needs an ETW-capable agent, not plain Windows Event Forwarding. Budget for the volume before you enable it fleet-wide.</p><p>And remember the two write paths. The Security log events (5136/5137) cover the LDAP path and need <strong>Audit Directory Service Changes</strong> enabled on the DCs. The DNS audit events cover the dynamic update path. You need both.</p><h3>Two detections worth building first</h3><p>Rather than a wall of event IDs, here are two that are worth actually writing.</p><p><strong>1. Wildcard record creation</strong></p><p>Watch Security 5137 for object creation where the object DN under the DNS zone container starts with DC=*. There is almost no legitimate reason for a wildcard dnsNode to appear, and if your admins pre-create one as a control (see below), that is a single known event you can baseline out.</p><p>The bonus here is attribution. The creating account’s SID is stamped on the object, so the detection and the “who did it” arrive in the same event.</p><p><strong>2. AXFR from an unexpected source</strong></p><p>Alert on DNS audit events 269–272 where the peer is not a known DNS server or secondary. In a healthy AD-integrated environment this should be close to silent, which makes it a good low-volume, high-signal rule.</p><h3>Building the Wildcard Detection End to End</h3><p>Writing a detection down is the easy part. I wanted to actually see the event, so I built the first one in my lab: a domain controller DC-01 holding the AD-integrated terracottapharma.com zone, the Guardsix Log Collection Agent on the server, and Guardsix SIEM on the other end. I work on the SIEM side at Guardsix, so that&#39;s the stack I had in front of me, but the Windows-side steps below are the same whichever collector you run.</p><p>The thing that catches people out is that this needs three separate switches turned on, not one. Miss any of them and you get a quiet lab and a false sense of coverage.</p><h3>1. Collect the DNS audit channel</h3><p>Add the channel to the agent’s collection policy:</p><pre>Microsoft-Windows-DNSServer/Audit</pre><p>Quick check that it exists and is enabled on the server:</p><pre>Get-WinEvent -ListLog &quot;Microsoft-Windows-DNSServer/Audit&quot; |<br>    Select-Object LogName, IsEnabled, RecordCount</pre><p>After applying the policy, only newly generated events get forwarded, old ones may not be backfilled depending on the collector’s bookmark behavior. So generate a fresh test after the policy is live, not before.</p><h3>2. Turn on Directory Service Changes auditing</h3><p>On the DC:</p><pre>auditpol /get /subcategory:&quot;Directory Service Changes&quot;</pre><p>If it isn’t on, in a lab:</p><pre>auditpol /set /subcategory:&quot;Directory Service Changes&quot; /success:enable</pre><p>In a managed environment this belongs in Group Policy, not as a one-off local setting on a DC.</p><h3>3. Put a SACL on the DNS zone</h3><p>This is the step people skip, and it’s why 5137 never shows up for them. The audit policy says <em>what kind</em> of thing to audit. The SACL says <em>which objects</em>. Without both, nothing is written.</p><p>I did this through adsiedit.msc, connecting to the application partition:</p><pre>DC=DomainDnsZones,DC=terracottapharma,DC=com</pre><p>then navigating to CN=MicrosoftDNS → DC=terracottapharma.com, and opening <strong>Properties → Security → Advanced → Auditing</strong>. I added a Success auditing entry for authenticated activity, applied to the zone and its descendants, with:</p><ul><li>Create all child objects</li><li>Write all properties</li><li>Delete all child objects, if you want deletion telemetry too</li></ul><p>It&#39;s worth being clear about what this does and doesn’t do: a SACL grants nobody any permission. It only tells AD to write an audit event when someone who already has the access performs the operation. And scope it to the zone rather than the whole directory, that gives the visibility without turning on broad directory auditing.</p><h3>4. Create the wildcard record</h3><p>I used a unique name on purpose. If you reuse a name you recently deleted, AD may revive the tombstoned dnsNode instead of creating a new one, and you&#39;ll get a 5136 (modified) rather than the 5137 (created) you were waiting for.</p><pre>$DnsServer = &quot;DC-01&quot;<br>$Zone      = &quot;terracottapharma.com&quot;<br>$Name      = &quot;*.adidns-&quot; + (Get-Date -Format &quot;yyyyMMddHHmmss&quot;)<br>$DemoIP    = &quot;192.0.2.123&quot;</pre><pre>Add-DnsServerResourceRecordA `<br>    -ComputerName $DnsServer `<br>    -ZoneName $Zone `<br>    -Name $Name `<br>    -IPv4Address $DemoIP `<br>    -TimeToLive 00:05:00</pre><pre>$Name</pre><p>That gave me the node *.adidns-20260920154853. 192.0.2.123 is from the documentation range, used only as a safe demo value.</p><p>Then a quick sanity check that the wildcard actually behaves like a wildcard, a hostname that has no record of its own:</p><pre>Resolve-DnsName -Server &quot;DC-01&quot; `<br>    -Name &quot;nonexistent.adidns-20260920154853.terracottapharma.com&quot; -Type A</pre><p>It resolved to 192.0.2.123. That&#39;s the whole problem in one command: a name that does not exist, answered authoritatively, by a record any authenticated user could have written.</p><h3>5. Find it in the SIEM</h3><p>Once the event reached Guardsix SIEM:</p><pre>norm_id=Winserver &quot;event_id&quot;=5137 class=&quot;dnsNode&quot;<br>| chart count() by user, class, object_dn, message</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EvQMkepcIoTNUVyp9lDuAg.png" /><figcaption><em>Guardsix SIEM: Event ID 5137 showing creation of the wildcard dnsNode by AndisP</em></figcaption></figure><p>Everything the detection needs is in that one row: who did it, what class of object, and the full DN with the wildcard name and its location in the DomainDnsZones partition preserved.</p><p>That query is the hunting version, it catches any audited dnsNode creation, which includes every ordinary record. To turn it into an alert, add a condition that the leaf RDN, object_dn starts with the literal string DC=*.. Mind the escaping here, because you want a literal asterisk, not a query wildcard, and that differs between parsers.</p><p>The same query, filtered for DC=wpad, or DC=isatap, instead, gives you detection 1&#39;s siblings for free. Microsoft puts both names in the Global Query Block List precisely because they&#39;re the ones worth hijacking, so creating them is never routine. Current list:</p><pre>Get-DnsServerGlobalQueryBlockList -ComputerName &quot;DC-01&quot;</pre><p>Creating one of those nodes isn’t proof of exploitation on its own. The analyst still has to check whether there’s an approved change behind it, what address it points at, which account created it, and whether any client actually queried or connected to it afterwards.</p><h3>Why you still want event 515</h3><p>The 5137 tells you which directory object was created and by whom. It doesn&#39;t tell you cleanly where the record points, because the dnsRecord attribute is binary. DNS audit event 515 fills that in: record name, type, TTL, record data and zone. Two events, two halves of the same story, which is exactly the &quot;two write paths&quot; point from earlier showing up in practice.</p><p>A few caveats from the lab, so nobody loses an afternoon:</p><ul><li>No 5137 without both the audit subcategory <em>and</em> the SACL.</li><li>Reusing a tombstoned name gives 5136, not 5137.</li><li>If multiple DCs host the zone, collect from every DC that can process the write, or you’ll miss it depending on where it landed.</li><li>A wildcard record isn’t automatically malicious. Some application and dev environments use them legitimately, baseline first, then alert.</li></ul><p>For attribution, take the account from the 5137 and correlate its logon_id with 4624 to get the logon type and source host. Creation by an ordinary user or an unexpected machine account should outrank creation by a known DNS admin during a change window.</p><h3>Defense</h3><p><strong>Fix the zone ACL.</strong> This is the real remediation. Very few environments genuinely need Authenticated Users to create arbitrary DNS records. Where DHCP handles registration, configure a dedicated DNS dynamic-update credential in DHCP and then remove <strong>Create all child objects</strong> from Authenticated Users on the zone. Do it in audit mode first, machine self-registration will break loudly if you get the scope wrong.</p><p><strong>Pre-create the names that matter.</strong> Because permissions attach to names, an admin who creates a name first denies it to everybody else. Create *, wpad and isatap as an administrator, point them at a black hole. One caveat Robertson corrected himself on: if your environment uses multiple DNS suffixes, do <strong>not</strong> use a wildcard A record, because it will swallow legitimate short-name lookups that should have resolved in a lower-priority suffix. Use a TXT record instead, it still occupies the dnsNode and blocks a rogue *, without resolving anything.</p><p><strong>Disable WPAD at the client</strong> via GPO, rather than relying on the GQBL.</p><p><strong>Use fully qualified names in configs.</strong> Every hardcoded short hostname in a script, connection string, mapped drive, or monitoring check is a lookup that follows the suffix search list and can be hijacked. You can’t stop users typing short names, but you can fix configuration.</p><p><strong>Enable scavenging.</strong> Stale machine records that nobody cleaned up are attack surfaces, and they make the noise floor higher for every detection above.</p><h3>Summary</h3><p>So, this is how DNS works in AD environments: the logic, the namespaces, the zones, the replication, the operating modes, and delegation. And then the part that matters for us: the zone is an AD object with an AD ACL, that ACL is permissive by default, and whoever can write to it can decide where authentication traffic goes.</p><p>Next in this series, I’ll look at AD DS itself and the objects that live inside it.</p><p><em>The ADIDNS attack research in this post is Kevin Robertson’s (NetSPI, 2018) — see </em><a href="https://www.netspi.com/blog/technical-blog/network-pentesting/exploiting-adidns/"><em>Beyond LLMNR/NBNS Spoofing</em></a><em> and </em><a href="https://www.netspi.com/blog/technical-blog/network-pentesting/adidns-revisited/"><em>ADIDNS Revisited</em></a><em>. The LDAP zone-dumping technique is Dirk-jan Mollema’s. The DNS fundamentals follow Dishan Francis’s</em> Mastering Active Directory, <em>with lab examples rebuilt in my own environment. Event ID tables and the 5137 auditing requirements are from Microsoft Learn — </em><a href="https://learn.microsoft.com/en-us/windows-server/networking/dns/dns-logging-and-diagnostics"><em>“Enable DNS Logging and Diagnostics”</em></a><em> and </em><a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5137"><em>“Event ID 5137”</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aeced531b67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Asynchronous I/O in Linux: From select() to epoll()]]></title>
            <link>https://medium.com/@andispaudel/understanding-asynchronous-i-o-in-linux-from-select-to-epoll-b450a32e8874?source=rss-248381d49df------2</link>
            <guid isPermaLink="false">https://medium.com/p/b450a32e8874</guid>
            <category><![CDATA[linux-kernel]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[epoll]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[concurrency]]></category>
            <dc:creator><![CDATA[Andis Paudel]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 15:57:19 GMT</pubDate>
            <atom:updated>2026-02-06T15:58:56.524Z</atom:updated>
            <content:encoded><![CDATA[<p>A few days ago, I came across a claim:</p><blockquote>Linux poll() has O(n) time complexity, while epoll() operates in O(1).</blockquote><p>That sentence caught my interest in how these things work. Curious enough, I decided to dig into the internals and the mental model behind Linux I/O multiplexing.</p><p>This article is a collection of my understanding of how Linux monitors file descriptors, why older mechanisms scale poorly, and what makes epoll() fundamentally different.</p><h3>The Problem: Waiting on Many File Descriptors</h3><p>At its core, asynchronous I/O is about this question:</p><blockquote>“Which of these file descriptors can I safely read from or write to without blocking?”</blockquote><p>Linux answers this question through <strong>I/O multiplexing system calls</strong>, the most common being:</p><ul><li>select()</li><li>pselect()</li><li>poll()</li><li>ppoll()</li><li>epoll()</li></ul><p>Let’s walk through them in evolutionary order.</p><h3>select() : The Original Bitmask-Based Design</h3><h3>What select() Does</h3><p>select() allows a process to block until one or more file descriptors become ready for I/O (read, write, or exceptional conditions), or until a timeout expires.</p><pre>int select(<br>    int nfds,<br>    fd_set *readfds,<br>    fd_set *writefds,<br>    fd_set *exceptfds,<br>    struct timeval *timeout<br>);</pre><h3>How File Descriptors Are Represented</h3><p>This is the key working behind select():</p><blockquote><strong><em>select() does not receive a list of file descriptors.<br> It receives bitmasks indexed by file descriptor number.</em></strong></blockquote><p>Internally, an fd_set is essentially an array of machine words:<br>Each <strong>bit position corresponds to a file descriptor</strong></p><ul><li>Bit = 1 → monitor this fd</li><li>Bit = 0 → ignore it</li></ul><p>Example: monitoring file descriptors 3 and 7 for reading.</p><pre>fd_set rfds;</pre><pre>FD_ZERO(&amp;rfds);<br>FD_SET(3, &amp;rfds);<br>FD_SET(7, &amp;rfds);</pre><pre>select(8, &amp;rfds, NULL, NULL, NULL);</pre><p>The kernel interprets this as:<br>Scan bits 0 → 7<br>Check readiness for each fd whose bit is set</p><h3>The Cost of This Design</h3><ul><li>The kernel <strong>scans every fd from 0 to </strong><strong>nfds - 1 </strong>requiring O(n) complexity.</li><li>The bitsets are <strong>modified in place.</strong></li></ul><h3>Hard Limit</h3><p>select() is capped by FD_SETSIZE (usually <strong>1024</strong>).<br>This is not configurable in user space.</p><h3>pselect(): select() with Signal Masking</h3><p>pselect() behaves almost exactly like select(), except for one crucial improvement:</p><pre>int pselect(<br>    int nfds,<br>    fd_set *readfds,<br>    fd_set *writefds,<br>    fd_set *exceptfds,<br>    const struct timespec *timeout,<br>    const sigset_t *sigmask<br>);</pre><p>It allows specifying a <strong>signal mask atomically</strong> during the wait, avoiding certain conditions between signal handling and blocking.</p><p>Mechanically, however, it is still <strong>bitmask-based</strong> and <strong>O(n)</strong>.</p><h3>poll(): Arrays Instead of Bitmasks</h3><p>To overcome the descriptor limit and awkward bitmasks, Linux introduced poll().</p><pre>int poll(struct pollfd *fds, nfds_t nfds, int timeout);</pre><h3>How poll() Represents FDs</h3><p>Instead of bitmasks, poll() uses an <strong>array of structures</strong>:</p><pre>struct pollfd {<br>    int   fd;      /* file descriptor */<br>    short events;  /* requested events */<br>    short revents; /* returned events */<br>};</pre><p>Each entry explicitly names the fd.</p><p>Example:</p><pre>struct pollfd fds[2];</pre><pre>fds[0].fd = 3;<br>fds[0].events = POLLIN;</pre><pre>fds[1].fd = 7;<br>fds[1].events = POLLIN;</pre><pre>poll(fds, 2, -1);</pre><h3>What the Kernel Does</h3><ul><li>Iterates <strong>only over the array entries</strong></li><li>Checks readiness for each fd</li><li>Writes results into revents</li><li>Does <strong>not destroy the input structure</strong></li></ul><h3>Improvements Over select()</h3><ul><li>No FD_SETSIZE limit</li><li>No sparse-fd penalty</li></ul><h3>But…</h3><ul><li>Time complexity is still <strong>O(n)</strong> per call</li><li>Every poll() re-scans all watched descriptors</li></ul><h3>ppoll(): Signal-Safe poll()</h3><p>Just as pselect() extends select(), ppoll() extends poll():</p><pre>int ppoll(<br>    struct pollfd *fds,<br>    nfds_t nfds,<br>    const struct timespec *timeout,<br>    const sigset_t *sigmask<br>);</pre><p>Same polling behavior, but with atomic signal masking.</p><h3>Why select() and poll() Don’t Scale</h3><p>Both suffer from the same architectural flaw:</p><blockquote><strong><em>The kernel has no memory of what changed.</em></strong></blockquote><p>Every call forces the kernel to <strong>re-evaluate all descriptors</strong>, whether they changed or not.</p><p>This is where epoll() enters.</p><h3>epoll(): Event-Driven, Not Scan-Driven</h3><p>Instead of repeatedly asking,</p><blockquote><em>“Which of these descriptors are ready?”</em></blockquote><p>epoll() flips the model to:</p><blockquote><em>“Tell me </em>only<em> when something becomes ready.”</em></blockquote><h3>The epoll Lifecycle</h3><ol><li><strong>Create an epoll instance</strong></li></ol><pre>int epfd = epoll_create1(0);</pre><p>This creates a structure in the kernel space, which tracks events.</p><p><strong>2. Register file descriptors</strong></p><pre>struct epoll_event ev;<br>ev.events = EPOLLIN;<br>ev.data.fd = sockfd;</pre><pre>epoll_ctl(epfd, EPOLL_CTL_ADD, sockfd, &amp;ev);</pre><p><strong>3. Wait for events</strong></p><pre>struct epoll_event events[64];</pre><pre>int n = epoll_wait(epfd, events, 64, -1);Level-Triggered vs Edge-Triggered</pre><h3>Level-Triggered (Default)</h3><ul><li>A file descriptor is “ready” as long as data is available in the file descriptor.</li><li>Similar semantics to poll() and select()</li><li>The kernel may still recheck readiness</li></ul><h3>Edge-Triggered (EPOLLET)</h3><ul><li>The event is delivered <strong>only on state transitions</strong></li><li>No repeated notifications for unchanged state</li><li>The kernel keeps a <strong>ready list</strong></li><li>No full scans → <strong>O(1) event delivery</strong></li></ul><h3>Why epoll() Can Be O(1)</h3><ul><li>File descriptors are <strong>registered once</strong></li><li>The kernel tracks readiness internally</li><li>Ready descriptors are <strong>pushed</strong>, not polled</li><li>epoll_wait() simply drains the ready queue</li></ul><p>There’s no repeated scanning of file desriptors, no bitmask rebuilding overhead and no more array iteration.</p><h3>A Subtle Edge-Triggered Trap</h3><p>Edge-triggered epoll <strong>requires non-blocking I/O</strong>.</p><p>Example failure scenario:</p><ul><li>FD has 5 KB of data</li><li>The user buffer is 1 KB</li><li>Reads only once</li><li>Calls epoll_wait() again</li><li>No new event arrives</li><li>Remaining data is never read → <strong>deadlock</strong></li></ul><p>Correct approach:<br>Drain<strong> the fd completely until </strong><strong>EAGAIN.</strong></p><h3>A Note on Node.js</h3><p>Node.js uses epoll() internally (via libuv) on Linux.</p><p>Important detail:</p><blockquote><em>epoll() tracks </em><strong><em>file descriptions</em></strong><em>, not file descriptors.</em></blockquote><p>This means:</p><ul><li>dup()ed descriptors refer to the same underlying object</li><li>Events are associated with kernel file objects, not process-local integers</li></ul><h3>Final Thoughts</h3><p>The evolution from select() to epoll() mirrors the evolution of Linux itself:</p><ul><li>From small, synchronous workloads</li><li>To massive, event-driven, high-concurrency systems</li></ul><p>select() and poll() ask the kernel to <strong>search</strong>.<br>epoll() asks the kernel to <strong>remember</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b450a32e8874" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle’s January 2026 Patch Flood]]></title>
            <link>https://medium.com/@andispaudel/oracles-january-2026-patch-flood-64232910b77b?source=rss-248381d49df------2</link>
            <guid isPermaLink="false">https://medium.com/p/64232910b77b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[patching]]></category>
            <category><![CDATA[vulnerability-management]]></category>
            <dc:creator><![CDATA[Andis Paudel]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 18:01:55 GMT</pubDate>
            <atom:updated>2026-01-22T18:01:55.030Z</atom:updated>
            <content:encoded><![CDATA[<p>Oracle’s January 2026 Critical Patch Update (CPU) delivered <strong>337 security patches</strong> addressing <strong>~230 distinct CVEs</strong> across its product portfolio. The update is notable not just for its size but for what it reveals about modern enterprise risk:</p><ul><li>A large fraction of fixes address <strong>third‑party open‑source libraries</strong>, not Oracle‑authored code.</li><li>Single vulnerabilities map to many products due to <strong>shared dependency chains</strong>.</li><li>Several <strong>internet‑facing components</strong>, including proxy software commonly deployed in DMZs, are affected by <strong>unauthenticated, remotely exploitable flaws</strong>.</li></ul><p>This release is less about emergency zero‑day response and more about <strong>exposure reduction and supply‑chain risk management</strong>.</p><h3>Patch Volume and Dependency Risk</h3><ul><li><strong>337 patches</strong> were released in the January 2026 CPU.</li><li>These patches correspond to <strong>approximately 230 unique CVEs</strong>.</li><li>Many CVEs apply to multiple Oracle products because the same third‑party libraries are embedded across product lines.</li></ul><p>This leads to what security teams experience as <em>CVE amplification</em>: one upstream library flaw requiring patches across dozens of services. The risk is structural rather than incidental; modern enterprise software is built on deep dependency stacks.</p><h3>Critical Proxy Vulnerability: CVE‑2026‑21962</h3><h3>What Is Affected</h3><ul><li>Oracle Fusion Middleware</li><li>Oracle HTTP Server</li><li>Oracle WebLogic Server Proxy Plug‑in (12.2.1.4.0, 14.1.1.0.0 and 14.1.2.0.0)</li></ul><h3>Severity and Exploitability</h3><ul><li><strong>CVSS v3 score: 10.0 (Critical)</strong></li><li><strong>No authentication required</strong></li><li><strong>No user interaction required</strong></li><li><strong>Network‑exploitable via crafted HTTP requests</strong></li></ul><p>Oracle’s advisory describes this issue as an <strong>improper input validation flaw</strong>. The proxy component fails to correctly handle specially crafted HTTP requests, allowing attackers to trigger unintended behavior remotely.</p><h3>Why a Proxy Flaw in the DMZ Matters</h3><p>Proxy servers are typically deployed in <strong>demilitarized zones (DMZs)</strong> and commonly front:</p><ul><li>Reverse proxies</li><li>Public web servers</li><li>Load balancers</li><li>Application gateways</li><li>VPN and access gateways</li></ul><p>A proxy’s role is to terminate external traffic and strictly control what reaches internal systems. If the proxy itself is compromised:</p><ul><li>It may be used as a <strong>pivot point</strong> for further attacks.</li><li>Trust boundaries can collapse <strong>if network segmentation is weak</strong>.</li><li>Internal services that were never internet‑facing may become reachable.</li></ul><p>Whether internal systems are exposed depends entirely on <strong>network design, segmentation, and firewall rules</strong>. The vulnerability does not inherently grant full internal access, but it removes a critical layer of defense.</p><h3>CIA Triad Impact</h3><p>If exploited in permissive environments, CVE‑2026‑21962 could affect:</p><h3>Confidentiality</h3><ul><li>Exposure of sensitive application data</li><li>Leakage of customer or business records</li></ul><h3>Integrity</h3><ul><li>Manipulation of web transactions</li><li>Injection or modification of application content</li></ul><h3>Availability</h3><ul><li>Proxy service disruption</li><li>Traffic blockage to backend systems</li><li>Service outages due to corrupted configuration or crashes</li></ul><p>Availability risk is particularly relevant: if the proxy fails, <strong>backend services become unreachable even if they remain intact</strong>.</p><h3>Apache Tika Supply‑Chain Vulnerability: CVE‑2025‑66516</h3><h3>What the Vulnerability Is</h3><ul><li>A <strong>critical Apache Tika vulnerability</strong> with CVSS scores ranging from <strong>9.8 to 10.0</strong></li><li>Root cause: <strong>XML External Entity (XXE) processing in crafted XFA content within PDFs</strong></li></ul><h3>Why It Matters</h3><p>Apache Tika is widely used for:</p><ul><li>Document parsing</li><li>Content extraction</li><li>Metadata processing</li></ul><p>Oracle embeds Apache Tika in multiple products, including:</p><ul><li>Oracle Business Process Management Suite</li><li>Oracle Middleware Common Libraries and Tools</li></ul><p>Because the same library is reused, <strong>one Apache CVE impacts many Oracle products simultaneously</strong>.</p><h3>Not an Oracle‑Only Issue</h3><p>This vulnerability exists in Apache Tika itself. Any platform embedding a vulnerable Tika version is affected, including:</p><ul><li>Java‑based enterprise applications</li><li>Document ingestion pipelines</li><li>Web services performing file uploads and parsing</li></ul><p>The risk is highest where <strong>untrusted documents are processed on internet‑facing systems</strong>.</p><h3>Patch Distribution Highlights</h3><p>Notable product families with high patch counts include</p><ul><li><strong>Oracle Zero Data Loss Recovery Appliance (ZDLRA): </strong>dozens of patches, many remotely exploitable</li><li><strong>Oracle Fusion Middleware / Enterprise Manager: </strong>large concentration of critical fixes</li><li><strong>Oracle E‑Business Suite (including financial services modules)</strong></li><li>Additional patches for <strong>Java SE, MySQL, PeopleSoft, Hyperion</strong>, and related products</li></ul><p>Exact counts of remotely exploitable patches may vary by classification method, but the concentration of high‑severity issues in middleware and infrastructure products is clear.</p><h3>Exploitation Status</h3><ul><li><strong>No confirmed zero‑day exploitation</strong> was reported by Oracle at the time of the January 2026 CPU release.</li><li>No public proof‑of‑concept exploits were disclosed at release time.</li></ul><p>This does not imply low risk. Patch disclosures frequently precede exploitation as attackers reverse‑engineer fixes.</p><h3>Patching Prioritization Guidance</h3><p>Given the size of this CPU, organizations should prioritize:</p><ol><li><strong>Critical vulnerabilities (CVSS ≥ 9.0)</strong></li><li><strong>Internet‑facing systems</strong>, especially proxies and middleware in DMZs</li><li>Products embedding <strong>shared third‑party libraries</strong> to reduce blast radius</li></ol><p>Attempting to patch everything simultaneously is unrealistic; risk‑based sequencing is essential.</p><h3>What Makes This CPU Different</h3><p>This update is not driven by active exploitation but by <strong>latent systemic risk</strong>:</p><ul><li>Dependency reuse amplifies impact</li><li>Trust boundaries at the DMZ are fragile</li><li>Infrastructure components remain high‑value targets</li></ul><p>The lesson is architectural: when the component designed to enforce isolation fails, <strong>every system behind it inherits that risk</strong>.</p><h3>Conclusion</h3><p>Oracle’s January 2026 CPU is a reminder that:</p><ul><li>Modern enterprise software risk is dominated by <strong>shared dependencies</strong></li><li><strong>DMZ components remain prime targets</strong></li><li>A single critical flaw in a proxy or parser can change the effective security scope of an entire environment</li></ul><p>Patching addresses the symptoms. Long‑term risk reduction requires visibility into dependency chains, strict network segmentation, and reduced trust in perimeter components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64232910b77b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding CVE-2025-68613: A Critical n8n Vulnerability Triggering RCE]]></title>
            <link>https://medium.com/@andispaudel/understanding-cve-2025-68613-a-critical-n8n-vulnerability-triggering-rce-6e59c2936f65?source=rss-248381d49df------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e59c2936f65</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[cve-2025-68613]]></category>
            <category><![CDATA[n8n-workflow-automation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Andis Paudel]]></dc:creator>
            <pubDate>Thu, 25 Dec 2025 15:46:41 GMT</pubDate>
            <atom:updated>2025-12-25T15:47:08.937Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>critical security vulnerability</strong> was publicly disclosed in the <strong>n8n workflow automation platform</strong> on December 19, 2025. This flaw enables <strong>remote code execution (RCE)</strong> via expression injection by authenticated users turning limited access into <strong>full system compromise</strong>.</p><ul><li><strong>Severity:</strong> Critical</li><li><strong>CVSS:</strong> 9.9 (near maximum severity)</li><li><strong>Impact:</strong> Full system compromise</li><li><strong>Root cause:</strong> Unsafe expression evaluation with sandbox escape due to insufficient isolation of user expressions from the underlying Node.js runtime.</li></ul><h3>What is n8n?</h3><p>n8n is an <strong>open-source workflow automation platform</strong> that lets users visually connect applications, APIs, and services to automate tasks. Workflows are defined using nodes, each representing actions like HTTP requests, database operations, or data transformations.</p><p>Common deployment configurations include:</p><ol><li><strong>Self-hosted instances</strong> (private servers or local infrastructure)</li><li><strong>Cloud-hosted instances</strong> (managed services like n8n.cloud)</li><li><strong>Internal automation tools</strong> within enterprise networks</li></ol><h3>n8n Architecture (High-Level)</h3><p>n8n is implemented in <strong>Node.js and TypeScript</strong>. Major internal components relevant to this CVE include:</p><ol><li><strong>Workflow execution engine: </strong>orchestrates and runs workflows</li><li><strong>Expression evaluation engine:</strong> interprets dynamic expressions inside workflows</li><li><strong>Code nodes: </strong>steps allowing custom JavaScript or Python logic executed inside the workflow context.</li></ol><h3>Where the Vulnerability Lives</h3><p>The flaw exists in n8n’s <strong>expression evaluation system, </strong>specifically how the platform processes user-supplied expressions within workflows (e.g., expressions wrapped in {{ }}). Under vulnerable versions, these expressions were evaluated in a context <strong>insufficiently isolated</strong> from Node.js internals, allowing access to global objects like process.</p><p>This is a <strong>sandbox escape</strong> flaw: user expressions can inadvertently interact with the host environment instead of being constrained to the intended safe execution context.</p><h3>Exploit Activity</h3><p>Exploitation <em>requires</em> authenticated access with the ability to create or edit workflows, a relatively low-privilege requirement in many environments. Once authenticated, an attacker can inject crafted expressions into any field that supports dynamic expressions, such as node parameters or transformation logic.<br><strong>Example Exploit:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjy-CyyAY5GxHjqAiW5HNg.png" /></figure><p><strong>Explanation:</strong></p><ul><li>this resolves to the Node.js global context in the vulnerable expression evaluator.</li><li>.process provides access to the Node.js process object.</li><li>.mainModule.require(&#39;child_process&#39;) loads the child_process module.</li><li>execSync(&#39;id&#39;) executes the id command on the host.</li></ul><p>This effectively spawns a shell command under the n8n process permissions.</p><h3>Payloads That Show Impact</h3><p>Once the expression evaluation is abused, attackers can run arbitrary OS commands. Examples include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7ysYE89vQidBhFB_sxXew.png" /></figure><p>and reverse shell payloads like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdU02GAIBx55YtRcyK8gtA.png" /></figure><p>These payloads inherit the <strong>n8n service account’s privileges</strong>. If n8n runs as root (common in Docker), this results in <strong>immediate root compromise.</strong></p><h3>Affected Versions</h3><p>CVE-2025–68613 affects n8n versions from <strong>0.211.0 up to 1.120.3</strong> (inclusive). The vulnerability is fixed in the following releases:</p><ul><li><strong>1.120.4</strong></li><li><strong>1.121.1</strong></li><li><strong>1.122.0</strong></li></ul><p>Any deployment running older versions should be considered at risk until patched.</p><h3>Detection</h3><p>n8n does not natively provide auditing of expression execution. For detection, teams can:</p><ul><li>Monitor workflows for unexpected expressions. (e.g., require(, execSync)</li><li>Deploy web application firewalls or proxies to log suspicious parameter patterns.</li><li>Use SIEM/Sigma rules to alert on expression fields containing suspicious constructs.</li></ul><p>Because exploit code is publicly available, the likelihood of active abuse increases over time.</p><h3>Mitigation</h3><p><strong>Primary:</strong></p><ul><li><strong>Upgrade immediately</strong> to one of the patched versions (1.120.4, 1.121.1, or later).</li></ul><p><strong>Intermediate workarounds :</strong></p><ul><li>Restrict workflow creation/editing to trusted users</li><li>Harden the host environment (least privilege service account, firewall rules)</li><li>Limit outbound network access from n8n hosts to reduce post-exploit communication</li></ul><p>These do not eliminate the underlying vulnerability but reduce exploitation windows.</p><h3>References</h3><ol><li>NVD: National Vulnerability Database.<br> <strong>CVE-2025–68613 Detail</strong><br> <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-68613?utm_source=chatgpt.com">https://nvd.nist.gov/vuln/detail/CVE-2025-68613</a></li><li>n8n Security Advisory / Changelog (official patch notes).<br> <strong>n8n Release Notes — Security Fixes for CVE-2025–68613</strong><br> <a href="https://docs.n8n.io/release-notes/">https://docs.n8n.io/release-notes/</a></li><li>SOC Radar.<br> <strong>CVE-2025–68613: Critical RCE in n8n Workflow Automation</strong><br> <a href="https://socradar.io/blog/cve-2025-68613-rce-n8n-workflow-automation/?utm_source=chatgpt.com">https://socradar.io/blog/cve-2025-68613-rce-n8n-workflow-automation/</a></li><li>TryHackMe.<br> <strong>n8n CVE-2025–68613 Lab / Walkthrough</strong><br> <a href="https://tryhackme.com/room/n8ncve202568613?utm_source=chatgpt.com">https://tryhackme.com/room/n8ncve202568613</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e59c2936f65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CIT: Karnali]]></title>
            <link>https://medium.com/@andispaudel/cit-karnali-fcc78cb716ec?source=rss-248381d49df------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcc78cb716ec</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[lake]]></category>
            <category><![CDATA[nepal]]></category>
            <category><![CDATA[rural-development]]></category>
            <dc:creator><![CDATA[Andis Paudel]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 14:46:31 GMT</pubDate>
            <atom:updated>2025-11-26T14:46:31.490Z</atom:updated>
            <content:encoded><![CDATA[<p>For this year’s <strong>Children in Technology</strong> program organized by <strong>LOCUS</strong> and <strong>Worldlink</strong>, we, a team of five, traveled to the distant lands of Karnali Province. We started off with an 18-hour-long bus ride to Surkhet, the capital of the province. We chose two government schools located somewhat far from Birendranagar, the headquarters of Surkhet.</p><p>Our group split into two, with one group traveling to Chinchhu to reach Shree Prabhat Secondary School and the other group heading to Dhuliyabit to reach Shree Shiva Secondary School. We were warmly received in both places, and we conducted our sessions successfully. The students were attentive, bright, and eager to interact with us. We also collected a video from the top students in each of the schools. Shree Prabhat was quite distant from the main areas, and most students there did not have easy access to the internet compared to the other school. Being a Nepali-medium school with no computer studies, the students were fascinated, to say the least.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipwWvIWyBlNWQn6efq2vhw.jpeg" /><figcaption>Ashim Sapkota at Shree Prabhat Secondary School, Chhinchhu</figcaption></figure><p>On the other hand, Shree Shiva Secondary School had English-medium classes, and most students were already exposed to technology. They were amazed to learn how complex and wonderful the mechanism behind bringing internet to their homes actually is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzVdOieKNRrheltedXErHQ.jpeg" /><figcaption>Birat Thapa, Andis Paudel and Yubraj Sharma at Shree Shiva Secondary School, Dhuliyabit</figcaption></figure><p>The next day, we traveled to the hills of Jajarkot. Jajarkot was hit by a devastating earthquake two years ago and was still recovering from the damage. The capital, Khalanga, stretches from one hilltop to another. We couldn’t imagine how challenging it must have been to build a bazaar in such difficult, rocky terrain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*H_8Yc2mpgxTlaY7dzmQLxw.jpeg" /><figcaption>Khalanga Bazar atop the hill, Jajarkot</figcaption></figure><p>First, we visited Shree Shiva Secondary School located at Kaligaun, a few kilometers away from Khalanga. There, we conducted classes in two rooms. All the schools from this point onwards were Nepali-medium, and this time we were prepared for what to expect. The students had a strong grasp of the Nepali language, perhaps because the language itself has its origins in the nearby areas, particularly the Sinja civilization, which lies in a neighboring district to Jajarkot. We focused on the positive sides of internet usage as well as the things one must remain cautious about. We instructed them to share the same awareness with their families and communities. Computers were rare, but we showed them what could be accomplished and how they could begin their journey into the world of technology from where they stood.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4hWS8-gjcKOSSFEvqXYjg.jpeg" /><figcaption>Shree Shiva Secondary School, Kalegaun, Jajarkot</figcaption></figure><p>Then, we traveled to Shree Tribhuvan Secondary School, located in the heart of the city. Students here had some exposure to technology compared to Shree Shiva Ma Vi, but still not to the level they needed. We found a few students who had heard of AI tools and coding, and we were happy to guide them into what lies ahead. AI safety, pitfalls, and internet safety were useful topics here as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRnHb9Bb7vRjQpcgvOdJYA.jpeg" /><figcaption>Presentation at Shree Tribhuvan Secondary School, Khalanga</figcaption></figure><p>After completing our programs in Jajarkot, we were ready to travel to one of the most rural districts of western Nepal, Dolpa. Dolpa is the largest district in terms of area and one of the least densely populated. The terrain, the rocks, the sandy soil, and the roaring Bheri River were a sight to behold.</p><p>More than 60 kilometers of mountainous roads took us eight hours of bumpy bus ride before we reached Dunai, the capital of Dolpa. The next day, we went to Shree Saraswati Secondary School, surrounded by barren, towering mountains on all sides. We were surprised and delighted to see a “Diploma in Civil Engineering” program sign at the school gate. Dunai was cold, with a piercing breeze blowing most of the time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jDq0l9RT18e9Yul0ImB4HA.jpeg" /><figcaption>The Dolpa landscape</figcaption></figure><p>Here, we taught slowly, writing terms on the whiteboard and showing our prepared materials on the smartboard. At least one smartboard was available in every school we visited. There were switches and routers as well, but the students were unaware of how they worked. We took them on a journey through networking, into the depths of how the internet functions, and back into what technology can offer and how they can step into it even from Dolpa.<br> When we asked the students about their plans after completing school, most of them said they planned to study the Korean language. Only a few mentioned wanting to pursue Lok Sewa examinations. We did not hear the usual buzzwords like &quot;engineering&quot; or &quot;medicine.&quot; Many students in rural Dolpa and Jajarkot had no idea how far they could go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZInwmSdvl4eAN59aHnsfNw.jpeg" /><figcaption>Shree Saraswati Secondary School, Dunai</figcaption></figure><p>We were especially struck by the disparity in education within our country. Coming from a small town and later studying in the Kathmandu Valley, the difference compared to Jajarkot and Dolpa is enormous. Students there want to go abroad not in search of better education, but out of desperation. In Dolpa, we spoke with the coordinator of the diploma program. The number of interested students had been declining every year, and this year there were only eight students enrolled, most of whom were not even regular. The school was planning to close the program after this batch completed their course. Teachers expressed dissatisfaction not only because of their own working conditions but also because their graduates struggled to find opportunities within the country.</p><p>The trend of going abroad is not limited to city areas; it is deeply rooted in the rural hills as well. Tourism seems to be the only sustainable option there. The majestic Shey Phoksundo Lake and the Upper Dolpa trek attract tourists, and most households in Dunai and the more remote parts of Dolpa are involved in hospitality, horse rearing, and trekking services. Smartboards and basic networking devices exist in most schools, but they are not used to their fullest, and the students still have little idea of what they could achieve with the internet and a device capable of accessing its vast resources.</p><p>This visit to Karnali gave us a deeper understanding of the education system there and where improvement is most urgently needed. In Jajarkot, there are no private schools offering education up to the 10th grade, so government schools are the only option. Awareness and education are the only ways to raise the intellectual standard of the people, which will not only strengthen our economy but also empower our democracy, ultimately placing the country and its politics on the right track.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJ9LsUX-qpQeiMLcPWcb1g.jpeg" /><figcaption>The Majestic Shey-Phoksundo Lake</figcaption></figure><p>We are immensely grateful towards LOCUS and Worldlink Telecommunications Company for this opportunity and would also like to extend our best wishes to Worldlink for its efforts in expanding internet connectivity even in the most rural parts of the country, including the Phoksundo Rural Municipality and the Dolpa regions.<br>Having free Worldlink WiFi on the shore of Shey Phoksundo Lake was wonderful, to say the least.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_iYiQPKdUJ0xxOiEaXKmg.jpeg" /><figcaption>Team Signing Off (LtoR: Yubraj Sharma, Ashim Sapkota, Batsal Bhusal, Andis Paudel, Birat Thapa)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcc78cb716ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>