Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/nuoxoxo/cfo into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoxoxo committed Nov 16, 2024
2 parents e920cb0 + ee87ffd commit 015f8e9
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
```b
flag00 nottoohardhere
level01 x24ti5gi3x0ol2eh4esiuxias
flag01 abcdefg
level02 f2av5il02puano7naaf6adaaf
flag02 ft_waNDReL0L
level03 kooda2puivaav1idi4f57q8iq
```


Expand Down Expand Up @@ -98,11 +102,43 @@ Password: abcdefg
- `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
### VM
> 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)
### Host
> hexdump -C level02.pcap
> xxd level02.pcap
> xxd level02.pcap | grep -i pass -A10 -B10
> xxd level02.pcap | cut -d ' ' -f2-9 | tr -d ' ' 👈 get midfields
```

- use Wireshark
- _Analyze - Follow - TCP Stream_ - copy _TCP Stream_ to text

```py
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)

# ft_waNDReL0L
```

# 02 - token

> su flag02
Password: ft_waNDReL0L
> su level03
> Password: kooda2puivaav1idi4f57q8iq
34 changes: 34 additions & 0 deletions level02/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,44 @@
- `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
### VM
> 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)
### Host
> hexdump -C level02.pcap
> xxd level02.pcap
> xxd level02.pcap | grep -i pass -A10 -B10
> xxd level02.pcap | cut -d ' ' -f2-9 | tr -d ' ' 👈 get midfields
```

- use Wireshark
- _Analyze - Follow - TCP Stream_ - copy _TCP Stream_ to text

```py
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)

# ft_waNDReL0L
```

# 02 - token

```b
> su flag02
Password: ft_waNDReL0L
> su level03
> Password: kooda2puivaav1idi4f57q8iq
```
4 changes: 4 additions & 0 deletions tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
```b
flag00 nottoohardhere
level01 x24ti5gi3x0ol2eh4esiuxias
flag01 abcdefg
level02 f2av5il02puano7naaf6adaaf
flag02 ft_waNDReL0L
level03 kooda2puivaav1idi4f57q8iq
```

0 comments on commit 015f8e9

Please sign in to comment.