CVE-2013-6271: Remove Device Locks from Android Phone - Android General

CVE-2013-6271: Remove Device Locks from Android Phone
The vulnerability described here enables any rogue (not rouge ) app at any time to remove all existing device locks activated by a user. Curesec disclosed this vulnerability as Google Android Security Team was not responding any more about this issue.
The bug exists on the “com.android.settings.ChooseLockGeneric class”. This class is used to allow the user to modify the type of lock mechanism the device should have. Android implements several locks, like pin, password, gesture and even face recognition to lock and unlock a device. Before a user can change these settings, the device asks the user for confirmation of the previous lock (e.x. If a user wants to change the pin or remove it it has to first enter the previous pin).
Whole article: HERE
Click to expand...
Click to collapse
Was looking for some ongoing discussion here and maybe some info how to "fix" that, but didn't found any ... so here is one ^^

Stunherald said:
CVE-2013-6271: Remove Device Locks from Android Phone
Was looking for some ongoing discussion here and maybe some info how to "fix" that, but didn't found any ... so here is one ^^
Click to expand...
Click to collapse
Tested in on my cm10.1 custom atrix rom
Just add one line:
packages/apps/Settings/AndroidManifest.xml
android:windowSoftInputMode="stateVisible|adjustResize"/>
<activity android:name="ChooseLockGeneric"
+ android:exported="false"
android:label="@string/lockpassword_choose_lock_generic_header"
android:excludeFromRecents="true" >
<intent-filter>
It might prevent ANY apps from calling ChooseLockGeneric Spread it out

Related

[GUIDE] Pattern Unlock with Exchange Server Security Policy for 2.1 & 2.2

This actually maybe more of a bug than a setting.
1) Do not setup your exchange account settings yet
2) go to menu > setting > security and set a screen unlock pattern
3) set up your exchange account settings and sync
3a) if your server security requires a pin unlock it will ask you now
3b) go ahead and setup a pin
4) now you'll notice when you turn on the screen you have to swipe down with the htc lock screen then a pin then a pattern unlock.
5) install lockpicker and disable the exchange screen password requirement
6) Now you will swipe down then do the pattern unlock
I hated typing in a pin every time i used my phone when i was on WM and find this is a decent alternative.
To change your lock pattern once you have everything set:
"to reset the unlock pattern, simply enter the wrong pattern 5 times, and then login with your google account. As soon as you've done that, then you are prompted for a new pattern." -- kitstable (Thanks!)
Also here's a nice widget to toggle your lock pattern
http://www.appbrain.com/app/com.curvefish.widgets.lockpatternonoff
Hope it helps.
----------------
Updates for 2.2:
Look at this thread here:
http://forum.xda-developers.com/showthread.php?t=655649
Follow the instructions as you will have to run the script to edit the mail.apk or email.apk depending on whether you are using ASOP or Sense client.
I am running this using the vael rom and it works very well.
Exactly what I was looking for thank you.
Thanks for that, just what I was looking for.
I started with a easy pattern, so found this out trying to change it - to reset the unlock pattern, simply enter the wrong pattern 5 times, and then login with your google account.
As soon as you've done that you're prompted for a new pattern.
Thank you.
You can grab Quick Settings off the market, this will allow you to toggle the pattern on and off, and change the pattern.
cant seem to change the unlock pattern with quick settings but putting in the wrong pattern 5 times then changing seems to work. Also found a cool widget called lockpattern onoff that allows you to toggle whether you want your lock pattern or not.
http://www.appbrain.com/app/com.curvefish.widgets.lockpatternonoff
Very helpful. Thank you.
I followed the directions here and entered the password for Exchange when prompted. I let the screen go and went to unlock, but I didn't have the pattern unlock. I just typed in the password and that is it. Looking at the security settings I now see options for the password and not the visible pattern.
Do have to use a pin for this trick to work? Or did the latest OTA improve security?
You sure you set the patern unlock and verified it worked prior to setting up your exchange account?
With Froyo, I think this functionality is built-in (i.e, you can use pattern unlock for Exchange) without having to go through all the steps mentioned.
I remember being able to do this with one of the CM6 nightly builds.
regulator207 said:
You sure you set the patern unlock and verified it worked prior to setting up your exchange account?
Click to expand...
Click to collapse
Yes, I did verify it before syncing with Exchange. I also created a NAND backup before syncing and after verifying pattern unlock. And if I restore I will go back and it will prompt me to pattern unlock before going into phone.
So even though the Exchange guy told me its just a pin, it appears the policy on the mail server is requiring a password, something strong than just a pin. So I think that is why I am unable to make use of this.
webs05 said:
So even though the Exchange guy told me its just a pin, it appears the policy on the mail server is requiring a password, something strong than just a pin. So I think that is why I am unable to make use of this.
Click to expand...
Click to collapse
are you running 2.1 or 2.2?
I have not tried this, but I am unable to use a pattern unlock by default because of the security requirements. I am only able to use pin/password. I'm on 2.2 rooted now.
What sucks since GOING to 2.2 is that I can't use Swype to unlock the phone. I didn't mind the password since I could draw it with Swype. I hate the password/pin stuff . . . WITHOUT Swype.
Anyway to reenable Swype's use for password entry on 2.2?
lockpicker says its not supported by 2.2. it worked great on 2.1, but i guess the new build really messed it up.
if the dev of lockpicker would make the app work with 2.2, I, and many other would donate pretty good, Im sure.
Or if another dev could make an optionin teh security tab to lock screen after , say, 24 hours of no activity, instead of 15 at teh longest, that would be great...
Just updated first post to reflect some development regarding this feature on 2.2
LAYGO said:
I have not tried this, but I am unable to use a pattern unlock by default because of the security requirements. I am only able to use pin/password. I'm on 2.2 rooted now.
What sucks since GOING to 2.2 is that I can't use Swype to unlock the phone. I didn't mind the password since I could draw it with Swype. I hate the password/pin stuff . . . WITHOUT Swype.
Anyway to reenable Swype's use for password entry on 2.2?
Click to expand...
Click to collapse
Swype works fine for me on 2.2. Just this method doesn't seem to work at all for me. I think the requirements from our Exchange policy are on the strict side.
There was a post on xda forums that used adb to go in and change the settings on the phone to force it to do what lockpicker did but this didn't require an app or even a background service to be running. I am unable to find that post now but I wonder if those same adb commands would work on 2.2. If so we wouldn't have to wait for lock picker to be updated and we could get rid of that background service and save some battery life. I can't remember what section it was in and searching returns too many duplicate posts making it very time consuming to look through that mess to find what I am looking for. If i ever find it I will link it in here.
I have this saved at work, I'll test and post it to see if it works.
strongsad said:
There was a post on xda forums that used adb to go in and change the settings on the phone to force it to do what lockpicker did but this didn't require an app or even a background service to be running. I am unable to find that post now but I wonder if those same adb commands would work on 2.2. If so we wouldn't have to wait for lock picker to be updated and we could get rid of that background service and save some battery life. I can't remember what section it was in and searching returns too many duplicate posts making it very time consuming to look through that mess to find what I am looking for. If i ever find it I will link it in here.
Click to expand...
Click to collapse
Sent from my PC36100 using XDA App
EXCHANGE PASSWORD BYPASS
0. BACKUP settings.db
1. adb shell
2. cd /data/data/com.android.providers.settings/databases
3. sqlite3 settings.db
4. update system set value=0 where name='lockscreen.lockexchange.enable';
5. .exit
I am testing this now, and will let you know.

Screen Off and Lock + Trusted Device?

I've been using Screen Off and Lock forever to lock my phone using the swipe-up-from-home-nav-button (instead of the default Google Now).
After updating to Lolipop, I started using my Moto 360 as a trusted device and enabled a PIN lock on my phone. When I lock the phone with the power button and my Moto 360 connected, no PIN screen appears when I turn the screen back on.
However, if I lock the phone using the app Screen Off and Lock, the PIN screen always comes on when I go to turn the screen back on. This defeats the whole purpose/convenience of the trusted device bypassing the PIN. Anyone know how to fix this? Or know of an app that will work better?
It hasn't been updated since January so I imagine its just an incompatibility
ragnarokx said:
I've been using Screen Off and Lock forever to lock my phone using the swipe-up-from-home-nav-button (instead of the default Google Now).
After updating to Lolipop, I started using my Moto 360 as a trusted device and enabled a PIN lock on my phone. When I lock the phone with the power button and my Moto 360 connected, no PIN screen appears when I turn the screen back on.
However, if I lock the phone using the app Screen Off and Lock, the PIN screen always comes on when I go to turn the screen back on. This defeats the whole purpose/convenience of the trusted device bypassing the PIN. Anyone know how to fix this? Or know of an app that will work better?
Click to expand...
Click to collapse
I'm on stock rooted Lollipop and I'm running into a similar issue, but with face unlock instead of trusted device.
I have double-tap on Nova Launcher set to system lock using Tasker, and when I lock my phone using that, face unlock doesn't activate, and won't until I put in my PIN password and then re-lock using the power button.
chronostorm said:
I'm on stock rooted Lollipop and I'm running into a similar issue, but with face unlock instead of trusted device.
I have double-tap on Nova Launcher set to system lock using Tasker, and when I lock my phone using that, face unlock doesn't activate, and won't until I put in my PIN password and then re-lock using the power button.
Click to expand...
Click to collapse
I also tried locking my phone using Greenify instead of Screen Off & Lock, sam result. Perhaps there is a way to implement locking the phone that won't trigger the PIN to unlock? Or - and I hope this isn't the case - maybe there is no way to do this in 5.0?
ragnarokx said:
I also tried locking my phone using Greenify instead of Screen Off & Lock, sam result. Perhaps there is a way to implement locking the phone that won't trigger the PIN to unlock? Or - and I hope this isn't the case - maybe there is no way to do this in 5.0?
Click to expand...
Click to collapse
I tried messing around with screen timeout in Tasker, but it doesn't let me set it to 0 seconds (for obvious reasons, I guess haha), since I noticed that letting my screen time out seems to work just fine for triggering face unlock. The lowest I can set it to is 7 seconds though, if I remember right, which is a bit too high for a screen off function.
ragnarokx said:
I've been using Screen Off and Lock forever to lock my phone using the swipe-up-from-home-nav-button (instead of the default Google Now).
After updating to Lolipop, I started using my Moto 360 as a trusted device and enabled a PIN lock on my phone. When I lock the phone with the power button and my Moto 360 connected, no PIN screen appears when I turn the screen back on.
However, if I lock the phone using the app Screen Off and Lock, the PIN screen always comes on when I go to turn the screen back on. This defeats the whole purpose/convenience of the trusted device bypassing the PIN. Anyone know how to fix this? Or know of an app that will work better?
Click to expand...
Click to collapse
Have the same issue, wait for developer to fix it.
Sent from my Nexus 5 using Tapatalk
Not sure this will be "fixed". All apps that are stating to lock the phone will actually do so, whether trusted devices are enabled or not. They act the same way as if you are on the lockscreen with the lock disabled by a trusted device and then press the lock symbol at the bottom, this also locks the device. This has been a problem forever, apps just work differently than the hardware power button.
As a fix you can try the following: Use another app to completely disable the lockscreen or keyguard (whatever your prefer) when a trusted device is connected instead of using the android built in feature.
If you are like me and want to use the new trusted devices feature of lollipop you can use Tasker as a workaround. Create a tasker task with the command "run shell --> input keyevent 26". This also requires root. Then you can use the app Home Button Launcher to set a shortcut to run the new task when swiping up. This is what I'm using and it works without any problem! I hope I could help.
spiderflash said:
Not sure this will be "fixed". All apps that are stating to lock the phone will actually do so, whether trusted devices are enabled or not. They act the same way as if you are on the lockscreen with the lock disabled by a trusted device and then press the lock symbol at the bottom, this also locks the device. This has been a problem forever, apps just work differently than the hardware power button.
As a fix you can try the following: Use another app to completely disable the lockscreen or keyguard (whatever your prefer) when a trusted device is connected instead of using the android built in feature.
If you are like me and want to use the new trusted devices feature of lollipop you can use Tasker as a workaround. Create a tasker task with the command "run shell --> input keyevent 26". This also requires root. Then you can use the app Home Button Launcher to set a shortcut to run the new task when swiping up. This is what I'm using and it works without any problem! I hope I could help.
Click to expand...
Click to collapse
I attached a pic of trying to do what you said in Tasker. When I run the task, nothing happens.
ragnarokx said:
I attached a pic of trying to do what you said in Tasker. When I run the task, nothing happens.
Click to expand...
Click to collapse
Have you installed the latest superSU beta? The previous versions had problems with the new security features introduced by lollipop. If you're not using this latest version my solution won't work.
spiderflash said:
Have you installed the latest superSU beta? The previous versions had problems with the new security features introduced by lollipop. If you're not using this latest version my solution won't work.
Click to expand...
Click to collapse
It worked! SuperSU beta did the trick.
Also, I didn't need a separate app to make a Home key shortcut, I just made a profile: Event -> UI -> Assistance Request -> add the Task with input keyevent 26.
Thanks!
Nothing against Screen Off and Lock as it's just doing what it's designed to do (and Lock after all) but this is a useful work around, thanks.
ragnarokx said:
It worked! SuperSU beta did the trick.
Also, I didn't need a separate app to make a Home key shortcut, I just made a profile: Event -> UI -> Assistance Request -> add the Task with input keyevent 26.
Thanks!
Click to expand...
Click to collapse
Oh yeah I forgot about that. First I tried it that way, but for some reason it didn't work, so thats why I use an external app But I'm glad it works for you!
spiderflash said:
Not sure this will be "fixed". All apps that are stating to lock the phone will actually do so, whether trusted devices are enabled or not. They act the same way as if you are on the lockscreen with the lock disabled by a trusted device and then press the lock symbol at the bottom, this also locks the device. This has been a problem forever, apps just work differently than the hardware power button.
As a fix you can try the following: Use another app to completely disable the lockscreen or keyguard (whatever your prefer) when a trusted device is connected instead of using the android built in feature.
If you are like me and want to use the new trusted devices feature of lollipop you can use Tasker as a workaround. Create a tasker task with the command "run shell --> input keyevent 26". This also requires root. Then you can use the app Home Button Launcher to set a shortcut to run the new task when swiping up. This is what I'm using and it works without any problem! I hope I could help.
Click to expand...
Click to collapse
Thanks you guys. Now I feel more at home with Lollipop with my old habit. I couldn't stand that smart lock was disabled when I used other screen off apps (then again those haven't gotten an update for a while too).
ragnarokx said:
It worked! SuperSU beta did the trick.
Also, I didn't need a separate app to make a Home key shortcut, I just made a profile: Event -> UI -> Assistance Request -> add the Task with input keyevent 26.
Thanks!
Click to expand...
Click to collapse
Yeah, there is no update yet from screen lock app developer regarding this issue ..
guess i have to use tasker trick ..
nsg86 said:
Yeah, there is no update yet from screen lock app developer regarding this issue ..
guess i have to use tasker trick ..
Click to expand...
Click to collapse
There probably won't be. The app is called "... And Lock". Technically, it's doing what its supposed to.
spiderflash said:
Not sure this will be "fixed". All apps that are stating to lock the phone will actually do so, whether trusted devices are enabled or not. They act the same way as if you are on the lockscreen with the lock disabled by a trusted device and then press the lock symbol at the bottom, this also locks the device. This has been a problem forever, apps just work differently than the hardware power button.
As a fix you can try the following: Use another app to completely disable the lockscreen or keyguard (whatever your prefer) when a trusted device is connected instead of using the android built in feature.
If you are like me and want to use the new trusted devices feature of lollipop you can use Tasker as a workaround. Create a tasker task with the command "run shell --> input keyevent 26". This also requires root. Then you can use the app Home Button Launcher to set a shortcut to run the new task when swiping up. This is what I'm using and it works without any problem! I hope I could help.
Click to expand...
Click to collapse
Was searching for a solution and i found this thread! Thanks a lot!
So no hope for people like me who don't use trusted devices/places but use trusted face? Because I think even tasker can't do that with trusted face unlock.
Also looking for a solution to this with trusted faces on lollipop.
Edit: If you're interested, you can follow the defect here: https://code.google.com/p/android/issues/detail?id=79735

[Q] Encryption: startup PIN without screen lock

I've just encrypted my Nexus 5 under Android 5.0 and I was hoping I could set a decryption PIN just for the startup boot process, and not every time I unlock my phone. I haven't managed to find a way to do this, though: it's possible to enable a startup PIN if you enable the lock screen PIN, but I don't see a way to simply enable a startup PIN.
My goal is simple: to secure my phone when it's powered off, while making it comfortable to use when it's powered on. Can this be done?
Thank you!
Not by standard. Not sure what affects using apps that turn the secure lock on and off will have. You can test them.
rootSU said:
Not by standard. Not sure what affects using apps that turn the secure lock on and off will have. You can test them.
Click to expand...
Click to collapse
OK, I will, thank you for your response.
jpabloae said:
My goal is simple: to secure my phone when it's powered off
Click to expand...
Click to collapse
When its off its already secure since no electrons flow through it...
jpabloae said:
I've just encrypted my Nexus 5 under Android 5.0 and I was hoping I could set a decryption PIN just for the startup boot process, and not every time I unlock my phone. I haven't managed to find a way to do this, though: it's possible to enable a startup PIN if you enable the lock screen PIN, but I don't see a way to simply enable a startup PIN.
My goal is simple: to secure my phone when it's powered off, while making it comfortable to use when it's powered on. Can this be done?
Thank you!
Click to expand...
Click to collapse
i'd say you want your phone to boot if you loose it (so you can track it), don't you think?
kenshin33 said:
i'd say you want your phone to boot if you loose it (so you can track it), don't you think?
Click to expand...
Click to collapse
That's reasonable in most cases. But there are situations and circumstances in which the data privacy has a higher priority than the ability to track the phone. Anyway the question can be considered independently from its motivations: can I separate the encryption key from the lock screen key? According to issue 29468 and this discussion, it seems it's still not possible.
jpabloae said:
That's reasonable in most cases. But there are situations and circumstances in which the data privacy has a higher priority than the ability to track the phone. Anyway the question can be considered independently from its motivations: can I separate the encryption key from the lock screen key? According to issue 29468 and this discussion, it seems it's still not possible.
Click to expand...
Click to collapse
according to this:
http://source.android.com/devices/tech/encryption/
out of the box, no because the lock screen password/PIN/ is used to encrypt the actual encryption key (randomly generated)
thank you very much b/c indirectly you answered the question I had (the reason I was browsing this thread), namely the boot password thinggy (as I said I'd like the phone to boot, baring an exploit, it's well protected: bootloader relocked, long password, impossible to flash anything without wiping - I sign my builds cm-12 with my own keys, and I crippled the recovery to allow only signed zips-, and no adb -even in recovery- connection outside my own computer, I installed cerberus in the system partition without a backup script, the only way to get rid of it is to explicitly format the system partition, and above all I don't trust the phone ).
that said, it should be possible may be to fiddle with vold's sources to make it so (separate passwords, it shouldn't be too hard ) the only problem in the absence of an "official" solution (be it in AOSP or the flavor du jour Android) the user is backed into a corner : build his own ROM from sources.

[Q] Lock Screen Security

Hi, I am trying improve the security on my phone, There has been a recent report about a guy who was forced to enter his unlock screen password to border officials at the airport (although he didn't comply). This is a HUGE abuse of power and an even bigger violation of privacy.
I hope never to be in that situation, but if i am i want an easy way out so i am looking for the following solutions:
Entering a secret code / Pattern on the lockscreen that would trigger a factory reset
And / Or
A secret code / Pattern on the lockscreen that would load a "dummy" home Lanucher
as far as i can tell neither exist. Any help/Advice would be great, thanks
Just enter into the guest mode?
HOW??
aniketpatil87 said:
Just enter into the guest mode?
Click to expand...
Click to collapse
How? I mean suppose that official is infront of you , how will you switch to gusest mode wihout letting him know .... i mean in power off option ?? or any other way?
What you are describing is similar to the plausible deniability mode of Truecrypt. However Android doesn't have this function natively, and I don't see how you can implement it without doing some major modification to the system.
What about bringing a secondary phone as a distraction instead?
There is already one major bug in Google Play services 7.0.97 reported by Android Police which alllows attackers to unlock the phone without any password since it takes around 15 ~ 20 seconds to re-apply the lock. Another hole seems that attackers could steal your phone if your phone just gets into the standby mode with disabled sceen. There are general known attacks with such smart-lock enabled function which allows to bypass the pin.
not sure if this is relevant , but on any phone i've owned with a 'swipe-down-status-bar' when phone is showing lock screen all i have to do is swipe the status bar down and can click on any icon to bypass lockscreen then back out of that setting , i.e. settings , apps , wifi , etc. and will be on home screen.
"all I can really do , is stay out of my own way and let the will of heaven be done"
mrrocketdog said:
not sure if this is relevant , but on any phone i've owned with a 'swipe-down-status-bar' when phone is showing lock screen all i have to do is swipe the status bar down and can click on any icon to bypass lockscreen then back out of that setting , i.e. settings , apps , wifi , etc. and will be on home screen.
"all I can really do , is stay out of my own way and let the will of heaven be done"
Click to expand...
Click to collapse
That only works if you didn't set any password lock.
I have es file manager, and i zip and password protect files or folders wich i need but dont want people finding if my phone ever gets stolen. you can check that out.
Maybe there's gonna be something I oversee, but you could (easily) do this with Tasker.
You could use tasker to make an 'app' to login with a different profile on your android. By opening that app, you go into a self-defined stealth-mode, where you disable everything you want to hide and where you open a minimal homescreen.
Tasker + Secure Settings should have all the tools you need to set it up without destroying your real security.
Maybe dual booting to an empty ROM with sdcard access removed and only a small amount of fake information down on the device?
Would not help if they decided to copy your entire devices info for a close exam but should fool most guards into thinking you don't use your phone much.
Just reboot into that ROM at any time you think anyone would ever check.

S8+ with corporate google apps device policy?

My company uses google apps and google apps device policy to manage company google accounts.
For some reason, my S8+ is failing to pass the requirement of "Password is required to start the device." So I tap on that item in the Google Device Policy app. The thing is, it IS enabled.
Then when I tap to change that setting, it brings me to the lock screen settings and I can select password input, but that doesn't satisfy the requirement. I've tried removing all security from the device, then adding the password from the app, but that didn't work either.
As a result, I can't get my work email on my phone. This is a huge problem.
What I think is happening is that Google Device Policy is trying to find the android setting of "require password on boot" but Samsung has replaced it with the lock screen security menu and that's not fulfilling the requirement.
Does anyone put their work google account on their phone, and have they encountered this problem?
Took me quite a few minutes to figure this out too. Here's the path to resolve it:
Settings > Lock screen and security > Secure startup (which is way down near the bottom)
I have mine set to PIN and that satisfied the requirement.
Hope that helps.
djHandy said:
Took me quite a few minutes to figure this out too. Here's the path to resolve it:
Settings > Lock screen and security > Secure startup (which is way down near the bottom)
I have mine set to PIN and that satisfied the requirement.
Hope that helps.
Click to expand...
Click to collapse
This worked! Thank you so much. I can't believe it was that easy.
Smatter said:
This worked! Thank you so much. I can't believe it was that easy.
Click to expand...
Click to collapse
You bet. Taping the missing requirement doesn't take you to the Secure startup which is the confusing part.
Glad I could help.

Categories

Resources