Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新的 line 廣告 url 的問題 #3

Open
gslin opened this issue Jan 26, 2024 · 3 comments
Open

新的 line 廣告 url 的問題 #3

gslin opened this issue Jan 26, 2024 · 3 comments

Comments

@gslin
Copy link

gslin commented Jan 26, 2024

https://gw.line.naver.jp/PUSH/1/subs 抓到對應的 request (這個是在 mitmproxy 上抓到的,這邊拿掉各種敏感資訊):

,]3:tls;4:true!5:error;0:~5:state;1:0#3:via;0:~11:tls_version;7:TLSv1.3;15:tls_established;4:true!19:timestamp_tls_setup;18:1706191172.3337116^19:timestamp_tcp_setup;18:1706191172.2877367^15:timestamp_start;18:1706191172.2457783^13:timestamp_end;18:1706191177.5038645^14:source_address;58:38:2001:b011:3808:6484:5b7:4be1:9c77:344e;5:46558#1:0#1:0#]3:sni;16:gw.line.naver.jp;10:ip_address;40:22:;3:443#1:0#1:0#]2:id;36:;4:alpn;2:h2,7:address;26:16:gw.line.naver.jp;3:443#]}11:client_conn;537:10:proxy_mode;7:regular;11:cipher_list;0:]11:alpn_offers;5:2:h2,]16:certificate_list;0:]3:tls;4:true!5:error;0:~8:sockname;24:13:192.168.2.250;4:3128#]5:state;1:0#11:tls_version;7:TLSv1.3;14:tls_extensions;0:]15:tls_established;4:true!19:timestamp_tls_setup;18:1706191172.3454676^15:timestamp_start;18:1706191172.2441373^13:timestamp_end;18:1706191177.5033572^3:sni;16:gw.line.naver.jp;8:mitmcert;0:~2:id;36:;11:cipher_name;22:TLS_AES_256_GCM_SHA384;4:alpn;2:h2,7:address;25:13:192.168.2.251;5:53756#]}5:error;0:~2:id;36:;}6358:4:type;4:http;7:version;2:18#9:websocket;0:~8:response;0:~7:request;992:4:path;18:/PUSH/1/subs?m=932,9:authority;16:gw.line.naver.jp,6:scheme;5:https,6:method;4:POST,4:port;3:443#4:host;16:gw.line.naver.jp;13:timestamp_end;0:~15:timestamp_start;18:1706191172.3470674^8:trailers;0:~7:content;0:~7:headers;728:48:18:x-line-application,22:IOS 13.21.0▷iOS 16.7.4,]48:10:user-agent,30:Line/13.21.0 iPhone10,1 16.7.4,]22:5:x-lal,10:zh-Hant_TW,]593:13:x-line-access,571:12:http_version;8:HTTP/2.0,}17:timestamp_created;18:1706191172.3471413^7:comment;0:;8:metadata;0:}6:marked;9::default:;9:is_replay;0:~11:intercepted;5:false!11:server_conn;4463:4:via2;0:~11:cipher_list;0:]11:cipher_name;22:TLS_AES_256_GCM_SHA384;11:alpn_offers;5:2:h2,]16:certificate_list;3818:2252:-----BEGIN CERTIFICATE-----

他的 reponse 裡面包括了廣告的 icon99[.]tw,這邊遮掉 tracking parameters:

{"deployVersion":"lgfp_v3.5.0.23.11.06.0","rid":"x","t":1706191172397,"lang":"zh-Hant","ads":[{"mid":"x","searchid":"@icon99.tw","type":"TA","uaid":"x","exp":600,"prod":"201","vfmt":"SMARTCH-IMAGE","adformat":1,"infotype":1,"link":{"curl":"#","ctrac":["https://a.line.me/er/lads/v1/ei?x"],"ebp":0,"action":2},"tit":{"id":2001,"txt":

上面是第一波在掃的時候掃到的。

另外一個是用 app 內建的 inspector 抓的 (我用 Quantumult X),抓到 https://obs.line-scdn.net/0hGH9Iy1WIGGcEMAuqNYVnMFdgExY3XQ9kZEgFWiB1OgtKQQwyXxc8Z0JsLgtSXgpTUx02Z2B2OQ9CAT5XWAoCZCB5LhxwQw1qbh0oZ2N7FjF7RiRtYl4rcQ 這樣的 image request,點開來看以後可以看到廣告,這邊沒找到是從哪個 HTTPS request 傳進來的,應該是 HTTPS MITM 沒有涵蓋到...

我把這兩個擋掉後是沒看到問題,不過剛剛在 telegram 上面看到你說後面擋圖片這組好像會出狀況...

@jkgtw
Copy link
Owner

jkgtw commented Jan 26, 2024

早上試了一下 https://gw.line.naver.jp/PUSH/1/subs 這條擋掉的話,LINE 的新對話會整個更新不出來

obs 那個廣告我目前是沒遇到,也暫時沒觀察到有其他廣告跳出來
或者先用下面這條針對 GH 開頭的封鎖看看?

^https:\/\/obs\.line-scdn\.net\/0h.+\/(o|m|GH)\d+x\d+$

@gslin
Copy link
Author

gslin commented Jan 26, 2024

早上試了一下 https://gw.line.naver.jp/PUSH/1/subs 這條擋掉的話,LINE 的新對話會整個更新不出來

這個差異蠻有趣的,我這邊是沒問題的... 我現在想到可能的差異有 Quantumult X 對 Surge,以及 iOS 16 對 iOS 17?(我還在用 iPhone 8)

obs 那個廣告我目前是沒遇到,也暫時沒觀察到有其他廣告跳出來 或者先用下面這條針對 GH 開頭的封鎖看看?
^https:\/\/obs\.line-scdn\.net\/0h.+\/(o|m|GH)\d+x\d+$

我貼的連結裡面沒有 /,所以不會 match 到你說的這條,不過應該是要找哪個 API call 傳回來的,而不是擋圖片的部分才對... 我再去研究一下 mitmproxy 這邊怎麼玩。

@jkgtw
Copy link
Owner

jkgtw commented Jan 26, 2024

早上試了一下 https://gw.line.naver.jp/PUSH/1/subs 這條擋掉的話,LINE 的新對話會整個更新不出來

這個差異蠻有趣的,我這邊是沒問題的... 我現在想到可能的差異有 Quantumult X 對 Surge,以及 iOS 16 對 iOS 17?(我還在用 iPhone 8)

LINE 的版本不知道也會不會有差

obs 那個廣告我目前是沒遇到,也暫時沒觀察到有其他廣告跳出來 或者先用下面這條針對 GH 開頭的封鎖看看?
^https:\/\/obs\.line-scdn\.net\/0h.+\/(o|m|GH)\d+x\d+$

我貼的連結裡面沒有 /,所以不會 match 到你說的這條,不過應該是要找哪個 API call 傳回來的,而不是擋圖片的部分才對... 我再去研究一下 mitmproxy 這邊怎麼玩。

哈好的,我沒注意到寫錯了,那我另外加一行好了,感謝!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants