diff --git a/.gitbook/assets/image (375) (1) (1).png b/.gitbook/assets/image (375) (1) (1).png new file mode 100644 index 000000000..22e99f845 Binary files /dev/null and b/.gitbook/assets/image (375) (1) (1).png differ diff --git a/.gitbook/assets/image (375) (1).png b/.gitbook/assets/image (375) (1).png index 22e99f845..1f4ffe3a6 100644 Binary files a/.gitbook/assets/image (375) (1).png and b/.gitbook/assets/image (375) (1).png differ diff --git a/.gitbook/assets/image (375).png b/.gitbook/assets/image (375).png index 1f4ffe3a6..794f5c4c2 100644 Binary files a/.gitbook/assets/image (375).png and b/.gitbook/assets/image (375).png differ diff --git a/.gitbook/assets/image (647) (1) (1) (1).png b/.gitbook/assets/image (647) (1) (1) (1).png new file mode 100644 index 000000000..73a88053e Binary files /dev/null and b/.gitbook/assets/image (647) (1) (1) (1).png differ diff --git a/.gitbook/assets/image (647) (1) (1).png b/.gitbook/assets/image (647) (1) (1).png index 73a88053e..103ffa077 100644 Binary files a/.gitbook/assets/image (647) (1) (1).png and b/.gitbook/assets/image (647) (1) (1).png differ diff --git a/.gitbook/assets/image (647) (1).png b/.gitbook/assets/image (647) (1).png index 103ffa077..757655716 100644 Binary files a/.gitbook/assets/image (647) (1).png and b/.gitbook/assets/image (647) (1).png differ diff --git a/.gitbook/assets/image (647).png b/.gitbook/assets/image (647).png index 757655716..d53a01b36 100644 Binary files a/.gitbook/assets/image (647).png and b/.gitbook/assets/image (647).png differ diff --git a/.gitbook/assets/image (652) (1) (1).png b/.gitbook/assets/image (652) (1) (1).png new file mode 100644 index 000000000..c3d3f2167 Binary files /dev/null and b/.gitbook/assets/image (652) (1) (1).png differ diff --git a/.gitbook/assets/image (652) (1).png b/.gitbook/assets/image (652) (1).png index c3d3f2167..41d3f2694 100644 Binary files a/.gitbook/assets/image (652) (1).png and b/.gitbook/assets/image (652) (1).png differ diff --git a/.gitbook/assets/image (652).png b/.gitbook/assets/image (652).png index 41d3f2694..a19d59d32 100644 Binary files a/.gitbook/assets/image (652).png and b/.gitbook/assets/image (652).png differ diff --git a/.gitbook/assets/image (664).png b/.gitbook/assets/image (664).png new file mode 100644 index 000000000..53c8c9a9a Binary files /dev/null and b/.gitbook/assets/image (664).png differ diff --git a/SUMMARY.md b/SUMMARY.md index 56b9cea0f..c7c772cb7 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -280,7 +280,9 @@ * [WebDav](pentesting/pentesting-web/put-method-webdav.md) * [werkzeug](pentesting/pentesting-web/werkzeug.md) * [Wordpress](pentesting/pentesting-web/wordpress.md) - * [XSS to RCE Electron Desktop Apps](pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md) + * [XSS to RCE Electron Desktop Apps](pentesting/pentesting-web/xss-to-rce-electron-desktop-apps/README.md) + * [Electron contextIsolation RCE via preload code](pentesting/pentesting-web/xss-to-rce-electron-desktop-apps/electron-contextisolation-rce-via-preload-code.md) + * [Electron contextIsolation RCE via Electron internal code](pentesting/pentesting-web/xss-to-rce-electron-desktop-apps/electron-contextisolation-rce-via-electron-internal-code.md) * [88tcp/udp - Pentesting Kerberos](pentesting/pentesting-kerberos-88/README.md) * [Harvesting tickets from Windows](pentesting/pentesting-kerberos-88/harvesting-tickets-from-windows.md) * [Harvesting tickets from Linux](pentesting/pentesting-kerberos-88/harvesting-tickets-from-linux.md) diff --git a/pentesting-web/http-request-smuggling/request-smuggling-in-http-2-downgrades.md b/pentesting-web/http-request-smuggling/request-smuggling-in-http-2-downgrades.md index b1ed10d26..ec893d5da 100644 --- a/pentesting-web/http-request-smuggling/request-smuggling-in-http-2-downgrades.md +++ b/pentesting-web/http-request-smuggling/request-smuggling-in-http-2-downgrades.md @@ -46,7 +46,7 @@ HTTP/2 on some servers lets you put a **colon in the header name, and with a \r\ Note that if you put just the new line characters sending a header without content, the request is going to be treated as **invalid**: -![](<../../.gitbook/assets/image (647) (1) (1).png>) +![](<../../.gitbook/assets/image (647) (1) (1) (1).png>) ### H2.TE via Request LIne Injection @@ -84,7 +84,7 @@ The **problem** with **HTTP/1.1** is that if you **receive 2 HTTP responses** yo However, this technique can be used **in HTTP/2** because if the endpoint was **vulnerable** and you smuggled one request, you will see the **headers of the response to the smuggled request in the response from the reverse proxy**: -![](<../../.gitbook/assets/image (652) (1).png>) +![](<../../.gitbook/assets/image (652) (1) (1).png>) ### Tunnel-vision Problem diff --git a/pentesting-web/xss-cross-site-scripting/README.md b/pentesting-web/xss-cross-site-scripting/README.md index de57bf54e..fc7dd1268 100644 --- a/pentesting-web/xss-cross-site-scripting/README.md +++ b/pentesting-web/xss-cross-site-scripting/README.md @@ -79,8 +79,8 @@ Some **examples**: [server-side-xss-dynamic-pdf.md](server-side-xss-dynamic-pdf.md) {% endcontent-ref %} -{% content-ref url="../../pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md" %} -[xss-to-rce-electron-desktop-apps.md](../../pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md) +{% content-ref url="../../pentesting/pentesting-web/xss-to-rce-electron-desktop-apps/" %} +[xss-to-rce-electron-desktop-apps](../../pentesting/pentesting-web/xss-to-rce-electron-desktop-apps/) {% endcontent-ref %} ## WAF bypass encoding image diff --git a/pentesting/pentesting-web/README.md b/pentesting/pentesting-web/README.md index 7b02f7237..863e46f9c 100644 --- a/pentesting/pentesting-web/README.md +++ b/pentesting/pentesting-web/README.md @@ -3,14 +3,13 @@ {% hint style="warning" %} **Support HackTricks and get benefits!** -Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access the **latest version of the PEASS or download HackTricks in PDF**? -Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) -**Join the** [**šŸ’¬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**šŸ¦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.** +**Join the** [**šŸ’¬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**šŸ¦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.** **Share your hacking tricks submitting PRs to the** [**hacktricks github repo**](https://github.com/carlospolop/hacktricks)**.** {% endhint %} @@ -112,7 +111,7 @@ Some **tricks** for **finding vulnerabilities** in different well known **techno * [**WebDav**](put-method-webdav.md) * [**Werkzeug**](werkzeug.md) * [**Wordpress**](wordpress.md) -* [**Electron Desktop (XSS to RCE)**](xss-to-rce-electron-desktop-apps.md) +* [**Electron Desktop (XSS to RCE)**](xss-to-rce-electron-desktop-apps/) _Take into account that the **same domain** can be using **different technologies** in different **ports**, **folders** and **subdomains**._\ If the web application is using any well known **tech/platform listed before** or **any other**, don't forget to **search on the Internet** new tricks (and let me know!). diff --git a/pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md b/pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md deleted file mode 100644 index a1cc4d69c..000000000 --- a/pentesting/pentesting-web/xss-to-rce-electron-desktop-apps.md +++ /dev/null @@ -1,47 +0,0 @@ -# XSS to RCE Electron Desktop Apps - -Recommended read for more trick: [https://mksben.l0.cm/2020/10/discord-desktop-rce.html?m=1](https://mksben.l0.cm/2020/10/discord-desktop-rce.html?m=1) - -When I test Electron app, first I always check the options of the [BrowserWindow API](https://www.electronjs.org/docs/api/browser-window), which is used to create a browser window. By checking it, I think about how RCE can be achieved when arbitrary JavaScript execution on the renderer is possible.\ -Example: - -``` -const mainWindowOptions = { - title: 'Discord', - backgroundColor: getBackgroundColor(), - width: DEFAULT_WIDTH, - height: DEFAULT_HEIGHT, - minWidth: MIN_WIDTH, - minHeight: MIN_HEIGHT, - transparent: false, - frame: false, - resizable: true, - show: isVisible, - webPreferences: { - blinkFeatures: 'EnumerateDevices,AudioOutputDevices', - nodeIntegration: false, - preload: _path2.default.join(__dirname, 'mainScreenPreload.js'), - nativeWindowOpen: true, - enableRemoteModule: false, - spellcheck: true - } -}; -``` - -## nodeIntgration RCE - -If the nodeIntegration is set to true, a web page's JavaScript can use Node.js features easily just by calling the `require()`. For example, the way to execute the calc application on Windows is: - -``` - -``` - -## Read Arbitrary Internal FIle - -If contextIsolation set to false you can try to use \ (similar to \