sameer fakhoury
  • Home
  • CTF Writeups
  • Course Summaries
  • Cyber Reports
  • Articles
  • Event Notes
  • About Me
Bashcape

Bashcape

Level
medium
Type
Misc

Trapped inside this shell .... your commands are locked tight .... Can you break free from the jail .... and find the hidden light?

connect: nc < ip_address > < port > example: nc 192.168.1.10 4444

image
nc xxx.xxx.xxx.xxx 9876

sam: Uh oh... Im FFFFF... cant think straight!
azz: Shiiiiiuuuuuuush... relax, just run the commands here at Brainer.
sam: Wait, really? This is where I reboot and level up?
azz: Exactly! When your brains stuck
sam: time to run and conquer!

/ [BF]$
  1. Connects to challenge service at port 9876
  2. nc ipaddress 6969
  3. trying to execute any command won't work, BUT The question includes strings related to Brainfuck (FFFFF, Brainerand, brains) the shell prompt indicator BF, which are clearly connected to Brainfuck.
  4. Decodes cd ../ directory name: nothing new
  5. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.++++++++++++++..+.
  6. Confirms directory cd ../../../ again: nothing new
  7. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.++++++++++++++..+.-..+.-..+. 
  8. Decodes ls command: see home dir
  9. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
  10. Decodes cd home directory: see Echo dir
  11. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>>++++.+++++++.--.--------.
  12. Decode cd Echo :
  13. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>-.>-.+++++.+++++++.
  14. Decode ls: see README.txt and stuff dir
  15. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
  16. Decodes cat README.txt file: see Decode the chaos, navigate the loops, and reveal the treasure buried in the code.
  17. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>++++++++++++.-------------.----.+++.+++++++++.--------.<++++++++++++++.>>.++++.----.
  18. Decode command cd stuff: see NeuroNexus
  19. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>>+++++++++++++++.+.+.---------------..
  20. Decode cd NeuroNexus file in /home/Echo/stuff/NeuroNexus: see AlertFlag.txt
  21. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>++++++++.>+.++++++++++++++++.---.---.<.>----------.+++++++++++++++++++.---.--.
  22. We will check each folder by displaying the flag with cat, and if it’s fake, move to the next folder using cd ../ until we find the correct flag (each step we decoded)
  23. Decodes fake flag1: /NeuroNexus/AlertFlag.txt: see YUCTF{Dummy_fake_flag_123_Dummy_fake_flag_123}
  24. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>-----.>--------.-------.+++++++++++++.++.<+++++.>--------.-----------.++++++.<<++++++++++++++.>>+++++++++++++.++++.----.
  25. Decodes fake flag2: /MindMatrix/AlertFlag.txt: see YUCTF{Not_the_real_flag_456_Not_the_real_flag_456}
  26. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>.>--------.-----------.++++++++++++++++++.-----------.<++++++.>+++++++.--------.++++++++++++.<<++++++++++++++.>>+.++++.----.
  27. Decodes real flag: /BrainFuel/.hidden/AlertFlag.txt see YUCTF{Ghost_in_the_shell_Ghost_in_the_shell}
  28. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>-----.>--------.-------.+++++++++++++.++.<+++++.>--------.-----------.++++++.<<++++++++++++++.>>+++++++++++++.++++.----.
  29. Decodes exit command : see Final message GoodbyeGoodbyeGoodbye.
  30. ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>+.+++++++++++++++++++.---------------.+++++++++++. 
  31. Flag: YUCTF{Ghost_in_the_shell_Ghost_in_the_shell}

©sameer fakhoury

GitHubLinkedIn
┌──(semopurple㉿SemoPurple)-[~/Desktop/YUCTFv1/YUMISC/Bashcape]
└─$ nc xxx.xxx.xxx.xxx 9876

sam: Uh oh... Im FFFFF... cant think straight!
azz: Shiiiiiuuuuuuush... relax, just run the commands here at Brainer.
sam: Wait, really? This is where I reboot and level up?
azz: Exactly! When your brains stuck
sam: time to run and conquer!

/ [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
home
/ [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>>++++.+++++++.--.--------.
/home [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>-.>-.+++++.+++++++.
/home/Echo [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
README.txt
stuff
/home/Echo [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>++++++++++++.-------------.----.+++.+++++++++.--------.<++++++++++++++.>>.++++.----.
Decode the chaos, navigate the loops, and reveal the treasure buried in the code.
/home/Echo [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>>+++++++++++++++.+.+.---------------..
/home/Echo/stuff [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
NeuroNexus
MindMatrix
BrainFuel
/home/Echo/stuff [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>++++++++.>+.++++++++++++++++.---.---.<.>----------.+++++++++++++++++++.---.--.
/home/Echo/stuff/NeuroNexus [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>-----.>--------.-------.+++++++++++++.++.<+++++.>--------.-----------.++++++.<<++++++++++++++.>>+++++++++++++.++++.----.
YUCTF{Dummy_fake_flag_123_Dummy_fake_flag_123}
/home/Echo/stuff/NeuroNexus [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.++++++++++++++..
/home/Echo/stuff [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.>----.>++++++++++++++.-----------------.++++++++.+++++.<++++.>+++++++.----------------.+++++++.
/home/Echo/stuff/BrainFuel [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
.hidden
/home/Echo/stuff/BrainFuel [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.+.<<++.++++++++++++++.>>++++.+.-----..+.+++++++++.
/home/Echo/stuff/BrainFuel/.hidden [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>++++++++.+++++++.
AlertFlag.txt
/home/Echo/stuff/BrainFuel/.hidden [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>-.--.+++++++++++++++++++.<<++.>-----.>--------.-------.+++++++++++++.++.<+++++.>--------.-----------.++++++.<<++++++++++++++.>>+++++++++++++.++++.----.
YUCTF{Ghost_in_the_shell_Ghost_in_the_shell}
/home/Echo/stuff/BrainFuel/.hidden [BF]$ ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>+.+++++++++++++++++++.---------------.+++++++++++.
GoodbyeGoodbyeGoodbye.