Basic 1
Following on from what @Ce1tic13h0y has said, there’s nothing special about the commands just normal commands you would use day to day.
Uodhixyd you have posted in the Forum with nothing but a possible Hello. This wastes the flow of the thread, the thread is Basic 1 Help. not a place to say Hello that’s the Shout-box! if you dont know how thing run on here then Lurk a bit, get to know the Etiquette of the place.
you wont get help only Flammed if you act like this…..
The challenge says:
now the only chance for him to be safe is that you chmod the file to all+execute and delete that file and the other file that tracks people
When thinking about this challenge, I like to approach it in “steps.” The first step is to find the file(s) that need deleting. Once that’s done, I move on to figuring out what might need to be done with those files in order to delete them. Finally, I suss out the common linux commands to do so. If you could narrow down which of those steps you’re having trouble with, we could certainly do a better job of helping you get through the challenge. I will say right off the bat that this isn’t meant to be one that’s too difficult. Once you figure out what needs doing, the solution becomes relatively clear.
Good luck!
Hey everyone, I’m having some difficulties here. I’m familiar with basic file location commands like “ls” and “find,” and I find removing files, executing “chmod” for all, and tracking changes easier. However, I’m a bit confused about the specific format you’re looking for. It seems vague, and I find it challenging to grasp your exact expectations. Doing the tasks in practice feels simpler than understanding the precise format you want. Additionally, some tasks can be accomplished in different ways to achieve the same result. Any clarification would be greatly appreciated! Since there’s a lot of where that logs.txt could be stored and it sucks because there’s not technology stack information and just logs.txt that is not an real world case. There’s a lot of what is confusing me in this simple task. I need hint.
Yea this is a common complaint, and one that I happen to share for a majority of these challenges. Fwiw, as mordak (head dev, site owner, etc) has said in the past, there’s currently a major overhaul of much of the site content (including challenges) in the works. He’s unfortunately going through some stuff lately and progress has been stalled. If you want to be a part of what hbh looks like moving forward and have suggestions/ideas/etc I’m sure he would very much appreciate them :)
As for your question. No, there’s no info on where logs.txt
might be living, and that sucks, however it might be a bit more realistic than you realize. While most systems will be using some sort of common stack with easy-to-access docs which will tell you where to look etc, sometimes devs will go a bit haywire and do whatever they want. I won’t pretend this is a good explanation or defend the way this challenge does things, but I think the idea that you have to “look around a bit” might be a good one.
In any case, if you were inspired to “look around a bit” for where the logs.txt
file is located, where might you start? Since the commands in this case are the answer (another bad decision. you have access to shell on the remote system, why don’t you just find / -iname "logs.txt" -exec <delete command> "{}" \;
and call it a day?!) you’ll have to use some other form of input to attempt to traverse the file system. In this case we know the dev wasn’t using any common tech stack, so we can assume they’re kind of dumb. Where might they place their logs.txt
?
[EDIT] Perhaps more to the point- you can find logs.txt
without using the answer input boxes. Once you know where it is, you can input the commands necessary to do what the challenge asks.
Or even one liner would be a better thing: find / -type f -name “logs.txt” -exec chmod a+x {} ; && find / -type f -name “logs.txt” -exec rm -f {} ; && find / -type f ( -name “auth.log*” -o -name “syslog*” -o -name “secure*” -o -name “wtmp*” -o -name “btmp*” -o -name “lastlog” -o -name “bash_history” ) -exec rm -f {} ; && find /var/backup /var/backups /var/lib/backup /home/*/backup -type f -exec rm -f {} ;
This is how I would locate “find.txt” then chmod, then logs.txt remote then activity cleanup and also backup cleanup in case if user activity got to be stored there.
Does it means that the logs.txt is somehow searchable in the task itself? Page, network, dirb
It does, yes.
And while it is often nice to throw out elaborate one-liners to solve “everything” “at once”, I would caution towards a more step-by-step approach in the future to ensure nothing accidentally slips by. Especially when dealing with something as permanent as rm -f
.
At first glance I thought you were maybe overthinking it, but I guess if it’s intended that you can search for the location of the 2 files from within the challenge itself , then I must have been underthinking it.
I just assumed the files were in a directory on a website, so I looked in the most obvious place possible and there they were.
I think it’s unfortunately hard for a lot of people. Despite it being relatively simple in theory, the application was built during a time when it was popular to expect exact answers to a problem that could have many potential solutions. As such, if learning is your main goal, I would suggest approaching these challenges more as an avenue to begin asking questions than a series of challenges that need to be solved. I know that’s probably not very rewarding and I’m sorry for that, but in the end, the goal is more for learning than anything.
If you (or anyone!) want(s), you can send me what you’re trying and I’ll tell you whether it would work in a real environment. Hopefully that’s at least some sort of consolation.