or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
CVE & Demo
Author: Sean 韋詠祥
Slide: https://tg.pe/sdy
講者介紹
現任經歷
Grafana
Path Traversal / CVE-2021-43798
CVSS Score: 7.5 (High)
Fix Commit
Please refer to "
grafana/grafana@c798c0e
".Why?
It's not safe to use "
filepath.Join
" for user input.What is "
Rel
"?Returns a relative path that is equivalent to
targpath
when joined tobasepath
with an/
.Return error if
targpath
can't be made relative tobasepath
.How to fix it?
Check if it's relative path before
Try it!
Get "
/flag
" using skill you learn.Hint: Use "
curl --path-as-is
" to preserve "../
" path.Apache 2.4.49
Path Traversal / CVE-2021-41773

CVSS Score: 7.5 (High)
Fix Commit
Looks familar?
We could use "
%2e
" or "%2E
" to exploit it.Try it!
The flag is located in "
/flag
" file.Apache 2.4.50 (Hum?)
Path Traversal / CVE-2021-42013
CVSS Score: 9.8 (Critical)
Why?
Let's review previous security patch.
Fix Commit
Assert "
%
" will follow by two "[0-9a-f]
" char.Try it!
Use "
%%32%65
" to double encode.elFinder (zip)
Command Injection / CVE-2021-32682
CVSS Score: 9.8 (Critical)
How to use
zip
commandThere are more options…
Fix Commit
Add
./
before filename.How to run arbitrary code?
We could leverage
zip -TT
option.Try it!
Hint: File name could be "
-v hello.zip
".Thanks
Any questions?
Links
Log4j
JNDI Injection / CVE-2021-44228
CVSS Score: 10.0 (Critical)
Homework: http://sqlab.nycu.dev:44228/
Fix Commit: apache/logging-log4j2@c77b3cb