The Following User Says Thank You to devbike For This Useful Post: | ||
|
2009-11-11
, 09:22
|
Posts: 3,841 |
Thanked: 1,079 times |
Joined on Nov 2006
|
#52
|
|
2009-11-11
, 10:06
|
Posts: 263 |
Thanked: 679 times |
Joined on Apr 2008
@ Lyon, France
|
#53
|
Not entirely hard to get the IMEI in C - for the N900 - at least:
Code:#define SIM_DBUS_NAME "com.nokia.phone.SIM" #define SIM_DBUS_IFACE "Phone.Sim.Security" #define SIM_DBUS_PATH "/com/nokia/phone/SIM/security" #define SIM_IMEI_SIG "get_imei"
|
2009-11-11
, 10:44
|
Posts: 2,802 |
Thanked: 4,491 times |
Joined on Nov 2007
|
#54
|
sysinfo-tool -g /certs/npc/esn/gsm
The Following 6 Users Say Thank You to lma For This Useful Post: | ||
|
2009-11-11
, 11:37
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#55
|
/* gcc -Wall imsi_example.c -o imsi_example `pkg-config --cflags --libs glib-2.0 dbus-glib-1` */ #include <stdlib.h> #include <glib.h> #include <glib/gprintf.h> #include <dbus/dbus-glib.h> #define SIM_DBUS_NAME "com.nokia.phone.SIM" #define SIM_DBUS_IFACE "Phone.Sim" #define SIM_DBUS_PATH "/com/nokia/phone/SIM" #define SIM_IMSI_SIG "get_imsi" static gchar* get_imsi(DBusGConnection *connection) { GError *error = NULL; DBusGProxy *proxy; gchar *imsi = NULL; guint32 tmp1; g_return_val_if_fail(connection, imsi); proxy = dbus_g_proxy_new_for_name(connection, SIM_DBUS_NAME, SIM_DBUS_PATH, SIM_DBUS_IFACE); if (!dbus_g_proxy_call(proxy, SIM_IMSI_SIG, &error, G_TYPE_INVALID, G_TYPE_STRING, &imsi, G_TYPE_INT, &tmp1, G_TYPE_INVALID)) { if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_REMOTE_EXCEPTION) g_printerr("Caught remote method exception %s: %s", dbus_g_error_get_name(error), error->message); else g_printerr("Failed to call method: %s\n", error->message); g_clear_error(&error); } g_object_unref(proxy); return imsi; } int main(void) { GError *error = NULL; DBusGConnection *connection; gchar* imsi; g_type_init(); connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); if (!connection) { g_printerr("Failed to open connection to system bus: %s\n", error->message); g_clear_error(&error); return EXIT_FAILURE; } imsi = get_imsi(connection); (void) g_printf("%s\n", imsi ? imsi : "Failed to retrieve IMSI\n"); if (!imsi) return EXIT_FAILURE; g_free(imsi); return EXIT_SUCCESS; }
|
2009-11-11
, 12:11
|
|
Posts: 1,217 |
Thanked: 446 times |
Joined on Oct 2009
@ Bedfordshire, UK
|
#56
|
Good idea, but kinda overkill Don't Nokia devices have a unique ID somewhere? Would be surprised if they didn't.
|
2009-11-11
, 12:14
|
|
Posts: 1,217 |
Thanked: 446 times |
Joined on Oct 2009
@ Bedfordshire, UK
|
#57
|
How is the IMSI protected ?
Carriers usually don't care about the IMEI cause they let you change your phone (my understanding) but the IMSI is your account number which links to your usage, etc...
It would probably be easy to find where the IMEI is sent and change it on the fly with some LD_PRELOAD or other techniques, but I'm guessing that the IMSI is in the smart card and has some form of crypto handshake with the provider?
Or is this just a receipt for fun^W disaster?
EDIT: http://en.wikipedia.org/wiki/IMSI-catcher
Also interesting, we should make sure the N900 show that (!) when it's not using encryption!
Also interesting: http://www.gsm-security.net
EDIT2: Uhm, of course there is a handshake, no multi-IMSI backup for multi-line use hehe (unless someone give you the key stored in the SIM, which, won't happen! ;-)
But still, changing the IMEI could be useful for those stuck with data plans tied to a specific device!
|
2009-11-11
, 17:55
|
Posts: 13 |
Thanked: 5 times |
Joined on Oct 2009
|
#58
|
If manufacturers start duplicating MAC addresses in manufacturing runs then a lot of customers would end up with tons of problems. It sounds unlikely to me that they do, or customers would have raised hell by now. We would have had trouble at work, as we buy batches of computers all the time. We don't fiddle with the MAC address. We register them though, then we plug all the new boxes into the network. No dups so far..
If a practice of producing equipment with unchanging MAC addresses exists then it doesn't seem to be followed by vendors like HP or Dell, at least.
|
2009-11-12
, 09:21
|
Posts: 3,841 |
Thanked: 1,079 times |
Joined on Nov 2006
|
#59
|
We haven't *actually* exceeded the entire 2^48 address space. I can guarantee you that 3com has made more than 16M NICs since the beginning of time - but they have 23 OUIs to spread things around. The original *intention* was to have everything be unique...but that would require everyone playing by rules that don't actually exist. The reality is that MAC address are reused within a single mfr. I saw a handful of dupes in a shipment of 200+ 10bT NICs 15 years ago - and if I'm remembering correctly they were 3com 3c509's...not exactly some no-name brand from China.
It's still not a real problem. Your MAC address doesn't make it past the very first router it hits. It does, however, make it a poor choice for globally identifying a piece of hardware. In this case, IMEI / IMSI is the way to go.
Last edited by devbike; 2009-11-11 at 00:25.