<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CTFDojo</title>
    <description>The latest articles on DEV Community by CTFDojo (@ctfdojo).</description>
    <link>https://dev.to/ctfdojo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4112730%2F246c6406-1631-43bd-9fb4-c0231faf7de6.png</url>
      <title>DEV Community: CTFDojo</title>
      <link>https://dev.to/ctfdojo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ctfdojo"/>
    <language>en</language>
    <item>
      <title>OverTheWire Bandit Level 10 Writeup — Decode a Base64-Encoded Password</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Sat, 07 Nov 2026 22:37:55 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-10-writeup-decode-a-base64-encoded-password-28bc</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-10-writeup-decode-a-base64-encoded-password-28bc</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;code&gt;data.txt&lt;/code&gt; holds the password encoded in base64 — the &lt;code&gt;base64&lt;/code&gt; command's &lt;code&gt;-d&lt;/code&gt; flag decodes it directly back to plain text.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 10 → 11&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; base64 decoding&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;No searching or filtering this time — the file is small and its entire content is the password, just run through base64 encoding first.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored in the file data.txt, which contains base64 encoded data."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Look at the raw content
&lt;/h2&gt;

&lt;p&gt;Log in as bandit10 and view the file directly — it's short, and clearly made up only of base64's alphabet (letters, digits, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, and padding &lt;code&gt;=&lt;/code&gt; characters):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VGhlIHBhc3N3b3JkIGlzIC4uLg==
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — Decode it
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;base64&lt;/code&gt; utility's &lt;code&gt;-d&lt;/code&gt; (decode) flag reverses the encoding directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;base64&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[PASSWORD FOR bandit11]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;Base64 is encoding, not encryption — it has no secret key, so anything base64-encoded decodes with a single command the moment you recognize the alphabet. Spotting base64 by sight (that specific character set, often padded with one or two trailing &lt;code&gt;=&lt;/code&gt; signs) is a skill worth having automatic by this point.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Base64 uses only A-Z, a-z, 0-9, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, and &lt;code&gt;=&lt;/code&gt; padding — recognizable on sight once you've seen it a few times&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;base64 -d&lt;/code&gt; decodes; plain &lt;code&gt;base64&lt;/code&gt; (no flag) encodes&lt;/li&gt;
&lt;li&gt;No password or key is involved — base64 is a reversible encoding, never a cipher&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level10-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 9 Writeup — Extract Readable Text from a Mostly-Binary File</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Sun, 01 Nov 2026 22:41:40 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-9-writeup-extract-readable-text-from-a-mostly-binary-file-3db7</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-9-writeup-extract-readable-text-from-a-mostly-binary-file-3db7</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;code&gt;data.txt&lt;/code&gt; is mostly binary data, but the password is one of the few human-readable strings inside it, preceded by several &lt;code&gt;=&lt;/code&gt; characters — &lt;code&gt;strings&lt;/code&gt; pulls out the readable text, and &lt;code&gt;grep&lt;/code&gt; narrows to the marked line.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 9 → 10&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; strings + grep for a marker pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;This file looks like garbage when opened directly — mostly non-printable binary bytes. Somewhere inside it, a handful of human-readable strings survive, and the level says the password is one of them, marked by leading equals signs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several '=' characters."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — See why opening it directly doesn't work
&lt;/h2&gt;

&lt;p&gt;Try viewing the raw file and notice it's mostly unprintable binary noise — &lt;code&gt;cat&lt;/code&gt; or opening it in a plain editor produces garbled output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data.txt: data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — Extract just the readable text
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;strings&lt;/code&gt; scans a file and prints only the sequences of printable characters, skipping the binary noise around them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;strings data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(a short list of readable strings scattered among the output)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Narrow to the marked line
&lt;/h2&gt;

&lt;p&gt;The level told you the real string is preceded by several &lt;code&gt;=&lt;/code&gt; characters — grep for a line starting with one or more of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;strings data.txt | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'^='&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;========== [PASSWORD FOR bandit10]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;strings&lt;/code&gt; is the standard first move on any file that looks like binary garbage — it doesn't care what the file format actually is, it just reports every run of printable characters it finds. Combined with a targeted &lt;code&gt;grep&lt;/code&gt;, it turns "needle in a haystack of binary noise" into a one-line command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;strings&lt;/code&gt; extracts printable text from any file, regardless of its actual format&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;^=&lt;/code&gt; in a grep pattern anchors the match to the start of the line&lt;/li&gt;
&lt;li&gt;This combination — &lt;code&gt;strings&lt;/code&gt; piped into a targeted &lt;code&gt;grep&lt;/code&gt; — reappears constantly in reversing and forensics challenges, not just this one&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level9-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF Static ain't always noise Writeup: Find the Flag in a Binary with strings</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Thu, 29 Oct 2026 20:33:12 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-static-noise-writeup-identify-a-file-hidden-in-binary-data-444m</link>
      <guid>https://dev.to/ctfdojo/picoctf-static-noise-writeup-identify-a-file-hidden-in-binary-data-444m</guid>
      <description>&lt;p&gt;&lt;em&gt;You get a binary named &lt;code&gt;static&lt;/code&gt; and a BASH script, &lt;code&gt;ltdis.sh&lt;/code&gt;. The flag is stored as a plain string inside the binary, so &lt;code&gt;strings static | grep picoCTF&lt;/code&gt; prints it. The script runs &lt;code&gt;objdump&lt;/code&gt; and &lt;code&gt;strings&lt;/code&gt; for you and saves the results to text files.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2021)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; General Skills&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; stringsgrepobjdump&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;Binary files look like noise in a text editor, but any text a program contains is stored as readable bytes somewhere inside it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Can you look at the data in this binary: static? This BASH script might help!"&lt;/em&gt; — provided: &lt;code&gt;static&lt;/code&gt;, &lt;code&gt;ltdis.sh&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Search the binary for printable strings
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;strings&lt;/code&gt; prints every run of printable characters in a file (4 or more by default). Filter for the flag format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ strings static | grep picoCTF
picoCTF{***}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the solve — the flag sits in the binary's data section as an ordinary string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Or use the provided script
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ltdis.sh&lt;/code&gt; wraps the same idea: it disassembles the binary with &lt;code&gt;objdump&lt;/code&gt; and extracts its strings into text files next to it. Make it executable and point it at the binary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ chmod +x ltdis.sh
$ ./ltdis.sh static
$ ls
ltdis.sh  static  static.ltdis.strings.txt  static.ltdis.x86_64.txt
$ grep picoCTF static.ltdis.strings.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reading the script first (&lt;code&gt;cat ltdis.sh&lt;/code&gt;) is a good reflex: it shows exactly which commands it runs before you run it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;The challenge's title says it all: "static" binary data isn't always noise.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;strings file | grep pattern&lt;/code&gt; is the first thing to try on any binary&lt;/li&gt;
&lt;li&gt;Text a program prints or stores is usually kept as plain bytes inside the file&lt;/li&gt;
&lt;li&gt;Read helper scripts before running them — they show the underlying commands&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-static-noise-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 8 Writeup — Find the One Unique Line Among Duplicates</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Tue, 27 Oct 2026 21:23:36 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-8-writeup-find-the-one-unique-line-among-duplicates-3801</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-8-writeup-find-the-one-unique-line-among-duplicates-3801</guid>
      <description>&lt;p&gt;&lt;em&gt;The password is the one line in &lt;code&gt;data.txt&lt;/code&gt; that occurs exactly once among thousands of duplicated lines — &lt;code&gt;sort&lt;/code&gt; groups identical lines together, and &lt;code&gt;uniq -u&lt;/code&gt; prints only the ones with no duplicate.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 8 → 9&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; sort + uniq -u&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;Level 8 hands you a file where almost every line of text shows up more than once. Somewhere in there is exactly one line that appears only a single time — that line is the password.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored in the file data.txt and is the only line of text that occurs only once."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Understand why uniq alone won't work
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;uniq&lt;/code&gt; only collapses consecutive duplicate lines — it has no effect on a file where duplicates are scattered throughout rather than grouped together. The file needs to be sorted first so every copy of a given line ends up adjacent to its other copies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Sort the file
&lt;/h2&gt;

&lt;p&gt;Sorting brings every duplicate of a line next to each other, which is the precondition &lt;code&gt;uniq&lt;/code&gt; needs to do anything useful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sort &lt;/span&gt;data.txt | less
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(every line now appears grouped with its exact duplicates)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Filter to lines with no duplicate
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;uniq&lt;/code&gt;'s &lt;code&gt;-u&lt;/code&gt; flag prints only the lines that have exactly one occurrence — exactly the property the level described:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sort &lt;/span&gt;data.txt | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[PASSWORD FOR bandit9]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sort&lt;/code&gt; and &lt;code&gt;uniq&lt;/code&gt; are almost always used together, because &lt;code&gt;uniq&lt;/code&gt; only ever looks at immediately adjacent lines. "Find the duplicate" or "find the one that's NOT duplicated" in a scrambled file is a &lt;code&gt;sort | uniq&lt;/code&gt; problem essentially every time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;uniq&lt;/code&gt; collapses or isolates duplicates among ADJACENT lines only — unsorted input defeats it silently&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sort&lt;/code&gt; groups every copy of an identical line together, which is why it always comes first in this pipeline&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;uniq -u&lt;/code&gt; prints lines with no duplicate at all; plain &lt;code&gt;uniq -d&lt;/code&gt; does the opposite, printing only lines that DO repeat&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level8-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF Nice netcat Writeup: Turn ASCII Codes Back into Text</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Mon, 26 Oct 2026 20:27:07 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-nice-netcat-writeup-talk-to-a-remote-service-with-netcat-5din</link>
      <guid>https://dev.to/ctfdojo/picoctf-nice-netcat-writeup-talk-to-a-remote-service-with-netcat-5din</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;code&gt;nc mercury.picoctf.net &amp;lt;port&amp;gt;&lt;/code&gt; prints decimal numbers. Each is an ASCII code: &lt;code&gt;112&lt;/code&gt; is &lt;code&gt;p&lt;/code&gt;, &lt;code&gt;105&lt;/code&gt; is &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;99&lt;/code&gt; is &lt;code&gt;c&lt;/code&gt;... Pipe the output into Python and convert each number with &lt;code&gt;chr()&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2021)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; General Skills&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; ncpython3&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;The description warns that the program on the server "doesn't speak English" — and indeed, it answers in numbers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Provided: &lt;code&gt;nc mercury.picoctf.net &amp;lt;port&amp;gt;&lt;/code&gt; (port shown on the challenge page)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Connect and look at the output
&lt;/h2&gt;

&lt;p&gt;Use the address and port from the challenge page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nc mercury.picoctf.net PORT
112 105 99 111 67 84 70 123 ... 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only numbers between 32 and 126, plus a final 10 — exactly the range of printable ASCII characters (and a newline).&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Convert the numbers to characters
&lt;/h2&gt;

&lt;p&gt;Each number is a character code. Pipe netcat straight into Python and turn every number into its character:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ nc mercury.picoctf.net PORT &lt;span class="o"&gt;|&lt;/span&gt; python3 -c &lt;span class="s2"&gt;"import sys; print(''.join(chr(int(n)) for n in sys.stdin.read().split()))"&lt;/span&gt;
picoCTF&lt;span class="o"&gt;{&lt;/span&gt;***&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;split()&lt;/code&gt; handles both one-number-per-line and space-separated output. CyberChef's &lt;strong&gt;From Decimal&lt;/strong&gt; operation does the same if you'd rather paste the numbers in.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;Text is just numbers with an agreed meaning — ASCII is the oldest of those agreements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Values from 32 to 126 are printable ASCII; 10 is a newline&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chr()&lt;/code&gt; turns a code into a character, &lt;code&gt;ord()&lt;/code&gt; goes the other way&lt;/li&gt;
&lt;li&gt;Piping &lt;code&gt;nc&lt;/code&gt; into a script avoids copy-pasting from the terminal&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-nice-netcat-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 7 Writeup — Find a Word Next to Another Word with grep</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Fri, 23 Oct 2026 19:04:56 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-7-writeup-find-a-word-next-to-another-word-with-grep-32h9</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-7-writeup-find-a-word-next-to-another-word-with-grep-32h9</guid>
      <description>&lt;p&gt;&lt;em&gt;The file &lt;code&gt;data.txt&lt;/code&gt; is large, but the password sits on the one line containing the word "millionth" — &lt;code&gt;grep&lt;/code&gt; finds it directly, no need to read the file.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 7 → 8&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; grep for a known marker word&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;Level 7 gives a large text file and tells you the password sits next to a specific word on one of its lines — rather than scrolling through thousands of lines, search for that word directly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored in the file data.txt next to the word 'millionth'."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Check the file's size
&lt;/h2&gt;

&lt;p&gt;Log in as bandit7 and see what you're dealing with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;wc&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(several thousand lines)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — grep for the marker word
&lt;/h2&gt;

&lt;p&gt;Rather than opening a file this large in an editor, search for the exact word the level description gave you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep &lt;/span&gt;millionth data.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;millionth   [PASSWORD FOR bandit8]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Read off the value next to it
&lt;/h2&gt;

&lt;p&gt;grep prints the whole matching line — the password is the second field on that line, separated from the word "millionth" by whitespace.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;When a challenge tells you a distinctive word or string to look for, that's a direct instruction to &lt;code&gt;grep&lt;/code&gt; for it rather than search manually — the whole point of a large-file level like this is testing whether you reach for the right tool instead of scrolling.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;grep word file&lt;/code&gt; prints every line in &lt;code&gt;file&lt;/code&gt; containing &lt;code&gt;word&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A large file is a cue to search, not to open in an editor&lt;/li&gt;
&lt;li&gt;The matching line's other fields (here, the password) come along with the match for free&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level7-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF crackme-py Writeup: Call the Hidden decode_secret Function</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Thu, 22 Oct 2026 20:39:17 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-crackme-py-writeup-reverse-a-python-password-check-4ie0</link>
      <guid>https://dev.to/ctfdojo/picoctf-crackme-py-writeup-reverse-a-python-password-check-4ie0</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;code&gt;crackme.py&lt;/code&gt; stores an encoded string in &lt;code&gt;bezos_cc_secret&lt;/code&gt; and defines &lt;code&gt;decode_secret()&lt;/code&gt; to decode it — but the script only calls &lt;code&gt;choose_greatest()&lt;/code&gt;, a harmless number comparison. Replace that call with &lt;code&gt;decode_secret(bezos_cc_secret)&lt;/code&gt; and run the script.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2021)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Reverse Engineering&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; python3text editor&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;No password to crack despite the name: the decoding logic is already in the file, just never used.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Provided: &lt;code&gt;crackme.py&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Read the script
&lt;/h2&gt;

&lt;p&gt;Open the file. Three things matter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;bezos_cc_secret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"[encoded string]"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decode_secret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="c1"&gt;# rotates each character through the printable ASCII range&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;choose_greatest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="c1"&gt;# asks for two numbers and prints the larger one&lt;/span&gt;

&lt;span class="nf"&gt;choose_greatest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;decode_secret&lt;/code&gt; is defined but never called. The last line runs &lt;code&gt;choose_greatest()&lt;/code&gt;, which has nothing to do with the secret.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Understand the decoding
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;decode_secret&lt;/code&gt; builds a string of all printable ASCII characters (from &lt;code&gt;!&lt;/code&gt; to &lt;code&gt;~&lt;/code&gt;, 94 of them) and replaces each character of the secret with the one 47 positions further, wrapping around. That's &lt;strong&gt;ROT47&lt;/strong&gt; — ROT13's cousin for symbols and digits as well as letters, and likewise its own inverse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — Call it
&lt;/h2&gt;

&lt;p&gt;Replace the last line of the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;decode_secret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bezos_cc_secret&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 crackme.py
picoCTF{***}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pasting the encoded string into CyberChef's &lt;strong&gt;ROT47&lt;/strong&gt; operation gives the same result without editing the file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;Unused code is still code — and in a crackme, it's often the point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read every function in a script, not just the ones that run&lt;/li&gt;
&lt;li&gt;ROT47 rotates the 94 printable ASCII characters by 47 and is its own inverse&lt;/li&gt;
&lt;li&gt;Editing a Python script's entry point is a legitimate and fast way to reuse its logic&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-crackme-py-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF Sleuthkit Apprentice Writeup: Find the Flag in a Disk Image with mmls, fls and icat</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Mon, 19 Oct 2026 20:22:14 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-sleuthkit-apprentice-writeup-recover-a-file-from-a-disk-image-59im</link>
      <guid>https://dev.to/ctfdojo/picoctf-sleuthkit-apprentice-writeup-recover-a-file-from-a-disk-image-59im</guid>
      <description>&lt;p&gt;&lt;em&gt;Decompress &lt;code&gt;disk.flag.img.gz&lt;/code&gt;. &lt;code&gt;mmls&lt;/code&gt; shows the partition table; the flag is on the last Linux partition. Pass its start sector to &lt;code&gt;fls -o OFFSET -r&lt;/code&gt;, grep for &lt;code&gt;flag&lt;/code&gt; to find &lt;code&gt;flag.uni.txt&lt;/code&gt; under &lt;code&gt;/root/my_folder&lt;/code&gt;, then &lt;code&gt;icat -o OFFSET disk.flag.img INODE&lt;/code&gt; prints it.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2022)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Forensics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; mmlsflsicat&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;The Sleuth Kit reads file systems directly from an image, without mounting it — exactly what you want for forensics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Provided: &lt;code&gt;disk.flag.img.gz&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Decompress and list the partitions
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gunzip disk.flag.img.gz
$ mmls disk.flag.img
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

      Slot      Start        End          Length       Description
...
...   ...       0000360448   ...          ...          Linux (0x83)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image holds several partitions; the files you want are on the last Linux (0x83) partition. The &lt;code&gt;Start&lt;/code&gt; column is the offset (in sectors) every other tool needs — &lt;code&gt;360448&lt;/code&gt; in our image; use the value from yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Search the partition for flag files
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fls&lt;/code&gt; lists files and directories; &lt;code&gt;-r&lt;/code&gt; recurses, &lt;code&gt;-o&lt;/code&gt; gives the partition offset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ fls -o 360448 -r disk.flag.img &lt;span class="o"&gt;|&lt;/span&gt; grep flag
+ r/r 2082: flag.txt
+ r/r 2371: flag.uni.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both live in &lt;code&gt;/root/my_folder&lt;/code&gt;. The number before each name is its inode, which may differ in your image. Read both — &lt;code&gt;flag.uni.txt&lt;/code&gt; is the one that holds the flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — Print the file with icat
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;icat&lt;/code&gt; outputs a file's content from its inode number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ icat -o 360448 disk.flag.img 2371
picoCTF&lt;span class="o"&gt;{&lt;/span&gt;***&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;The three Sleuth Kit commands you'll reuse on every disk image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mmls&lt;/code&gt; → partition layout and start offsets&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fls -o OFFSET -r&lt;/code&gt; → every file, including deleted ones (marked &lt;code&gt;*&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;icat -o OFFSET IMAGE INODE&lt;/code&gt; → a file's content&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-sleuthkit-apprentice-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>forensics</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 6 Writeup — Search the Whole Filesystem by Owner and Size</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Fri, 16 Oct 2026 19:48:33 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-6-writeup-search-the-whole-filesystem-by-owner-and-size-ml0</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-6-writeup-search-the-whole-filesystem-by-owner-and-size-ml0</guid>
      <description>&lt;p&gt;&lt;em&gt;The password file lives somewhere on the whole filesystem, not in the home directory — &lt;code&gt;find /&lt;/code&gt; filtered by owning user, owning group, and exact size locates it, with stderr suppressed to hide permission-denied noise.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 6 → 7&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; filesystem-wide find with -user/-group/-size&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;Unlike every previous level, this one doesn't point at a specific directory at all — the password file could be anywhere on the server. The level description instead gives three properties to search the entire filesystem for.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored somewhere on the server and has all of the following properties: owned by user bandit7, owned by group bandit6, 33 bytes in size."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Search from the filesystem root
&lt;/h2&gt;

&lt;p&gt;Start the search at &lt;code&gt;/&lt;/code&gt; instead of the home directory, since the file could be anywhere:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find / &lt;span class="nt"&gt;-user&lt;/span&gt; bandit7 &lt;span class="nt"&gt;-group&lt;/span&gt; bandit6 &lt;span class="nt"&gt;-size&lt;/span&gt; 33c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find: '/etc/ssl/private': Permission denied
find: '/var/lib/...': Permission denied
...
/var/lib/dpkg/info/bandit7.password
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — Suppress the permission errors
&lt;/h2&gt;

&lt;p&gt;Most of the filesystem isn't readable by bandit6, so &lt;code&gt;find&lt;/code&gt; prints a permission-denied line for every directory it can't enter. Redirect stderr to discard them and leave only the real result (and any other stdout matches) visible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find / &lt;span class="nt"&gt;-user&lt;/span&gt; bandit7 &lt;span class="nt"&gt;-group&lt;/span&gt; bandit6 &lt;span class="nt"&gt;-size&lt;/span&gt; 33c 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/dpkg/info/bandit7.password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Read it
&lt;/h2&gt;

&lt;p&gt;The matched path is readable despite living outside bandit6's home directory — dpkg (the Debian package manager) stores small per-package metadata files like this one, and this particular file's ownership happens to satisfy the puzzle's conditions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /var/lib/dpkg/info/bandit7.password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[PASSWORD FOR bandit7]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;A search scoped to the entire filesystem is noisy by default — most of it you don't have permission to even look inside. &lt;code&gt;2&amp;gt;/dev/null&lt;/code&gt; is the standard way to keep a command's real output while throwing away the error spam, and it's worth reaching for any time you deliberately search somewhere you only have partial access.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find /&lt;/code&gt; searches starting from the filesystem root, not just the current directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-user&lt;/code&gt; and &lt;code&gt;-group&lt;/code&gt; filter by file ownership, independent of each other&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;2&amp;gt;/dev/null&lt;/code&gt; redirects stderr (file descriptor 2) to discard it, leaving stdout untouched&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level6-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF Vigenere Writeup: Decrypt with the Given Key CYLAB</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Thu, 15 Oct 2026 20:08:58 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-vigenere-writeup-recover-a-vigenere-key-with-crib-dragging-961</link>
      <guid>https://dev.to/ctfdojo/picoctf-vigenere-writeup-recover-a-vigenere-key-with-crib-dragging-961</guid>
      <description>&lt;p&gt;&lt;em&gt;You get &lt;code&gt;cipher.txt&lt;/code&gt; and the key &lt;code&gt;CYLAB&lt;/code&gt; in the challenge description. Vigenère decryption subtracts the key letter from each ciphertext letter (mod 26), moving to the next key letter only after a letter — digits, underscores and braces are left alone and don't consume the key.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2022)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Cryptography&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; CyberChefpython3&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;No key recovery needed here: the challenge provides the ciphertext file and tells you the key outright.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Provided: &lt;code&gt;cipher.txt&lt;/code&gt; (starting &lt;code&gt;rgnoDVD{&lt;/code&gt;) and the key &lt;code&gt;CYLAB&lt;/code&gt; in the description&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Check the key against the flag format
&lt;/h2&gt;

&lt;p&gt;The ciphertext starts &lt;code&gt;rgnoDVD{&lt;/code&gt;, which should decrypt to &lt;code&gt;picoCTF{&lt;/code&gt;. Check the first letters against the key &lt;code&gt;CYLAB&lt;/code&gt; (C=2, Y=24, L=11, A=0, B=1):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;r (17) − C (2)  = 15 → p
g (6)  − Y (24) = −18 mod 26 = 8 → i
n (13) − L (11) = 2  → c
o (14) − A (0)  = 14 → o
D (3)  − B (1)  = 2  → C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It lines up, so the key is right and it is applied letter by letter, repeating every five letters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Decrypt the whole flag
&lt;/h2&gt;

&lt;p&gt;The only subtlety: the key position advances on letters only. Everything else is copied as-is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cipher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"cipher.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"CYLAB"&lt;/span&gt;
&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isalpha&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"A"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isupper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;shift&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"A"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;ch&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ python3 vigenere.py
picoCTF&lt;span class="o"&gt;{&lt;/span&gt;***&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CyberChef's &lt;strong&gt;Vigenère Decode&lt;/strong&gt; with key &lt;code&gt;CYLAB&lt;/code&gt; behaves the same way and gives the same result.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;With the key known, Vigenère is just a Caesar shift that changes every letter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decryption is &lt;code&gt;(cipher − key) mod 26&lt;/code&gt; per letter&lt;/li&gt;
&lt;li&gt;Most Vigenère implementations only advance the key on letters — check yours does too&lt;/li&gt;
&lt;li&gt;Testing the key on the known &lt;code&gt;picoCTF{&lt;/code&gt; prefix confirms it before decrypting everything&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-vigenere-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>cryptography</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 5: find -size 1033c Solution</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Wed, 14 Oct 2026 20:14:43 +0000</pubDate>
      <link>https://dev.to/ctfdojo/overthewire-bandit-level-5-writeup-find-a-file-by-size-type-and-permissions-297o</link>
      <guid>https://dev.to/ctfdojo/overthewire-bandit-level-5-writeup-find-a-file-by-size-type-and-permissions-297o</guid>
      <description>&lt;p&gt;&lt;em&gt;The password file inside &lt;code&gt;inhere&lt;/code&gt; is the only one that is human-readable, exactly 1033 bytes, and not executable — &lt;code&gt;find&lt;/code&gt; filters for all three at once.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; OverTheWire Bandit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Linux Fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level:&lt;/strong&gt; 5 → 6&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technique:&lt;/strong&gt; find with combined size/type/permission filters&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;Level 5's home directory contains a directory called &lt;code&gt;inhere&lt;/code&gt;, which itself contains many subdirectories, each full of decoy files. Manually opening every one isn't realistic — the level gives three exact properties the real file satisfies.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Level Goal: The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties: human-readable, 1033 bytes in size, not executable"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — See the scale of the problem
&lt;/h2&gt;

&lt;p&gt;Log in as bandit5 and look at what's inside &lt;code&gt;inhere&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; inhere
find . -type f &lt;span class="o"&gt;|&lt;/span&gt; wc -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(a large number — dozens of nested directories, each holding several decoy files)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — Filter by size
&lt;/h2&gt;

&lt;p&gt;The level gave an exact byte count — use it directly rather than opening files one by one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find . -size 1033c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./maybehere07/.file2
(and possibly a few other candidates)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Add the type and permission filters
&lt;/h2&gt;

&lt;p&gt;Combine all three stated properties — regular file, that exact size, and not executable — into a single &lt;code&gt;find&lt;/code&gt; command to narrow to exactly one result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find . -type f -size 1033c ! -executable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./maybehere07/.file2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4 — Read it
&lt;/h2&gt;

&lt;p&gt;Cat the single remaining candidate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat ./maybehere07/.file2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[PASSWORD FOR bandit6]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔑 password intentionally hidden&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The password is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;When a task description gives you specific, checkable properties instead of a name or location, that's a hint to filter for them directly rather than browse manually. &lt;code&gt;find&lt;/code&gt;'s flags compose — stacking &lt;code&gt;-size&lt;/code&gt;, &lt;code&gt;-type&lt;/code&gt;, and a permission test narrows a huge haystack down to one file in a single command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find . -size 1033c&lt;/code&gt; matches files of an exact size, in bytes (the trailing &lt;code&gt;c&lt;/code&gt; means bytes)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;! -executable&lt;/code&gt; negates a test — here, "not executable"&lt;/li&gt;
&lt;li&gt;Stacking multiple &lt;code&gt;find&lt;/code&gt; conditions together narrows results fast, without opening a single file by hand&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/overthewire-bandit-level5-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>picoCTF Mind your Ps and Qs Writeup: Factor a Small RSA Modulus</title>
      <dc:creator>CTFDojo</dc:creator>
      <pubDate>Tue, 13 Oct 2026 20:58:34 +0000</pubDate>
      <link>https://dev.to/ctfdojo/picoctf-mind-your-ps-and-qs-writeup-factor-a-weak-rsa-modulus-38bo</link>
      <guid>https://dev.to/ctfdojo/picoctf-mind-your-ps-and-qs-writeup-factor-a-weak-rsa-modulus-38bo</guid>
      <description>&lt;p&gt;&lt;em&gt;The &lt;code&gt;values&lt;/code&gt; file gives &lt;code&gt;c&lt;/code&gt;, &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;e = 65537&lt;/code&gt;. The hint says only a bit over 100 bits were "spent" per prime, so &lt;code&gt;n&lt;/code&gt; is around 270 bits — small enough that its factors &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; are already known to factordb.com. With them, compute &lt;code&gt;φ = (p−1)(q−1)&lt;/code&gt;, &lt;code&gt;d = e⁻¹ mod φ&lt;/code&gt;, and &lt;code&gt;m = c^d mod n&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; picoGym (picoCTF 2021)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Cryptography&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficulty:&lt;/strong&gt; Beginner&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; factordbpython3&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Challenge description
&lt;/h2&gt;

&lt;p&gt;RSA is only as strong as the difficulty of factoring &lt;code&gt;n&lt;/code&gt;. Real keys use 2048-bit moduli; this one is tiny on purpose.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"In RSA, a small e value can be problematic, but what about N? Can you decrypt this?"&lt;/em&gt; — provided: &lt;code&gt;values&lt;/code&gt; (c, n, e)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 — Read the values
&lt;/h2&gt;

&lt;p&gt;The file contains three decimal numbers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Decrypt my super sick RSA:
c: [ciphertext, decimal]
n: [modulus, about 82 digits]
e: 65537
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An 82-digit &lt;code&gt;n&lt;/code&gt; is about 270 bits — far below the 2048 bits used in practice. The hint ("I used only a little bit over 100 to save money") confirms the primes are small.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Factor n
&lt;/h2&gt;

&lt;p&gt;Paste &lt;code&gt;n&lt;/code&gt; into &lt;a href="http://factordb.com/" rel="noopener noreferrer"&gt;factordb.com&lt;/a&gt;. Moduli used in CTFs are often already factored there, and it returns the two primes &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt;. If it isn't listed, an ECM factoring tool (Alpertron's online calculator, or &lt;code&gt;yafu&lt;/code&gt;/&lt;code&gt;cado-nfs&lt;/code&gt; locally) handles a number this size in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — Rebuild the private key and decrypt
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;p&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt;, the rest is the textbook RSA math:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="c1"&gt;# from values&lt;/span&gt;
&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;65537&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="c1"&gt;# from factordb&lt;/span&gt;
&lt;span class="n"&gt;q&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;q&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;

&lt;span class="n"&gt;phi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;phi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# modular inverse (Python 3.8+)&lt;/span&gt;
&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bit_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"big"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 solve.py
picoCTF{***}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🚩 picoCTF{ flag intentionally hidden }&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The flag is deliberately hidden — follow the method, you've earned it. 💪&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;The whole security of RSA rests on one assumption — that nobody can factor n:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A small modulus can be factored, and then the private key follows immediately&lt;/li&gt;
&lt;li&gt;factordb.com is the first stop for any CTF modulus&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pow(e, -1, phi)&lt;/code&gt; computes &lt;code&gt;d&lt;/code&gt;; &lt;code&gt;pow(c, d, n)&lt;/code&gt; decrypts&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ctfdojo.com/writeups/picoctf-mind-your-ps-and-qs-writeup.html" rel="noopener noreferrer"&gt;CTFdojo&lt;/a&gt; — join the &lt;a href="https://discord.gg/cvypGBQCBg" rel="noopener noreferrer"&gt;CTFdojo Discord&lt;/a&gt; to discuss writeups and get notified about new ones.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>cryptography</category>
    </item>
  </channel>
</rss>
