<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Security on Learning Journey of Alexander Allgäuer</title><link>https://bitlex.li/tags/security/</link><description>Recent content in Security on Learning Journey of Alexander Allgäuer</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 15 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://bitlex.li/tags/security/index.xml" rel="self" type="application/rss+xml"/><item><title>YubiKey: SSH with FIDO2</title><link>https://bitlex.li/tutorials/yubikey-ssh-fido2/</link><pubDate>Wed, 15 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/yubikey-ssh-fido2/</guid><description>&lt;p&gt;The YubiKey supports four methods to enable hardware-backed SSH authentication.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FIDO2&lt;/li&gt;
&lt;li&gt;PIV&lt;/li&gt;
&lt;li&gt;PGP&lt;/li&gt;
&lt;li&gt;OTP&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;FIDO2 provides the highest security and comes with low complexity. The private key is non-exportable.&lt;/p&gt;
&lt;h2 id="limitations"&gt;Limitations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;OpenSSH v 8.2.p1 is a requirement better 8.3 for the verify-required option, shouldn&amp;rsquo;t be an issue since both versions were released in 2020.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Windows SSH at the time of writing not supported. &lt;br&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Mac OS bundled openssh version doesn&amp;rsquo;t support it but this can be fixed.&lt;/p&gt;</description></item><item><title>Full Disk Encryption (FDE).md</title><link>https://bitlex.li/posts/full-disk-encryption-fde/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/posts/full-disk-encryption-fde/</guid><description>&lt;h3 id="insightful-articles-about-tpm"&gt;Insightful articles about TPM&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/osy/45e612345376a65c56d0678834535166?permalink_comment_id=4685731"&gt;https://gist.github.com/osy/45e612345376a65c56d0678834535166?permalink_comment_id=4685731&lt;/a&gt;\&lt;/p&gt;
&lt;p&gt;From the founder of Systemd
&lt;a href="https://0pointer.net/blog/authenticated-boot-and-disk-encryption-on-linux.html"&gt;https://0pointer.net/blog/authenticated-boot-and-disk-encryption-on-linux.html&lt;/a&gt;\&lt;/p&gt;
&lt;p&gt;Microsoft recommendations
&lt;a href="https://learn.microsoft.com/en-us/windows/security/operating-system-security/data-protection/bitlocker/countermeasures"&gt;https://learn.microsoft.com/en-us/windows/security/operating-system-security/data-protection/bitlocker/countermeasures&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Secureboot Arch Linux</title><link>https://bitlex.li/tutorials/secureboot-arch-linux/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/secureboot-arch-linux/</guid><description>&lt;p&gt;Configuration Guide for Secure Boot ArchLinux.&lt;/p&gt;
&lt;h2 id="update-bios"&gt;Update Bios&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fwupdmgr refresh
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fwupdmgr refresh
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fwupdmgr get-updates
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fwupdmgr update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sbctl status
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;***
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;*Setup Mode: X Disabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;*Secure Boot: X Disabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;***
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In BIOS delete your PlatformKeys to get into setupMode.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sbctl status
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;***
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;*Setup Mode: ✓ Enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;*Secure Boot: X Disabled
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;***
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;@slexi  sudo sbctl create-keys
Created Owner UUID 636e0dc7-096e-4e10-8f7f-831dfa8b5b97
✓
Secure boot keys created!&lt;/p&gt;
&lt;p&gt;@slexi  sudo sbctl enroll-keys
‼ File is immutable: /sys/firmware/efi/efivars/KEK-8be4df61-93ca-11d2-aa0d-00e098032b8c
‼ File is immutable: /sys/firmware/efi/efivars/db-d719b2cb-3d3a-4596-a3bc-dad00e67656f
You need to chattr -i files in efivarfs&lt;/p&gt;</description></item><item><title>YubiKey: Autolockscreen via udev (Hyprland)</title><link>https://bitlex.li/tutorials/yubikey-autolockscreen/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/yubikey-autolockscreen/</guid><description>&lt;p&gt;Automatically lock your Hyprland session the moment you pull your YubiKey out of the USB port.
A udev rule triggers a screen lock script.&lt;/p&gt;
&lt;h2 id="read-hyprlock-doc-first"&gt;Read hyprlock doc first!&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ :&lt;/strong&gt; If you are using hyprland the default application to lock the screen is Hyprlock.
Hyprlock does not automatically create a config, and without one, hyprlock will not render anything.
But even without a config, your session will get locked and thus Hyprland will cover your session with a black screen.&lt;br&gt;
&lt;a href="https://wiki.hypr.land/Hypr-Ecosystem/hyprlock/"&gt;https://wiki.hypr.land/Hypr-Ecosystem/hyprlock/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>YubiKey: Passwordless Sudo</title><link>https://bitlex.li/tutorials/yubikey-passwordless-sudo/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/yubikey-passwordless-sudo/</guid><description>&lt;p&gt;Use a YubiKey touch to replace your password for sudo .&lt;/p&gt;
&lt;h2 id="install-pam-u2f"&gt;Install pam-u2f&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo pacman -S pam-u2f
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir -p ~/.config/Yubico
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="register-the-keys"&gt;Register the keys&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pamu2fcfg &amp;gt; ~/.config/Yubico/u2f_keys &lt;span style="color:#75715e"&gt;# primary key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pamu2fcfg -n &amp;gt;&amp;gt; ~/.config/Yubico/u2f_keys &lt;span style="color:#75715e"&gt;# append backup key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="edit-pam"&gt;Edit PAM&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ Warning:&lt;/strong&gt; Keep a root session open in another terminal in case something goes wrong.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo nano /etc/pam.d/sudo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add at the top:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;auth sufficient pam_u2f.so cue
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sufficient&lt;/code&gt; → the YubiKey alone is enough to authenticate.&lt;/li&gt;
&lt;li&gt;Change to &lt;code&gt;required&lt;/code&gt; if you want 2FA (YubiKey &lt;strong&gt;and&lt;/strong&gt; password).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cue&lt;/code&gt; prints a hint when a touch is needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="test-it"&gt;Test it&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo -s
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Please touch the FIDO authenticator.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>KeePassXC</title><link>https://bitlex.li/posts/keepassxc/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/posts/keepassxc/</guid><description>&lt;p&gt;KeePassXC is essentially KeePass with a modern UI, rebuilt from scratch to run natively on Windows, macOS, and Linux. Instead of relying on plugins like KeePass does, it ships with the most important features already built in, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;YubiKey support (see &lt;a href="https://bitlex.li/tutorials/yubikey-hmac-sha1-challenge-response/"&gt;Yubikey HMAC-SHA1 Challenge-Response&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Browser integration (Chrome, Firefox, Edge, and more)&lt;/li&gt;
&lt;li&gt;TOTP/2FA code generation&lt;/li&gt;
&lt;li&gt;SSH agent support&lt;/li&gt;
&lt;li&gt;Have I Been Pwned breach checking&lt;/li&gt;
&lt;li&gt;Passkey support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="links"&gt;Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/keepassxreboot/keepassxc"&gt;https://github.com/keepassxreboot/keepassxc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>YubiKey: HMAC-SHA1 Challenge-Response</title><link>https://bitlex.li/tutorials/yubikey-hmac-sha1-challenge-response/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/yubikey-hmac-sha1-challenge-response/</guid><description>&lt;p&gt;Configure HMAC-SHA1 Challenge-Response on a YubiKey&amp;rsquo;s second OTP slot.&lt;/p&gt;
&lt;h2 id="check-slot-status"&gt;Check slot status&lt;/h2&gt;
&lt;p&gt;Use &lt;code&gt;ykman otp info&lt;/code&gt; to make sure your second slot isn&amp;rsquo;t already used. Slot 1 is typically reserved for Yubico OTP.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ykman otp info
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Slot 1: programmed&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Slot 2: empty&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="configure-otp-slot-2"&gt;Configure OTP slot 2&lt;/h2&gt;
&lt;p&gt;Generate a shared secret and program &lt;strong&gt;both&lt;/strong&gt; YubiKeys (primary + backup) with the &lt;em&gt;same&lt;/em&gt; secret so either can open the database.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SECRET&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;openssl rand -hex 20&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ykman otp chalresp --touch &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; $SECRET &lt;span style="color:#75715e"&gt;# Key 1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ykman otp chalresp --touch &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; $SECRET &lt;span style="color:#75715e"&gt;# Key 2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;unset SECRET
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;--touch&lt;/code&gt; flag is optional, but when you think about it, it absolutely makes sense — you want physical presence confirmation before the key responds.&lt;/p&gt;</description></item><item><title>YubiKey: Introduction</title><link>https://bitlex.li/posts/yubikey/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/posts/yubikey/</guid><description>&lt;p&gt;&lt;strong&gt;YubiKey&lt;/strong&gt; is a hardware security key manufactured by &lt;strong&gt;Yubico&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;YubiKeys support a wide range of authentication standards, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FIDO2 / WebAuthn&lt;/li&gt;
&lt;li&gt;FIDO U2F&lt;/li&gt;
&lt;li&gt;Smart card (PIV)&lt;/li&gt;
&lt;li&gt;OpenPGP&lt;/li&gt;
&lt;li&gt;OATH-TOTP / HOTP&lt;/li&gt;
&lt;li&gt;Yubico OTP&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="rule-1-always-buy-two"&gt;Rule #1: Always buy two&lt;/h2&gt;
&lt;p&gt;When ordering a YubiKey, always put &lt;strong&gt;two&lt;/strong&gt; of them in the shopping cart. Saving a few bucks on a backup key can leave you with a single point of catastrophic failure. They come with a hole that lets you attach one to your keychain while the other stays in another safe, trusted location.&lt;/p&gt;</description></item><item><title>YubiKey: Management Tool</title><link>https://bitlex.li/tutorials/yubikey-management/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://bitlex.li/tutorials/yubikey-management/</guid><description>&lt;h2 id="yubikey-management-tools-installation"&gt;Yubikey Management Tools Installation&lt;/h2&gt;
&lt;p&gt;We need yubikey-manager
Smart Card Daemon middlware.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo pacman -S yubikey-manager pcsclite ccid
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable --now pcscd.service
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable --now pcscd.socket
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Verify if the key is detected:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ykman info
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex="0"&gt;&lt;code&gt; @slexi  ykman info 
Device type: YubiKey 5C NFC
Serial number: 25997589
Firmware version: 5.4.3
Form factor: Keychain (USB-C)
Enabled USB interfaces: OTP, FIDO, CCID
NFC transport is enabled

Applications USB NFC 
Yubico OTP Enabled Enabled
FIDO U2F Enabled Enabled
FIDO2 Enabled Enabled
OATH Enabled Enabled
PIV Enabled Enabled
OpenPGP Enabled Enabled
YubiHSM Auth Enabled Enabled
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>