IDF实验室CTF题解——WEB(更新中,已完成5/7)

IDF实验室CTF训练营-WEB

题解

1 一种编码而已

老题,复制粘贴到console里运行,其实是js代码。

key:WCTF{H3110_J0t4er}


2 你关注最新的漏洞吗

下载发现是一个数据包,格式转换成pcap格式。
使用WireShark打开之,发现四个包。
协议不熟,查之发现是kerberos
查了一下协议以及题中提示的漏洞。
第一反应是用漏洞原理破解这个包中的密文找到key之类的。

后发现漏洞编号就是答案= =

是在下输了

key:wctf{MS14-068}


3 简单的js解密

查看源代码:

function pseudoHash(string, method) {
  // Default method is encryption
  if (!('ENCRYPT' == method || 'DECRYPT' == method)) {
    method = 'ENCRYPT';
  }
  // Run algorithm with the right method
  if ('ENCRYPT' == method) {
    // Variable for output string
    var output = '';
    // Algorithm to encrypt
    for (var x = 0, y = string.length, charCode, hexCode; x < y; ++x) {
      charCode = string.charCodeAt(x);
      if (128 > charCode) {
        charCode += 128;
      } else if (127 < charCode) {
        charCode -= 128;
      }
      charCode = 255 - charCode;
      hexCode = charCode.toString(16);
      if (2 > hexCode.length) {
        hexCode = '0' + hexCode;
      }

      output += hexCode;
    }
    // Return output
    return output;
  } else if ('DECRYPT' == method) {
    // DECODE MISS
    // Return ASCII value of character
    return string;
  }
}
document.getElementById('password').value = pseudoHash('4e4a1a4e4d4d1a474c461b191b1e1e481c1a4649464a4c4919464b1e1a1c1949', 'DECRYPT');
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值