zu1k / Good-MITM

Rule-based MITM engine. Rewriting, redirecting and rejecting on HTTP(S) requests and responses, supports JavaScript rule.
https://good-mitm.zu1k.com
MIT License
801 stars 102 forks source link

[Bug] 是否已经失效了? #71

Closed lthero-big closed 6 months ago

lthero-big commented 6 months ago

Verify steps

Version

latest

What OS are you seeing the problem on?

No response

Rule file

- name: "netflix"
  mitm: "*.netflix.com"
  filters:
    url-regex: '^https:\/\/(www\.)?netflix\.com'
  actions:
    - modify-request:
        cookie:
          key: NetflixId
          value: **********
    - modify-request:
        cookie:
          key: SecureNetflixId
          value: **********
    - modify-response:
        cookie:
          key: NetflixId
          remove: true
    - modify-response:
        cookie:
          key: SecureNetflixId
          remove: true

log

[2024-05-09T06:50:10Z INFO  good_mitm] Http Proxy listen on: http://127.0.0.1:34567
[2024-05-09T06:50:58Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:50:58Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:00Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:00Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:02Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:02Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:08Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:08Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:12Z INFO  good_mitm_rule::handler] [Response] 403 Forbidden www.netflix.com unknown
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:12Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:14Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:14Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:16Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:16Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/
[2024-05-09T06:51:17Z INFO  good_mitm_rule::handler] [Response] 302 Found www.netflix.com text/html
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/browse
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/browse
[2024-05-09T06:51:17Z INFO  good_mitm_rule::handler] [Response] 200 OK www.netflix.com text/html; charset=utf-8
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:17Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:18Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/service-worker.js
[2024-05-09T06:51:18Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/service-worker.js
[2024-05-09T06:51:18Z INFO  good_mitm_rule::handler] [Response] 403 Forbidden www.netflix.com unknown
[2024-05-09T06:51:18Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:18Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:19Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/nq/website/memberapi/v5133bbf4/pathEvaluator?webp=true&drmSystem=widevine&isVolatileBillboardsEnabled=true&isTop10Supported=true&isTop10KidsSupported=true&hasVideoMerchInBob=true&hasVideoMerchInJaw=true&falcor_server=0.1.0&withSize=true&materialize=true&original_path=%2Fshakti%2Fmre%2FpathEvaluator
[2024-05-09T06:51:19Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/nq/website/memberapi/v5133bbf4/pathEvaluator?webp=true&drmSystem=widevine&isVolatileBillboardsEnabled=true&isTop10Supported=true&isTop10KidsSupported=true&hasVideoMerchInBob=true&hasVideoMerchInJaw=true&falcor_server=0.1.0&withSize=true&materialize=true&original_path=%2Fshakti%2Fmre%2FpathEvaluator
[2024-05-09T06:51:19Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/nq/website/memberapi/v5133bbf4/pathEvaluator?webp=true&drmSystem=widevine&isVolatileBillboardsEnabled=true&isTop10Supported=true&isTop10KidsSupported=true&hasVideoMerchInBob=true&hasVideoMerchInJaw=true&method=call&falcor_server=0.1.0&withSize=true&materialize=true&original_path=%2Fshakti%2Fmre%2FpathEvaluator
[2024-05-09T06:51:19Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/nq/website/memberapi/v5133bbf4/pathEvaluator?webp=true&drmSystem=widevine&isVolatileBillboardsEnabled=true&isTop10Supported=true&isTop10KidsSupported=true&hasVideoMerchInBob=true&hasVideoMerchInJaw=true&method=call&falcor_server=0.1.0&withSize=true&materialize=true&original_path=%2Fshakti%2Fmre%2FpathEvaluator
[2024-05-09T06:51:20Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/api/ftl/probe?monotonic=false&device=web&iter=0
[2024-05-09T06:51:20Z INFO  good_mitm_rule] [ModifyRequest] https://www.netflix.com/api/ftl/probe?monotonic=false&device=web&iter=0
[2024-05-09T06:51:20Z INFO  good_mitm_rule::handler] [Response] 403 Forbidden www.netflix.com unknown
[2024-05-09T06:51:20Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:20Z INFO  good_mitm_rule] [ModifyResponse] 
[2024-05-09T06:51:20Z INFO  good_mitm_rule::handler] [Response] 200 OK www.netflix.com application/json

Description

NetflixId和SecureNetflixId都填写正确,开启服务后,可以打开netflix.com并且确实可以登录上,但登录过几秒后就显示403无权访问,随后netflix就跳转到clearcookies的网址,log如下 [2024-05-09T06:51:32Z INFO good_mitm_rule] [ModifyRequest] https://www.netflix.com/clearcookies [2024-05-09T06:51:32Z INFO good_mitm_rule] [ModifyRequest] https://www.netflix.com/clearcookies

zu1k commented 6 months ago

This is just a demo. Write your own rule. Capture and analysis traffic when necessary.