1,557
29
Essay, 4 pages (800 words)

Week 3 lab

Week 3: Assignment Week 3: Assignment Level 0: In level 0 the goal is to login into the shell and read the next level (level 1) password from the file readme in the home directory. We Ssh to bandit0@bandit. labs. overthewire. org to enter the shell.
1
2
3
4
5
bandit0@benedict (Linux / Unix Command: bash):~$ ls -lh
total 4. 0K
-rw-r—– 1 bandit1 bandit0 33 Jun  6 13: 59 readme
bandit0@benedict:~$ cat readme
********************************
Level 1
The goal was to obtain the password from the file named “-“ in the home directory and use the password for the next level. Now in the shell it is noticed that the readme file is in our home directory. We “ cat” it to obtain the password. The only command was to “. /” to the absolute path of the file.
1
2
3
4
5
bandit1@benedict:~$ ls -lh
total 4. 0K
-rw-r—– 1 bandit2 bandit1 33 Jun  6 13: 59 –
bandit1@benedict:~$ cat. /-
********************************
Level 2
The level’s goal was “ the password for the next level is stored in a file called spaces in this filename located in the home directory.”
1
2
3
4
5
bandit2@benedict:~$ ls -lh
total 4. 0K
-rw-r—– 1 bandit3 bandit2 33 Jun  6 13: 59 spaces in this filename
bandit2@benedict:~$ cat ./spaces in this filename
********************************
Level 3
The goal for this level was to obtain the password for the next level stored in a hidden file in the inhere directory.
1
2
3
4
5
6
7
8
9
10
11
12
bandit3@benedict:~$ ls -lh
total 4. 0K
drwxr-xr-x 2 root 4. 0K Jun  6 13: 59 inhere
bandit3@benedict:~$ ls -lh inhere/
total 0
bandit3@benedict:~$ ls -lha inhere/
total 12K
drwxr-xr-x 2 root       4. 0K Jun  6 13: 59 .
drwxr-xr-x 3 root    root    4. 0K Jun  6 13: 59..
-rw-r—– 1 bandit4 bandit3   33 Jun  6 13: 59 . hidden
bandit3@benedict:~$ cat ./inhere/. hidden
********************************
Level 4
The goal for this level is to find the password for the next level in the only human readable file in the inhere directory. The challenge was difficult because all of the commands provided by the overthewire. org were not working. However the command “ strings” works fine. It prints all the strings which are human readable. The switch modifier “ f” was used to print the name the file is taken from.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
bandit4@benedict:~$ ls -lh
total 4. 0K
drwxr-xr-x 2 root root 4. 0K Jun  6 13: 59 inhere
bandit4@benedict:~$ ls -lh inhere/
total 40K
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file00
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file01
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file02
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file03
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file04
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file05
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file06
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file07
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file08
-rw-r—– 1 bandit5 bandit4 33 Jun  6 13: 59 -file09
inhere/-file04: RZ! N
inhere/-file05: ?-p#
inhere/-file07: ********************************
inhere/-file08: ” Q 2B
Level 5
The level’s goal is to find a human readable, 1033 byte sized, and unexcutable file in the inhere directory. Linux command “ find” is used to find files with specific sizes and type.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
bandit5@benedict:~$ ls -lh
total 4. 0K
drwxr-x— 22 root bandit5 4. 0K Jun  6 13: 59 inhere
bandit5@benedict:~$ ls -lh inhere/
total 80K
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere00
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere01
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere02
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere03
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere04
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere05
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere06
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere07
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere08
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere09
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere10
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere11
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere12
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere13
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere14
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere15
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere16
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere17
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere18
drwxr-x— 2 root bandit5 4. 0K Jun  6 13: 59 maybehere19
bandit5@benedict:~$ find. /* -size 1033c -readable! -perm /111
./inhere/maybehere07/. file2
bandit5@benedict:~$ cat ./inhere/maybehere07/. file2
********************************
In conclusion, the exercise was worthwhile as it helped in practicing the theoretical knowledge acquired in class. The format string bug is an example.
Reference
Linux / Unix Command: bash. (n. d.). Retrieved from About. com: http://linux. about. com/library/cmd/blcmdl1_bash. htm

Thank's for Your Vote!
Week 3 lab. Page 1
Week 3 lab. Page 2
Week 3 lab. Page 3
Week 3 lab. Page 4
Week 3 lab. Page 5
Week 3 lab. Page 6
Week 3 lab. Page 7
Week 3 lab. Page 8
Week 3 lab. Page 9

This work, titled "Week 3 lab" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2022) 'Week 3 lab'. 15 September.

Reference

AssignBuster. (2022, September 15). Week 3 lab. Retrieved from https://assignbuster.com/week-3-lab/

References

AssignBuster. 2022. "Week 3 lab." September 15, 2022. https://assignbuster.com/week-3-lab/.

1. AssignBuster. "Week 3 lab." September 15, 2022. https://assignbuster.com/week-3-lab/.


Bibliography


AssignBuster. "Week 3 lab." September 15, 2022. https://assignbuster.com/week-3-lab/.

Work Cited

"Week 3 lab." AssignBuster, 15 Sept. 2022, assignbuster.com/week-3-lab/.

Get in Touch

Please, let us know if you have any ideas on improving Week 3 lab, or our service. We will be happy to hear what you think: [email protected]