[Q] Google security policy question - General Questions and Answers

I have a question regarding some hardware components in Android. As we know, switching them on and off through some software API
was disabled by Google, due to security reasons. For example, GPS (on device without root acceess) can only be enabled or disabled
by exact option in menu, but not by third party software. Same for 2g/3g network access, and sometimes even for display brightness...
So, my question is why it can't be done easy way by simply removing that security code from sources? Android is open source operating
system, sources are published by Google, aren't they? So, why these workarounds like RIL code injection (2g/3g), or some root access
helpers (Secure Settings from GP)? It is really so hard to handle such a hardware like GPS or radio mode?
I'm using Cyanogenmod 10 on Samsung Galaxy S, which is theoretically "impossible" to run Jelly Bean (as Samsung decided).
But even in this advanced mod, the hardware switches aren't working well. So, I'm not asking for CM10 itself, but about whole
conception. This is stupid for me, that's hindering people using Android smartphones...

Related

[Q] Using 3G and WLAN simultaneously

Hello,
I am working on porting an application which requires at least two network interfaces to be available at the same time, for example WLAN and 3G. However, I have not been able to figure out how to use multiple interfaces simultaneously on Android, the OS seems to remove or at least disable one of the interfaces when the other is switched on. I have looked through the official API and any relevant examples and documentation, but have not figured out how to force the system not to switch off one of the interfaces. The closest I got was the tethering hotspot source code, as they do something similar to what I want to do, but I was not able to fully understand their code.
My question is therefore, does anyone know how to enable both the WLAN and the 3G interface of an Android-phone? It does not matter if it is through code, configuring the operating system or something else. The phones I have tested with are the Galaxy S and Nexus One, and the application is currently written in native code (however, it can easily be ported to Java if that is neccessary).
Thanks in advance for any help.
-Kristian

[Q] How to detect hardware and OS settings on Android-based phones

Hi all,
I dabble in security, so my reason for taking up Android programming was mainly to see what kind of information I could pull out of a Android-based smartphone.
Getting information like Device ID, SIM no., preferred networks and such, turned out to be fairly simple, but when I got to trying to read the settings of the phone, I hit a roadblock. For the life of me, I can not seem to figure out where to get those settings from.
What I want to get from the phone, is stuff like this:
Is the lock-pattern/PIN enabled?
Is the SIM PIN enabled?
Is GPS on? (this was quite simple for bluetooth, but apparently not so for GPS)
Does the phone allow installation of 3rd party software.
...and settings of that nature. I would think this was a simple matter of getting some kind of "settings" object, and then read the various variables, but so far, this object eludes me.
Any and all ideas are welcome.
Best regards

[APP][4.2+][2014.02.02] Pry-Fi v1.20 [ROOT]

You are being watched...
A fairly new trend in (for example) retail is tracking customer's movements by snooping Wi-Fi signals. If your Wi-Fi is turned on, even though it is not connected to any network, your phone will periodically broadcast a unique number (the MAC address), as well as all the Wi-Fi network names and addresses it remembers ever connecting to. With newer Android versions this can happen even if Wi-Fi is turned off, due to a feature called "scanning always available", which helps your device better determine its location.
At the very least, businesses can use these signals to track your visits. But these signals can also be used by a malicious entity (store owners, for example) to track your exact physical location in any area under their Wi-Fi surveillance. In a store, this data can be used for optimizing another one of those annoying store re-arrangements, forcing you to walk by all the product you don't want, to get to those you do want. Or detecting products you're tempted by, but ultimately not buying.
Of course they can also track your trip to the register, and couple your device's MAC address to the payment information (and thus many details about who you are). The tracking hardware and software vendors, the store (or chain) owner, their business partners, they can now all track where you are every time you come into range of one of their systems, and fully profile who you are, what you do, your financials, and your daily patterns!
That's just one small example - the possibilities are endless. A crook could hide a tracker at a bunch of houses, and in an automated fashion learn the patterns of everybody living in all those houses, without even having to do any surveillance - picking the ideal time to heist the family jewels becomes trivial. Authorities can use this information to correlate physical evidence with your location as well, and all the nastiness that comes with that.
Not even mentioning that your device's habit of announcing who all it's friends are and their names, makes it easier for hackers to perform a man-in-the-middle attack, tricking your phone to connect to an access point under their control.
Pry-Fi
One solution is shutting off Wi-Fi completely (including the background network scanning), but you would lose benefits like automatically connecting to known Wi-Fi networks and improved location awareness for your apps. It also does nothing to help the situation for others.
Pry-Fi will prevent your device from announcing all the networks it knows to the outside world, but it will still allow background scanning and automatically connecting to Wi-Fi networks. While you are not connected to a Wi-Fi network, the MAC address will constantly be pseudo-randomized, following a pattern that still makes the trackers think you are a real person, but they will not encounter your MAC address again. This will slowly poison their tracking database with useless information.
When you do connect to a Wi-Fi network, unless you specify otherwise, your MAC address will also be randomized - the same MAC address will not be used the next time you connect to this or any other network.
War!
Though of course the companies involved with these trackers claim they wouldn't use the data maliciously, the possibility is there, and we all know that if something can be abused, ultimately it will be. There do not appear to be any laws against these practices yet, nor is it likely Wi-Fi will be redesigned any time soon to get rid of the information leaks.
But we can make an effort to reduce the usefulness of the tracking data for the exploiters. Pry-Fi comes with a War mode, which when enabled tries to make your Android device appear like dozens of people. Just wandering around an area under Wi-Fi location surveillance for a few minutes can ruin the tracking data for the period of your stay.
Proof-of-Concept
This is proof-of-concept code, and how for it will go in the future depends on interest and how well it works. It has been tested on several devices and seems to work, but it is very young still. The magic the app does to achieve its purpose is ever subject to changing Android security policies and OEM customizations, so even though it works now, there really is no saying if it will still be possible in future firmwares.
Download
You can get Pry-Fi from Google Play
If Play is not working out for you, the APK is also attached below
TEST
Attached you will also find a 'beta-test' version. This one is compiled to work on all Android 4.0+ devices (instead of 4.2+ of the current official release). I have made all the changes needed to make it compile and technically run on pre-4.2 firmwares, but I have not tested it on an actual 4.0 or 4.1 firmware yet. Let me know if it works for your pre-4.2 firmware!
Issues
This is a very young app and its main feature is doing something that by all counts no app should be doing - as such, it will probably always have issues.
The app was developed against and tested on the following devices:
- Google Nexus 5 @ Stock+root 4.4.2
- Samsung Galaxy S4 @ Stock+root 4.4.2
- Samsung Galaxy Note3 @ Stock+root 4.4.2
- Samsung Galaxy Note2 @ OmniROM 4.4.2
- HTC One @ Stock+root 4.3 (S-OFF or otherwise writable /system needed)
- Sony Xperia family - NOT COMPATIBLE
- Oppo devices - NOT COMPATIBLE
Note that your firmwares should be fully up to date - that includes the TrustZone component in case of Samsung.
Known issues
- Requires SuperSU ?
It's tested against SuperSU, and uses some features that may not be available in other root management apps. Depending on both your Android and root management app version it may or may not work with other solutions, but I certainly recommend against it.
- Using the Android Wi-Fi settings is weird
Pry-Fi does a lot of event-based Wi-Fi on/off switching and connecting/disconnecting. So if you go to settings and turn Wi-Fi on or off, add a network, etc, the interface may start looking as if it has gone mad for a few seconds. Don't worry, this is expected behavior.
- Connecting to a Wi-Fi network (either a new one or a previously known one) is slower
Yes. Indeed.
- Forgetting networks
You can't just forget a network from the normal Android Wi-Fi settings. If Pry-Fi is enabled, you need to use the in-app network management tool to forget a network.
- Multiple known networks
Since v1.10, multiple known networks should be supported.
- Hidden networks
It doesn't currently work with hidden SSIDs, and it won't in the future.
- Wi-Fi Direct (to-do)
Behavior is undefined. Pry-Fi probably heavily interferes with this. Needs more testing/development.
- Beam, S Share, etc
Some methods that quickly share data between two Android devices that are close, tapped together, etc, make use of Wi-Fi Direct, and may thus be negatively affected by Pry-Fi.
- Authentication errors
If the Wi-Fi settings keep claiming authentication errors, your device may not actually support changing the MAC address, and Pry-Fi may not be for you... this doesn't have to be the issue, but it is one of the indicators.
Changelogs
2014.02.02 - v1.20
- Force toolbox calls. Typical case of busybox symlinks causing unexpected failures. Probably the primary cause of people losing Wi-Fi completely
- Service receivers are now en/disabled dynamically. Saves a few CPU cycles and a bit of memory when Pry-Fi is installed but disabled.
2014.02.02 - v1.10
- Support for multiple simultaneously known SSIDs
- Spoofing MACs *also* while connected to a network is now a feature you need to enable separately, as this is the feature that causes most issues yet is arguably the least important tracking-wise.
2014.02.01 - v1.02
- Fixed crash/freeze in case of SU denied
- Changed non-SuperSU error to a warning
- Fixed various reported crashes
- Added Superuser permission (doh)
2014.02.01 - v1.01
- (Hopefully) Fixed an issue with the optional IAP
2014.02.01 - v1.00
- Initial public release
--- reserved ---
This app only works with SuperSU. Would it be able to work with Koush's Superuser in the near future?
Sent from my Nexus 4
Whilst not its main purpose, it will also work great at airports with time based free WiFi. Schipol uses the MAC address to assign a timeframe to devices.
Anyway, working well on HTC One - 4.4.2.
0.0 said:
This app only works with SuperSU. Would it be able to work with Koush's Superuser in the near future?
Click to expand...
Click to collapse
Maybe. Currently has to do with some changes to AOSP that haven't fully panned out yet. Once I'm clear on that, I might put in some time to make it work with Superuser. But I'm certainly not going to delay a release to make it compatible...
Up and running on my s2 with slimkat. So glad I'm aware of guys like you and the work you do. Thank you.
Sent from my GT-I9100 using Tapatalk
Just fine here on my Nexus4.
One thing though is that Playstore has v1.00. I've downloaded v1.01 from here and it updated flawlessly. I just thought you'd like to know it.
Anyway thank you for all your hard work to our benefits.
• OMNI 4.4.2 NIGHTLY • AK.042.XGENESIS •
HTC One, CM11, up and running. Have multiple networks at home so can test with that if needed. I'm ready for a little wifi war.
Thanks for this tiny and helpful utility. However, I initiated it, then started my (home) wifi up, then could not login to the network, although I have re-entered the correct password. Turning this off, again allows me to access the wifi. What should I do? (I am on Samsung Galaxy S4, I9500 @ 4.3)
Working great on s4 4.4.2 Probam
Sent from my GT-I9505 using Tapatalk
Thanks!!!
Working great on note 2.
4.3 alliance
4.4.2 Resurrection Remix
4.4.2 Omni
Hope this will still work in future android development
Verstuurd vanaf mijn GT-N7100 met Tapatalk
Which features will not work on HTC One with root SuperSU, but with S-ON?
This app broke my WiFi on GalaxyS4 (i9505) with Omega ROM v19. I already tried to flash the ROM again, flash new kernel, flash the modem via ODIN again and WiFi fix, but nothing helped. I'm out of ideas what could happen. I cant put the WiFi on anymore.
thangbom said:
Thanks for this tiny and helpful utility. However, I initiated it, then started my (home) wifi up, then could not login to the network, although I have re-entered the correct password. Turning this off, again allows me to access the wifi. What should I do? (I am on Samsung Galaxy S4, I9500 @ 4.3)
Click to expand...
Click to collapse
Something is breaking some of Samsung's extra encryption... this would take a lot of tinkering to figure out, there's no direct answer I can give you right now. Turn it off for the time being.
muamers said:
This app broke my WiFi on GalaxyS4 (i9505) with Omega ROM v19. I already tried to flash the ROM again, flash new kernel, flash the modem via ODIN again and WiFi fix, but nothing helped. I'm out of ideas what could happen. I cant put the WiFi on anymore.
Click to expand...
Click to collapse
If all else fails, flash a full stock firmware and see if that restores operation.
reeder said:
Which functions will not work on HTC One with root SuperSU, but with S-ON?
Click to expand...
Click to collapse
S-ON is not supported at all.
Confirmed working on Galaxy Note N7000 running Kitkat 4.4.2 with SuperSU 1.91
- OmniROM nightly 2014-02-01 (ART)
- Carbon ROM nightly 2014-01-31 (Dalvik)
In the play store description it was mentioned "developed for phones". I tried it nevertheless with a Galaxy Tab2 10.1 GSM (P5100) running OmniRom KK nightly and it changed successfully the Mac address also.
?
Yes. Reconnect to known WiFi takes a bit longer, but still working..
Just about to backup my apps and setting ... will try a clean instal first.
How do I exactly check if it's working?
I'm on HTC One Cyanogenmod 10.2 Rooted S-ON and there seemed to be no error till now :/
Same for me. Please share if you are able to fix this. Unfortunately I am away from a laptop for the coming week
At least the app does what it should.nobody can track me through Wi-Fi now...
muamers said:
This app broke my WiFi on GalaxyS4 (i9505) with Omega ROM v19. I already tried to flash the ROM again, flash new kernel, flash the modem via ODIN again and WiFi fix, but nothing helped. I'm out of ideas what could happen. I cant put the WiFi on anymore.
Click to expand...
Click to collapse

Enable Location Services via ROM

A little background first:
I have a product that is a combination of a physical tablet with my own software pre-installed on it. The software runs in a full kiosk mode keeping the OS hidden from the user. This is what the customer expects, it's what they are paying for - they do not expect any part of the OS to be presented to them at any time. It is all supposed to be managed by my software.
The tablet manufacturer has recently sent me their latest ROM, which is for Android 6.0.
Due to some changes in 6.0 a key area of my software no longer works - a simple form that presents the user with a Wi-Fi selector and a password box. My software can no longer access the list of available Wi-Fi networks unless location services are enabled (bad design!). I am led to believe that this is fixed in 6.0.1, however, the tablet manufacturer doesn't have this update.
Until the manufacturer can provide me with a newer OS ROM, I need for Location Services to be enabled when the tablet is first booted, preferably in battery saving mode.
So my question is:
Is there anything in the ROM (build.prop, projectconfig.mk, anything) that I can change so that the tablet boots up with Location Services already enabled, in battery saving mode.
I have already added ro.com.google.locationfeatures=1 and ro.com.google.networklocation=1 to build.prop but that doesn't appear to have made any difference.
Bear in mind that the user should not have to grant any permission or go into the OS at any point - this would completely destroy the user experience, so please take it as read that I understand that it isn't best practice to enable Location Services without the customer knowing.
Thanks in advance,
Kevin

Is there any attack that bruteforce an Android device with disabled bluetooth?

Recently I had a problem where my phone was hacked.
One of the things that happened was that the supposed person managed to stay by my side and when it left, I looked at my cell phone and Bluetooth was enabled (it was not before). There is a possibility that Bluetooth was already enabled but I don't think so.
After that I had leaked information from the cell phone, including the camera, calls and microphone.
Is there an attack that does this? And how can I protect myself in the future?
Also, how can I know on a non-rooted device if my phone is being monitored? I only find programs that find known viruses and network monitoring programs that are difficult to interpret or do not give veyy useful information.
Is there a way to get proof that my device is infected / being monitored?
unkownuserl33t said:
Recently I had a problem where my phone was hacked.
One of the things that happened was that the supposed person managed to stay by my side and when it left, I looked at my cell phone and Bluetooth was enabled (it was not before). There is a possibility that Bluetooth was already enabled but I don't think so.
After that I had leaked information from the cell phone, including the camera, calls and microphone.
Is there an attack that does this? And how can I protect myself in the future?
Also, how can I know on a non-rooted device if my phone is being monitored? I only find programs that find known viruses and network monitoring programs that are difficult to interpret or do not give veyy useful information.
Is there a way to get proof that my device is infected / being monitored?
Click to expand...
Click to collapse
There is a feature in some android devices that automatically enables Bluetooth when it encounters devices that it has previously been paired with at some point, some even have a feature that enables Bluetooth when any other active Bluetooth device comes within range.
Maybe this is what you are experiencing.
Sent from my LGL84VL using Tapatalk

Categories

Resources