chrisk44 / Hijacker

Aircrack, Airodump, Aireplay, MDK3 and Reaver GUI Application for Android
GNU General Public License v3.0
2.38k stars 418 forks source link

Pixie-dust in nethunter chroot problem #24

Closed EvilAirborn closed 6 years ago

EvilAirborn commented 6 years ago

it says cannot open /dev/urandom after reaver meassage receaved m1 message......

EvilAirborn commented 6 years ago

i able to enable monitor mode in hijacker reaver in chroot mode, it meant i able to fix the bin/bash/monstart-nh no such a directory or file, but only one problem remaining,that problem is it cant access to kalichroot/dev/urandom , i some how you can make access to urandom,it will work with my fix

chrisk44 commented 6 years ago

There should be global access to /dev/urandom. Perhaps there os something wrong with your kali installation. Make sure that /dev/urandom exists and has rw permissions. I can't test this because I don't have monitor mode in the chroot environment.

EvilAirborn commented 6 years ago

you dont have chroot?

EvilAirborn commented 6 years ago

or you dont have nexus?

chrisk44 commented 6 years ago

I have both, I don't have monitor mode inside the chroot envirinment. Reaver starts but can't reach the point you have the problem...

EvilAirborn commented 6 years ago

i like your project really, and i hope to contribute to your project to make it perfect

EvilAirborn commented 6 years ago

dude i was added the no-nacks option to hijacker app,but before i do a pull request ,you did it before me :/....anyway i can solve your problem to get monitor mode

EvilAirborn commented 6 years ago

i solved and reaver works correctly and it associate too! it stuck before pixiewps ran

chrisk44 commented 6 years ago

What's the problem?

EvilAirborn commented 6 years ago

your pixiewps ran??

EvilAirborn commented 6 years ago

your reaver works in chroot?? and does it ran pixiewps after reaver attack complete?

EvilAirborn commented 6 years ago

the problem was bin/bash '' monstart-nh" cant found........i solved this when runing as chroot,but after solve this , the reaver stuck after recive m1 message. says /dev/urandom cant access before run pixie-dust attack

EvilAirborn commented 6 years ago

And Also Its Says libsigchain.so cannot be preloaded, but reaver runs,associats,sent and receive identity Request but stuck after sent & receive m1 message,says dev/uandom can't acess......so where is the problem can you tell me,I am confiused

chrisk44 commented 6 years ago
  1. If you have enabled the option to run monstart-nh you need to be in NethunterOS, otherwise there is no such script.

  2. Unless you are using an external adapter, you would need a customized kernel (or maybe a customized ROM, with the only one being NethunterOS) for the internal adapter to support monitor mode INSIDE the chroot environment. This means that even though the adapter is in monitor mode for the Android OS, in the kali environment the adapter is not in monitor mode. That's why you need to run monstart-nh in NethunterOS. I don't think you can do this on any other ROM.

  3. IN the kali chroot environment there IS a /dev/urandom "file" and is publicly accessible (with 666 permissions) so there should be no problems by default for any app that tries to use it. If you encounter such an error, there is something wrong with your kali installation and Hijacker can do absolutely nothing about it.

  4. Speaking of things that Hijacker is not concerned about; The error about libsigchain.so appears on my device too, and this too is a problem with the chroot environment. Everything you see in the console after "Running: (command)" is coming from kali. I have no idea where reaver is looking for this library, and eventhough this is relatively easy to find out, you would need to place the library there by yourself.

  5. Now, about what I can test: I have a Nexus 5 with LineageOS 14.1 (Android 7.1.2) and I'm using the Nexmon driver for my internal wireless adapter to suppport monitor mode within the Android OS. To test Reaver in NetHunter, I would need either to be in NetHunter OS (which never worked for me and never had the time to troubleshoot it) or connect an external adapter (that I don't have), put it in monitor mode etc etc so that I can run reaver in the kali chroot environment. Right now, reaver starts and waits for a beacon from the network I'm trying to crack. Since the adapter is not in monitor mode, this beacon is never detected, so the actual attack can't start (even if it did, it wouldn't be able to inject packets). Your problem about /dev/urandom appears after it receives the M1 message. I can't reach that point, so I can't test it.

Hijacker does NOT and will NEVER intervene with your kali installation, not even if I were able to find the library and where it should be. Remember, the app is just a GUI tool to automate the process of typing commands, MAC addresses etc. and as long as the included tools work correctly in Android, my work is done. I was always sceptical about including the "Reaver in NetHunter" option because of this, but I did it anyway because I thought that the seperation between "Android OS" and "Kali OS" was clear to anyone using these tools. Appearently it's not. No offense to you of course, but I think that without the necessary knowledge about these things, noone should use these tools. Most people sadly don't understand the dangers of this.

If you still have a problem with the app itself, I would be happy to troubleshoot it and fix it. But as long as the problem is within the chroot environment, the great people of NetHunter will help you much more than I can. Take the command you see on the console (the last part about reaver ...) and run it manually in the chroot environment. After you make sure it works manually, I will be happy to make any adjustments that I can. If you now believe there is no problem with the app, you can close the issue.

EvilAirborn commented 6 years ago

screenshot_20171005-110806 screenshot_20171005-111207 screenshot_20171005-111213

EvilAirborn commented 6 years ago

I am currently in nethunter is cm14.1 on nexus 5....... Generally Reaver Runs in Chroot via kali@root and works without any error. Up in the screenshot you can see the reaver chroot give me the eroor /dev/urandom can't open..... I copied the exact same command that was run in hijacker "chroot /data/local/nhsystem/kali-armhf /bin/bash -c 'export USER=root && export SHELL=/bin/bash && export MAIL=/var/mail/root && export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && export TERM=linux && export HOME=/root && export LOGNAME=root && export SHLVL=1 && export YOU_KNOW_WHAT=THIS_IS_KALI_LINUX_NETHUNTER_FROM_JAVA_BINKY && source monstart-nh; reaver -i wlan0 -vv -b 84:16:F9:AD:69:18 --channel 6 -d 1 -l 60 -N -K 1"""" and paste it to the terminal app of nethunter and executed as androidsu mode not as kali@root, the reaver gives me same error related libsigchain.so,but it doesn't give me the error /dev/urandom can't open.. So the reaver runs and works successfully with pixiewps!! The I copied the exact command from hijacker and executed as Android Su not as kali@root.....so I confirmed the problem is from the app!

chrisk44 commented 6 years ago

I can see the problem, and there are ways that I manage to have access to /dev/urandom. However, starting kali with those ways breaks reaver for some reason.

EvilAirborn commented 6 years ago

screenshot_20171006-231739

screenshot_20171006-231743

Hey....!!!!!!!!!!!!!! I found the full solution, running pixiewps in chroot doesn't requires nethunteros, I was mad and what I was doing I don't know, but it worked! Now pixiewps run in chroot, ignored the fu**ing LD preloaded warning, I don't care that warning......... So the solution!!!!...... At First I Installed Hijacker, and install nexmon to system/xbin directory, then I put the monstart-nh in system xbin by downloading from github.then I installed busybox to system/xbin (androids system/xbin>not in Kali)....then I copied the hole system folder of android [androidsu/system][system folder that in the root of android system]and pasted in the Kali chroot,so it overwritten the empty system folder in Kali, then I did chmod to kali-chroot/dev/urandom and chmod to androidsu/dev/urandom using es file manager (never mind)....after that I restarted my mobile, fired hijacker , fired pixiewps in chroot , and it did it job as well ,the reaver runs and the pixiewps retrieved the pins ;) ......... [a mad way to fix reaver in chroot environment without knowing the actual problem] And something I realised that the reaver in chroot via hijacker, it search for monstart-nh and nexutil from the bin folder of Kali, so don't forget to put this files in bin "monstart-nh,monstop-nh,nexutil"

EvilAirborn commented 6 years ago

Rock An Roll

chrisk44 commented 6 years ago

Can you try the default situation again? Try putting the chmod command in the "Custom command" of Hijacker (it runs INSIDE THE CHROOT so it would be just chroot 777 /dev/urandom).

riyoua commented 6 years ago

@EvilAirborn could you help fixing this problem ? monstart-nh >> command not found source monstart-nh >>no such file or directory i am running kali nethunter 3.15 on Sony Xperia Z (Yuga)

AutinMitra commented 6 years ago

@riyoua That's because monstart-nh is built for specific devices that support wlan0 monitor mode (nexmon)

riyoua commented 6 years ago

@autindesign i thought something about chroot configuration could fix it .. i guess yes what you've said is right , because i navigate to /system/xbin/ and i couldn't see monstart-nh .. is there any way to contribute to make it happen ?

AutinMitra commented 6 years ago

@riyoua unless you have genius reverse engineering skills, I guess we have to wait for other devs to make this possible

chrisk44 commented 6 years ago

@riyoua monstart-nh is a script included in NetHunterOS, it has nothing to do with this app. Maybe the developer can help you.

EvilAirborn commented 6 years ago

Just put monstart-nh to system/xbin....that's how it's easy noobs....I ran reaver in chroot with pixiewps too! Just put the libs and source monstart-nh to system xbin directory