@shriyanss/js-recon 1.1.0-beta.4 → 1.1.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +7 -1
- package/CHANGELOG.md +11 -0
- package/README.md +24 -12
- package/build/globalConfig.js +1 -1
- package/build/lazyLoad/index.js +5 -2
- package/build/lazyLoad/index.js.map +1 -1
- package/build/lazyLoad/next_js/next_GetLazyResourcesBuildManifestJs.js +62 -0
- package/build/lazyLoad/next_js/next_GetLazyResourcesBuildManifestJs.js.map +1 -0
- package/build/lazyLoad/next_js/{next_GetLazyResources.js → next_GetLazyResourcesWebpackJs.js} +4 -4
- package/build/lazyLoad/next_js/next_GetLazyResourcesWebpackJs.js.map +1 -0
- package/build/strings/index.js.map +1 -1
- package/build/techDetect/index.js +3 -3
- package/build/techDetect/index.js.map +1 -1
- package/package.json +1 -1
- package/build/lazyLoad/next_js/next_GetLazyResources.js.map +0 -1
- package/docs/CNAME +0 -1
- package/docs/README.md +0 -20
- package/docs/api-gateway.md +0 -68
- package/docs/endpoints.md +0 -49
- package/docs/example-scenario.md +0 -258
- package/docs/interactive-mode.md +0 -81
- package/docs/lazyload.md +0 -56
- package/docs/map.md +0 -53
- package/docs/robots.txt +0 -2
- package/docs/run.md +0 -54
- package/docs/strings.md +0 -75
|
@@ -30,6 +30,12 @@ jobs:
|
|
|
30
30
|
registry-url: https://registry.npmjs.org/
|
|
31
31
|
- run: npm ci
|
|
32
32
|
- run: npm run build
|
|
33
|
-
-
|
|
33
|
+
- name: Publish to npm
|
|
34
|
+
run: |
|
|
35
|
+
TAG="latest"
|
|
36
|
+
[[ "$VERSION" == *"beta"* ]] && TAG="beta"
|
|
37
|
+
[[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
|
|
38
|
+
npm publish --tag $TAG
|
|
34
39
|
env:
|
|
35
40
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
41
|
+
VERSION: ${{ github.event.release.tag_name }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.1.0 - 2025.07.18
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Detect next in servers in which src includes '/\_next/' rather than just startsWith
|
|
8
|
+
- Detect webpack chunks in \_buildManifest.js
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
3
14
|
## 1.1.0-beta.4 - 2025.07.09
|
|
4
15
|
|
|
5
16
|
### Added
|
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
     
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://js-recon.io">
|
|
7
|
+
<img src="https://js-recon.io/img/js-recon-logo.png" alt="JS Recon Logo" width="100">
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
5
11
|
A powerful tool for JavaScript reconnaissance. `js-recon` helps you discover, download, and analyze JavaScript files to uncover endpoints, secrets, and other valuable information from any web application running supported frameworks
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
@@ -14,6 +20,14 @@ To install the tool globally, run:
|
|
|
14
20
|
npm i -g @shriyanss/js-recon
|
|
15
21
|
```
|
|
16
22
|
|
|
23
|
+
For detailed installation and setup process, please refer to the [Installation page](https://js-recon.io/docs/docs/installation)
|
|
24
|
+
|
|
25
|
+
## Framework Support
|
|
26
|
+
|
|
27
|
+
The features in JS Recon tool are built after thorough research on apps running different frameworks.
|
|
28
|
+
|
|
29
|
+
Please refer to the [Framework Support](https://js-recon.io/docs/docs/framework-support) page for detailed information on feature compatibility across different frameworks.
|
|
30
|
+
|
|
17
31
|
## Quick Start
|
|
18
32
|
|
|
19
33
|
```bash
|
|
@@ -34,16 +48,14 @@ js-recon run -u https://app.example.com
|
|
|
34
48
|
|
|
35
49
|
`js-recon` provides a suite of commands for comprehensive JavaScript analysis. For detailed usage and examples, please refer to its full documentation.
|
|
36
50
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `api-gateway` | Manages AWS API Gateway for IP rotation to bypass rate limits. | [Read Docs](./docs/api-gateway.md) |
|
|
46
|
-
| `run` | Runs all analysis modules automatically on a target. | [Read Docs](./docs/run.md) |
|
|
51
|
+
| Command | Description | Documentation |
|
|
52
|
+
| ------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
53
|
+
| `lazyload` | Downloads dynamically loaded JavaScript files from a target. | [Read Docs](https://js-recon.io/docs/docs/modules/lazyload) |
|
|
54
|
+
| `endpoints` | Extracts API endpoints and client-side paths from JS files. | [Read Docs](https://js-recon.io/docs/docs/modules/endpoints) |
|
|
55
|
+
| `strings` | Extracts strings, URLs, and potential secrets from JS files. | [Read Docs](https://js-recon.io/docs/docs/modules/strings) |
|
|
56
|
+
| `map` | Maps function calls and analyzes code, with optional AI-powered descriptions. | [Read Docs](https://js-recon.io/docs/docs/modules/map) |
|
|
57
|
+
| `api-gateway` | Manages AWS API Gateway for IP rotation to bypass rate limits. | [Read Docs](https://js-recon.io/docs/docs/modules/api-gateway) |
|
|
58
|
+
| `run` | Runs all analysis modules automatically on a target. | [Read Docs](https://js-recon.io/docs/docs/modules/run) |
|
|
47
59
|
|
|
48
60
|
## Key Features
|
|
49
61
|
|
|
@@ -55,8 +67,8 @@ js-recon run -u https://app.example.com
|
|
|
55
67
|
|
|
56
68
|
## Example Scenario
|
|
57
69
|
|
|
58
|
-
Refer to [this page](
|
|
70
|
+
Refer to [this page](https://js-recon.io/docs/docs/example-scenarios/next-js) where an example scenario of running this tool against a Next.JS target is demonstrated.
|
|
59
71
|
|
|
60
72
|
## Documentation
|
|
61
73
|
|
|
62
|
-
For detailed guides, command options, and advanced usage examples, please check out the
|
|
74
|
+
For detailed guides, command options, and advanced usage examples, please check out the JS Recon Site at https://js-recon.io
|
package/build/globalConfig.js
CHANGED
package/build/lazyLoad/index.js
CHANGED
|
@@ -17,7 +17,8 @@ import { URL } from "url";
|
|
|
17
17
|
// Next.js
|
|
18
18
|
import subsequentRequests from "./next_js/next_SubsequentRequests.js";
|
|
19
19
|
import next_getJSScript from "./next_js/next_GetJSScript.js";
|
|
20
|
-
import
|
|
20
|
+
import next_GetLazyResourcesWebpackJs from "./next_js/next_GetLazyResourcesWebpackJs.js";
|
|
21
|
+
import next_getLazyResourcesBuildManifestJs from "./next_js/next_GetLazyResourcesBuildManifestJs.js";
|
|
21
22
|
// Nuxt.js
|
|
22
23
|
import nuxt_getFromPageSource from "./nuxt_js/nuxt_getFromPageSource.js";
|
|
23
24
|
import nuxt_stringAnalysisJSFiles from "./nuxt_js/nuxt_stringAnalysisJSFiles.js";
|
|
@@ -87,7 +88,8 @@ const lazyLoad = (url, output, strictScope, inputScope, threads, subsequentReque
|
|
|
87
88
|
// find the JS files from script of the webpage
|
|
88
89
|
const jsFilesFromScriptTag = yield next_getJSScript(url);
|
|
89
90
|
// get lazy resources
|
|
90
|
-
const lazyResourcesFromWebpack = yield
|
|
91
|
+
const lazyResourcesFromWebpack = yield next_GetLazyResourcesWebpackJs(url);
|
|
92
|
+
const lazyResourcesFromBuildManifest = yield next_getLazyResourcesBuildManifestJs(url);
|
|
91
93
|
let lazyResourcesFromSubsequentRequests;
|
|
92
94
|
if (subsequentRequestsFlag) {
|
|
93
95
|
// get JS files from subsequent requests
|
|
@@ -100,6 +102,7 @@ const lazyLoad = (url, output, strictScope, inputScope, threads, subsequentReque
|
|
|
100
102
|
let jsFilesToDownload = [
|
|
101
103
|
...(jsFilesFromScriptTag || []),
|
|
102
104
|
...(lazyResourcesFromWebpack || []),
|
|
105
|
+
...(lazyResourcesFromBuildManifest || []),
|
|
103
106
|
...(lazyResourcesFromSubsequentRequests || []),
|
|
104
107
|
];
|
|
105
108
|
// Ensure js_urls from globals are included if next_getJSScript or next_getLazyResources populated it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lazyLoad/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,UAAU;AACV,OAAO,kBAAkB,MAAM,sCAAsC,CAAC;AACtE,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lazyLoad/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,UAAU;AACV,OAAO,kBAAkB,MAAM,sCAAsC,CAAC;AACtE,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,8BAA8B,MAAM,6CAA6C,CAAC;AACzF,OAAO,oCAAoC,MAAM,mDAAmD,CAAC;AAErG,UAAU;AACV,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,0BAA0B,MAAM,yCAAyC,CAAC;AACjF,OAAO,aAAa,MA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eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import chalk from "chalk";
|
|
11
|
+
import * as globals from "../globals.js";
|
|
12
|
+
import makeRequest from "../../utility/makeReq.js";
|
|
13
|
+
import parser from "@babel/parser";
|
|
14
|
+
import _traverse from "@babel/traverse";
|
|
15
|
+
const traverse = _traverse.default;
|
|
16
|
+
const next_getLazyResourcesBuildManifestJs = (url) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
// get the JS URLs
|
|
18
|
+
const foundUrls = globals.getJsUrls();
|
|
19
|
+
let toReturn = [];
|
|
20
|
+
let buildManifestUrl = "";
|
|
21
|
+
// iterate over them, and find the build manifest
|
|
22
|
+
for (const jsUrl of foundUrls) {
|
|
23
|
+
if (jsUrl.endsWith("_buildManifest.js")) {
|
|
24
|
+
buildManifestUrl = jsUrl;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (buildManifestUrl === "") {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
// get the contents of that
|
|
32
|
+
let buildManifestContent = yield (yield makeRequest(buildManifestUrl, {})).text();
|
|
33
|
+
// parse it with babel parser
|
|
34
|
+
const ast = parser.parse(buildManifestContent, {
|
|
35
|
+
sourceType: "unambiguous",
|
|
36
|
+
plugins: ["jsx", "typescript"],
|
|
37
|
+
errorRecovery: true,
|
|
38
|
+
});
|
|
39
|
+
let strings = [];
|
|
40
|
+
traverse(ast, {
|
|
41
|
+
StringLiteral(path) {
|
|
42
|
+
strings.push(path.node.value);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
// iterate over the strings, and find the chunks
|
|
46
|
+
for (const stringTxt of strings) {
|
|
47
|
+
if (stringTxt.includes("static/chunks/")) {
|
|
48
|
+
// a chunk is found
|
|
49
|
+
// bui;d the relative URL
|
|
50
|
+
const foundUrl = new URL(`../../${stringTxt}`, buildManifestUrl)
|
|
51
|
+
.href;
|
|
52
|
+
globals.pushToJsUrls(foundUrl);
|
|
53
|
+
toReturn.push(foundUrl);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (toReturn.length > 0) {
|
|
57
|
+
console.log(chalk.green(`[✓] Found ${toReturn.length} JS files from _buildManifest.js`));
|
|
58
|
+
}
|
|
59
|
+
return toReturn;
|
|
60
|
+
});
|
|
61
|
+
export default next_getLazyResourcesBuildManifestJs;
|
|
62
|
+
//# sourceMappingURL=next_GetLazyResourcesBuildManifestJs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next_GetLazyResourcesBuildManifestJs.js","sourceRoot":"","sources":["../../../src/lazyLoad/next_js/next_GetLazyResourcesBuildManifestJs.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;AAEnC,MAAM,oCAAoC,GAAG,CACzC,GAAW,EACY,EAAE;IACzB,kBAAkB;IAClB,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,C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AC5B,CAAC;IACL,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CACP,KAAK,CAAC,KAAK,CACP,aAAa,QAAQ,CAAC,MAAM,kCAAkC,CACjE,CACJ,CAAC;IACN,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAA,CAAC;AAEF,eAAe,oCAAoC,CAAC"}
|
package/build/lazyLoad/next_js/{next_GetLazyResources.js → next_GetLazyResourcesWebpackJs.js}
RENAMED
|
@@ -27,7 +27,7 @@ import * as globals from "../../utility/globals.js";
|
|
|
27
27
|
* absolute URLs pointing to JavaScript files found in require.ensure()
|
|
28
28
|
* functions, or undefined if no webpack JS is found.
|
|
29
29
|
*/
|
|
30
|
-
const
|
|
30
|
+
const next_GetLazyResourcesWebpackJs = (url) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
31
|
const browser = yield puppeteer.launch({
|
|
32
32
|
headless: true,
|
|
33
33
|
});
|
|
@@ -71,7 +71,7 @@ const next_getLazyResources = (url) => __awaiter(void 0, void 0, void 0, functio
|
|
|
71
71
|
if (!webpack_js) {
|
|
72
72
|
console.log(chalk.red("[!] No webpack JS file found"));
|
|
73
73
|
console.log(chalk.magenta(CONFIG.notFoundMessage));
|
|
74
|
-
return; // Return undefined as per JSDoc
|
|
74
|
+
return []; // Return undefined as per JSDoc
|
|
75
75
|
}
|
|
76
76
|
// parse the webpack JS file
|
|
77
77
|
const res = yield makeRequest(webpack_js, {});
|
|
@@ -199,5 +199,5 @@ const next_getLazyResources = (url) => __awaiter(void 0, void 0, void 0, functio
|
|
|
199
199
|
}
|
|
200
200
|
return final_urls;
|
|
201
201
|
});
|
|
202
|
-
export default
|
|
203
|
-
//# sourceMappingURL=
|
|
202
|
+
export default next_GetLazyResourcesWebpackJs;
|
|
203
|
+
//# sourceMappingURL=next_GetLazyResourcesWebpackJs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AAW,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC9C,aAAa,EAAE,CAAC;gBACpB,CAAC;YACL,CAAC;QACL,CAAC;QAED,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,aAAa,UAAU,CAAC,CAAC,CAAC;QACnE,CAAC;IACL,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -32,15 +32,15 @@ const checkNextJS = ($) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
32
32
|
const srcSet = $(el).attr("srcset");
|
|
33
33
|
const imageSrcSet = $(el).attr("imageSrcSet");
|
|
34
34
|
if (src || srcSet || imageSrcSet) {
|
|
35
|
-
if (src && src.
|
|
35
|
+
if (src && src.includes("/_next/")) {
|
|
36
36
|
detected = true;
|
|
37
37
|
evidence = `${tag} :: ${src}`;
|
|
38
38
|
}
|
|
39
|
-
else if (srcSet && srcSet.
|
|
39
|
+
else if (srcSet && srcSet.includes("/_next/")) {
|
|
40
40
|
detected = true;
|
|
41
41
|
evidence = `${tag} :: ${srcSet}`;
|
|
42
42
|
}
|
|
43
|
-
else if (imageSrcSet && imageSrcSet.
|
|
43
|
+
else if (imageSrcSet && imageSrcSet.includes("/_next/")) {
|
|
44
44
|
detected = true;
|
|
45
45
|
evidence = `${tag} :: ${imageSrcSet}`;
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/techDetect/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AACh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,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,CAAC;IACd,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,QAAQ,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,kBAAkB;IAClB,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,oCAAoC;QACpC,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjE,wCAAwC;QACxC,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;QACvE,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC,CAAA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
package/docs/CNAME
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
js-recon.io
|
package/docs/README.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# js-recon Documentation
|
|
2
|
-
|
|
3
|
-
Welcome to the official documentation for `js-recon`, a powerful tool for JavaScript reconnaissance. This documentation provides a comprehensive overview of all available commands and their functionalities.
|
|
4
|
-
|
|
5
|
-
## Available Commands
|
|
6
|
-
|
|
7
|
-
`js-recon` offers the following commands to help you analyze and extract valuable information from JavaScript files:
|
|
8
|
-
|
|
9
|
-
- **[Lazyload](./lazyload.md):** Download all Lazy-Loaded JavaScript files from a target URL or a list of URLs.
|
|
10
|
-
- **[Endpoints](./endpoints.md):** Extract client-side from JavaScript files.
|
|
11
|
-
- **[Strings](./strings.md):** Extract strings, URLs, and secrets from JavaScript files.
|
|
12
|
-
- **[API Gateway](./api-gateway.md):** Configure and manage AWS API Gateway for IP rotation.
|
|
13
|
-
- **[Map](./map.md):** Map and analyze functions within JavaScript files. For Next.js, an [interactive mode](./interactive-mode.md) is also available.
|
|
14
|
-
- **[Run](./run.md):** Run essential modules automatically.
|
|
15
|
-
|
|
16
|
-
Select a command from the list above to view its detailed documentation, including all available options and practical examples.
|
|
17
|
-
|
|
18
|
-
## Example Scenario
|
|
19
|
-
|
|
20
|
-
An example scenario is demonstrated on [this](./example-scenario.md) page. The example assumes the app is using Next.JS.
|
package/docs/api-gateway.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# API Gateway Command
|
|
2
|
-
|
|
3
|
-
The `api-gateway` command is used to configure and manage AWS API Gateway for the purpose of IP address rotation. This configuration is written to `.api_gateway_config.json` by default. This allows you to make requests from a pool of different IP addresses, which can be useful for avoiding rate limiting.
|
|
4
|
-
|
|
5
|
-
Note that the only module which makes HTTP request is `lazyload`. So, the configuration generated by this module will only work there.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
js-recon api-gateway [options]
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Options
|
|
14
|
-
|
|
15
|
-
| Option | Alias | Description | Default | Required |
|
|
16
|
-
| --------------------------- | ----- | --------------------------------------------------------------------- | -------------------------- | -------- |
|
|
17
|
-
| `--init` | `-i` | Initialize the config file and create a new API Gateway. | `false` | No |
|
|
18
|
-
| `--destroy <id>` | `-d` | Destroy the API with the given ID. | | No |
|
|
19
|
-
| `--destroy-all` | | Destroy all APIs created by this tool in all regions. | `false` | No |
|
|
20
|
-
| `--region <region>` | `-r` | AWS region to create the API in. | random region | No |
|
|
21
|
-
| `--access-key <access-key>` | `-a` | AWS access key. Uses `AWS_ACCESS_KEY_ID` env var if not provided. | | No |
|
|
22
|
-
| `--secret-key <secret-key>` | `-s` | AWS secret key. Uses `AWS_SECRET_ACCESS_KEY` env var if not provided. | | No |
|
|
23
|
-
| `--config <config>` | `-c` | Name of the config file (if different from the default) | `.api_gateway_config.json` | No |
|
|
24
|
-
| `--list` | `-l` | List all APIs created by this tool. | `false` | No |
|
|
25
|
-
| `--feasibility` | | Check the feasibility of using API Gateway for a target. | `false` | No |
|
|
26
|
-
| `--feasibility-url <url>` | | URL to check the feasibility of. | | No |
|
|
27
|
-
|
|
28
|
-
## Examples
|
|
29
|
-
|
|
30
|
-
### Initialize API Gateway
|
|
31
|
-
|
|
32
|
-
Create a new API Gateway and save its configuration:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
js-recon api-gateway --init
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### List Created APIs
|
|
39
|
-
|
|
40
|
-
List all the API Gateways that have been created by this tool:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
js-recon api-gateway --list
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Destroy an API
|
|
47
|
-
|
|
48
|
-
Destroy a specific API Gateway using its ID:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
js-recon api-gateway --destroy <api-id>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Destroy All APIs
|
|
55
|
-
|
|
56
|
-
Destroy all APIs created by this tool in all regions:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
js-recon api-gateway --destroy-all
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Check Feasibility
|
|
63
|
-
|
|
64
|
-
Check if a target URL returns a response that contains known traces of firewall. If the result says firewall detected, then it means that the target has blocked the IP addresses originating from the AWS infrastructure.
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
js-recon api-gateway --feasibility --feasibility-url https://example.com
|
|
68
|
-
```
|
package/docs/endpoints.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Endpoints Command
|
|
2
|
-
|
|
3
|
-
The `endpoints` command is used to extract client-side endpoints from a directory of JavaScript files. It identifies potential client-side paths and organizes them for further analysis.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
js-recon endpoints [options]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
| Option | Alias | Description | Default | Required |
|
|
14
|
-
| --------------------------------------- | ----- | ----------------------------------------------------------------------------------- | ----------- | -------- |
|
|
15
|
-
| `--url <url>` | `-u` | Target Base URL (will be used to resolve relative paths). | | Yes |
|
|
16
|
-
| `--directory <directory>` | `-d` | Directory containing JS files. | | Yes |
|
|
17
|
-
| `--output <filename>` | `-o` | Output filename (without file extension). | `endpoints` | No |
|
|
18
|
-
| `--output-format <format>` | | Output format for the results (comma-separated; available: `md`). | `md` | No |
|
|
19
|
-
| `--tech <tech>` | `-t` | Technology used in the JS files (run with `-l`/`--list` to see available options). | | Yes |
|
|
20
|
-
| `--list` | `-l` | List available technologies. | `false` | No |
|
|
21
|
-
| `--subsequent-requests-dir <directory>` | | Directory containing subsequent requests. **Required for Next.JS (`--tech next`)**. | | No |
|
|
22
|
-
|
|
23
|
-
## Examples
|
|
24
|
-
|
|
25
|
-
### Basic Usage
|
|
26
|
-
|
|
27
|
-
Extract endpoints from a directory of JS files, specifying the technology and target URL:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
js-recon endpoints -d /path/to/js-files -t <technology> -u https://example.com
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Specify Output File
|
|
34
|
-
|
|
35
|
-
Extract endpoints and save them to a custom file named `api_paths.md`:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
js-recon endpoints -d /path/to/js-files -t <technology> -u https://example.com -o api_paths
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Next.JS Usage
|
|
42
|
-
|
|
43
|
-
When analyzing a Next.JS application, you must specify the technology as `next` and provide the directory containing subsequent requests. These requests are typically captured during the `lazyload` process. Refer to the [example scenario](./example-scenario.md#subseqent-requests) to know detailed guide on this.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
js-recon endpoints -d /path/to/js-files -t next -u https://example.com --subsequent-requests-dir /path/to/js-files/___subsequent_requests
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
This command will analyze the JavaScript files and the subsequent requests to extract a comprehensive list of client-side paths and API endpoints specific to the Next.JS framework.
|
package/docs/example-scenario.md
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
# Example Scenario of using JS-Recon
|
|
2
|
-
|
|
3
|
-
This document highlights using the modules of JS-Recon individually. All of this can be automated, which can be found at the end of the file in the [Run Module](#run-module).
|
|
4
|
-
|
|
5
|
-
This example assumes that the app is a Next.JS targets. The tool is currently optimized for Next.JS.
|
|
6
|
-
|
|
7
|
-
The `lazyload` module will work on Next.JS, Nuxt.JS, and Svelte apps. All other modules are only expected to work on Next.JS apps.
|
|
8
|
-
|
|
9
|
-
## Table of Contents
|
|
10
|
-
|
|
11
|
-
- [Target](#target)
|
|
12
|
-
- [Initial Recon](#initial-recon)
|
|
13
|
-
- [Downloading JS files](#downloading-js-files)
|
|
14
|
-
- [Finding strings](#finding-strings)
|
|
15
|
-
- [Subseqent Requests](#subseqent-requests)
|
|
16
|
-
- [Getting more with strings analysis](#getting-more-with-strings-analysis)
|
|
17
|
-
- [Getting client-side endpoints](#getting-client-side-endpoints)
|
|
18
|
-
- [Mapping all the functions](#mapping-all-the-functions)
|
|
19
|
-
- [Launching interactive console](#launching-interactive-console)
|
|
20
|
-
- [Run Module](#run-module)
|
|
21
|
-
|
|
22
|
-
## Target
|
|
23
|
-
|
|
24
|
-
The client provides the pentester a wildcard target `*.example.com`
|
|
25
|
-
|
|
26
|
-
## Initial Recon
|
|
27
|
-
|
|
28
|
-
The pentester starts by gathering subdomains for the target, and then uses HTTP probe to filter out all the available HTTP servers.
|
|
29
|
-
|
|
30
|
-
They decide to analyze JavaScript of all the websites to gain access to additional attack surface.
|
|
31
|
-
|
|
32
|
-
## Downloading JS files
|
|
33
|
-
|
|
34
|
-
To download JS files, the pentester can use the [`lazyload` module](./lazyload.md) of the tool. To run this, they can use the following command:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
js-recon lazyload -u https://app.example.com
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
The tool will then analyze the responses from the server, and then download all the JS files it could find. The JS files will be written in the `./output/app.example.com` directory. If the app contains external scripts, then those will be written in the `./output/<domain>` directory.
|
|
41
|
-
|
|
42
|
-
The pentester could get the URL from the top of each file, as the tool writes all the JS files with their source commented on the top
|
|
43
|
-
|
|
44
|
-
_At the time of writing this, the tool is capable of downloading JS files for **Next.JS, Nuxt.JS, and Svelte**. For all other apps, it will download the JS files that are loaded on the webpage_
|
|
45
|
-
|
|
46
|
-
## Finding strings
|
|
47
|
-
|
|
48
|
-
Once the pentester has downloaded all the JS files, the first thing that they would like to do is to analyze all the strings that are found in the app. To do so, they can run the [`strings` module](./strings.md).
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
js-recon strings -d output/app.example.com -e
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Breakdown of the command:
|
|
55
|
-
|
|
56
|
-
- `strings`: Run the module to analyze strings
|
|
57
|
-
- `-d`: Shorthand flag for `--directory`. Defines the directory containing the JS files. If any changes to default values hasn't been done in previous command, it should be `./output/<domain>`
|
|
58
|
-
- `-e`: Shorthand flag for `--extract-urls`. Iterates through all the strings found, and prints any potential URLs or paths by matching against the regex
|
|
59
|
-
- The output for this flag is `extracted_urls.json`
|
|
60
|
-
- In case that the pentester wants to output it as an OpenAPI collection to load in an API client, they can use the `--openapi` flag. It will be written in `extracted_urls-openapi.json`
|
|
61
|
-
|
|
62
|
-
The `extracted_urls.json` has the following structure:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"urls": [
|
|
67
|
-
"https://api.example.com",
|
|
68
|
-
"https://rum.example.com",
|
|
69
|
-
"https://www.example.com",
|
|
70
|
-
"https://app.example.com",
|
|
71
|
-
"https://internal.app.com"
|
|
72
|
-
],
|
|
73
|
-
"paths": [
|
|
74
|
-
"/v1/admin",
|
|
75
|
-
"/v1/dashboard",
|
|
76
|
-
"/v1/members",
|
|
77
|
-
"/v1/report",
|
|
78
|
-
"/v1/settings",
|
|
79
|
-
"/v1/edit"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Subseqent Requests
|
|
85
|
-
|
|
86
|
-
JS-Recon has found that the app is using Next.JS. This framework has a feature that upon sending requests to a valid client-side endpoints along with the `RSC: 1` header, the application returns a response with content type `text/x-component`, which contains more client-side paths and JS files. To get this, the tool requires the `extracted_urls.json` from the strings module, which has been generated in the previous step.
|
|
87
|
-
|
|
88
|
-
To use this method, the pentester can pass the `--subsequent-requests` flag to the lazyload command:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
js-recon lazyload -u https://app.example.com --subsequent-requests
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
By passing this flag, the tool will read the `extracted_urls.json` file, and make HTTP requests accordingly, and then save the files found in the `output/app.example.com` directory.
|
|
95
|
-
|
|
96
|
-
## Getting more with strings analysis
|
|
97
|
-
|
|
98
|
-
Now that the tester has got more JS files, they can run string analysis again. This time, they should pass a few more arguments to the tool:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
js-recon strings -d output/app.example.com -e -p --openapi -s
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Breakdown of additional flags:
|
|
105
|
-
|
|
106
|
-
- `-p`: Shorthand flag for `--permutate`. This will permutate the `urls` and `paths` in the `extracted_urls.json` file. The output will be a plaintext (`.txt`) file called `extracted_urls.txt`
|
|
107
|
-
- `--openapi`: This flag will genetate an output file called `extracted_urls-openapi.json`. This file is based on the `paths` in the `extracted_urls.json`, and can be directly loaded into an API client like [Postman](https://www.postman.com) or [Bruno](https://usebruno.com)
|
|
108
|
-
- `-s`: Shorthand flag for `--scan-secrets`. This will iterate over all the strings found, and match it against regex for popular secrets
|
|
109
|
-
|
|
110
|
-
## Getting client-side endpoints
|
|
111
|
-
|
|
112
|
-
Now that the pentester has got all the JS files and a rough ideation of what the app can do (through string analysis), they can now get the exact client-side endpoints. Apart from unique implementations, there are some common ways a web-app stores client-side endpoints. The tool utilizes the common methods to find the client-side endpoints in the web app.
|
|
113
|
-
|
|
114
|
-
To do so, they can use the `endpoints` module of the tool
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
js-recon endpoints -d output/app.example.com -u https://app.example.com -t next --subsequent-requests-dir output/app.example.com/___subsequent_requests
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Breakdown of the command:
|
|
121
|
-
|
|
122
|
-
- `endpoints`: This module extracts client-side endpoints from the app
|
|
123
|
-
- `-d`: Shorthand flag for `--directory`. Defines the directory in which the JS files are stored for the given target
|
|
124
|
-
- `-u`: Shorthand flag for `--urls`. The URL of the target (the paths found are prepended to it)
|
|
125
|
-
- `-t`: Shorthand flag for `--tech`. Defines the framework (aka tech) that the target is using. It is required to find the suitable methods
|
|
126
|
-
- Run with `-l`/`--list` to see list of supported tech: `js-recon endpoints -l`
|
|
127
|
-
- `--subsequent-requests-dir`: Flag specific to Next.js (`-t next`) targets. Defines the directory containing response texts for requests with `RSC: 1` header. By default, it is `output/<domain>/___subsequent_requests` (triple underscore `_` before `subsequent_requests`)
|
|
128
|
-
|
|
129
|
-
This command will write a file called `endpoints.json`. Following is an example of this file:
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"https://app.example.com": {
|
|
134
|
-
"/": {},
|
|
135
|
-
"/dash": {
|
|
136
|
-
"/dash/clients",
|
|
137
|
-
"/dash/automations",
|
|
138
|
-
"/dash/usage"
|
|
139
|
-
},
|
|
140
|
-
"/settings": {
|
|
141
|
-
"/settings/clients": {
|
|
142
|
-
"/settings/clients/edit",
|
|
143
|
-
"/settings/clients/add"
|
|
144
|
-
},
|
|
145
|
-
"/settings/automations",
|
|
146
|
-
"/settings/usage"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"https://internal.example.com": {
|
|
150
|
-
"/prod": {
|
|
151
|
-
"/prod/env"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Mapping all the functions
|
|
158
|
-
|
|
159
|
-
At this point, the pentester has got an idea of what the app looks like. They have also used the app to see the functionality in action. Now, they suspect that the app contains a secret endpoint. They have seen `https://internal.app.com` in the strings output, but are unsure how it works. They decide to manually analyze the JS files. This is where the `map` modules could help them.
|
|
160
|
-
|
|
161
|
-
They would like to first get all the instances of `fetch()` to know which functions can make the API calls. Apart from this, they would also like to get the AI-generated descriptions for the functions, as it would significantly speed up the process of analyzing the flow of all the functions. To do so, they can run the `map` module of the tool.
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
js-recon map -d output/app.example.com -t next --ai description
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Breakdown of the command:
|
|
168
|
-
|
|
169
|
-
- `map`: Runs the `map` module
|
|
170
|
-
- `-d`: Shorthand flag for `--directory`. Defines the directory of the JS files
|
|
171
|
-
- `-t`: Shorthand flag for `--tech`. Defines the technology (aka framework) used by the app
|
|
172
|
-
- Run with `-l`-/`--list` flag to see a supported frameworks
|
|
173
|
-
- `js-recon map -l`
|
|
174
|
-
- `--ai`: Enable AI parsing. `description` is used as its value, which means that the tool will write descriptions for the functions
|
|
175
|
-
|
|
176
|
-
The pentester can also adjust some AI settings:
|
|
177
|
-
|
|
178
|
-
- `--ai-provider`: AI provider to use
|
|
179
|
-
- `openai` and `ollama` are supported as of writing this
|
|
180
|
-
- `--model`: AI model to use
|
|
181
|
-
- `--openai-api-key`: API key to use for OpenAI
|
|
182
|
-
- The value for environment variable `$OPENAI_API_KEY` will be used if not provided
|
|
183
|
-
- `--ai-threads <threads>`: Number of threads to simultaneously run to generate descriptions
|
|
184
|
-
- Refer to [Organization Limits](https://platform.openai.com/settings/organization/limits) in [OpenAI API Platform](https://platform.openai.com) for limits for your OpenAI Account
|
|
185
|
-
- For Ollama, adjust the value as per capacity of machine running Ollama
|
|
186
|
-
- `--ai-endpoint`: Endpoint to use with AI models
|
|
187
|
-
- Defaults to `https://api.openai.com/v1` for OpenAI
|
|
188
|
-
- Some providers like xAI supported supported using OpenAI SDK to use their models. Refer to their docs to know latest updates
|
|
189
|
-
- Defaults to `http://127.0.0.1:11434` for Ollama
|
|
190
|
-
|
|
191
|
-
## Launching interactive console
|
|
192
|
-
|
|
193
|
-
Now that the pentester has got the mappings of all the functions, they can now use interactive console. To launch it, they can add `-i`/`--interative` flag to the previous command
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
js-recon map -d output/app.example.com -t next --ai description -i
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
_This feature might look complex, so it is recommended to get an overview through the [Interactive Mode Docs](./interactive-mode.md) before reading further_
|
|
200
|
-
|
|
201
|
-
The pentester would first like to get the instances of `fetch()`, so that they can know the sites where an API call could be made. So, they will run the following command in interactive mode:
|
|
202
|
-
|
|
203
|
-
```
|
|
204
|
-
list fetch
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
This will list all the functions that have a fetch function. If the pentester had enabled the AI descriptions, then they could also see a brief of what the function does. Now, they can go to any function that seems suspicious
|
|
208
|
-
|
|
209
|
-
```
|
|
210
|
-
go to 1234
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
By running this command, the tool would clear the output of the interactive mode, and print the code of the function. The tool provides vim like interface and shortcuts. The user can scroll on the function to go either up or down. Also, they can press `Esc`, and then use the arrow keys to navigate. To focus again on the input box, they can press the `i` key. To quit the app, they can press `Esc` and then `q` or `Ctrl-c`
|
|
214
|
-
|
|
215
|
-
Since the pentester prefers to see the function code in the IDE of their choice, they can write this to a separate file. To do so, they can run the following command in the interactive mode:
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
set funcwritefile <filename>
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Now, every time when the `go to <id>` command will be ran, the tool will write the code to the specified file.
|
|
222
|
-
Once they open it in the IDE of their choice, they can go to the instances of fetch by finding it through `C-f` in the IDE. Once they find an instance, they could manually reverse engineer the full request.
|
|
223
|
-
|
|
224
|
-
To assist in doing the same, they used the following commands:
|
|
225
|
-
|
|
226
|
-
- `list all`: Lists all the functions, their descriptions, and the file they are found in
|
|
227
|
-
- `trace <functionName>`: This lists all the other function that the given function imports, as well as the functions to which this is being exported
|
|
228
|
-
- For example, a function required to modify the UI, so it will import those function, and hence they will be listed as imports
|
|
229
|
-
- This function is called at multiple places, which are listed as exports
|
|
230
|
-
- `go back`: This will take the pentester to the previous function they viewed
|
|
231
|
-
- `go ahead`: This will take the pentester to the next function they viewed (should work if they used `go back`)
|
|
232
|
-
|
|
233
|
-
## Run Module
|
|
234
|
-
|
|
235
|
-
If this process seems tidious (which it is), the pentester can use the `run` module of the tool. It will:
|
|
236
|
-
|
|
237
|
-
- [Download all the JS files](#downloading-js-files)
|
|
238
|
-
- [Find all the strings](#finding-strings)
|
|
239
|
-
- [Check for subsequent requests if required](#subseqent-requests)
|
|
240
|
-
- [Run string analysis again](#getting-more-with-strings-analysis)
|
|
241
|
-
- [Get all client-side endpoints](#getting-client-side-endpoints)
|
|
242
|
-
- [Map all the functions](#mapping-all-the-functions)
|
|
243
|
-
|
|
244
|
-
Here's what it will **NOT** do:
|
|
245
|
-
|
|
246
|
-
- Understand the output files to build a good attack vector
|
|
247
|
-
- The pentester can fuzz the `paths` from the `strings` module on multiple hosts
|
|
248
|
-
- They can see the UI on the client-side paths found by `endpoints` module
|
|
249
|
-
- They can come up with new methods to get the most from the output of different modules
|
|
250
|
-
- Completely resolve all the requests (it would go as deep as possible, but couldn't fully resolve some requests as of writing this)
|
|
251
|
-
|
|
252
|
-
The docs for the `run` module can be found [here](./run.md)
|
|
253
|
-
|
|
254
|
-
The pentester could now automate the mentioned steps by running the following command:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
js-recon run -u https://app.example.com --secrets --ai description
|
|
258
|
-
```
|
package/docs/interactive-mode.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Interactive Mode for Next.js Maps
|
|
2
|
-
|
|
3
|
-
The interactive mode for Next.js maps provides a terminal-based interface to explore and analyze the functions within your Next.js application. This guide will walk you through the features and commands available in this mode.
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
To launch the interactive mode, run the following command:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
js-recon map <other options> -i
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## User Interface
|
|
14
|
-
|
|
15
|
-
The interactive mode interface is composed of three main components:
|
|
16
|
-
|
|
17
|
-
- **Title Box**: Displays the title "JS Recon Interactive Mode".
|
|
18
|
-
- **Output Box**: Shows the output of commands and function information. You can scroll through this box using the arrow keys when it's in focus.
|
|
19
|
-
- **Input Box**: This is where you type your commands.
|
|
20
|
-
|
|
21
|
-
## Keybindings
|
|
22
|
-
|
|
23
|
-
The following keybindings are available for navigation and control:
|
|
24
|
-
|
|
25
|
-
| Key | Description |
|
|
26
|
-
| --------------- | ----------------------------------------------------------------------------------------------------- |
|
|
27
|
-
| `Ctrl+C` or `q` | Exit the interactive mode (when not in the input box). To exit from the input box, press `Esc` first. |
|
|
28
|
-
| `i` | Focus the input box. |
|
|
29
|
-
| `o` | Focus the output box. |
|
|
30
|
-
| `Esc` | When in the input box, focuses the output box. |
|
|
31
|
-
| `Up Arrow` | In the input box, navigate to the previous command. |
|
|
32
|
-
| `Down Arrow` | In the input box, navigate to the next command. |
|
|
33
|
-
| `Up Arrow` | In the output box, scroll up. |
|
|
34
|
-
| `Down Arrow` | In the output box, scroll down. |
|
|
35
|
-
|
|
36
|
-
## Commands
|
|
37
|
-
|
|
38
|
-
Here is a list of available commands and their usage:
|
|
39
|
-
|
|
40
|
-
### `help`
|
|
41
|
-
|
|
42
|
-
Displays the help menu with a list of all available commands.
|
|
43
|
-
|
|
44
|
-
### `exit`
|
|
45
|
-
|
|
46
|
-
Exits the interactive mode.
|
|
47
|
-
|
|
48
|
-
### `clear`
|
|
49
|
-
|
|
50
|
-
Clears the content of the output box.
|
|
51
|
-
|
|
52
|
-
### `list`
|
|
53
|
-
|
|
54
|
-
Lists different types of information. Usage: `list <option>`
|
|
55
|
-
|
|
56
|
-
- `list fetch`: Lists all functions that contain `fetch` instances.
|
|
57
|
-
- `list all`: Lists all functions found in the application.
|
|
58
|
-
- `list nav`: Lists your function navigation history.
|
|
59
|
-
|
|
60
|
-
### `go`
|
|
61
|
-
|
|
62
|
-
Navigates between functions. Usage: `go <option>`
|
|
63
|
-
|
|
64
|
-
- `go to <functionID>`: Displays the code for a specific function.
|
|
65
|
-
- `go back`: Navigates to the previously viewed function.
|
|
66
|
-
- `go ahead`: Navigates to the next function in your history.
|
|
67
|
-
|
|
68
|
-
### `set`
|
|
69
|
-
|
|
70
|
-
Sets configuration options. Usage: `set <option> <value>`
|
|
71
|
-
|
|
72
|
-
- `set funcwritefile <filename>`: Update the file location where function code will be written when using the `go to` command.
|
|
73
|
-
- `set writeimports [true/false]`: When using `go *` command, also write all the imports of the function to the file
|
|
74
|
-
- `set funcdesc <functionId>`: Set the description of the provided function ID with provided value
|
|
75
|
-
- Example: `set funcdesc 1234 This function does something fishy`
|
|
76
|
-
- This will set the description to `This function does something fishy`
|
|
77
|
-
- Note that you don't need to provide the quotes for this. The tool detects the description based on spaces(` `)
|
|
78
|
-
|
|
79
|
-
### `trace`
|
|
80
|
-
|
|
81
|
-
Traces the imports for a given function. Usage: `trace <functionName>`
|
package/docs/lazyload.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Lazyload Command
|
|
2
|
-
|
|
3
|
-
The `lazyload` command is used to download JavaScript files from a given URL or a list of URLs. It simulates various techniques to discover and fetch JS files that are loaded dynamically.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
js-recon lazyload -u <url/file> [options]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
| Option | Alias | Description | Default | Required |
|
|
14
|
-
| ----------------------------- | ----- | ----------------------------------------------------------------------------------- | -------------------------- | -------- |
|
|
15
|
-
| `--url <url/file>` | `-u` | Target URL or a file containing a list of URLs (one per line). | | Yes |
|
|
16
|
-
| `--output <directory>` | `-o` | Output directory to save the downloaded JS files. | `output` | No |
|
|
17
|
-
| `--strict-scope` | | Download JS files from only the input URL domain. | `false` | No |
|
|
18
|
-
| `--scope <scope>` | `-s` | Download JS files from specific domains (comma-separated). Use `*` for all domains. | `*` | No |
|
|
19
|
-
| `--threads <threads>` | `-t` | Number of threads to use for downloading. | `1` | No |
|
|
20
|
-
| `--subsequent-requests` | | Download JS files from subsequent requests (Next.JS only). | `false` | No |
|
|
21
|
-
| `--urls-file <file>` | | Input JSON file containing URLs (for `--subsequent-requests`) | `extracted_urls.json` | No |
|
|
22
|
-
| `--api-gateway` | | Generate requests using API Gateway for IP rotation. | `false` | No |
|
|
23
|
-
| `--api-gateway-config <file>` | | API Gateway config file. | `.api_gateway_config.json` | No |
|
|
24
|
-
| `--cache-file <file>` | | File to contain response cache. | `.resp_cache.json` | No |
|
|
25
|
-
| `--disable-cache` | | Disable response caching. | `false` | No |
|
|
26
|
-
| `--yes` | `-y` | Auto-approve executing JS code from the target. | `false` | No |
|
|
27
|
-
|
|
28
|
-
## Examples
|
|
29
|
-
|
|
30
|
-
### Basic Usage
|
|
31
|
-
|
|
32
|
-
Download all JavaScript files from a single URL:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
js-recon lazyload -u https://example.com
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Setting Scope
|
|
39
|
-
|
|
40
|
-
Download JavaScript files only from `example.com` and `cdn.example.com`:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
js-recon lazyload -u https://example.com -s "example.com,cdn.example.com"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Using the `--strict-scope` will only download JS files from the URL provided. This will skip any files from external CDN.
|
|
47
|
-
|
|
48
|
-
### Using API Gateway
|
|
49
|
-
|
|
50
|
-
Use AWS API Gateway to rotate IP addresses while downloading:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
js-recon lazyload -u https://example.com --api-gateway
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Read docs of [API Gateway](./api-gateway.md) for more information.
|
package/docs/map.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Map Command
|
|
2
|
-
|
|
3
|
-
The `map` command is used to map and analyze the functions within a directory of JavaScript files. It can help you understand the codebase by identifying function definitions and, optionally, using AI to generate descriptions.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
js-recon map -d <directory> -t <technology> [options]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
| Option | Alias | Description | Default | Required |
|
|
14
|
-
| -------------------------- | ----- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------- |
|
|
15
|
-
| `--directory <directory>` | `-d` | Directory containing JS files. | | Yes |
|
|
16
|
-
| `--tech <tech>` | `-t` | Technology used in the JS files (run with `-l`/`--list` to see available options). | | Yes |
|
|
17
|
-
| `--list` | `-l` | List available technologies. | `false` | No |
|
|
18
|
-
| `--output <file>` | `-o` | Output file name (without extension). | `mapped` | No |
|
|
19
|
-
| `--format <format>` | `-f` | Output format for the results (comma-separated; available: `json`). | `json` | No |
|
|
20
|
-
| `--interactive` | `-i` | Interactive mode for exploring the mapped functions. | `false` | No |
|
|
21
|
-
| `--ai <options>` | | Use AI to analyze the code (comma-separated; available: `description`). | | No |
|
|
22
|
-
| `--ai-provider <provider>` | | Service provider to use for AI (available: openai, ollama) | `openai` | No |
|
|
23
|
-
| `--ai-endpoint <endpoint>` | | Endpoint to use for AI service (for Ollama, etc) | `https://api.openai.com/v1` for OpenAI, and `http://127.0.0.1:11434` for Ollama | No |
|
|
24
|
-
| `--openai-api-key <key>` | | OpenAI API key for AI analysis. | | No |
|
|
25
|
-
| `--model <model>` | | AI model to use for analysis. | `gpt-4o-mini` for OpenAI, and `llama3.1` for Ollama | No |
|
|
26
|
-
|
|
27
|
-
## Examples
|
|
28
|
-
|
|
29
|
-
### Basic Usage
|
|
30
|
-
|
|
31
|
-
The `map` command requires you to specify the directory containing the JavaScript files and the technology used.
|
|
32
|
-
|
|
33
|
-
For example, to map a Next.JS application:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
js-recon map -d /path/to/js-files -t next
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Interactive Mode
|
|
40
|
-
|
|
41
|
-
Map functions and explore them in an interactive session. For a detailed guide, see the [Interactive Mode documentation](./interactive-mode.md).
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
js-recon map -d /path/to/js-files -t next -i
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### AI-Powered Analysis
|
|
48
|
-
|
|
49
|
-
Use an AI model to generate descriptions for the mapped functions by providing the `--ai` flag and an OpenAI API key.
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
js-recon map -d /path/to/js-files -t next --ai description --openai-api-key <your-key>
|
|
53
|
-
```
|
package/docs/robots.txt
DELETED
package/docs/run.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Run Command
|
|
2
|
-
|
|
3
|
-
The `run` command is a powerful feature that automates the most of the JavaScript reconnaissance workflow by executing a series of modules in a predefined order. This command is ideal for users who want to perform a basic analysis of a target without running each module individually.
|
|
4
|
-
|
|
5
|
-
## Workflow
|
|
6
|
-
|
|
7
|
-
The `run` command executes the following modules in sequence:
|
|
8
|
-
|
|
9
|
-
1. **Lazy Load (Initial)**: Downloads the initial set of JavaScript files from the target URL.
|
|
10
|
-
2. **Strings (Initial)**: Extracts strings, URLs, and paths from the downloaded JavaScript files.
|
|
11
|
-
3. **Lazy Load (Subsequent Requests - for Next.JS)**: Downloads additional JavaScript files discovered from the extracted URLs and paths.
|
|
12
|
-
4. **Strings (Final)**: Performs another round of string extraction on the newly downloaded files to find more endpoints, secrets, and other valuable information.
|
|
13
|
-
5. **Endpoints**: Analyzes the collected data to identify and list all potential API endpoints.
|
|
14
|
-
6. **Map**: Maps all the functions and their relationships within the JavaScript files to provide a clear overview of the application's structure.
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
js-recon run -u <url/file> [options]
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Required Arguments
|
|
23
|
-
|
|
24
|
-
- `-u, --url <url/file>`: The target URL or a file containing a list of URLs (one per line).
|
|
25
|
-
|
|
26
|
-
### Options
|
|
27
|
-
|
|
28
|
-
| Option | Alias | Description | Default | Required |
|
|
29
|
-
| ----------------------------- | ----- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------- |
|
|
30
|
-
| `--url <url/file>` | `-u` | Target URL or a file containing a list of URLs (one per line) | | Yes |
|
|
31
|
-
| `--output <directory>` | `-d` | Output directory | `output` | No |
|
|
32
|
-
| `--strict-scope` | | Download JS files from only the input URL domain | `false` | No |
|
|
33
|
-
| `--scope <scope>` | `-s` | Download JS files from specific domains (comma-separated) | `*` | No |
|
|
34
|
-
| `--threads <threads>` | `-t` | Number of threads to use | `1` | No |
|
|
35
|
-
| `--api-gateway` | | Generate requests using API Gateway | `false` | No |
|
|
36
|
-
| `--api-gateway-config <file>` | | API Gateway config file | `.api_gateway_config.json` | No |
|
|
37
|
-
| `--cache-file <file>` | | File to store response cache | `.resp_cache.json` | No |
|
|
38
|
-
| `--disable-cache` | | Disable response caching | `false` | No |
|
|
39
|
-
| `--yes` | `-y` | Auto-approve executing JS code from the target | `false` | No |
|
|
40
|
-
| `--secrets` | | Scan for secrets | `false` | No |
|
|
41
|
-
| `--ai <options>` | | Use AI to analyze the code (comma-separated; available: description) | | No |
|
|
42
|
-
| `--ai-threads <threads>` | | Number of threads to use for AI | `5` | No |
|
|
43
|
-
| `--ai-provider <provider>` | | Service provider to use for AI (available: openai, ollama) | `openai` | No |
|
|
44
|
-
| `--ai-endpoint <endpoint>` | | Endpoint to use for AI service (for Ollama, etc) | `https://api.openai.com/v1` for OpenAI, and `http://127.0.0.1:11434` for Ollama | No |
|
|
45
|
-
| `--openai-api-key <key>` | | OpenAI API Key | | No |
|
|
46
|
-
| `--model <model>` | | AI model to use | `gpt-4o-mini` for OpenAI, and `llama3.1` for Ollama | No |
|
|
47
|
-
|
|
48
|
-
## Example
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
js-recon run -u https://example.com -o results --secrets --ai description
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This command will perform a full analysis on `https://example.com`, save the output to the `results` directory, scan for secrets, and use AI to generate descriptions for the mapped functions.
|
package/docs/strings.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Strings Command
|
|
2
|
-
|
|
3
|
-
The `strings` command is used to extract strings, URLs, and secrets from a directory of JavaScript files. This is useful for identifying sensitive information and potential API endpoints.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
js-recon strings -d <directory> [options]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
| Option | Alias | Description | Default | Required |
|
|
14
|
-
| ----------------------------- | ----- | ------------------------------------------------------------- | ---------------- | -------- |
|
|
15
|
-
| `--directory <directory>` | `-d` | Directory containing JS files. | | Yes |
|
|
16
|
-
| `--output <file>` | `-o` | JSON file to save the extracted strings. | `strings.json` | No |
|
|
17
|
-
| `--extract-urls` | `-e` | Extract URLs from the strings. | `false` | No |
|
|
18
|
-
| `--extracted-url-path <file>` | | Output file for extracted URLs and paths (without extension). | `extracted_urls` | No |
|
|
19
|
-
| `--permutate` | `-p` | Permutate the URLs and paths found. | `false` | No |
|
|
20
|
-
| `--openapi` | | Generate an OpenAPI specification from the paths found. | `false` | No |
|
|
21
|
-
| `--scan-secrets` | `-s` | Scan for secrets within the strings. | `false` | No |
|
|
22
|
-
|
|
23
|
-
## Examples
|
|
24
|
-
|
|
25
|
-
### Basic Usage
|
|
26
|
-
|
|
27
|
-
Extract all strings from a directory of JS files and save them to `strings.json`:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
js-recon strings -d /path/to/js-files
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Extract URLs
|
|
34
|
-
|
|
35
|
-
Extract strings and also identify and save any URLs found within them:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
js-recon strings -d /path/to/js-files -e
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
This will write a new file called `extracted_urls.json` along with the default `strings.json`
|
|
42
|
-
|
|
43
|
-
### Scan for Secrets
|
|
44
|
-
|
|
45
|
-
Extract strings and scan for any potential secrets or sensitive information:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
js-recon strings -d /path/to/js-files -s
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
This will print all the potential finds on the terminal window.
|
|
52
|
-
|
|
53
|
-
*Please note that this process could be memory and compute intensive, and can take longer to run.*
|
|
54
|
-
|
|
55
|
-
### Generate OpenAPI Specification
|
|
56
|
-
|
|
57
|
-
Extract URLs and paths, and then generate an OpenAPI specification:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
js-recon strings -d /path/to/js-files -e --openapi
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
This will generate the default `strings.json`, the `extracted_urls.json` file with URLs and paths in simple JSON format, and the `extracted_urls-openapi.json` file. The `extracted_urls-openapi.json` can be imported into API clients like [Postman](https://www.postman.com), [Bruno](https://www.usebruno.com), etc.
|
|
64
|
-
|
|
65
|
-
### Permutate URLs and Paths
|
|
66
|
-
|
|
67
|
-
The `--permutate` (`-p`) flag generates new potential endpoints by combining the base of found URLs with all discovered paths. This requires the `-e` flag to be active.
|
|
68
|
-
|
|
69
|
-
For example, if the tool finds the URL `https://api.example.com/v1/users` and the path `/v2/orders`, it will generate `https://api.example.com/v2/orders`.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
js-recon strings -d /path/to/js-files -e -p
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
The permuted URLs will be saved to `extracted_urls.txt` along with `strings.json` and `extracted_urls.json`
|