QQ空间登录全解析
一. 首先访问QQ空间手机版。
手机版提交的参数会少些 方便我们分析。
https://m.qzone.com/ 这个地址会有一个302跳转 而且这个域名是没有任何参数的 所以日后操作会很方便 访问这个页面的主要目的也就是为了要cookie而已
二.检查账号。
正常操作会自动进行这一步骤 主要目的是为了检查账号是不是需要验证码。https://ssl.ptlogin2.qq.com/check?pt_tea=2&uin=用户名&appid=549000929&ptlang=2052®master=&pt_uistyle=9&r=0.10075433968427405&pt_jstoken=2421886501 这里的r是随机值 后面的jstoken经过测试 好像没有什么意义 随便给什么值都可以通过.
ptui_checkVC('0','!ZWR','\x00\x00\x00\x00\x16\x11\xab\x6e','f39cd53543fb2ce73b3c228ad53cf165326bbda1057cad2e200a62e3590cf92e75fb81c3de6fd9758291de82cb506c320a1eca7a71482e80','2')
第一个0代表不需要验证码,如果是1代表需要验证码 会走另一个流程.第二个参数和第三个参数会带入到密码加密中进行运算.
三.登录。
密码加密分析.
首先使用firefox 输入地址m.qqzone.com 点击 点击登录
可以看到如上函数
因为他中间会各种跳 反正最后的位置会在这里 像下面那个submit 不管是pc还是移动端都是一样的几乎
至于这个移动端的详细跟踪路径 如果有同学跟踪出来的希望可以留个言 学习下
持续跟随后发现 我们来到这里
可能有的朋友看到这里会感觉乱 这个正常 我为什么知道这个地方呢 因为pc端和手机端的提交函数是一样的 分析pc端的时候 知道 提交函数是叫submit
然后可以看到 这个就是加密函数了
window = {};
window.$ = {}
window.$pt ={};
var navigator = {};
navigator.appName = "navigator";
navigator.appVersion = "5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Mobile Safari/537.36";
$ = window.$ || {},
$pt = window.$pt || {},
$.RSA = $pt.RSA = function() {
function t(t, e) {
return new a(t,e)
}
function e(t, e) {
if (e < t.length + 11)
return uv_alert("Message too long for RSA"),
null;
for (var n = new Array, o = t.length - 1; o >= 0 && e > 0; ) {
var i = t.charCodeAt(o--);
n[--e] = i
}
n[--e] = 0;
for (var r = new Y, p = new Array; e > 2; ) {
for (p[0] = 0; 0 == p[0]; )
r.nextBytes(p);
n[--e] = p[0]
}
return n[--e] = 2,
n[--e] = 0,
new a(n)
}
function n() {
this.n = null,
this.e = 0,
this.d = null,
this.p = null,
this.q = null,
this.dmp1 = null,
this.dmq1 = null,
this.coeff = null
}
function o(e, n) {
null != e && null != n && e.length > 0 && n.length > 0 ? (this.n = t(e, 16),
this.e = parseInt(n, 16)) : uv_alert("Invalid RSA public key")
}
function i(t) {
return t.modPowInt(this.e, this.n)
}
function r(t) {
var n = e(t, this.n.bitLength() + 7 >> 3);
if (null == n)
return null;
var o = this.doPublic(n);
if (null == o)
return null;
var i = o.toString(16);
return 0 == (1 & i.length) ? i : "0" + i
}
function a(t, e, n) {
null != t && ("number" == typeof t ? this.fromNumber(t, e, n) : null == e && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, e))
}
function p() {
return new a(null)
}
function s(t, e, n, o, i, r) {
for (; --r >= 0; ) {
var a = e * this[t++] + n[o] + i;
i = Math.floor(a / 67108864),
n[o++] = 67108863 & a
}
return i
}
function c(t, e, n, o, i, r) {
for (var a = 32767 & e, p = e >> 15; --r >= 0; ) {
var s = 32767 & this[t]
, c = this[t++] >> 15
, u = p * s + c * a;
s = a * s + ((32767 & u) << 15) + n[o] + (1073741823 & i),
i = (s >>> 30) + (u >>> 15) + p * c + (i >>> 30),
n[o++] = 1073741823 & s
}
return i
}
function u(t, e, n, o, i, r) {
for (var a = 16383 & e, p = e >> 14; --r >= 0; ) {
var s = 16383 & this[t]
, c = this[t++] >> 14
, u = p * s + c * a;
s = a * s + ((16383 & u) << 14) + n[o] + i,
i = (s >> 28) + (u >> 14) + p * c,
n[o++] = 268435455 & s
}
return i
}
function l(t) {
return st.charAt(t)
}
function d(t, e) {
var n = ct[t.charCodeAt(e)];
return null == n ? -1 : n
}
function h(t) {
for (var e = this.t - 1; e >= 0; --e)
t[e] = this[e];
t.t = this.t,
t.s = this.s
}
function f(t) {
this.t = 1,
this.s = t < 0 ? -1 : 0,
t > 0 ? this[0] = t : t < -1 ? this[0] = t + DV : this.t = 0
}
function g(t) {
var e = p();
return e.fromInt(t),
e
}
function w(t, e) {
var n;
if (16 == e)
n = 4;
else if (8 == e)
n = 3;
else if (256 == e)
n = 8;
else if (2 == e)
n = 1;
else if (32 == e)
n = 5;
else {
if (4 != e)
return void this.fromRadix(t, e);
n = 2
}
this.t = 0,
this.s = 0;
for (var o = t.length, i = !1, r = 0; --o >= 0; ) {
var p = 8 == n