-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to use any configured network interface with a valid IP #245
allow to use any configured network interface with a valid IP #245
Conversation
I could test it out if you have compiled the .apk |
ok, I´ve detected a couple of problems, so I´ll commit the latest changes tonight, and upload to somewhere the apk. |
…rk interfaces. reload correctly the network devices list. launch the network radar when selecting a new network interface from the dialog.
@sorano, here you have: http://tempsend.com/2B583A8746/106C/cSploitmultinterfaces_16092015.apk |
Crashes as soon as I choose an interface
|
@hightechstl , could you post please the logcat output where the exception occurs? android version? mobile model? how many interfaces appeared on the dialog when the app crashed? what kind of interface(s) (wifi, gsm, ethernet)? |
…date occurs, or when we connect to a wifi from the app.
Here's another apk with the latest 3 commits applied (plus the one which fixes a crash, reported on another issue): md5: a91377f4cfad2768909ff1f93b3e74c6 |
Hey @Gainan-- any chance you could meet on IRC... want to compare notes w/you on what's working and what isn't... I'll hang out here, on #csploit in freenode. Anyone else who feels like joining great.. I didn't create this channel tho. |
Ok. Sorry for the delay. I started testing the first version yesterday on my Nexus 7 Lollipop (Running Nethunter rom (aug 2015 release)) but followed up by testing the newer APK today (it was released when I was sleeping). FYI I could start both versions without crashes. I tested the newer APK with both a USB LAN and WLAN interface and it worked fine as such as it detects and prompts for additional interfaces, finds the local subnet on that interface, sweeps that subnet etc. One bug I found is that if I am connected to two WLAN interfaces at the same (WLAN0 and WLAN1). In this case cSploit will be confused on which is the correct SSID on the network gateway / router and will show the SSID from WLAN0 even if I selected WLAN1 interface in cSploit. This can easily be circumvented by disconnecting wlan0 though. So all in all I must say: Great job! Can't wait to see this merged together with the fix for MSF :) 👍 Update: If I disable everything except WLAN1 and try to perform any actions, scan host, port scan, etc. nothing seems to work. I get "Error accessing the Net" on everything. If I then instead enable 3G interface and WLAN1 still connected I dont get the "Error access the net" however nothing seems to happen. It starts the action but no output is ever given. If I use a LAN interface it works better, some actions works, like port scanner, but different actions seems a bit more prone to crashing at times. No logcat at this moment sorry. |
@sorano, thank you very much for your feedback, very useful. I've taken a look at the error you're seeing ("error accessing the net"), and the bug is present on the master branch. In fact it crashes the app. We should react on network connectivity changes, but as it's a different feature I've decided to not add it to this patch. Once we decide to merge this feature or not, I'll start working on that one. In the meantime, I'll commit a workaround for this problem. |
Hi, can you upload again the APK? |
@sorano, @domenicoblanco here's another version with a fix for the situation you've described: I don't have an external wifi card for connect to the mobile, so I haven't tested it with 2 wifi interfaces and I don't know if it will display correctly the ESSID of the selected network. But if it solves the other issue will be great. I won't commit these changes for now, I'll wait for your feedback. Thank you very much for the tests, we're going to need more testers btw :) |
In the apk you sent only rmnet1 and rmnet 0 are availible |
Nevermind after 30 seconds they all came up |
|
||
mUpdateStatus | ||
.setText(UPDATE_MESSAGE.replace("#STATUS#", "...")); | ||
mUpdateStatus.setVisibility(View.VISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling a method of mUpdateStatus
, but checking if it is null after few lines of code.
if all path that lead the program here initializes mUpdateStatus
the null check is pointless, instead if some execution path leave it uninitialized a NullPointerException will be raised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the initialization of mUpdateStatus to onCreate(). Since it's called only once on the activity lifetime, it shouldn't be null, and it's not instantiated every time we change a layout (although there aren't so much changes...).
btw, there's a null check in onCreate(), because onCreate() was called after coming back from selecting a wifi network. Since I created a new method, init(), for common initializations and checks, that null check is not necessary anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, will remove these checks after the merge 😉
great new feature @gainan , I've reviewed the code and commented where I have some questions. thanks for all your great efforts 😊 |
wow @tux-mind , thank you very much for review it. As I said this is a quite intrusive patch which should be reviewed carefully. I've had a lot of doubts about the code, so probably there're parts that have no sense or are not finished yet (I think I've covered all of them). I've had serious problems to:
I have a set of changes not commited yet, which would fix the problem described by @sorano, when you are using the app and the net iface goes down. This is a huge change to the code and to the default app behaviour, so I'll understand if it's not merged. Maybe I've given you some ideas :-) In any case, this would be an awesome feature. |
hi @gainan , first of all thanks for your great work 😊 this feature MUST be merged. I'm currently working on closing some bug, after you'll fix the other pull ( the one with the file editor ) I can compile again the apk and start play with this feature. don't be hurry my friend, we are working on an open source project, do what you feel when you can, I don't want to stress you 😋 I gave a look at the core of android years ago and there is a socket for the wpa_supplicant daemon. also this is the first to step to control an external WiFi adapter, which is a feature that I want to add from years ❤️ |
Hey guys, if you do it, I will try to add aircrack-ng instead of router
|
@developpsoft can you split the aircrack-ng suite into small libraries ? for example:
I can assist you in this big challenge, I'm a linux expert developer. aircrack-ng seems having a clean separation of sources ( i just gave a look at their file names ).
let me known 😊 |
@developpsoft |
@settix nice to read from you again 😊 AFAIK that project were only developing a monitor driver for bcm chipset, the aircrack suite were statically compiled for android, including the gnu libc, as you can see from their sources on google project. |
Thanks @Tux ! |
@settix you hit the point. beside we can make an App that handle the driver problem, finding the right kernel module for your device and kernel build. do you agree ? |
we would need to put our usb connected wifi adaptater into monitor mode. We could eventually build a kernel w/ monitor mode and packet injection support for every devices out there that uses csploit The problem is that it's a very time-consuming and head banging task.. Indeed. Every device will need its own kernel modifications, which is kind of a big deal to maintain and could be android version dependent. That said, I'll throw in a plug here for Nethunter which is doing this for quite a few devices. Aside from some android-UI in the main app, Nethunter installs a full kali chroot on your device. For monitor mode and other functionality it does require the same kernel support, which it provides in the ROMs. Version 2.1 of the NH app is going to be even easier to install/maintain-- you should be able to use it with existing rooted ROMs such as CyanogenMod. It'll auto-install the chroot and kernel for you. So it could be a nice compliment to cSploit and handle some of the kernel issues... it also could be a collaborative sub-project. There's a #nethunter channel on IRC (freenode) as well. |
@tux-mind, will send a makefile and sources as soon as possible 😄
|
Or we can use Router Keygen, too
|
patch outdated. enqueued for the future. |
this feature is a must-to have 😉 as always thanks for your great help @gainan 😊 I'll work on it ASAP. |
Conflicts: cSploit/res/values/strings.xml cSploit/src/org/csploit/android/MainActivity.java cSploit/src/org/csploit/android/core/System.java cSploit/src/org/csploit/android/net/Network.java MainActivity has been heavily changed, many tests needed.
merge develop into this pull request. many tests needed: this branch must be heavily tested before merging. thanks in advance to all those that will spend their time compiling and trying this branch 😊 as now it works also on 3G networks, so please be careful. |
Wow good work 😄
|
TODO: UI prompt before removing current targets.
@tux-mind , so far so good, no crashes, working fine :) |
merged |
Noob question : How can I use this? |
@Megaeloelo just install the nightly build. |
Hi all,
This is a patch for the suggestion #240 .
It works as follow:
If the user press the option menu to select a device:
This has been my check list:
If someone wants to try it out would be great, since it's quite intrusive and it will need to be tested well.
Regards.