我的路由器配置页面的客户端散列方法中使用的XML对象是什么?

发布于 2025-01-22 00:18:50 字数 1417 浏览 0 评论 0原文

payload = {
    'Username': 'admin',
    'Password': 'e451cc1e5885cae5bec2640cf40c7ee6cc09010ddc6f897963641fa63d6852be',
    'action': 'login',
    '_sessionTOKEN': '510252081095712727960760'
}

当我尝试登录路由器的配置页面时,这是带有我的发布请求发送的有效载荷(该页面 /a>)带有用户名的凭据“ admin”和“ 1”的密码。因此,显然,密码与SHA256(互联网上的哈希分析仪说)进行了哈希,但是SHA256(“ 1”)与上面的'密码'值不符。稍后,我检查了源HTML,并在<脚本之间找到了此

function g_loginToken(xml) {
    var xmlObj = $(xml).text();
    var Password = $("#Frm_Password").val();
    var SHA256Password = sha256(Password + xmlObj);
    var LoginFormObj = new webSubmitForm();
    LoginFormObj.addParameter("Username", $("#Frm_Username").val());
    LoginFormObj.addParameter("Password", SHA256Password);
    LoginFormObj.addParameter("action", "login");
    LoginFormObj.addParameter("_sessionTOKEN", "313949915505130291199244");
    LoginFormObj.Form.submit();
    Password = undefined;
    SHA256Password = undefined;
}

方法)与某些XML对象连接,该对象作为参数传递给G_Logintoken函数。我不知道XML对象是什么,也许我会预测我的请求标头序列化为XML,而我不知道我的要求。帮助您表示赞赏。

编辑:这是通过@andrejkesely的建议,在设置断点定义的断点后的“ XML”和“ XMLOBJ”变量的样子 我仍然不知道这些值代表什么。

payload = {
    'Username': 'admin',
    'Password': 'e451cc1e5885cae5bec2640cf40c7ee6cc09010ddc6f897963641fa63d6852be',
    'action': 'login',
    '_sessionTOKEN': '510252081095712727960760'
}

This is the payload sent with my POST request when I try to login my router's configuration page (which is at http://192.168.1.1) with the credentials "admin" for username and "1" for the password. So obviously password gets hashed with sha256 (hash analyzers on internet told so) but sha256("1") doesn't match the 'Password' token above. Later on I inspected the source HTML and found this method between <script></script> tags:

function g_loginToken(xml) {
    var xmlObj = $(xml).text();
    var Password = $("#Frm_Password").val();
    var SHA256Password = sha256(Password + xmlObj);
    var LoginFormObj = new webSubmitForm();
    LoginFormObj.addParameter("Username", $("#Frm_Username").val());
    LoginFormObj.addParameter("Password", SHA256Password);
    LoginFormObj.addParameter("action", "login");
    LoginFormObj.addParameter("_sessionTOKEN", "313949915505130291199244");
    LoginFormObj.Form.submit();
    Password = undefined;
    SHA256Password = undefined;
}

If i'm not mistaken the password I provide (which is "1" in this particular case) gets concatenated with some XML object which is passed as a parameter to the g_loginToken function. I don't know what would the XML object be, perhaps I'd predict like my request headers serialized as XML, further than that I have no idea. Help is appreciated.

Edit: Here is how the "xml" and "xmlObj" variables look like after setting a breakpoint where they get defined, by the advice from @AndrejKesely
I still don't know what these values represent though.

screenshot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想你的星星会说话 2025-01-29 00:18:50
  • 从此处获得http:// {router_ip}/function_module/login_module/login_page/logintoken_lua.lua?_= {unix_time}至少在我的router上。
    我在请求中未经Unix时间的情况下进行了测试,并且产生了一个无效的令牌。
  • 它用于盐,使彩虹表无用,也可以防止重播攻击,因为盐/令牌将在下一个登录请求中发生变化。
  • 对于您的特定路由器,您可以运行Wireshark以找到所需的信息。
  • 要计算盐的SHA256,您必须执行SHA256(密码+login_token)
  • Obtained from here http://{router_ip}/function_module/login_module/login_page/logintoken_lua.lua?_={unix_time} at least on my router.
    I tested without passing unix time in the request and it generated a token which didn't work.
  • It is used for salting which renders rainbow tables useless, also prevents replay attacks because the salt/token will change on the next request for login.
  • For your specific router you can run wireshark to find the information needed.
  • To calculate the salted sha256 you have to do sha256(password+login_token)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文