MCPcopy Index your code
hub / github.com/c0ny1/jsEncrypter

github.com/c0ny1/jsEncrypter @0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.3.2 ↗ · + Follow
614 symbols 1,112 edges 31 files 4 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

jsEncrypter

本插件使用phantomjs调用前端加密函数对数据进行加密,方便对加密数据输入点进行fuzz。

0x01 插件编译

安装好maven,然后执行以下命令即可编译成功:

mvn package

0x02 插件安装

加载

加载

0x03 插件使用

3.1 运行靶机

项目提供了一个用php编写的靶机(jsEncrypter/server),靶机提供了7个算法对密码进行加密后传输,后台解密,最后进行密码匹配。

  • base64
  • md5
  • sha1
  • sha254
  • sha384
  • sha512
  • RSA

靶机

3.2 编写phantomJS运行脚本

jsEncrypter/js/jsEncrypter_base.js为插件phantomJS脚本模板。我们只需要将实现加密算法的js文件引入模板脚本,并在模板脚本的js_encrypt函数体中完成对加密函数的调用。

......
......
......
// 加载实现加密算法的js脚本
var wasSuccessful = phantom.injectJs('xxx.js');/*引入实现加密的js文件*/

// 处理函数
function js_encrypt(payload){
    var newpayload;
    /**********在这里编写调用加密函数进行加密的代码************/

    /**********************************************************/
    return newpayload;
}
......
......
......

项目jsEncrypter/server/TestScript目录下是编写好的对应靶机各个加密算法的phantomJS脚本,可以参考!

3.3 运行phantomJS并测试

运行phantomJS

>phantomJS.exe jsEncrypter_sha1.js 

测试的目的是为了确保我们编写的phantomJS脚本能够正常加密payload。

运行phantomJS并测试

3.4 抓包暴力破解

抓包暴力破解

0x04 相关文章

Core symbols most depended-on inside this repo

X64Word_create
called by 81
test/TestScript/sha384/crypto-js.js
X64Word_create
called by 81
test/TestScript/sha512/crypto-js.js
X64Word_create
called by 81
test/TestScript/sha256/crypto-js.js
X64Word_create
called by 81
test/webapp/js/crypto-js.js
nbi
called by 37
test/TestScript/RSA/jsencrypt.js
nbi
called by 37
test/webapp/js/jsencrypt.js
parseBigInt
called by 19
test/TestScript/RSA/jsencrypt.js
parseBigInt
called by 19
test/webapp/js/jsencrypt.js

Shape

Function 575
Method 34
Class 5

Languages

TypeScript93%
Java6%
PHP1%

Modules by API surface

test/webapp/js/jsencrypt.js141 symbols
test/TestScript/RSA/jsencrypt.js141 symbols
test/webapp/js/jquery-3.2.1.min.js86 symbols
test/webapp/js/crypto-js.js25 symbols
test/TestScript/sha512/crypto-js.js25 symbols
test/TestScript/sha384/crypto-js.js25 symbols
test/TestScript/sha256/crypto-js.js25 symbols
test/webapp/js/md5.js20 symbols
test/TestScript/md5/md5.js20 symbols
test/TestScript/des/des.js19 symbols
test/webapp/js/sha1.js17 symbols
test/TestScript/sha1/sha1.js17 symbols

For agents

$ claude mcp add jsEncrypter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact