当前位置:网站首页>A failed cracking experience
A failed cracking experience
2022-07-28 15:52:00 【I'm not a code God】
Entrusted by others , Want to go to a website “ get ” Live video stream on it , And make use of , Although it finally failed , But the cracking process is still worth sharing with you , Hope to inspire you .
Live video streaming is nothing more than RTMP Protocol encapsulated Flv perhaps mp4, perhaps HLS, Of course, there is my unique technology (websocket Transmit raw data , adopt js Decode and play ). However, the technology encountered this time is very tricky , It ended in failure .
chrome Open the live screen of the website , Don't talk much ,F12 Call up the console , Locate the live screen Dom Elements , At first glance, it's a Flash Elements , Key parameters passed Flashvars Pass to flash, These parameters are passed in clear text , It's mainly userId,videoId. It seems to be going well .
If it is Flash player , Then the following way is to decompile . take out 10 The tools found in the hoard in have fallen behind , A lot of searches on the Internet , Found a free powerful tool , open swf file , There is no confusion , Code at a glance . It seems to be going well .
Not much code , After careful analysis , It was found that RTMPE Agreement to play . Although I have specialized in Flash And live video , But I really didn't study RTMPE agreement , This is a RTMP A variation of the agreement , stay RMTP The protocol is encrypted . This encryption doesn't matter , Another verification work was also done , It bothered me all day .
Before the video is played , The player also did one thing to guard against theft . Now let me explain in detail .
1. stay RTMPE After connecting to the server successfully ——NetConnection.Connect.Success
2. adopt RPC A method was called GetLive, This method returns a ByteArray object ———— It can be understood as binary stream
3. Put the binary object load To Loader And allow it to access the parent SWF Code permissions for
Here's a little explanation , This operation is Flash Load another Flash The process of ,Loader Object can be loaded directly swf Of URL, Or load a binary object directly from memory as described above , Such passage RTMPE Agreed RPC Mode to transmit a SWF The binary format of is quite hidden , And because of RTMPE Encryption of the Protocol , So you can't know this operation process by capturing packets .
I simulate this process , Before disconnecting , adopt fileReference Object will this ByteArray Objects are stored on the hard disk . Then open it through the decompile tool , See this SWF Source code of the document . In this source code, it does such an operation
4. This is loaded SWF It carries a string , And take this string as RPC The method name of initiates the request again , And get the actual name of the video stream from the server .
5. Lord SWF Play the video through the name of this video stream
The above process is fully understood , The following is the cracking process . First, decompile SWF Make local modifications , Intended to remove some of these visual elements ( through RPC Back to ByteArray Loaded onto the screen ), As long as I modified SWF, The connection will be disconnected soon . So I just wrote a new one myself Flash player , But the same fate .
On baidu search RTMPE、bing search 、 Over the wall Google search , There is not much information .
the second day , Continue to study , As far as I can guess , The server must be right SWF The document itself is verified , If two files are different, even if one byte is different , So the file Hash It must be different . This is the principle of many download tools for verification . Then I opened it Adobe Check the official article RTMPE Description of the agreement , See light suddenly :FMS You can use RTMPE Protocol pair swf Document validation , If not specified swf The client file will reject the connection .
So can you forge a client , Send verification information ? In theory , But you need to understand FlashPlayer Encryption process and generation principle of verification information . even so , We also need to solve dynamic loading SWF The problem of , That needs to be realized FlashPlayer The main function of , Such a workload is almost unrealistic . So the website has effectively resisted people like me who want to crawl its resources through these methods . I am willing to bow to the disadvantage .
边栏推荐
- Matlab does not overwrite importing Excel
- 活动速递| Apache Doris 性能优化实战系列直播课程初公开,诚邀您来参加!
- File and directory operations (5)
- Software architecture and design (VIII) -- distributed architecture
- 在OBS上进行H265推流
- 1路编码器2路DI转速测量RS485串口连接1路DO报警模块IBF151
- [live broadcast reservation] a new challenge under the evolution of data architecture - Shanghai railway station
- Software architecture and design (x) -- Architecture Technology
- 数牍 X Rust,那些不得不说的事
- monkey压力测试
猜你喜欢

Communication between client and server based on rsocket protocol

Duty cycle switch output high speed pulse counter rtumodbus module ibf63

Using SYSTEMd to manage services

FTP文件传输协议

Flowable workflow all business concepts

比例电磁阀控制阀4-20mA转0-165mA/330mA信号隔离放大器

【直播预约】数据架构演进下的新挑战——上海站

活动速递| Apache Doris 性能优化实战系列直播课程初公开,诚邀您来参加!

PXE network installation
![[channel attention mechanism] senet](/img/e6/261ca0ae5a38c26e74de27d90993f7.jpg)
[channel attention mechanism] senet
随机推荐
如何通过adb打开和关闭飞行模式
Docker容器实现MySQL主从复制
电压频率的变换原理
5路DI/DO继电器输出远程IO采集模块Modbus TCP/IBF95
Among the three "difficult and miscellaneous diseases" of machine learning, causal learning is the breakthrough | Liu Li, Chongqing University
记项目 常用js方法
About the pictures inserted in the word document, only the following part is displayed
玩死原型链
Software architecture and design (I) -- key principles
Rxdart is used instead of stateful in fluent
Duty cycle switch output high speed pulse counter rtumodbus module ibf63
编码器高速脉冲计数器Modbus RTU模块IBF150
Software architecture and design (IX) -- component based architecture
Framework定制系列(十)-----SystemUI定制状态栏statusbar和导航栏navigationbar教程
Software architecture and design (VII) -- interactive architecture
Easyexcel complex header export (one to many)
Shell programming specifications and variables
跟我学Rx编程——Concat
5-channel di/do relay output remote IO acquisition module Modbus tcp/ibf95
数牍 X Rust,那些不得不说的事