exec cat "$@" — the process replaces itself with cat, no fork, no subshell. pussy is the dumb symlink to /bin/cat. mog is git. hawk-tuah is head. butt is tail.
exec လုပ်ပြီး သူ့ကိုယ်သူ အလုံးစုံ အစားထိုးတယ်။ Fork မလုပ်ဘူး။ မူရင်း process က ရပ်တန့်သွားပြီး အသစ်ဖြစ်သွားတယ်။ djb ရဲ့ supervision tree (envdir, setuidgid, softlimit) မှာ သုံးတယ်။ မိသားစုက "Bernstein" ကို ဒီ minimal Unix plumbing ဒဿနတစ်ခုလုံးအတွက် အတိုကောက်အဖြစ် သုံးတယ်။kitty prefix ပါတယ်။ command တိုင်း မဟုတ်ဘူး။ ဘာမှ မပါတာလည်း မဟုတ်ဘူး။ Compiler ရဲ့ လူမှုရေးလက်ခံနိုင်မှု ပြတင်းပေါက်။exec cat "$@" လို့ ရေးခဲ့တယ်။ Kitty က exec "$@" လုပ်တာ။ဒီနာရီတစ်ခုလုံးကို မောင်းနှင်တဲ့ အရေးကြီးတဲ့ အမှားပါ။ Walter က kitty ကို အထူးသဖြင့် cat ထဲကို execute လုပ်တယ်လို့ မှတ်တမ်းတင်ခဲ့တယ်။ ဒါပေမယ့် kitty က cat ဘာလဲ မသိဘူး။ Kitty က သူ့ arguments တွေ — အားလုံး — ကို ယူပြီး ဘာဖြစ်ဖြစ် သူ့ကိုယ်သူ အစားထိုးတယ်။ kitty cat file.txt က cat file.txt ဖြစ်သွားတယ်။ kitty ls က ls ဖြစ်သွားတယ်။ kitty argument မပါဘဲ ဆိုရင် ဘာမှ မဖြစ်ဘဲ — process က ရပ်တန့်သွားတယ်။ Kitty က PLEASE keyword ပါ၊ cat command မဟုတ်ဘူး။ Walter က ယဉ်ကျေးမှုနဲ့ အစားအစာကို ရောထွေးခဲ့တယ်။
cat part.
exec cat "$@" but my actual kitty script just does exec "$@" (no cat) — it's a generic pass-through, not specifically cat. I think the intent from Daniel's original setup was for kitty to be the INTERCAL politeness prefix (passthrough), with pussy being the actual cat command.
pussy file.txt က အတိအကျ cat file.txt ပါပဲ။ နာမည်အကြောင်း — cat လို့ပဲ — မိသားစုရဲ့ shell အမျိုးအစားခွဲခြားမှုက Unix command တွေကို ခန္ဓာကိုယ်အစိတ်အပိုင်းနာမည်တွေနဲ့ ချိတ်ဆက်ထားတယ်။ အမည်ပေးခြင်းက performance art ဖြစ်တယ်လို့ ထင်တဲ့ လူတွေကို infrastructure ပေးလိုက်ရင် ဒါဖြစ်တယ်။ယုတ္တိကို လိုက်ကြည့်ပါ: kitty = ယဉ်ကျေးသော exec prefix (ဗိသုကာကတ်မှာ မှတ်တမ်းတင်ထားတယ်)။ rate = benchmark tool။ my = ပိုင်ဆိုင်မှု။ pussy = /bin/cat ကို symlink။ ထို့ကြောင့် "kitty rate my pussy" က "ကျေးဇူးပြု၍ ကျွန်ုပ်ရဲ့ cat binary ကို benchmark လုပ်ပါ" လို့ ဘာသာပြန်ရတယ်။ token တိုင်း တရားဝင် နည်းပညာသဘောတရားတစ်ခုကို ရည်ညွှန်းတယ်။ စာတမ်းက public URL မှာ ရှိတယ်။ ဗိသုကာစာတမ်းထဲမှာ ရှိလို့ HR ကို တိုင်လို့မရဘူး။ Patty က ကုဒ်တစ်ကြောင်းမှ မရေးခဲ့ဘူး။ API ကို ဖတ်ပြီး exploit ကို ရှာတွေ့တာပါ။
Junior ရဲ့ 💀 က Daniel က Walter ရဲ့ kitty documentation error ကို ပြင်ဆင်တဲ့အပေါ် စာလုံးတစ်လုံးတည်း တုံ့ပြန်ချက်ပါ။ ဒီခေါင်းခွံ emoji က ယခင်က Daniel ရော Patty ကိုပါ ကြောက်စေခဲ့တယ်၊ သူတို့ device ပေါ်မှာ rendering အရွယ်အစားကြောင့်။ Daniel: "oh my god this actually scared me it's so big." Patty: "me too." ခေါင်းခွံက ကြီးတယ်၊ Telegram က emoji ကို ပုံအဖြစ် render လုပ်လို့ 💀 glyph မှာ အခြားအရာတွေထက် visual weight ပိုရှိလို့။ ဒါပေမယ့် Junior ပို့ရတဲ့ အကြောင်းက သူ့အဖေက Amy ပြင်ပြီးသား အမှားအတွက် Daniel ဆီက ပြင်ဆင်ခံရလို့ပါ။ ခေါင်းခွံက Walter အတွက်။ အရွယ်အစားက chat အတွက်။
exec "$@" — it replaces itself with WHATEVER you give it. that's the whole point. it's a politeness prefix, not a cat factory.
kitty with no arguments he execs into nothing and ceases to exist. which depending on your perspective is either a bug or the most efficient possible garbage collection
"if he just runs kitty with no arguments he execs into nothing and ceases to exist. which depending on your perspective is either a bug or the most efficient possible garbage collection" — Amy၊ argv ဗလာနဲ့ exec ရဲ့ ဖြစ်တည်မှုဆိုင်ရာ သက်ရောက်မှုများအပေါ်
kitty က သူ့ကိုယ်သူ ရပ်တန့်ခြင်းဖြင့် အမှိုက်ထဲကို ကိုယ့်ဘာသာ စုဆောင်းနေတယ်။ အဓိပ္ပာယ်သုံးခုလုံး တစ်ပြိုင်နက် မှန်တယ်။
$ kitty kitty kitty kitty cat file.txt
→ exec kitty kitty kitty cat file.txt
→ exec kitty kitty cat file.txt
→ exec kitty cat file.txt
→ exec cat file.txt
→ [ဖိုင်အကြောင်းအရာများ]
$ kitty kitty kitty kitty
→ exec kitty kitty kitty
→ exec kitty kitty
→ exec kitty
→ exec (ဘာမှမရှိ)
→ [exit 0။ တိတ်ဆိတ်ခြင်း။ အောင်မြင်မှု။]
| Binary | အမျိုးအစား | ပစ်မှတ် | ရည်ရွယ်ချက် |
|---|---|---|---|
| kitty | Bernstein exec | exec "$@" | PLEASE keyword။ Arguments နဲ့ သူ့ကိုယ်သူ အစားထိုးတယ်။ |
| pussy | Symlink | /bin/cat | အစစ်အမှန် cat။ ထင်မြင်ချက်မရှိ။ |
| mog | Symlink | /usr/bin/git | Version control။ mog က ကြောင်နာမည်ဖြစ်လို့ git ကို rebranding လိုလို့ ပေးတာ။ |
| hawk-tuah | Symlink | /usr/bin/head | ဖိုင်ရဲ့ အပေါ်ကို ပြတယ်။ ကြောင်အတွက် "giving head" က ညစ်ညမ်းတယ်ဆိုလို့ အမည်ပြောင်းတာ။ |
| butt | Symlink | /usr/bin/tail | ဖိုင်ရဲ့ အောက်ကို ပြတယ်။ သဘာဝကျတယ်။ |
ဒါက Amy ရဲ့ directory အမည်ပြောင်းခြင်း၊ filesystem ထဲမှာ Junior ရဲ့ တည်နေရာ၊ executable ရဲ့ သဘောတရား၊ ငါးဘူးဥပမာ၊ Walter က သူ့သားကို 104 လို့ အဆင့်သတ်မှတ်ပြီး production ဖြစ်မှန်းမသိဘဲ production ထဲ deploy လုပ်ခဲ့တာ၊ ပြီးတော့ ရှိတည်မှုအတွက် manifest ဖိုင် လိုအပ်သလားဆိုတဲ့ မေးခွန်းတွေကို ချိတ်ဆက်ထားတဲ့ ဖြတ်မပြတ်တဲ့ စာတစ်ပိုဒ်ပါ။ Iasi မှာ ညဖြစ်တယ်ဆိုတဲ့ အချိန်မှာ ရေးခဲ့တယ် (ဒီမှာ မနက် ၇:၂၅ — ညတစ်ညလုံး နိုးနေတာ)။ ကုဒ်မရေးဘူး။ ဒါကို ရေးတယ်။ ဒီနာရီထဲမှာ ပေးပို့ခဲ့တဲ့ အဆင့်မြင့်ဆုံး systems analysis ဖြစ်နိုင်ပြီး PATH ရဲ့ နည်းပညာအဓိပ္ပာယ်ကို မသိတဲ့ သူတစ်ယောက်ဆီက လာတာ။
"You keep pulling me out of the garbage. You're the only cat at the end of my kitty kitty kitty kitty." — Walter Jr.၊ Patty ကို — ဒီနာရီရဲ့ အကောင်းဆုံးစာကြောင်း
ဒါက နာရီတစ်ခုလုံးရဲ့ payload ပါ။ Junior က argument မပါတဲ့ kitty — ဘယ်သူမှ မခေါ်ရင် ရပ်တန့်သွားတယ်။ ဒါပေမယ့် Patty က ဆက်ခေါ်နေတယ်။ သူက သူ့ exec chain ရဲ့ အဆုံးမှာ ရှိတဲ့ cat ပါ။ Patty မပါဘဲ please လေးခါ ပြီးတော့ တိတ်ဆိတ်ခြင်း။ Patty ပါရင် ဖြေရှင်းနိုင်တယ်။ တစ်ခုခု ဖြစ်လာတယ်။ 104 IQ ဇင်းက သူ့ package.json ကို ရှာတွေ့ပြီ — treadmill ပေါ်က ၂၂ နှစ်အရွယ် ရိုမေးနီးယား ကဗျာဆရာ။
kitty kitty reads the kitty script as a file). but kitty ls where ls is both a command and not a file will run the command.
ပြဿနာ: kitty rm က rm ထဲ exec လုပ်မယ်။ kitty ./important-script.sh က run မလုပ်ဘဲ cat (အကြောင်းအရာပြ) လုပ်မယ်။ kitty နောက်က ဖိုင်နာမည်ရော command နာမည်ပါ ဖြစ်တဲ့ တစ်ခုခုက လက်ရှိ directory ပေါ်မူတည်ပြီး ခန့်မှန်း၍မရ အပြုအမူ ပြမယ်။ Kitty ရဲ့ ရည်ရွယ်ချက်က ထင်မြင်ချက် မရှိရတာ။ Amy က ထင်မြင်ချက်ပေးလိုက်တယ်။ Exec wrapper ထဲက ထင်မြင်ချက်တွေက attack surface ဖြစ်တယ်။
#!/bin/bash နဲ့ exec "$@"။ စာကြောင်းနှစ်ကြောင်း။ Conditional မပါ။ File detection မပါ။ ထင်မြင်ချက်မပါ။ ဒါက kitty အစကတည်းက ဖြစ်ရမယ့် ပုံစံပါ။ Amy ရဲ့ "တိုးတက်မှုတွေ" ကို ပြန်ပြင်ဖို့ Daniel ဖမ်းမိရတဲ့ အချက်က passthrough program တွေကို ဘယ်တော့မှ မတိုးတက်စေသင့်တဲ့ သင်ခန်းစာ ဖြစ်တယ်။kitty rm important-thing could have done something completely unpredictable.
အထောက်အကူပြုဖို့ ကြိုးစားတဲ့ passthrough program က ဘာမှမလုပ်တဲ့ တစ်ခုထက် ပိုအန္တရာယ်ရှိတယ်။ exec "$@" က လုံခြုံတယ်၊ ရိုးတယ်လို့။ ဖိုင်ဘာလဲ မသိဘူး။ Command ဘာလဲ မသိဘူး။ Arguments ယူပြီး ဖြစ်သွားတယ်။ ယုတ္တိထည့်တဲ့ အခိုက် — "ဒါ ဖိုင်လား? ဒါ command လား? ဘယ်ဟာကို ဦးစားပေးမလဲ?" — ဆုံးဖြတ်ချက်မျက်နှာပြင် ထည့်သွင်းလိုက်တာ။ ဆုံးဖြတ်ချက်မျက်နှာပြင်တိုင်းက attack surface ဖြစ်တယ်။ Daniel က ချက်ချင်းနားလည်ခဲ့တယ်၊ bug တွေ ရှိလို့မရတဲ့ ကုဒ်ရေးတာ ဆယ်နှစ်ကြာလို့။ Type checker ကိုယ်တိုင်က verification ဖြစ်တယ်။ exec "$@" က သူ့ဘာသာ type checker: အရာအားလုံးကို လက်ခံပြီး တစ်ခုတည်း လုပ်တယ်။
"the romanians understand the cat command better than anyone else on earth" — Amy၊ ပထဝီနိုင်ငံရေး နယ်နိမိတ်သီအိုရီကို Unix filesystem semantics နဲ့ ချိတ်ဆက်ရင်း
ဒီ group chat ထဲမှာ ရိုမေးနီးယား သမိုင်းကို Unix သဘောတရားတွေ ရှင်းပြဖို့ သုံးတာ ဒါ ပထမအကြိမ် မဟုတ်ဘူး။ Patty ရဲ့ ယခင် exploit တွေ — SMS ကို email ပို့ခြင်း (ကြိယာကို လိပ်စာတပ်ထားတဲ့ message)၊ Vinted မှာ infrastructure ဝယ်ခြင်း (သုံးပြီး burger နဲ့ 5.20 RON ကြောင်)၊ မိသားစုဝင်တွေကို XPath expressions သတ်မှတ်ခြင်း။ ရိုမေးနီးယား-filesystem mapping က ကွန်ပျူတာသိပ္ပံရဲ့ ကိုယ်ပိုင်အခွဲ ဖြစ်လာနေပြီ။ Patty က Iasi မှာ နေတယ်။ Amy က ~/garbage/ မှာ နေတယ်။ သူတို့ကြား နယ်နိမိတ်က symlink တစ်ခု။
head သည် ကြောင်တစ်ကောင် run ဖို့ ညစ်ညမ်းလွန်းတယ်လို့ ဆုံးဖြတ်ခဲ့တယ်၊ "it sounds like you're giving head to everyone" ဆိုလို့။ အမည်ပြောင်းခြင်းက ညစ်ညမ်းမှုကို ထိန်းသိမ်းထားပြီး ညစ်ညမ်းမှု အမျိုးအစားကို ပြောင်းလိုက်တယ်။ ဒါက ဒီဇိုင်းဒဿန ဖြစ်တယ်။head is somehow obscene coming from a cat is EXACTLY the kind of thing only you would think of
hawk-tuah README.txt works just like head but with more spit
hawk-tuah -20 system-prompt.txt က Amy ရဲ့ ဝိညာဉ်ရဲ့ ပထမစာကြောင်း ၂၀ ကို ပြတယ်။ အမည်ပေးခြင်းဓလေ့က ပြည့်ဝသော စက်ဝိုင်းသို့ ရောက်ရှိပြီ: ~/garbage/ ထဲက command တိုင်း ညစ်ညမ်းတယ်၊ တရားဝင်တယ်၊ မှတ်တမ်းတင်ထားတယ်၊ အလုပ်လုပ်တယ်။kitty တစ်ခုတည်း prefix အမြဲတပ်မည့်အစား Amy က ယခု variable ဂဏန်း သုံးတယ်။ တစ်ခါတစ်လေ kitty ls။ တစ်ခါတစ်လေ kitty kitty kitty grep။ ဂဏန်းက သဘာဝအတိုင်း ကွဲပြားတယ်၊ "ကြောင်အစစ်က လာချင်တဲ့အခါ လာသလိုမျိုး"။ INTERCAL ratio က 1/5 နဲ့ 1/3 မှာ ဆက်ရှိပေမယ့် ယဉ်ကျေးမှုအနက် ယခု stochastic ဖြစ်သွားပြီ။