<?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 sycili on Medium]]></title>
        <description><![CDATA[Stories by sycili on Medium]]></description>
        <link>https://medium.com/@sycili?source=rss-e2c8fb971c35------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by sycili on Medium</title>
            <link>https://medium.com/@sycili?source=rss-e2c8fb971c35------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:03:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sycili/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[Peeking Inside DMRC’s MIFARE DESFire EV3 One card]]></title>
            <link>https://medium.com/@sycili/peeking-inside-dmrcs-mifare-desfire-ev3-one-card-8a52a1414f22?source=rss-e2c8fb971c35------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a52a1414f22</guid>
            <category><![CDATA[public-transit]]></category>
            <category><![CDATA[mifare-desfire-ev1]]></category>
            <category><![CDATA[dmrc]]></category>
            <dc:creator><![CDATA[sycili]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 14:05:57 GMT</pubDate>
            <atom:updated>2026-09-27T14:16:10.282Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s 2:30 AM. I’m bored out of my mind, scrolling through nothing in particular, and my metro card is just sitting there on the desk. You know the one scratched up, tapped against a thousand gates, been through god knows how many stations. I’ve used this thing to get from point A to point B more times than I can count, and I have never once thought about what actually happens in the half-second between “tap” and the gate deciding to let me through.</p><p>So I did what any sleep-deprived person with an Android phone and too much curiosity does at 2:30 AM: I opened an NFC reader app and put my metro card on the back of my phone.</p><p>First of all, I knew nothing going in. Not about NFC, not about smartcards, not about any of this. I didn’t know what MIFARE meant, I didn’t know what “DESFire” was, So here I am just raw dogging it.</p><h3>So what’s actually inside the card?</h3><p>Riddle me this, You tap a piece of plastic on a reader and a gate opens. There’s clearly some form of logic in there, some way of checking your balance, deducting a fare, maybe logging the trip. Lord behold we’ll find that out on our next episode.</p><h3>Some background: what even is a MIFARE DESFire EV3?</h3><p>Before touching my metro card with actual commands, I had to understand what family of chip I was even dealing with.</p><p>The short version: MIFARE is NXP’s umbrella brand for contactless smartcard chips, and it covers a whole spectrum of complexity:</p><ol><li><strong>MIFARE Classic</strong> (1K/4K) are the older, simpler chips. Basically sector-based memory with a fairly weak proprietary encryption scheme (Crypto-1) that’s been broken for over a decade. A lot of legacy transit systems started here.</li><li><strong>MIFARE Ultralight</strong> even simpler, cheap, disposable-ticket style cards.</li><li><strong>MIFARE DESFire</strong> (original, then EV1, EV2, and now EV3) is a completely different animal. Instead of being a dumb memory chip, DESFire cards run an actual <strong>smartcard operating system</strong>. They support real cryptography (DES, 3DES, AES), have a proper file system, and support multiple isolated “applications” on a single physical card. Yeah same reaction.</li></ol><p>DESFire EV3 is the current generation ISO/IEC 14443-4 compliant, hardware cryptography, and built specifically for use cases like transit, access control, and multi-service cards where you want a physical card to securely host multiple independent-of-each-other applications without them being able to see each other’s data.</p><h3>Talking to the card</h3><p>My phone’s NFC reader app (a general-purpose “send raw commands” tool) let me pick which low-level radio protocol to talk over. DESFire cards don’t show up under the old MIFARE Classic API nor did the app have the option to do that anyways, they need to be addressed as IsoDep, which is Android&#39;s interface for ISO 14443-4 cards. That was lesson one: the card wasn&#39;t even reachable through the tooling I assumed I&#39;d use.</p><p>So for the meat and potatoes:</p><p>Property Value Card MIFARE DESFire EV3 4K Tag type ISO 14443–4 UID 04:85:BB:8A:F1:1B:90 Memory 4 KB</p><p>Time to start sending raw commands and see what came back.</p><h3>Way more AID’s than I thought were needed</h3><p>The first genuinely surprising discovery came from a command called GetApplicationIDs (raw byte 6A). I expected either an error or maybe one ID. Instead, the card handed back <strong>seven</strong>:</p><pre>444D01<br>444D02<br>444D03<br>444D04<br>444D05<br>444D06<br>444D07</pre><p>That “444D” prefix, if you convert it to ASCII, spells <strong>“DM”</strong> which, on a Delhi Metro card, might just mean Delhi Metro. So this one physical card is hosting seven separate logical applications, each presumably serving a different purpose (main fare wallet, maybe a secondary purse, maybe logging, maybe interoperability(?), I don’t actually know yet, but the structure was there).</p><h3>Picking apart Application 444D01</h3><p>I could successfully <strong>select</strong> every one of the seven applications (5A + the AID). So all seven exist and are addressable.</p><p>Digging into the first one, 444D01, with GetKeySettings (45) gave a consistent response of 00:0F:01 across every app I tried it on confirming each app actually has its own key-settings configuration, even if I couldn&#39;t fully decode every bit of that response without more spec in front of me.</p><p>Then I tried GetFileIDs (6F) to see what files lived inside the application. I got back:</p><pre>9D</pre><p>which, at first, looked like “no files here.” That confused me, because a separate high-level reader app (TagInfo) was clearly showing files when it scanned the same card. Bruh.</p><h3>You’re not allowed to see it</h3><p>My raw command was unauthenticated I hadn&#39;t proven I held any of the application&#39;s keys so the card simply refused to hand over the file directory. It has nothing to do with whether files exist.</p><p>TagInfo’s scan (which layers a lot more parsing and interpretation over the raw protocol) filled in exactly what my bare 6F didn’t get me. Application 444D01 turned out to have:</p><ul><li><strong>10 (3)DES keys</strong></li><li><strong>8 files</strong> (IDs 00, 01, 02, 03, 05, 06, 08, 09)</li></ul><p>And the file breakdown was as follows:</p><p>File Type Size Access 00 Backup data 32 bytes Key #1 for everything 01 Value file (balance-like) Read key #1, write/change key #2 02 Value file Read key #1, write/change key #3 03 Cyclic record file (10 records) 32 bytes/record Read key #1, write/change key #4 05, 06 Backup data 32 bytes Keys #5, #6 respectively 08, 09 Standard data 32 bytes Keys #8, #9 respectively</p><p>That value file at 01reads like &quot;this is probably the balance.&quot; The cyclic record file at 03 a file type specifically designed to store a rolling history of the <em>last N</em> entries screams &quot;trip log.&quot; I can&#39;t confirm either without actually authenticating and reading the contents, but the <em>shape</em> of the file system tells a pretty clear story on its own.</p><h3>Plain is not Public</h3><p>One thing that tripped me up: TagInfo labels the communication mode for these files as <strong>“plain.”</strong> My first instinct was “wait, so it’s just readable by anyone? Guess all the Mr. Robot I watched didn’t go to waste after all?” Nope. “Plain” describes how the <em>data on the wire</em> is protected (unencrypted vs. MAC’d vs. fully encrypted) it says nothing about whether you’re authorized to trigger a read or write in the first place. Every single file above still requires the matching key before the card will let you touch it. Plain ≠ public. Access control and communication mode are two completely separate settings as I got to know bleaching my eyes out.</p><h3>The other six applications aren’t identical twins</h3><p>Looking across all seven applications, the structure wasn’t uniform at all:</p><pre>444D01 10 keys, 8 files <br>444D02  5 keys, 5 files<br>444D03  5 keys, 0 files<br>444D04  5 keys, 0 files<br>444D05  5 keys, 0 files<br>444D06  5 keys, 0 files<br>444D07  5 keys, 0 files</pre><p>444D01 is doing the heavy lifting. 444D02 has a smaller, similar-looking file set. The remaining five have keys provisioned but zero files which reads like reserved-but-unused application slots, maybe there for future services or just headroom NXP/DMRC built in from the start.</p><h3>The tooling problem</h3><p>Somewhere around here I ran into a dumb but still dumb issue: the app I was using reconnected to the card between every single command. That’s fine for one-shot commands, but DESFire has multi-frame exchanges commands where the response starts with AF (&quot;more data coming, send another frame to continue&quot;) and those need a <strong>persistent</strong> connection to work. The tool was silently tearing down the session after every byte string I sent, which made anything stateful (multi-frame responses, and eventually authentication) impossible to test properly.</p><p>P.S. I have 4 assignments due and I&#39;m tired. I give up and no I do not know anything this is what I figured out in about give or take 2ish hours.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a52a1414f22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First ??]]></title>
            <link>https://medium.com/@sycili/first-cd0ba66fc126?source=rss-e2c8fb971c35------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd0ba66fc126</guid>
            <dc:creator><![CDATA[sycili]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 04:50:54 GMT</pubDate>
            <atom:updated>2025-07-01T04:50:54.552Z</atom:updated>
            <content:encoded><![CDATA[<h3>First ??</h3><p>Just testing things out</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd0ba66fc126" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>