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nNaSFJoUmxwTwpVbTVDYUZkc1dsWmxSbHBYVW01T1YySlhlRmhXTUZaTFUx WmFkR05GWkZaa00wSlRWRlphYzA1V1ZuUk9WWFJvVmxSQ05WWlhlRzlYClozQlhUVEZLYndwV2JY QkhaREZaZUZwSVNsQldNMEp3Vm14YWQxTldXbkZUV0docVRWWldOVlV5TlV0V1IwcElZVVZXV21F eGNETlUKVlZweVpERmFWVlpzWkdGTk1FcFFWbGQwVjFOck1VZGFSbFpTQ21KVlduQlVWM1IzVTBa VmVVNVdUbGRpVlhCSlEyMVdSMXBHY0ZkTgpNVXB2VVRJeFIxSXhXbGxhUm1ocFYwWktlRmRYZEd0 Vk1sWnpXa2hLWVZKNmJGaFVWM1JYVG14V1dFMVZaRmNLVFZad01GWkhjRk5XCmJVWnlWMjFHWVZa c2NFeFdNV1JMVWpGa2MyRkdUazVXV0VKSVZtcEdZV0l5VVhoWFdHZExWa2QwYTFZeFpFaGxTRXBX WVdzMVZGbHEKUm5OamJGcDFXa1pTVXdwaVdHZzFWbTB4ZDFVeFdYZE5WbHBxVTBjNVRGVlVTalJo TWsxNFZtNUtWbUpYZUZoV2ExWldaREZhYzFWcgpkRTVTTUZZMVZXMDFUMVpIUlhsVmJrWldZa1pL ZGxaRldtRmpkM0JoQ2xKRlNtOVVWVkpYVTBaVmVXVkhkRnBXYXpWSVZqSTFRMVpXCldrWmpSbEpY Vm14d2FGbDZSbUZXVmtwMFpFWmthVkp1UWtwV2JYaGhZakpGZUZkcmFGWlhSM2hSVld0a05GSlda SFVLWWpOa1VGVlkKUWtWWGJtOTNUMVZPYmxCVU1Fc0sK
一見すると何が何だかわかりませんが、文中にアルファベットと数字しか含まれていないことを考えるとBase64でエンコードされている可能性が高いです。デコードしていきましょう。
Base64デコード(Base64 Decode)|Web便利ツール@ツールタロウ
↑一見すると変わってないように見えますが、末尾の方がちゃんと変わっています。くり返しデコードを行います。
十数回やると以下のコードが出てきました。
begin 666
51DQ!1U]&94QG4#-3:4%797I74$AU
end
これはuuencodeというUNIXで使われるエンコード方式です。
デコーダで「51DQ!1U]&94QG4#-3:4%797I74$AU」を復元するとフラグが出てきます。
uuencode変換
タイトルの意味
ITでのOnionといえば、Torブラウザのオニオンルーティングが有名です。Torで行う通信は何重にも暗号化されており、データを暗号化の層が覆う姿が玉ねぎのようだということから名付けられています。この問題でもフラグがBase64とuuencodeの層によって守られていましたね。
ちなみに同じように食べ物に例えるものとして、多層防御の考え方の一つであるスイスチーズモデルがあります。参考までに。