Information Security
命令 | 說明 | 用法 |
---|---|---|
cat | 查看檔案內容 | cat 檔案名 |
wget | 下載檔案 | wget 網址 |
--help | 查看命令使用說明 | 命令 –help |
grep | 在檔案中尋找符合條件的關鍵字或正規表示法 | grep 關鍵字 檔案名 |
unzip | 解壓縮 | unzip '檔案名' |
nc(netcat) | 讓你直接連接一個遠方主機,它向你送訊息、你也向它送訊息,這樣一個溝通工具 | 超級無敵多用法 |
man | 查詢指令用法 | man 指令 |
Description
This file has a flag in plain sight (aka "in-the-clear"). Download flag).
Description
Python scripts are invoked kind of like programs in the Terminal… Can you run this Python script using this password to get the flag?
step1.
cat flag.txt.en
和pw.txt
。
step2.
執行ende.py
,
Usage: ende.py (-e/-d) [file]
表示需要輸入一個檔案,參數選項 -e, -d,基本上就是encode和decode。
接著按照提示輸入指令python3 ende.py -d flag.txt.en
(記得一定要python3!只打python不給過:D),會跑出Please enter the password:
,此時輸入剛剛cat pw.txt的內容,就會跑出flag了。
Description
Can you invoke help flags for a tool or binary? This program has extraordinarily helpful information…
step1.
wget
後,檔案為warm
step2.
無法執行(權限不足)
step3.
輸入chmod +x ./warm
,幫warm
加上執行權限
(此處注意是./warm
而非warm
,./warm
代表「目前目錄下的warm
檔案」)
step4.
執行warm
後,出現提示字!
按照提示,使用-h
查詢warm
的說明
step5.
輸入./warm -h
,即出現flag!
Description
There is a nice program that you can talk to by using this command in a shell: $ nc mercury.picoctf.net 49039
, but it doesn't speak English…
step1.
按照題目輸入$ nc mercury.picoctf.net 49039
後,出現一大串數字
step2.
將其丟到十進制轉ASCII,轉換結果為flag
Description
Can you look at the data in this binary: static? This BASH script might help!
step1.
執行兩個下載下來的檔案,其中輸入./ltdis.sh
時,輸出寫到disassembly
(反組譯),它會將執行檔的二進位檔案內容,轉換成對應組合語言。
wiki: 反組譯器(disassembler)是一種將機器語言轉換為組合語言的電腦程式——這與組譯器的目的相反。反組譯器與反編譯器不同,反編譯器的目標是高階語言而非組合語言。反組譯器的反組譯輸出通常格式化為適合人類閱讀,而非用作組譯器的輸入源,因此它主要是一個逆向工程工具。
step2.
再來,看到執行ltdis.sh
出現的ltdis.sh <program-file>
,因此輸入./ltdis.sh ./static
。
出現Any strings found in ./static have been written to ./static.ltdis.strings.txt with file offset
,代表flag在static.ltdis.strings.txt
裡。
step3.
接著,因為要找到在static.ltdis.strings.txt
的flag,所以輸入grep 'picoCTF' ./static.ltdis.strings.txt
(表示要在static.ltdis.strings.txt
裡找到picoCTF
關鍵字)。最終找到flag。
Description
Using tabcomplete in the Terminal will add years to your life, esp. when dealing with long rambling directory structures and filenames: Addadshashanammu.zip
step1.
先解壓縮檔案。
解壓縮出來的檔案路徑檔名很長,目錄也很多層。
step2.
先進去Addadshashanammu
資料夾之後,打./
後爆按Tab,shell自動幫你補上所有路徑,最後到達fang-of-haynekhtnamet
這個檔案,接著按Enter執行,即跑出flag。
Description
Using netcat (nc) is going to be pretty important. Can you connect to jupiter.challenges.picoctf.org at port 25103 to get the flag?
輸入netcat(or nc) jupiter.challenges.picoctf.org 25103
即可。
Description
Can you find the flag in file without running it?
step1.
題目提示你要用strings
指令,那就先查查看strings
要怎麼用。
輸入man strings
查看用法,按q
離開。
step2.
輸入strings strings
(指令
檔名
)後,跑出來一大串東西。
step3.
此時使用大絕招strings strings | grep "pico"
(grep),成功找到flag。