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

BSK是怎么生成出来的. #3

Open
alcule31 opened this issue Apr 19, 2020 · 4 comments
Open

BSK是怎么生成出来的. #3

alcule31 opened this issue Apr 19, 2020 · 4 comments

Comments

@alcule31
Copy link

大佬,请问一下,raw.js 这个脚本与BSK参数的生成有关吗,

@alcule31
Copy link
Author

大佬,我之前在逆向BSK时候,很浅,生成出的BSK参数不对.所以我想向您请教一下这个BSK参数生成的流程.好让我明晰哪里出了差错 @8qwe24657913

@bigtrace
Copy link

bigtrace commented Dec 2, 2020

当然有关系。
假设deobf.js 是对的话(按照issue1里面百度的那个哥们说法,deobf.js可能会有些小bug)
BSK的值是从line162-218,里面对应的各种function随机打乱顺序加密而来的。它跟你的tbs,各种window obj的属性(比如window.screen.height,window.navigator.userAgent 等等) 都有关系。你要是直接用headless agent/nodejs去跑这个deobf.js,, 你可以把这些function里面的attribute都给override成你用浏览器去run出来的值,(记得跳过line133-139),这样百度就不会发现你了。

@bigtrace
Copy link

bigtrace commented Dec 2, 2020

你还可以在deobf.js的基础上自己加几个逆向function, 然后可以把任意一个bsk值给convert成对应的string,如果你能成功转成line162-218里对应的各种function的key-value pair,你就知道你的bsk符合要求了。

@bigtrace
Copy link

我做了一个在线的解析bsk或者转bsk成明文的工具:http://www.baidubsk.site
仅供个人学习使用。

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