![]() |
[Announce] SIMLock - A SIM card based locking daemon
What is SIMLock?
SIMLock, or simlockd, is a small application written for the Nokia N900 that provides the ability for your phone to automatically lock itself if it detects that the SIM card has been changed. This is done using the phone's built in lock functionality and only requires that you have set a lock code on your phone. What does SIMLock do? When your phone is started up after installing SIMLock your current SIM Card's unique identifier, known as an IMSI, is stored. Each time the phone is started after that the current SIM Card's IMSI is compared to the original one. Should SIMLock find that your SIM Card's IMSI is different it will automatically lock the phone and put it into Offline Mode. Once the phone has been unlocked again SIMLock will add the current SIM Card's IMSI to the list of "allowed" IMSI numbers and it will not bother you again. Why should I use SIMLock? SIMLock provides an added level of security should your cellphone be stolen. While not being completely bulletproof the aim is to make it just that much more difficult for a thief to use your phone after he has stolen it. It is written to behave similarly to the functionality available in the Symbian UIQ phones of late and seems to function very well. Where can I get it? SIMLock is available for download here and information about the changes made to it can be found on this page. I found a bug! If you have managed to find a bug please feel free to send information about what happened to me at contact@sierrasoftworks.com or if you want to try your hand at fixing the problem yourself you can grab the source code from http://gitorious.org/simlockd. Download Install Changes Source Code AppLock This thread will now be used to discuss anything related to the development of AppLock, an application based lock for Maemo devices which has been discussed in this thread. |
Re: [Announce] SIMLock - A SIM card based locking daemon
not sure its trustworthy but Ill give it a try, thanks
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Like I said, source is up on Gitorious if you want to give it a look, just checks the IMSI number and compares it to a DB of the ones you have "authorized" before. If they aren't the same then it locks the phone using the lock DBus call. Not sure what happens if you run it without setting an unlock code though...
|
Re: [Announce] SIMLock - A SIM card based locking daemon
tried it, looks good! thanks!
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Excellent, I will be releasing a new version relatively soon that fixes a few small bugs (namely, if you don't have a SIM card inserted and unlock the phone, any subsequent boots without a SIM card will not be locked, in v0.3.0 it will be.). I also plan to make it semi-configurable, at the moment it also throws the phone into offline mode, just to make it a bit harder for someone to use SSH to crack the security. I will maybe make that optional.
If you have any ideas as to how I could improve it I would love to hear them. EDIT: Okay, the new version (0.3.0) is released. Adds a console command for the app to let you view the list of "valid" IMSI numbers and clear them if you want (i.e. start from scratch). Also, the app will now add your IMSI number to the database upon installing rather than on the phone's next boot. The latest version can still be downloaded from the link in the first post |
Re: [Announce] SIMLock - A SIM card based locking daemon
getting it into the repos will get it out there more too
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Sounds like a good idea, to be honest though it seemed like a lot of effort for such a simple application. Will see what I can do though :)
|
Re: [Announce] SIMLock - A SIM card based locking daemon
please correct me if i'm wrong but isn't this feature already there by default?
i mean, without installing anything my phone already ask for lock code each time the phone starts. and i believe sshd is not even started yet until we get pass the lock screen? anyway it's always a great work for someone giving more option to adding extra layer of security to the phone. even myself have been considering for a while whether we can encrypt our entire home directory with ecryptfs :p |
Re: [Announce] SIMLock - A SIM card based locking daemon
Hey,
it would ne great to be able to start a script, to e.g. delete something (maybe cd / and then rm -r * ;) (dont try it :D). But I don't know if this is possible at the early bootstage where it is asked for the lock code? Cheers, Blck |
Re: [Announce] SIMLock - A SIM card based locking daemon
@figaro: Not quite, this will only force you to enter the lock code IF the SIM card has been changed. The idea being that unless someone swaps out your SIM card you won't notice it.
@blck: I could get it to do so, but it is coded in Qt so I could just force a delete of everything on the phone. That being said, I think it would be a kinda risky feature to implement for the following reasons: 1. The application cannot detect if someone enters the wrong lock code, so I couldn't do a "Enter the lock code...3 retries available" unless I coded up my own lock subsystem 2. By using the built in lock system it makes it a lot more secure than an alternative method since once it gets locked the OS handles keeping it locked rather than relying on another app to do so. The reason for knocking it into offline mode is to make sure that if the app takes more time than necessary to load for some reason or other (bear in mind that because Upstart is used the OS will not wait for the app to finish before continuing to boot) it can still prevent the phone from being accessible later on in the boot process. As for whether or not it is possible to run scripts during boot, absolutely. |
Re: [Announce] SIMLock - A SIM card based locking daemon
Stupid question, if this program was used, what stops the person from re-flashing the phone?
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Can you please upload this to the Maemo.org repositories?
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
My basic idea is that a list of protected applications is maintained and whenever a protected application is opened, the phone should ask for a lock code before opening the application. Hope you could understand my idea here. Most "experts" in this community responded to my request by asking me to create and maintain a truecrypt volume or container..but this is not what I want. All I want is a lock code being asked before opening a protected application. Thanks in advance! |
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
i think that's quite doable.. if no one interested in doing this, i might consider do this myself. let's see when i get free time, i'll try to look at this |
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
I have requested for such an app since I bought my N900 and never saw something like this for maemo. I have some nosey friends who try to take a peek into my contacts and messages whenever they get hold of the phone. So this is to discourage that. Here, they can still check out my phone,but cannot open protected applications without entering the lock code. Thanks for taking this into consideration. I'll be looking forward to something like this. |
Re: [Announce] SIMLock - A SIM card based locking daemon
I was thinking of using python-dbus to listen to new started apps, but apparently no dbus signal triggered when launching an apps
anybody has an idea on how to trap a dbus method? since I can see com.nokia.HildonDesktop.AppMgr.LaunchApplication using dbus-monitor, but continuously running dbus-monitor and parse its output can quickly drain your battery AFAIK |
Re: [Announce] SIMLock - A SIM card based locking daemon
@ajack: The idea is more to discourage people from being able to use your phone without reflashing (and hence loosing all your personal data). Also, reflashing isn't the most easy thing to do for a thief not to mention they aren't all that likely to find many N900s to steal. All just designed to make their life a pain.
With regards to making an app to secure your applications. It could be possible but as figaro said, constantly checking the list of running apps will eat your battery. You could have it pause checking while the phone is locked and use some tricks to drop the number of cycles performed to see what checks have to be done (say, not checking before a certain TTY which you would have checked before). I could look into doing something like this but there will always be a workaround, a simple killall command would render it useless unless it was constantly respawned (not too hard to do) but say the app doesn't check any apps which are open before it was launched, then a killall applockerd exec contacts && disown has a chance of getting through (race condition). Once again though, it is unlikely that your friends are going to realise all of this, and either way, you are likely to have added xterm to your list of secure apps anyway. |
Re: [Announce] SIMLock - A SIM card based locking daemon
theres an app that does something similar to what ajacks after, I forget the name though!
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
If a standalone application would eat cpu cycles or battery, a hack to invoke maemo's own "Enter lock code" screen on opening these applications would also do the job. |
Re: [Announce] SIMLock - A SIM card based locking daemon
Okay, SIMLock is now in the autobuilder que, will let you all know if/when it is in extras-devel.
As for the idea of locking your phone when an app is started, it isn't the actual UI part that would chew battery power (since that would only be visible for as long as it took you to enter your code in the first place) but rather the background daemon which would have to do something like this (since there doesn't appear to be a DBus signal for "app launched"): Code:
If you'd like though, I'll code it up in Qt, should make it a little less power hungry than if it were in Python. As for keeping it running after a killall command, you could just use an event.d script that would restart it continually until the phone was turned off. EDIT: Okay, package has been built by the Autobuilder and should appear in extras-devel relatively soon. I will update this and the first post when it has been uploaded there correctly. EDIT2: Package is now available in extras-devel |
Re: [Announce] SIMLock - A SIM card based locking daemon
Version 0.5.0 released on Extras-Devel, adds the following console commands as well as fixing an upgrade issue from <=0.3.0
--add [IMSI] : Adds an IMSI to the database --remove [IMSI]: Removes an IMSI from the database Neither of these commands is documented yet however, not sure if they should be included so I'll let you guys decide and remove them if you think they aren't worth it. |
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
I'm sorry if I seem too desperate, but this is an application I really wanted on Maemo. All other platforms have apps like this and I've been requesting for such an app since I bought my N900 last year. I never got a satisfactory response till now. But when you said you could do it, my hopes are up high again. I'm patiently waiting for a release. Thanks again. Cheers! :) |
Re: [Announce] SIMLock - A SIM card based locking daemon
Hi, it should be since it will compile to native code (doesn't have to run through an interpreter). That being said it will still chow battery until I can get it to stop intelligently.
Am in the process of coding up an early version now, hopefully it will be ready for early testing in a few days time. Also, since I am coming from a Windows/.NET background it will take a bit of fiddling to figure out how to get a list of running processes (looks like I'll have to make use of /proc) but once that is done it shouldn't be too hard. May also consider making it have some DBus calls so you can pause it or start it using a shortcut or something on your desktop (you could call the lock thing anyway when you do so just to prevent them from doing it themselves) which would prevent it from sharpening its claws on your precious battery :) Will let you know when I have something to show for it. Regards, SPARTAN563 |
Re: [Announce] SIMLock - A SIM card based locking daemon
this has changed name too...... thanks for update!
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Correct, went from simlockd to simlock. Figured that since it was now a commandline app the d suffix was no longer appropriate.
Everything else however should function the same as it did before. |
Re: [Announce] SIMLock - A SIM card based locking daemon
seems that way :D
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Version 0.6.0 released on Extras-Devel
Changes are as follows: * Fixed the folder ~/.simlockd being created when it wasn't needed * Rewrote help text to make it easier to read * Added shortcuts for --add, --remove, --show and --clear commands * Rewrote event.d script, removed chmod calls, better startup time * Rewrote README file to add information about how to use SIMLock * Removed unnecessary debug code from the --show command * Lots of memory leaks have been fixed (wouldn't have been noticed) EDIT: Recommend you do not upgrade to 0.6.0 as it introduces a crash which stops the application's daemon from functioning correctly. v0.6.1 which rectifies this issue will be released within the next 45 minutes |
Re: [Announce] SIMLock - A SIM card based locking daemon
Version 0.6.1 released in Extras-Devel
Fixes a crash introduced in version 0.6.0 Fixed a spelling error in the debug output printed by the daemon |
Re: [Announce] SIMLock - A SIM card based locking daemon
v .6.1 update not showing for me...........?
|
Re: [Announce] SIMLock - A SIM card based locking daemon
Hmm, still hasn't been pushed into the actual repository yet, very strange. You can check here to see when it does, your you can install it directly from my website here
EDIT: Package is now available through Extras-Devel, not sure why it didn't get moved earlier but it seems throwing it into the build que again fixed the problem. |
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
Moreover I guess you could integrate SIMlock as a park of your App locking application like Advanced Device Locks for Symbian or Perfect AppLock for Andriod. As a result you could end up with a complete locking systen for the N900. An app which can lock apps, phone & SIM..depending usage scenario. |
Re: [Announce] SIMLock - A SIM card based locking daemon
I was considering integrating it but to be honest I think it would be nicer for people to have 2 seperate apps. I may just add a virtual package which depends on both to the repos. The reason for that is that SIMLock's daemon only tries to run until it does so successfully and then it doesn't again until you reboot next whereas the AppLock would have to run continuously.
At the moment I am trying to find the DBus signals that are emitted when the device goes into its standby state (i.e. screen gets dimmed) though I am considering just making it listen to the lock events rather. I have written up all the code for checking when apps get launched as well as parsing .desktop files to get the list of installed apps but I still need to figure out how to listen to DBus tio_application calls for certain apps (contacts, messaginge etc.) which are run as daemons in the background. Then I just need to write up a UI (am tempted to just release a console version initially). |
Re: [Announce] SIMLock - A SIM card based locking daemon
Quote:
By the way, you should also note that the contacts application can still be invoked by using the hardware qwerty keyboard. I dont know if there is anyway to disable it. But I wish there was. And about the integration part, what I meant was a more centralised locking application with deals with all the locking functionality, for example an app called "DeviceLocks" which has both your Applocker & Simlock integrated with individual settings for each. But that was just a suggestion. Releasing a standalone applocker is also fine. You are the only one in this community who actually responded to this request and understood the concept & I know there are many people out here who would really appreciate an app like this. Once again, eagerly awaiting the release of your application. cheers! :) |
Re: [Announce] SIMLock - A SIM card based locking daemon
Hmm, okay so I've been doing a lot of research and I think I've finally managed to come up with a way of monitoring applications which are launched using DBus calls.
My idea is as follows: The standard DBus launched applications set the X-Osso-Service property in their .desktop files, this is then used to launch the service based on the file contained within /usr/share/dbus-1/services So, since I can't seem to intercept method calls using QtDBus, I was thinking it would be possible to modify the service files in /usr/share/dbus-1/services to go from something like this: Code:
[D-BUS Service] Code:
[D-BUS Service] Then I would also run a background daemon which could scan constantly for any applications that were launched which don't use DBus calls and, if they are on the list of monitored apps, lock the phone. If you have a better idea though, or know how to intercept DBus calls to the top_application() function then I'd be happy to hear them. But I was also thinking, just intercepting top_application() would mean that each time the application was focused it would lock the phone, which could get VERY annoying. At least this way it should (in theory) only lock the phone when you click on the menu link or on a shortcut. Will let you know if it does work as expected or if it just ends up dying horribly :) |
Re: [Announce] SIMLock - A SIM card based locking daemon
Okay, here is a new thread for discussing anything related to AppLock and its development.
http://talk.maemo.org/showthread.php...50#post1037350 So far the following functionality is available in my dev build:
|
All times are GMT. The time now is 15:46. |
vBulletin® Version 3.8.8