-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
# tokens | ||
|
||
```b | ||
level00 level00 | ||
flag00 nottoohardhere | ||
level01 x24ti5gi3x0ol2eh4esiuxias | ||
flag01 abcdefg | ||
level02 f2av5il02puano7naaf6adaaf | ||
``` | ||
|
||
|
||
# SSH into VM on host | ||
# SSH | ||
|
||
```rb | ||
```b | ||
$ ifconfig | ||
$ ifconfig | grep inet | ||
$ ifconfig | grep 'inet ' | awk 'NR==2' | ||
|
@@ -22,7 +19,7 @@ $ ssh level00@$(ifconfig | grep 'inet ' | awk 'NR==2 {print $2}') -p 4242 | |
|
||
- to begin with | ||
|
||
``` | ||
```b | ||
$ ls -l | ||
$ find / -user level00 | ||
$ find / -user level00 2>/dev/null | ||
|
@@ -44,32 +41,21 @@ for i in range(26): | |
print(i, ''.join(chr(a + (ord(c) - a + i) % 26) for c in 'cdiiddwpgswtgt')) | ||
``` | ||
|
||
- swicth to user `flag00` | ||
|
||
```sh | ||
$ su flag00 | ||
Password: nottoohardhere | ||
``` | ||
|
||
# 00 - token | ||
|
||
```j | ||
> x24ti5gi3x0ol2eh4esiuxias | ||
```b | ||
> su flag00 | ||
Password: nottoohardhere | ||
> su level01 | ||
> Password: x24ti5gi3x0ol2eh4esiuxias | ||
``` | ||
|
||
|
||
# 01 | ||
|
||
- use token `x24...` from the last level | ||
|
||
``` | ||
$ su level01 | ||
$ Password: x24ti5gi3x0ol2eh4esiuxias | ||
``` | ||
|
||
- take a look at legacy folder `/etc/passwd` | ||
|
||
``` | ||
```b | ||
$ cat /etc/passwd | ||
$ cat /etc/passwd | grep -i flag01 | awk -F: '{print $2}' | ||
|
@@ -78,14 +64,16 @@ $ cat /etc/passwd | grep -i flag01 | awk -F: '{print $2}' | |
$ john --show <(cat /etc/passwd | grep -i flag01 | awk -F: '{print $2}') | ||
``` | ||
|
||
- get and use `john` on host: | ||
- use our own _`do_john`_ script | ||
|
||
``` | ||
```b | ||
$ chmod +x do_john.sh | ||
$ ./do_john.sh | ||
``` | ||
|
||
OR | ||
- or download and use _`john`_ | ||
|
||
```b | ||
$ wget https://download.openwall.net/pub/projects/john/contrib/macosx/john-1.8.0.9-jumbo-macosx_sse4.zip | ||
$ tar -xvf john-1.8.0.9-jumbo-macosx_sse4.zip | ||
$ cd john-1.8.0.9-jumbo-macosx_sse4 | ||
|
@@ -94,16 +82,27 @@ $ ./john __test | |
$ ./john --show __test | ||
``` | ||
|
||
- VM | ||
# 01 - token | ||
|
||
``` | ||
$ su flag01 | ||
```b | ||
> su flag01 | ||
Password: abcdefg | ||
> su level02 | ||
> Password: f2av5il02puano7naaf6adaaf | ||
``` | ||
|
||
# 01 - token | ||
|
||
```r | ||
> f2av5il02puano7naaf6adaaf | ||
# 02 | ||
|
||
- new stuff | ||
- `realpath` - get the full absolute filepath | ||
- `scp` - secure copy - `scp username@ip:path _local_` | ||
- `~.pcap` - a Packet Capture to store network packet data captured during network traffic monitoring | ||
```b | ||
> ls -l | ||
----r--r-- 1 flag02 level02 level02.pcap | ||
^ which means a regular file | ||
> scp -P 4242 [email protected]:/home/user/level02/level02.pcap $(pwd) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 02 | ||
|
||
- new stuff | ||
- `realpath` - get the full absolute filepath | ||
- `scp` - secure copy - `scp username@ip:path _local_` | ||
- `~.pcap` - a Packet Capture to store network packet data captured during network traffic monitoring | ||
```b | ||
> ls -l | ||
----r--r-- 1 flag02 level02 level02.pcap | ||
^ which means a regular file | ||
> scp -P 4242 [email protected]:/home/user/level02/level02.pcap $(pwd) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
000000D6 00 0d 0a 50 61 73 73 77 6f 72 64 3a 20 ...Passw ord: | ||
000000B9 66 f | ||
000000BA 74 t | ||
000000BB 5f _ | ||
000000BC 77 w | ||
000000BD 61 a | ||
000000BE 6e n | ||
000000BF 64 d | ||
000000C0 72 r | ||
000000C1 7f . | ||
000000C2 7f . | ||
000000C3 7f . | ||
000000C4 4e N | ||
000000C5 44 D | ||
000000C6 52 R | ||
000000C7 65 e | ||
000000C8 6c l | ||
000000C9 7f . | ||
000000CA 4c L | ||
000000CB 30 0 | ||
000000CC 4c L | ||
000000CD 0d . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
infile = [[n[-2], n[-1]] for n in [_.split() for _ in open(0).read().split('\n') if len(_.split()) == 3]] | ||
res = '' | ||
for i, line in enumerate(infile): | ||
print('line/', line, 'i/', i) | ||
l, r = line | ||
if l == '7f': | ||
res = res[:-1] | ||
elif r != '.': | ||
res += r | ||
else: | ||
assert(l == '0d') | ||
print('res/', res) | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
# tokens | ||
|
||
```b | ||
level00 level00 | ||
flag00 nottoohardhere | ||
level01 x24ti5gi3x0ol2eh4esiuxias | ||
flag01 abcdefg | ||
|