OWASP / QRLJacking

QRLJacking or Quick Response Code Login Jacking is a simple-but-nasty attack vector affecting all the applications that relays on “Login with QR code” feature as a secure way to login into accounts which aims for hijacking users session by attackers.
GNU General Public License v3.0
1.35k stars 615 forks source link

Any way to make it work on Termux with ARM device #237

Closed dr1408 closed 8 months ago

dr1408 commented 8 months ago

I cloned the repo and installed requirements the py works i set host and ip but when i do run command it dosent recognize the command show me error about browser and subprocess with extensive_child error .. also i didnt do the geodriver because i dont know how to do it on termux .. any help is appreciated ?

dr1408 commented 8 months ago

<er/whatsapp) > run Exception -> [Errno 2] No such file or directory: 'which' Input -> run Trackback -> Traceback (most recent call last): File "/data/data/com.termux/files/home/QRLJacking/QRLJacker/core/module.py", line 55, in handle handler(args) File "/data/data/com.termux/files/home/QRLJacking/QRLJacker/core/module.py", line 136, in command_run Settings.headless_browser = browser.headless_browsers() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/home/QRLJacking/QRLJacker/core/browser.py", line 49, in init p = subprocess.Popen(["which","firefox"], stdout= subprocess.PIPE, stderr= subprocess.PIPE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1948, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'which' [!] run is not recognized as an internal command ! [+] Maybe you meant : , runreload, refresh, resource [+] Type help or ? to learn more..

dr1408 commented 8 months ago

Ok i managed to install firefox and gekodriver from tur and x11 repos .. still run command gives me same error .. im on rootless ARM samsung A13 with newest termux

dr1408 commented 8 months ago

When i go into core file and for example run module Py it give me error : module not found (core)

dr1408 commented 8 months ago

When i try pip install pyhton-core it ends with subprocess error too .. i hope brother you tell me how to install it perfectly on termux salam alikum

dr1408 commented 8 months ago

In termux

firefox version 121.0.1 geckodriver 0.33.0

dr1408 commented 8 months ago

@melbadry9 @LucaReggiannini can you help me brothers

dr1408 commented 8 months ago

Ok I installed package which and change the geckodriver location in browser.py to geckodriver location in termux now new error

< Module(grabber/whatsapp) > run [+] Using the default useragent Exception: [Errno 8] Exec format error: '/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager' Trackback: Traceback (most recent call last): File "/data/data/com.termux/files/home/QRLJacking/QRLJacker/core/browser.py", line 76, in new_session new_headless[module_name]["Controller"] = Firefox(profile, executable_path="/$PREFIX/bin/geckodriver", capabilities=caps)#options=self.opts) # Inserting the browser object ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/firefox/webdriver.py", line 195, in init self.service.path = DriverFinder.get_path(self.service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path path = shutil.which(service.path) or SeleniumManager().driver_location(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location result = self.run(args) ^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/common/selenium_manager.py", line 106, in run completed_proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/data/data/com.termux/files/usr/lib/python3.11/subprocess.py", line 1948, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/data/data/com.termux/files/usr/lib/python3.11/site-packages/selenium/webdriver/common/linux/selenium-manager' [!] Couldn't open Firefox! Check the installation instructions again!

dr1408 commented 8 months ago

Ok i updated selenium to 4.16 Firefox 121.0.1 geckodriver 0.33

now selenium error disappeared

im getting this error

run [+] Using the default useragent Exception: WebDriver.init() got an unexpected keyword argument 'executable_path' Trackback: Traceback (most recent call last): File "/data/data/com.termux/files/home/QRLJacking/QRLJacker/core/browser.py", line 76, in new_session new_headless[module_name]["Controller"] = Firefox(profile, executable_path="/usr/local/share/geckodriver", capabilities=caps)#options=self.opts) # Inserting the browser object ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: WebDriver.init() got an unexpected keyword argument 'executable_path' [!] Couldn't open Firefox! Check the installation instructions again!

Where to put the executable path i tried both gecko and firefox paths

im on termux with ARM device 32 bit

dr1408 commented 8 months ago

I did nano browser.py and put path /data/data/com.termux/files/bin/geckodriver and also firefox instead of gecko .. still not working .. any fix im trying to make it work for Termux plz help

dr1408 commented 8 months ago

Solved by using xcfe package and exporting display to vnc viewer