Open s7x opened 3 years ago
Hi @s7x,
Thanks for reporting this. Development is pretty slow these days. Hopefully, we'll find some time to have a look within the next few months.
Hi @s7x,
First of all, thanks for the detailed report. I'd like to mention PyRIC is a separate library maintained by @wraith-wireless. That being said, I can't replicate your issue on my machine (Ubuntu). When I replicate your experiment with manually pasting the code for rfkill_list
into python (bpython
to be exact), I get an error that getname
is not defined. After defining that function it works fine. Did you declare it "above" your screenshot?
P.S. @sophron I was literally just typing this when you commented...
Hi @JetseVerschuren & @sophron, first of all: thank you for your feedbacks on the issue!
No worries on the delays @sophron I understand. It's to help us keep track on the issues encountered on tools in Blackarch's side too :)
Hi @s7x,
First of all, thanks for the detailed report. I'd like to mention PyRIC is a separate library maintained by @wraith-wireless. That being said, I can't replicate your issue on my machine (Ubuntu). When I replicate your experiment with manually pasting the code for
rfkill_list
into python (bpython
to be exact), I get an error thatgetname
is not defined. After defining that function it works fine. Did you declare it "above" your screenshot?P.S. @sophron I was literally just typing this when you commented...
Regarding PyRIC causing trouble, I need to specify that I was using the fork from @sophron in my test. I also tried the @wraith-wireless version but I'm having the same issue when running wifiphisher: (pyric.error: [Errno 19] No device at None)
.
I did in fact import all the pyric/utils/rfkill.py content in ipython before running the script.
Hello @s7x , @sophron , friendly Noob here. I was having the same issue on Ubuntu 20.04, re-installed the OS multiple times along with the proper Python packages. It was to no avail. I kept getting the same issue you are having. I found it interesting that when i did a fresh install of Ubuntu 18.04 LTS, and installed the Python packages and dependencies along with sudo apt-get install net-tools, it actually worked. I couldn't get the victim machine to connect to my Evil Twin "Couldn't get IP", but after running the following commands (sudo systemctl disable systemd-resolved.service & sudo systemctl stop system-resolved ), The "Couldn't get IP" issue was resolved and Wifiphisher worked without Errors. Maybe with your extensive knowledge you can investigate what differentiates Ubuntu 18.04 & 20.04, and that could possibly lead the authors to a better diagnostic. Sorry i can't be of much help. P.S after installing and succesfully running an attack with Wifiphisher, i tried to upgrade from 18.04 LTS to 20.04 LTS using terminal and after doing so, wifiphisher gave me multiple Errors along the way and could not find a solution anywhere. Hope my experience can offer you guys some hints, thank you for your hard work. The cards i was using during this Alfa AWUS036NHA and Alfwa AWUS036ACS (5ghz capable).
5.14.0-kali2-amd64 #1 SMP Debian 5.14.9-2kali1 (2021-10-04) x86_64 GNU/Linux
i have this error too
Changing wlan2mon MAC addr (BSSID) to 00:00:00:af:90:c1
[+] Changing wlan2mon MAC addr (BSSID) to 00:00:00:02:c6:86
Traceback (most recent call last):
File "/usr/local/bin/wifiphisher", line 33, in
why sir...help me...broken wifiphisher
[*] Starting Wifiphisher 1.4GIT ( https://wifiphisher.org ) at 2021-12-14 11:55
[+] Timezone detected. Setting channel range to 1-13
[+] Selecting wlan0 interface for the deauthentication attack
[+] Selecting wlan1 interface for creating the rogue Access Point
[+] Changing wlan1 MAC addr (BSSID) to 00:00:00:da:88:a8
[+] Changing wlan1 MAC addr (BSSID) to 00:00:00:81:d7:e6
Traceback (most recent call last):
File "/usr/local/bin/wifiphisher", line 33, in
@sophron @s7x tracked down to pyric/net/wireless/rfkill_h.py line 123:
it says: rfk_rfkill_event = "IBBBB" but should be rfk_rfkill_event = "IBBBBB"
at least in my setting (kali linux - debian rolling testing ?? )
i goes that : RFKILLEVENTLEN = struct.calcsize(rfk_rfkill_event) ----> is 9 instead of 8
so :
def rfkill_event(idx,rtype,op,hard=0,soft=0): """ create a rkfill event structure :param idx: index of dev rfkill i.e. 0,1 :param rtype: type of rfkill :param op: op code :param hard: hard state one of {0=unbloacked|1=blocked} :param soft: soft state one of {0=unblocked|1=blocked} :returns: a rfkill event structure """ return struct.pack(rfk_rfkill_event,idx,rtype,op,hard,soft)
should return a byte more like --> return struct.pack(rfk_rfkill_event,idx,rtype,op,hard,soft, unknown)
don't know what the byte is for, according to https://github.com/torvalds/linux/blob/master/include/uapi/linux/rfkill.h
is for:
struct rfkill_event_ext { u32 idx; u8 type; u8 op; u8 soft; __u8 hard;
/*
* older kernels will accept/send only up to this point,
* and if extended further up to any chunk marked below
*/
__u8 hard_block_reasons; ## -------> ?????????????????
} attribute((packed));`
__u8 hard_block_reasons; let me know if you know more,
found something : https://patchwork.kernel.org/project/linux-wireless/patch/20201104134641.28816-1-emmanuel.grumbach@intel.com/
I just found out what the problem is, I only keep one wireless card, through ifconfig wlan0 down, and then run sudo wifiphisher and it works!
I have got the below error after install wiifiphisher on ubuntu 22.04
Traceback (most recent call last):
File "/home/niroop/wifiphisher/bin/./wifiphisher", line 24, in
Version: commit 4e1052f7e06da1ad66846c41df2be54452a2777b
Description
Information
Hello there!
s7x here, from the Blackarch Linux team. There seems to be an error in the pyric/utils/rfkill.py file in the soft_blocked() function preventing wifiphisher to run properly. I think the problem lies in the rfkill_list() function though. As shown in the screenshot below, when I run the rfkill_list() function, it does not properly indexes the phy#N/wlanN cards/interfaces in the rfks dict.
iw dev showing the phy#N cards/interfaces:
When running rfkill list, I can see that the cards are not blocked (neither hard/soft blocked):
Things tried
Script Output
Don't hesitate to ask if you need more information.
EDIT: typo
Cheers!