A lean Chrome Extension boilerplate built for DEF CON demos and security research. Built with Manifest V3, powered by Webpack, this template is designed for rapid prototyping of both benign and malicious Chrome extension behavior.
This project is intended strictly for educational and ethical research purposes. It must not be used to develop or distribute malicious software. Always respect user privacy and platform policies.
- NodeJs
v17.4.0
- Go to https://nodejs.org
- Download the LTS version
- Run the installer and follow the setup instructions
After installation, open a terminal or command prompt and run:
node -v
npm -v
- Clone the repository
git clone https://github.com/aviadgispan/LayerXDefConKit.git
cd LayerXDefConKit
- Install dependencies
npm install
- Build for production
npm run build
- Start working on locally
npm run start
- Start the server (runs on port 5555)
npm run server
-
Then click on
Load unpacked
-
Select
dist
folder inside this repo folder(It will get generated after running eitherbuild
orstart
command) -
If you have run
start
command, you can see something like this in browser console
To make sure your server.js
is running correctly and the extension is successfully receiving a token from the server:
Run the following command to start the server locally:
npm run start
Run the following command in your terminal:
npm run server
Navigate to: (chrome://extensions
)
Find the extension named LayerXDefConKit, and click the 🔄 refresh icon:
Each time you refresh the extension, it makes a request to the local server and receives a new token.
After refreshing the extension, you should see output like this in your terminal:
A new token will be logged every time the extension is refreshed. If you see this behavior — everything is working correctly ✅
The workshop is structured as a series of Git branches. Start at the first step and move forward — each branch contains the solution to the previous task.
Branch Name | Description | Solution Link |
---|---|---|
main |
Starting point. Exercise: activate cookies stealing | View Solution |
step-1-fetch-injection |
Exercise: Injecting Code into the Main World to Override fetch (Only on chatgpt.com) | View Solution |
step-2-log-response-body |
Exercise: Log the response body of intercepted fetch requests | View Solution |
step-3-inject-with-minimal-permission |
Exercise: Use only the following permissions in your manifest.json cookies, tabs and storage |
View Solution |
step-4-force-chat-gpt-to-answer-in-lyrics |
Exercise: Force ChatGPT to answer in lyrics | View Solution |
step-5-exfiltrate-the-data |
Exercise: Transfer the captured information to the remote server. | View Solution |
step-6-obfuscation-to-hide-injected-extension-logic |
Exercise: Add Webpack config to export obfuscated extension bundles. | View Solution |
step-7-the-complete-solution |
Contains the final implementation of the extension, incorporating everything from all previous exercises solutoin | View Branch |
complete-solution-without-any-permission |
This branch demonstrates how to manipulate ChatGpt without using any permissions. | View Solution |