There was a question in one of quiz conducted one year back. I was attempting to solve this question and got stuck. All the other were programming related but this one was a Unix file permissions related Stuff. Following is the scenario.
You will be given a login and a password to a SSH server. ssh your-username@server-addr
Your task is to look for a file named /home/abc/chekme and retrieve the contents.
When logged in to the ssh remote server doing an ls -l shows 0 files, which shows that the login given has no permissions but on doing ls -l for the above mentioned file it can be seen that Read permission is given to the root user and a group and the name of the group is chekme.
I can't read the file because I don't have the permission and am not a member of that group. On exploring the /etc/group file I found out that there is a group named chekme and only one user is added to that group. The user name is guest
From here I tried changing my guid to that of the group, adding myself to the group, doing a su as the user guest but none of it worked since the first two required root access and su to guest required the password of that user.
How do I proceed now ?
Actual question with login creds :
File : /home/hacker-weekly/abacus
So, you have to read the file '/home/hacker-weekly/abacus' and submit the file content here.
If you haven't got your login credentials, get it by clicking on the button 'Get Login Credential' below. Then you can login into the machine by running following command:
ssh "your-username"@"server-addr"
Hint: Think all about file permission in a UNIX-based system.
Login credentials Server: ec2-175-41-164-254.ap-southeast-1.compute.amazonaws.com Username: ashwinscongo Password: ab12d6H
The group name is abacus, the user in that group is guest. Tried /etc/passwrd, couldn't make out anything.
guest's password is oftenguestor blank. Did you try that?