<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Music on 知识带给我们自由</title>
    <link>https://yuexuan521.github.io/zh/tags/music/</link>
    <description>Recent content in Music on 知识带给我们自由</description>
    <image>
      <title>知识带给我们自由</title>
      <url>https://yuexuan521.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://yuexuan521.github.io/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.160.1</generator>
    <language>en-us</language>
    <copyright>See this site&amp;rsquo;s source code here, licensed under GPLv3 ·</copyright>
    <lastBuildDate>Sat, 28 Jun 2025 20:16:15 +0000</lastBuildDate>
    <atom:link href="https://yuexuan521.github.io/zh/tags/music/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>BUUCTF [ACTF新生赛2020]music 1</title>
      <link>https://yuexuan521.github.io/zh/posts/buuctf-actf%E6%96%B0%E7%94%9F%E8%B5%9B2020music-1/</link>
      <pubDate>Sat, 28 Jun 2025 20:16:15 +0000</pubDate>
      <guid>https://yuexuan521.github.io/zh/posts/buuctf-actf%E6%96%B0%E7%94%9F%E8%B5%9B2020music-1/</guid>
      <description>&lt;p&gt;
&lt;div class=&#34;post-img-view&#34;&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190443925.png&#34;&gt;
        &lt;img src=&#34;https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190443925.png&#34; 
             alt=&#34;&#34; 
              
             loading=&#34;lazy&#34;
        /&gt;
    &lt;/a&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BUUCTF: &lt;a href=&#34;https://buuoj.cn/challenges&#34;target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://buuoj.cn/challenges&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;相关阅读
&lt;a href=&#34;https://ctf-wiki.org/&#34;target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;CTF Wiki&lt;/a&gt;
&lt;a href=&#34;https://blog.csdn.net/liuxunfei15/article/details/120441383&#34;target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;m4a文件格式分析&lt;/a&gt;
&lt;a href=&#34;https://www.ruanyifeng.com/blog/2021/01/_xor.html&#34;target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;异或运算 XOR 教程&lt;/a&gt;
&lt;a href=&#34;https://blog.csdn.net/mochu7777777/article/details/109806994&#34;target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;BUUCTF：[ACTF新生赛2020]music&lt;/a&gt;&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190443925.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190443925.png" 
             alt="" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p><strong>BUUCTF: <a href="https://buuoj.cn/challenges"target="_blank" rel="noopener noreferrer">https://buuoj.cn/challenges</a></strong></p>
<hr>
<p>相关阅读
<a href="https://ctf-wiki.org/"target="_blank" rel="noopener noreferrer">CTF Wiki</a>
<a href="https://blog.csdn.net/liuxunfei15/article/details/120441383"target="_blank" rel="noopener noreferrer">m4a文件格式分析</a>
<a href="https://www.ruanyifeng.com/blog/2021/01/_xor.html"target="_blank" rel="noopener noreferrer">异或运算 XOR 教程</a>
<a href="https://blog.csdn.net/mochu7777777/article/details/109806994"target="_blank" rel="noopener noreferrer">BUUCTF：[ACTF新生赛2020]music</a></p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190445904.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190445904.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<h3 id="题目描述">题目描述：</h3>
<p>得到的 flag 请包上 flag{} 提交。</p>
<h3 id="密文">密文：</h3>
<p>下载附件，解压得到tmp文件夹，内有vip.zip，解压得到vip.m4a文件。</p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190447569.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190447569.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<hr>
<h3 id="解题思路">解题思路：</h3>
<p>1、打开vip.m4a文件，发现该文件已损坏。</p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190448858.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190448858.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>在010Editor中，也可以观察到文件数据的混乱。</p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190450366.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190450366.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>2、通过观察，参考 <a href="https://blog.csdn.net/liuxunfei15/article/details/120441383"target="_blank" rel="noopener noreferrer">m4a文件格式分析</a> 、 <a href="https://www.ruanyifeng.com/blog/2021/01/_xor.html"target="_blank" rel="noopener noreferrer">异或运算 XOR 教程</a> 两篇文章，我终于明白，vip.m4a文件数据经过对“ <code>A1</code> ”的异或运算，才呈现上面的样子。</p>
<p>首先，通过对比m4a文件的ftyp（文件标识）和stsc（记录每个trunk的采样数），发现原来是“ <code>00</code> ”的数据变成了“ <code>A1</code> ”，ftyp：“ <code>66 74 79 70</code> ”变为“ <code>C7 D5 D8 D1</code> ”，stsc：“ <code>73 74 73 63</code> ”变为“ <code>D2 D5 D5 D2</code> ”。</p>
<p>（感谢CSDN半岛铁盒博主的分享，另外周的《半岛铁盒》也很好听）</p>
<p><strong>ftyp：</strong>

<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190452337.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190452337.png" 
             alt="" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190453759.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190453759.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p><strong>stsc：</strong>

<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190455552.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190455552.png" 
             alt="" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190457661.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190457661.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>同时，我了解到异或运算的一条运算规律： <strong>一个值与 0 的运算，总是等于其本身。</strong></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">x ^ <span class="nv">0</span> <span class="o">=</span> x
</span></span></code></pre></td></tr></table>
</div>
</div><p>所以，当“ <code>A1</code> ”与 <code>0</code> 进行异或运算时，结果为“ <code>A1</code> ”。这就是为什么原来是“ <code>00</code> ”的数据变成了“ <code>A1</code> ”。</p>
<p>从而得出， <strong>vip.m4a文件原数据经过了对“ <code>A1</code> ”的异或运算</strong> 。</p>
<p>3、在010 Editor中，对整个文件进行对“ <code>A1</code> ”的异或运算，保存得到完好的vip.m4a文件。</p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190459369.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190459369.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>
<div class="post-img-view">
    <a data-fancybox="gallery" href="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190501187.png">
        <img src="https://cdn.jsdelivr.net/gh/yuexuan521/image/20251228190501187.png" 
             alt="在这里插入图片描述" 
              
             loading="lazy"
        />
    </a>
</div></p>
<p>播放vip.m4a文件，将听到的字母记下来，得到： <code>actfabcdfghijk</code> ，flag为： <code>abcdfghijk</code></p>
<h3 id="flag">flag：</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">flag<span class="o">{</span>abcdfghijk<span class="o">}</span>
</span></span></code></pre></td></tr></table>
</div>
</div>]]></content:encoded>
    </item>
  </channel>
</rss>
