iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 9
0
Security

點錯遊戲的我也只好硬著頭皮上了 系列 第 9

[基本技巧] ls - 列出檔案目錄

  • 分享至 

  • xImage
  •  

「Do you remember anything else?」
「Just the light. I think… it was from a screen. I think Iwas hacking into something.」
「It was a honeypot trap, lured you in, perhaps with a promising file to open. Instead you opened something else.」
「That light. What was it?」
「We don’t know for certain. We think it’s an image. Launched by a computer virus, and encoded somehow with instructions.」
「Yes. I remember the instructions. For days… or was it weeks? … years? Just hacking. Obeying the light. The virus. Like a never-ending dream.」
「You were hypnotized, yes.」
「...how long have I been here?」
「Tell me.」
「Several months.」
「No. That can’t be. Where did Ieven get food, stuck in here?」
「Don’t lose focus, please. I know it’s a great deal to take in. Still with me?」
「Yeah.」
「What’s in the power room? In this factory. There’s a locked room labeled with a power symbol.」
「I don’t know, Sky. I can’t access the factory. Only the problems delivered to you. Why do you ask?」
「There’s light inside. The exact color of the light I saw.」

11. where-is-the-file

I've used a super secret mind trick to hide this file. Maybe something lies in /problems/where-is-the-file_6_8eae99761e71a8a21d3b82ac6cf2a7d0.
我將檔案巧妙的藏起來,試試看在以下的路徑找不找的到吧 /problems/where-is-the-file_6_8eae99761e71a8a21d3b82ac6cf2a7d0。
https://ithelp.ithome.com.tw/upload/images/20200923/20103688Muxhq49kwv.png

WRITEUP:

由於已經養成執行 ls 指令時習慣帶上 la 參數:
(a 會列出所有檔案,包含隱藏檔(.開頭)。 l 表示輸出時以 list 一列一列輸出。)
因此在進入該目錄後的第一件事: ls -la 立即解決問題。

打開 shell 進入該目錄並使用 ls 列出所有檔案、目錄

cd /problems/where-is-the-file_6_8eae99761e71a8a21d3b82ac6cf2a7d0
ls -la
total 80
drwxr-xr-x   2 root       root        4096 Sep 28  2019 .
drwxr-x--x 684 root       root       69632 Oct 10  2019 ..
-rw-rw-r--   1 hacksports hacksports    39 Sep 28  2019 .cant_see_me

發現隱藏檔案後使用 cat 搭配 grep 找出 flag

cat .cant_see_me | grep "pico"
picoCTF{w3ll_that_d1dnt_w0RK_a88d16e4}

ANSWER:

picoCTF{w3ll_that_d1dnt_w0RK_a88d16e4}
注意每個人不同


上一篇
[基本技巧] diff - 比對檔案內容
下一篇
[基本技巧] bug - 程式的可能漏洞
系列文
點錯遊戲的我也只好硬著頭皮上了 30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言