No Tools in a CTF

  Рет қаралды 350,303

John Hammond

John Hammond

29 күн бұрын

Learn Cybersecurity - Name Your Price Training with John Hammond: nameyourpricetraining.com
Read The Hacker Mindset by Garret Gee: jh.live/hackermindset
📧JOIN MY NEWSLETTER ➡ jh.live/email
🙏SUPPORT THE CHANNEL ➡ jh.live/patreon
🤝 SPONSOR THE CHANNEL ➡ jh.live/sponsor
🌎FOLLOW ME EVERYWHERE ➡ jh.live/twitter ↔ jh.live/linkedin ↔ jh.live/discord ↔ jh.live/instagram ↔ jh.live/tiktok
💥 SEND ME MALWARE ➡ jh.live/malware
🔥KZbin ALGORITHM ➡ Like, Comment, & Subscribe!

Пікірлер: 121
@nelsoncorreia7293
@nelsoncorreia7293 28 күн бұрын
Love it. Never really considered how to use the terminal if the tools in Linux suddenly disappeared.
@zuberkariye2299
@zuberkariye2299 27 күн бұрын
Same 😂
@trizedlyza
@trizedlyza 22 күн бұрын
This challenge is thrown to some degree on a lot on embedded devices like routers, or an old Linux box called TiVo. TiVo had a shell but no ls (dir) command so you had to use things like "echo *" to get the list of files.
@TheoryCraftBR
@TheoryCraftBR 15 күн бұрын
I'd just like to interject for a moment. What you’re referring to as Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.
@GreatTaiwan
@GreatTaiwan 7 күн бұрын
@@TheoryCraftBR ahhh classic
@StuartMill14
@StuartMill14 22 күн бұрын
John you make this look breezy as all heck! Always a treat to watch you work!
@movax20h
@movax20h 9 күн бұрын
To be pedantic, echo is not required to be a built-in into a shell (i.s. posix sh specification says absolutely nothing about echo). It can be just a binary in /bin/ (in fact there is one there just for this occasion).
@zackarycrider5191
@zackarycrider5191 9 күн бұрын
I understood a few of those words
@ChikoOof
@ChikoOof 7 күн бұрын
those were words?
@My1xT
@My1xT 9 күн бұрын
Wait if echo works why not just echo the file?
@matbeedotcom
@matbeedotcom 9 күн бұрын
Because echo outputs what’s input, it’d just output the string path to the filename
@kippers12isOG
@kippers12isOG 5 күн бұрын
Redirect to echo
@Jarvx
@Jarvx 24 күн бұрын
I think they gave this particular challenge at the Bsides San Francisco CTF a week ago, pretty fun experience
@mu11668B
@mu11668B 28 күн бұрын
In some `sh` implementations, trying to execute `sh /path/to/script` will lead to all unavailable "commands" in that script reported in the terminal. Since `sh` is supposed to be available, `sh /home/ctf/flag.txt` might also work.
@lurifos9576
@lurifos9576 23 күн бұрын
I was thinking the same thing
@EugeneYunak
@EugeneYunak 22 күн бұрын
@@lurifos9576 $ sh flag.txt sh flag.txt /bin/sh: 16: sh: not found
@EugeneYunak
@EugeneYunak 22 күн бұрын
but `.` (aka `source`) works! $ . ./flag.txt . ./flag.txt /bin/sh: 1: ./flag.txt: CTF{where-are-my-tools}: not found
@trizedlyza
@trizedlyza 22 күн бұрын
Sourcing the txt CTF file, nothing could go wrong.
@mu11668B
@mu11668B 20 күн бұрын
@@trizedlyza Even if it does, it's their VM that gets rekt. Not something I would worry about. 😁
@huntit4578
@huntit4578 21 күн бұрын
Please more shorts like this love it ❤
@injuringflea727yeet
@injuringflea727yeet 16 күн бұрын
Where can I find these challenges?
@JeffNoel
@JeffNoel 7 күн бұрын
This was BSideSSF's CTF challenge. It's not available anymore I think.
@RedBigz
@RedBigz 14 күн бұрын
I completely didn't know the read command until yesterday, because I was trying to parallelize some cracking tools, and this gem pops up on my shorts. Awesome timing.
@mopioline65
@mopioline65 5 күн бұрын
bookmarking this one. I have a feeling I may need it one day lol
@Mirikant
@Mirikant 22 күн бұрын
I don’t understand a thing that is happening but this all looks and sounds cool
@BubbleS1
@BubbleS1 28 күн бұрын
Very cool solution and challenge!
@georgerobbins5560
@georgerobbins5560 5 күн бұрын
Good stuff, John.
@G-man_the-cyber-guy
@G-man_the-cyber-guy 20 күн бұрын
Please carry on with ctf and challenge walk through I love that content of yours! ❤
@_mrcrypt
@_mrcrypt 27 күн бұрын
‘‘Tis the season to be practicing your CTF 🍷😜🏴‍☠️
@KP-nc9gk
@KP-nc9gk 21 күн бұрын
Noob question. Does `cat ` works as well?
@MakerTim
@MakerTim 21 күн бұрын
Cat is a binary, so that is one of the missing features what makes this a challenge
@lauraprates8764
@lauraprates8764 20 күн бұрын
​@@MakerTimit depends, by the standard echo is also a file, part of the core utils, but some implementations use it as a built in, and the same can be said about cat and ls
@CatDevz
@CatDevz 20 күн бұрын
@@lauraprates8764 in bash at least it’s a shell built in.
@koshakush
@koshakush 8 күн бұрын
the short answer is no. cat for me is in /usr/bin and in this scenario, everything in usr/bin was deleted.
@someoneunqualified7715
@someoneunqualified7715 13 күн бұрын
That's a super cool CTF and it's also just super simple
@georgehammond867
@georgehammond867 27 күн бұрын
You made it look like easy work 😅
@blackhavoc1320
@blackhavoc1320 27 күн бұрын
fr
@righteous-bison
@righteous-bison 21 күн бұрын
i love this concept
@arshiaalidosti8818
@arshiaalidosti8818 19 күн бұрын
Loved it!
@elliot-hacks
@elliot-hacks 27 күн бұрын
Hammond back on CTFs, bro got some awesome tricks
@robindeboer7568
@robindeboer7568 26 күн бұрын
Oh hey! I saw you there! That was a fun one! I actually ended up doing this a different way hahaha I literally just did . /home/ctf/flag.txt and it spit out the answer in an error XD Your way is better.
@xheezy
@xheezy 10 күн бұрын
Oooh bsides san francisco?
@rayforever
@rayforever 22 күн бұрын
Can anyone explain what is that website?
@hiraelum
@hiraelum 7 күн бұрын
What about the 'cat' command? Is it available for this challenge? I've used it to print file contents to the standard output before.
@iliealexandru2181
@iliealexandru2181 2 күн бұрын
how can I access those challenges, what is the website?
@exaltedlord8771
@exaltedlord8771 23 күн бұрын
Thats so cool
@Baked7DX
@Baked7DX 28 күн бұрын
This so cool
@christiansanchez1097
@christiansanchez1097 23 күн бұрын
Where can You learn this ?
@wishmaster-productions
@wishmaster-productions 23 күн бұрын
I would like to set something like this up for a LAN party. but im lazy and im wondering if there is a package with vm's ready to use to start playing a set of challenges with friends. Do you know of any that I could use?
@blankexpression2u
@blankexpression2u 22 күн бұрын
vulnhub has a bunch of Virtual Machines and the challenges for each
@seasong7655
@seasong7655 2 күн бұрын
where can we play the challenge? Does anyone know?
@BlockchainShango
@BlockchainShango 22 күн бұрын
Dude! 😮
@snakshayan2132
@snakshayan2132 3 күн бұрын
hey guys , I am building a CTF and need a lot of help 🙂 , any idea how to create a challenge like this ??
@Proman4713
@Proman4713 11 күн бұрын
Wouldn't `cat
@MeTheCoolDude
@MeTheCoolDude 10 күн бұрын
cat is binary that was deleted
@aaronderoberts3273
@aaronderoberts3273 22 күн бұрын
I need help with acid server, the PHP script that's supposed to patch me in with the host isn't working
@fyodor8008
@fyodor8008 6 күн бұрын
There are probably a bunch of ways to solve that
@machacador9000
@machacador9000 20 күн бұрын
ah. yes. i understood everything happening here
@corners1733
@corners1733 27 күн бұрын
Cool
@Cucazikf
@Cucazikf 23 күн бұрын
Heyy, live CTFs 😁
@TehTobis
@TehTobis 13 күн бұрын
This looks really interesting, what is it? Is capture the flag like a game to help you learn Linux commands?
@nicholasfinch4087
@nicholasfinch4087 10 күн бұрын
It's a game, yes, but it's really just ways of Hacking into a machine to find some text in a file.
@joshuawillis7874
@joshuawillis7874 11 күн бұрын
Is `cat` a binary that was removed?
@kilgarragh
@kilgarragh 10 күн бұрын
yes
@H3cJP
@H3cJP 9 күн бұрын
yes, because cat is a binary located on /usr/bin, built in functions work because those are already loaded on RAM
@anirudhsharma2003
@anirudhsharma2003 9 күн бұрын
@H3cJP Please tell me why was read not removed if cat was?
@H3cJP
@H3cJP 9 күн бұрын
@anirudhsharma2003 because read is a bash function, not a binary unlike cat, which is its own binary; /usr/bin/cat you can see it by doing a "whereis read", you will see there isnt a binary associated with the command and if you do whereis cat, you will indeed see that it points to /usr/bin/cat you can also test it by running a virtual machine with some distro installed (or even just using a live distro) then doing rm -rf / --no-preserve-root and seing that "cat" fails but "read" still works if you kept the terminal with bash opened why? because it is still loaded on ram, you are using bash so bash functions are loaded on ram
@anirudhsharma2003
@anirudhsharma2003 8 күн бұрын
@@H3cJP Thanks a lot, that was really helpful for me. I have now a better understanding over these functions and binaries.
@skylo706
@skylo706 22 күн бұрын
This is clever. As a linux noob though, I have to ask: Is stuff like ls also removed?
@EugeneYunak
@EugeneYunak 22 күн бұрын
yes
@THATCANADIANDUDE682
@THATCANADIANDUDE682 17 күн бұрын
I wouldn't have used the variable, just straight echo out.
@movax20h
@movax20h 9 күн бұрын
Like how? Remember cat is not available.
@koshakush
@koshakush 8 күн бұрын
think someone else mentioned that would only echo the filename, not the contents so wouldn't work.
@THATCANADIANDUDE682
@THATCANADIANDUDE682 8 күн бұрын
​@@movax20h echo "$(
@petrlaskevic1948
@petrlaskevic1948 22 күн бұрын
Could you use the cat command?
@F38U
@F38U 21 күн бұрын
No binaries, no cat
@petrlaskevic1948
@petrlaskevic1948 14 күн бұрын
​@@F38Uwhat is the difference between read and echo commands and cat?
@F38U
@F38U 14 күн бұрын
@@petrlaskevic1948 well echo just print whatever is after it to the terminal, cat concatenates files and read reads a file. major diff is cat lives in /usr/bin/cat while the others in /opt/
@lettd0wn
@lettd0wn 22 күн бұрын
Can you open the txt file with nano?
@ARMcPro
@ARMcPro 22 күн бұрын
it's NO tools
@Dxeus
@Dxeus 25 күн бұрын
These are lil kids' games.
@nakedpotato9894
@nakedpotato9894 22 күн бұрын
Im just going to pretend that i understand every single second of that
@constantitus
@constantitus 16 күн бұрын
ok, now read the second line in the file
@errorcode778
@errorcode778 28 күн бұрын
where can I find the CTF?
@j0hn4th4nd03
@j0hn4th4nd03 26 күн бұрын
The URL is visible at the top of the screen
@hayder775
@hayder775 12 күн бұрын
Oh the joker forgot remove binary of echo command 🤣
@planktonfun1
@planktonfun1 21 күн бұрын
is cat a builtin tool?
@andrewpatterson3139
@andrewpatterson3139 20 күн бұрын
Yeah he just did cat with extra steps.
@CatDevz
@CatDevz 20 күн бұрын
@@andrewpatterson3139 cat isn’t a built in
@OrNah.
@OrNah. 24 күн бұрын
Sir this is a Wendy’s
@OG-zr3bw
@OG-zr3bw 20 күн бұрын
Basic linux admin skills, nice.
@xloppyschannel4881
@xloppyschannel4881 25 күн бұрын
why cant you just cat it?
@harshvardhansinha7688
@harshvardhansinha7688 25 күн бұрын
Because all of the binaries are deleted including the cat command
@theAymen_dev
@theAymen_dev 23 күн бұрын
but echo also in bin folder can you explain why it work when he is use it please
@HansPeter-qg2vc
@HansPeter-qg2vc 23 күн бұрын
​@@theAymen_devecho is both a binary and a shell-built-in. Try executing `type echo` (w/o the backticks) and it will probably tell you that you're using the shell-built-in echo. However, you can also use /bin/echo.
@domelessanne6357
@domelessanne6357 21 күн бұрын
how the fk can u learn all that wow?
@superbellum
@superbellum 22 күн бұрын
cat
@DreadArsenol
@DreadArsenol 14 күн бұрын
Why can’t you just use cd and go to the directory and then use cat to read the file?
@mewc0re
@mewc0re 10 күн бұрын
because the binaries were deleted...
@kilgarragh
@kilgarragh 10 күн бұрын
both cd and cat were deleted
@movax20h
@movax20h 9 күн бұрын
@@kilgarragh only cat. cd is not a binary, it is a builtin (in fact some shells might have cat a builtin, but it is not possible to have cd to not be builtin, because cd modifies state of current process, and that cannot be done by a child process)
@danthemango
@danthemango 21 күн бұрын
But you deleted all your binaries then how are you using sh? Huh? Check mate
@DiverSteenberg
@DiverSteenberg 24 күн бұрын
Kali 😂
@axelaragon7550
@axelaragon7550 21 күн бұрын
I mean… can’t you just use cat?
@CatDevz
@CatDevz 20 күн бұрын
No. The problem description says there’s no programs available, you have to use shell builtins.
@stipgoddab2087
@stipgoddab2087 19 күн бұрын
cat?
@meomapxanh
@meomapxanh 22 күн бұрын
cat?????????
@___jd
@___jd 24 күн бұрын
y'all need to touch grass fr could be laying in a field eating peaches but instead you're doing absolutely nothing for no reason smh
@trizedlyza
@trizedlyza 22 күн бұрын
Two options: 1. Normally just "touch grass" But all tools are removed, we want a non-destructive "touch" and that's just no command with the append style redirect: 2. ">> grass" Both would allow you to update the file time stamp on the the file called grass.
@morsikpl
@morsikpl 6 сағат бұрын
Nice, altough I would just use simplier: echo $(
@douwehuysmans5959
@douwehuysmans5959 24 күн бұрын
/dev/stdout < /home/ctf/flag.txt
@douwehuysmans5959
@douwehuysmans5959 24 күн бұрын
/home/ctf/flag.txt > /dev/stdout
@spookycode
@spookycode 24 күн бұрын
That ain’t gona work, files aren’t executables!
@lukasz.jagiello
@lukasz.jagiello 24 күн бұрын
. /path/to/flag.txt
@lukasz.jagiello
@lukasz.jagiello 24 күн бұрын
I was also the first one who solves it
Scraping Dark Web Sites with Python
19:29
John Hammond
Рет қаралды 133 М.
Password Cracker with Notepad!
11:41
ebola man
Рет қаралды 384 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 53 МЛН
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
Finding WEIRD Devices on the Public Internet
27:48
John Hammond
Рет қаралды 219 М.
everything is open source if you can reverse engineer (try it RIGHT NOW!)
13:56
Low Level Learning
Рет қаралды 1,2 МЛН
Python The Hacker's Secret Weapon | Importance Of Python in Hacking
11:06
60 Linux Commands you NEED to know (in 10 minutes)
10:50
NetworkChuck
Рет қаралды 1,3 МЛН
Hacking 101: Everything You Need To Know
13:32
Privacy Matters
Рет қаралды 202 М.
Malware development 101: Creating your first ever MALWARE
28:00
Leet Cipher
Рет қаралды 224 М.
Is this the best OSINT tool out there?!
17:10
stuffy24
Рет қаралды 298 М.
Can a PDF File be Malware?
22:26
John Hammond
Рет қаралды 80 М.
Rust's Alien Data Types 👽 Box, Rc, Arc
11:54
Code to the Moon
Рет қаралды 132 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 145 МЛН