【逆向Flutter系列】 91**厂 核心解密逆向

很久没发帖子了, 上次发帖分享一下iOS 2023年如何上架html5包和VPN包的技巧,结果不但没有人赞反而还啰里八嗦的,这次分享给需要的人提供一些思路和参考吧。 首先贴一下app的下载地址:https://zpc91.com/ 估计很多人知晓也看过 :grinning:

App是通过Flutter做的,网络协议以及图片(base64后)都是通过AES加密,首先贴出来解密实现PHP 逻辑具体效果:https://www.gpt666.online/91/ZhiPian91.php 另外这个app在宣传的时候通过iOS证书webclip的方式直接在桌面生成flutter web app,体验还是蛮好的。然后我自己做了一个测试地址:https://www.gpt666.online/91/

由于都是flutter写的App,通过网络抓取协议,改二进制,然后重新打包,动态调试,然后再解密一些列操作后

核心具体解密代码如下:

<?php


function request_post($url, $data, $headers)
{

    echo "-----------Http Request--------------<br>";
    echo $url . "<br>";
    for ($i = 0; $i < count($headers); $i++) {
        echo $headers[$i] . "<br>";
    }
    echo "<br>";
    echo $data . "<br>";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
    $res = curl_exec($ch);
    curl_close($ch);
    return $res;
}

function request_GET($url, $headers)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSLCERTTYPE, "P12");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
    $res = curl_exec($ch);
    curl_close($ch);//关闭
    return $res;

}

//$key: 2acf7e91e9864673  $iv: 1c29882d3ddfcfd6
function data_encrypt($input)
{
    $key = base64_decode("MmFjZjdlOTFlOTg2NDY3Mw==");
    
    $iv = base64_decode("MWMyOTg4MmQzZGRmY2ZkNg==");
    // echo '$key: '.$key.'  ';
    // echo '$iv: '.$iv;
    return base64_encode(openssl_encrypt($input, 'AES-128-CBC', $key, $options = OPENSSL_RAW_DATA,
        $iv));
}

function data_decrypt($data)
{
    $key = base64_decode("MmFjZjdlOTFlOTg2NDY3Mw==");
    $iv = base64_decode("MWMyOTg4MmQzZGRmY2ZkNg==");
    // echo '$key: '.$key.'  ';
    // echo '$iv: '.$iv; 
    return openssl_decrypt(base64_decode($data), 'AES-128-CBC', $key, $options = OPENSSL_RAW_DATA, $iv);
}

function get_sign($input_data)
{
    return md5(hash("sha256", $input_data));
}


function decrypt_image($image_data)
{
    $key = base64_decode("ZjVkOTY1ZGY3NTMzNjI3MA==");
    $iv = base64_decode("OTdiNjAzOTRhYmMyZmJlMQ==");
    return openssl_decrypt($image_data, 'AES-128-CBC', $key, $options = OPENSSL_RAW_DATA, $iv);
}


function decrypt_video($video_data,$key,$iv)
{
    // $key = base64_decode("ZjVkOTY1ZGY3NTMzNjI3MA==");
    // $iv = base64_decode("OTdiNjAzOTRhYmMyZmJlMQ==");
    
    return openssl_decrypt($video_data, 'AES-128-CBC', $key, $options = OPENSSL_RAW_DATA, $iv);
}


function http_test()
{
              //https://api3.zpcpjapi.com/api.php/api/mv/list_construct
    $req_url = "https://api3.zpcpjapi.com/api.php/api/mv/list_construct";
    $nowTime = time();
    $data = '{"oauth_id":"2f23cbb03fc20c233a4c607ccc6aa53f","bundleId":"com.pwa.zpcpj","version":"1.0.0","oauth_type":"web","language":"zh","via":"pwa","token":"","id":4,"_hash":1672635505,"page":200,"limit":15}';
    $data = data_encrypt($data);
    $sign = get_sign("client=pwa&data=" . $data . "&timestamp=" . $nowTime . "5589d41f92a597d016b037ac37db243d");
    $req_data = "client=pwa&timestamp=" . $nowTime . "&data=" . $data . "&sign=" . $sign;
    $reqHeader = ["accept: */*", "accept-language: zh-CN,zh;q=0.9,en;q=0.8", "content-type: application/x-www-form-urlencoded;charset=utf-8",
        "origin: https://p1.zpc007.co", "pragma: no-cache", "referer: https://p1.zpc007.co/", "user-agent: Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36"
        , 'sec-ch-ua-platform: "Android"', "sec-fetch-dest: empty", "sec-fetch-mode: cors", "sec-fetch-site: cross-site"
        , "sec-ch-ua-mobile: ?1", 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"'];
    return request_post($req_url, $req_data, $reqHeader);
}

$test_data = "O2W6C/bX+Cz10KiKZRSYlfFO+BxIBeswqM6FpmlXSngUb0PGvaseio8LgygTppVmaOAuy5XiLvI3lELQYLco+mZlsTIdFSpXCmApNFQWGCfufqkbGdJVG8D2uwfChe/WrzCi8wICP6K4VJe92oiM3T07LuEpZ72hi+rPLVGcfaTF4o0YOEezPBPvEArn26+wTj+6LS8/uvJ48nbPP/ifMePb1wPDgJMCLDgfSnL55hzCdzg/Ni7QDdT8rbUFiKnOameITNpYBWJvBQyV0GXTQg==";
$test_data = "9qfw63xRd4Y8opv3Ej6IkbH5Q2T/CN/f8YQ0+wcFQm/BOugKHLv2WNKWuDJhvN3h2oHcTAij7oxhqcBv6MvP0TomCk/j7fV5N7u9C1W+E5K4+0/Ht2xJPRWxLBbutw0PykCGpjDqpp7itdMJret9qoieOmtHzP6LoWf5HQYmd+ctj4i0bm1gBCr9ws2aUGKmO+BaXB0Fvb0V/np6kPG+0TrGdF4Q8WMMdv5Me7d+CXWz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data . "</p>";
echo "<h4>解密结果:</h4><p style=word-break:break-all>" . data_decrypt($test_data) . "</p>";
echo "<h4>加密结果:</h4><p style=word-break:break-all>" . data_encrypt(data_decrypt($test_data)) . "</p>";

$test_sign_data = "client=pwa&data=NYbiVdgLAZQ5JzjQfEF86bnZ0b8zeVmIAgRcBdvl+oqiaTusVgEEkKKdSifjDhQ3Z+o/am5EHvkYF5QIOsCScI+s8lm7hVRkNpjjlM1pATSk+pnzfDkX2oj2KQwTyPdd6E7iJN2YHLlo77pNXiSEx8AsUY9wdNPdaWqphNQK8yOv9l47RG12oMVZLyEsXxx7Q/vIVFBHZ7QpCWpDmXuRYw4u10gLzpgYIqGhVdXo2kmlK5nMaozGZ7hELPUfrNK9FOoChVVWvMvOZEHbH+Q1fA==&timestamp=16726572015589d41f92a597d016b037ac37db243d";
echo "<h4>Sign计算结果:</h4><p style=word-break:break-all>" . get_sign($test_sign_data) . "</p>";

//请求实例
$response_text = http_test();

echo "<h4>请求返回:</h4><p style=word-break:break-all>" . $response_text . "</p>";
$res_data = json_decode($response_text, true)["data"];
echo "<h4>解密响应数据:</h4><p style=word-break:break-all>" . data_decrypt($res_data) . "</p>";

//解密图片
echo "获取图片:<br>";
//$image_url = "https://new.cnzuqiu.mobi/new/upload/20220727/2022072720021873683!720x0.jpeg";
$image_url="https://new.cnzuqiu.mobi/new/xiao/20230103/2023010314535191347.jpg";
//$image_url = "https://long.fuhuida.ltd//watch8/742c57263839a9e449c48554c48e9f4d/742c57263839a9e449c48554c48e9f4d.m3u8?auth_key=1672665154-0-0-2b0143e306feb3ec348283e60cd91417";
 $reqHeader = ["accept: */*", "accept-language: zh-CN,zh;q=0.9,en;q=0.8", "content-type: application/x-www-form-urlencoded;charset=utf-8",
    "origin: https://p1.zpc007.co", "pragma: no-cache", "referer: https://p1.zpc007.co/", "user-agent: Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36"
    , 'sec-ch-ua-platform: "Android"', "sec-fetch-dest: empty", "sec-fetch-mode: cors", "sec-fetch-site: cross-site"
    , "sec-ch-ua-mobile: ?1", 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"'];
$image=base64_encode(decrypt_image(request_GET($image_url, $reqHeader)));
echo $image;
echo '<img src="data:image/jpg;base64,'.$image.'"></img>';

//解密 视频
echo "获取Video:<br>";
$videom3u8 = 'https://a.jiebaoshipin.xyz/watch8/742c57263839a9e449c48554c48e9f4d/crypt.key?auth_key=1671003585-0-0-0d812acd44a5a826b84a65014ec9f0c5';
$videoKey = base64_encode(request_GET($videom3u8,$reqHeader)); //decrypt_video
echo $videoKey;
$videoIV = base64_encode('0xca308434975cf10e76eb7759df273769');

$videTS ='https://a.jiebaoshipin.xyz/watch8/742c57263839a9e449c48554c48e9f4d/742c57263839a9e449c48554c48e9f4d1.ts?auth_key=1671003585-0-0-b98af2b38482c59e9f6b09450b0b65fd';
// $ts = request_GET($videTS,$reqHeader);
// echo $ts;

?>

具体视频抓去Python脚本:

import requests
import time, os
import hashlib
import base64
from Cryptodome.Cipher import AES




# 获取key  ,二进制流格式
key=requests.get('https://a.jiebaoshipin.xyz/watch8/742c57263839a9e449c48554c48e9f4d/crypt.key?auth_key=1671003585-0-0-0d812acd44a5a826b84a65014ec9f0c5').content
cryptkey = base64.b64encode(key).decode()
print(key)
print(cryptkey)

 # iv是一个二进制字符串,没有明确说明就按照这个写即可,注意位数
iv=b'0000000000000000'
# 获取aes对象,key已获取
cipher = AES.new(key, AES.MODE_CBC, iv)
# 进行解密,res1就是媒体流(二进制)字符串
res1=requests.get('https://a.jiebaoshipin.xyz/watch8/742c57263839a9e449c48554c48e9f4d/742c57263839a9e449c48554c48e9f4d17.ts?auth_key=1671003585-0-0-551e1d2781585f420fe874ecf5cc04bc').content
plain_data = cipher.decrypt(res1)

with open('hebing1.ts','ab+') as w:
     w.write(plain_data) # 写入解密后的内容

# 获取key  ,二进制流格式,key的地址具体网站自己看
# res=requests.get('https://a.jiebaoshipin.xyz/watch8/742c57263839a9e449c48554c48e9f4d/crypt.key?auth_key=1671003585-0-0-0d812acd44a5a826b84a65014ec9f0c5').content
# for i in res:
#     try:
#       print(i)
#         # res1 = requests.get(i,timeout=5).content
#         # iv=b'0000000000000000'
#         # # 获取aes对象
#         # cipher = AES.new(key, AES.MODE_CBC, iv)
#         # # 进行解密
#         # plain_data = cipher.decrypt(res1)
#         # with open('合并.ts','ab+') as w:
#         #     w.write(plain_data) # 写入解密后的内容
#     except:
#         pass



# cryptkey22 = base64.b64encode("U1MjU1M0FDOUZ.Qz").decode()
# #print(cryptkey22)
# key2="U1MjU1M0FDOUZ.Qz"
# cipher2=AES.new(cryptkey22, AES.MODE_CBC, iv)
# plain_data22 = cipher2.decrypt("guy/obBxg2XaqJkOyjVNgMhWkLdOukPXYLjARLp7gsY9HucfBQOTfYLxq09QKIfqHGa3a1CLqLjylJL1PTd4CtnD4NeX50zH4dWFCaRdJs9I4AFCbsK8QidPmSp346s8gN+yXhiDZkVADFsn0YWIsQ==")
# print(plain_data22)

由于这个站点质量太大,爬下来的资源TS文件太大了,资源不齐全,后面我给你们介绍下haosexiansheng 的抓取和解密。

2 个赞

hjh,论坛看片指日可待

有木有具体的分析过程,俺不是为了看片(如果你信),只是想系统学习一下Flutter App的分析方法 :grin:

去年写过一个,

插件在这
https://github.com/DKJone/DKVideoPlayer

1 个赞

已拜读 :hand_with_index_finger_and_thumb_crossed: